Msvm_VirtualHardDiskSettingData class

Provides setting data for a virtual hard disk.

The following syntax is simplified Managed Object Format (MOF) code, and it includes all of the inherited properties.

Syntax

[AMENDMENT]
class Msvm_VirtualHardDiskSettingData : CIM_SettingData
{
  string   InstanceID;
  string   Caption = "Virtual Hard Disk Setting Data";
  string   Description = "Setting Data for a Virtual Hard Disk";
  string   ElementName;
  uint16   Type;
  uint16   Format;
  string   Path;
  string   ParentPath;
  DATETIME ParentTimestamp;
  string   ParentIdentifier;
  uint64   MaxInternalSize;
  uint32   BlockSize;
  uint32   LogicalSectorSize;
  uint32   PhysicalSectorSize;
  string   VirtualDiskId;
  uint64   DataAlignment;
  uint16   PmemAddressAbstractionType;
  boolean  IsPmemCompatible;
};

Members

The Msvm_VirtualHardDiskSettingData class has these types of members:

Properties

The Msvm_VirtualHardDiskSettingData class has these properties.

BlockSize

Data type: uint32

Access type: Read/write

The block size used by the virtual hard disk, in bytes.

Caption

Data type: string

Access type: Read-only

A short description of the object. This property is inherited from CIM_ManagedElement, and it is always set to "Virtual Hard Disk Setting Data".

DataAlignment

Data type: uint64

Access type: Read/write

Specifies the desired alignment, in bytes, for the data payload of the virtual disk

Note

Added in Windows 10, version 1709.

Description

Data type: string

Access type: Read-only

A description of the object. This property is inherited from CIM_ManagedElement, and it is always set to "Setting Data for a Virtual Hard Disk".

ElementName

Data type: string

Access type: Read-only

A display name for the object. This property is inherited from CIM_ManagedElement.

Format

Data type: uint16

Access type: Read/write

The format for the virtual hard disk. This will be one of the following values.

VHD (2)

VHDX (3)

VHDSet (4)

Note

Added in Windows 10 and Windows Server 2016.

InstanceID

Data type: string

Access type: Read-only

Qualifiers: Key

Uniquely identifies an instance of this class. This property is inherited from CIM_SettingData.

IsPmemCompatible

Data type: boolean

Access type: Read/write

Specifies whether the virtual disk can be used as the backing store for a persistent memory device.

Note

Added in Windows 10, version 1709.

LogicalSectorSize

Data type: uint32

Access type: Read/write

The logical sector size used by the virtual hard disk, in bytes.

MaxInternalSize

Data type: uint64

Access type: Read/write

The maximum size of the virtual hard disk as viewable by the virtual machine, in bytes. This size will be rounded up to the next largest multiple of the sector size.

ParentIdentifier

Data type: string

Access type: Read-only

The GUID used to uniquely identify the parent of the virtual hard disk. If the virtual hard disk does not have a parent, then this field is empty.

Note

Added in Windows 10 and Windows Server 2016.

ParentPath

Data type: string

Access type: Read/write

The parent of the virtual hard disk. If the virtual hard disk does not have a parent, then this property is empty.

ParentTimestamp

Data type: DATETIME

Access type: Read-only

The timestamp of the parent of the virtual hard disk. If the virtual hard disk does not have a parent, then this field is empty.

Note

Added in Windows 10 and Windows Server 2016.

Path

Data type: string

Access type: Read/write

The fully qualified path of the virtual hard disk.

PhysicalSectorSize

Data type: uint32

Access type: Read/write

The physical sector size used by the virtual hard disk, in bytes.

PmemAddressAbstractionType

Data type: uint16

Access type: Read/write

The persistent memory address abstraction method to be used with this virtual disk.

Note

Added in Windows 10, version 1709.

None (0)

BTT (1)

Unknown (65535)

Type

Data type: uint16

Access type: Read/write

The type of virtual hard disk. This will be one of the following values.

Fixed (2)

Dynamic (3)

Differencing (4)

VirtualDiskId

Data type: string

Access type: Read/write

The GUID that is used to uniquely identify the virtual disk.

When the Msvm_ImageManagementService.GetVirtualHardDiskSettingData method returns an instance of Msvm_VirtualHardDiskSettingData, the client can use this property to get the unique disk ID of the VHD.

On conflict detection or otherwise, a client can set the VirtualDiskId value to a new GUID and pass this Msvm_VirtualHardDiskSettingData instance to the Msvm_ImageManagementService.SetVirtualHardDiskSettingData method to change the disk ID of the VHD. If the VHD is not a VHDX VHD, or if the VHD is attached, the operation fails. The operation also fails if the passed value is malformed, that is, not a GUID or has all 0s. The operation silently succeeds if the passed value is the same as the current disk ID.

Errors generated by the SetVirtualDiskInformation function are bubbled up through this property. A client can also use the same mechanism to provide the VirtualDiskId value at VHD creation via the Msvm_ImageManagementService.CreateVirtualHardDisk method in the same namespace. This can be used to create VHD1 or VHD2 VHDs.

Windows 8.1: This value is not supported until Windows 8.1 and Windows Server 2012 R2.

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
Namespace
Root\Virtualization\V2
MOF
WindowsVirtualization.V2.mof
DLL
Vmms.exe

See also

CIM_SettingData

GetVirtualHardDiskSettingData