Condividi tramite


VmId

Provides the GUID that identifies the Virtual Machine. The following table summarizes the attributes of the VmId property.

Attribute Value
Data type
Null-terminated Unicode string containing a GUID
Access
Read/write
Status
Required
Structure
CLUSPROP_SZ
Minimum
NULL
Maximum
see Maximum String Size
Default
NULL

Remarks

The CLUSPROP_SZ_DECLARE macro creates a CLUSPROP_SZ structure with an array of the correct size.

Examples

The property value portion of a property list entry for VmId can be set with the following example code.

WCHAR                szVmIdData[] = L"30f163fa-f38d-45b5-b163-8f9c8071c72d";
CLUSPROP_SZ_DECLARE( VmIdValue, sizeof(szVmIdData) / sizeof(WCHAR) );

VmIdValue.Syntax.dw = CLUSPROP_SYNTAX_LIST_VALUE_SZ;
VmIdValue.cbLength  = sizeof( szVmIdData );
StringCbCopy( VmIdValue.sz, VmIdValue.cbLength, szVmIdData );

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008 Datacenter, Windows Server 2008 Enterprise

See also

Virtual Machine Private Properties

CLUSPROP_SZ

CLUSPROP_SZ_DECLARE