Share via


IVMVirtualMachine::BIOSGUID property

The BIOSGUID property contains the BIOS GUID.

This property is read/write.

Syntax

HRESULT put_BIOSGUID(
  [in]  BSTR biosGUID
);

HRESULT get_BIOSGUID(
  [out] BSTR *biosGUID
);

VB
VMVirtualMachine.BIOSGUID( _
  ByRef biosGUID, _
  ByVal biosGUID _
)

Property value

The BIOS GUID.

This property value is read/write.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The biosGUID parameter is NULL.
E_INVALIDARG
The biosGUID parameter is not valid or is an empty string.
VM_E_VM_UNKNOWN
The configuration is unknown.
DISP_E_EXCEPTION
An unexpected error has occurred.

Remarks

This property will not contain valid information until after the virtual machine has started up for the first time. An empty string will be returned if it is read before the initial startup.

The BIOS GUID string is specified and returned using the following format (the actual value shown is only an example): {a18ad063-1678-43cb-baea-c954b581578c}. The left and right braces around the hex digits, as well as the hex digit groupings, are required.

Examples

The following example displays the BIOSGUID property value of a VMVirtualMachine object.

Set objVS = CreateObject("VirtualServer.Application")
Set objVM = objVS.FindVirtualMachine("Windows Server 2003")

Wscript.Echo "VM Name: " & objVM.Name
If objVM.BIOSGUID = "" Then
    WScript.Echo "BIOS GUID: [null]"
Else
    WScript.Echo "BIOS GUID: " & objVM.BIOSGUID
End If

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMVirtualMachine