Msvm_DiskDrive class

Represents a hard disk drive inside of a virtual machine. This hard disk drive can be either a pass-through device (if a physical hard disk was attached to the virtual machine) or a synthetic device that is populated with virtual hard disk media. Because virtual and physical hard disks can be added and removed from the virtual machine, there are two resource pools associated with this class, one for pass-through hard disks and the other for virtual hard disks. Hard disks can only be added to or removed from the virtual SCSI controller when the virtual machine is online. Disks can only be added to or removed from the virtual IDE controller when the virtual machine is offline.

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

Syntax

[Dynamic, Provider("VmmsWmiInstanceAndMethodProvider"), AMENDMENT]
class Msvm_DiskDrive : CIM_DiskDrive
{
  string   InstanceID;
  string   Caption;
  string   Description;
  string   ElementName;
  datetime InstallDate;
  string   Name;
  uint16   OperationalStatus[];
  string   StatusDescriptions[];
  string   Status;
  uint16   HealthState = 5;
  uint16   CommunicationStatus;
  uint16   DetailedStatus;
  uint16   OperatingStatus;
  uint16   PrimaryStatus;
  uint16   EnabledState = 2;
  string   OtherEnabledState;
  uint16   RequestedState;
  uint16   EnabledDefault;
  datetime TimeOfLastStateChange;
  uint16   AvailableRequestedStates[];
  uint16   TransitioningToState;
  string   SystemCreationClassName;
  string   SystemName;
  uint16   CreationClassName;
  string   DeviceID;
  boolean  PowerManagementSupported;
  uint16   PowerManagementCapabilities[];
  uint16   Availability;
  uint16   StatusInfo;
  uint32   LastErrorCode;
  string   ErrorDescription;
  boolean  ErrorCleared;
  string   OtherIdentifyingInfo[];
  uint64   PowerOnHours;
  uint64   TotalPowerOnHours;
  string   IdentifyingDescriptions[];
  uint16   AdditionalAvailability[] = { 6 };
  uint64   MaxQuiesceTime;
  uint16   Capabilities[];
  string   CapabilityDescriptions[];
  string   ErrorMethodology = "None";
  string   CompressionMethod = "Not Compressed";
  uint32   NumberOfMediaSupported = 1;
  uint64   MaxMediaSize = 2000000000;
  uint64   DefaultBlockSize = 512;
  uint64   MaxBlockSize;
  uint64   MinBlockSize = 512;
  boolean  NeedsCleaning = False;
  boolean  MediaIsLocked = True;
  uint16   Security = 3;
  datetime LastCleaned;
  uint64   MaxAccessTime = 0;
  uint32   UncompressedDataRate;
  uint64   LoadTime = 0;
  uint64   UnloadTime = 0;
  uint64   MountCount = 0;
  datetime TimeOfLastMount;
  uint64   TotalMountTime = 0;
  string   UnitsDescription;
  uint64   MaxUnitsBeforeCleaning = 0xffffffffffffffff;
  uint64   UnitsUsed = 0;
  uint32   DriveNumber;
};

Members

The Msvm_DiskDrive class has these types of members:

Methods

The Msvm_DiskDrive class has these methods.

Method Description
EnableDevice This method is not supported.
LockMedia Locks or releases the media.
OnlineDevice This method is not supported.
QuiesceDevice This method is not supported.
RequestStateChange Requests a state change.
Reset Resets the virtual device.
RestoreProperties This method is not supported.
SaveProperties This method is not supported.
SetPowerState This method is not supported.

Properties

The Msvm_DiskDrive class has these properties.

AdditionalAvailability

Data type: uint16 array

Access type: Read-only

This property is inherited from CIM_LogicalDevice, and it is set to 6 (Not Applicable).

Availability

Data type: uint16

Access type: Read-only

This property is inherited from CIM_LogicalDevice.

AvailableRequestedStates

Data type: uint16 array

Access type: Read-only

Indicates the possible values for the RequestedState parameter of the RequestStateChange method. This property is inherited from CIM_EnabledLogicalElement.

Capabilities

Data type: uint16 array

Access type: Read-only

The capabilities of the media access device. This property is inherited from CIM_MediaAccessDevice, and it is set to the following values.

Value Meaning
3
The corresponding entry in CapabilityDescriptions is "Random Access".
4
The corresponding entry in CapabilityDescriptions is "Supports Writing".

CapabilityDescriptions

Data type: string array

Access type: Read-only

An array of free-form strings that provides detailed explanations for access device features indicated in the Capabilities property array. Each entry of this array is related to the entry in the Capabilities property array, located at the same index. This property is inherited from CIM_MediaAccessDevice.

Caption

Data type: string

Access type: Read-only

A short description of the object. This property is inherited from CIM_ManagedElement.

CommunicationStatus

Data type: uint16

Access type: Read-only

Indicates the ability of the instrumentation to communicate with the underlying managed element. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

Not Available (1)

Communication OK (2)

Lost Communication (3)

No Contact (4)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

CompressionMethod

Data type: string

Access type: Read-only

A string that indicates the algorithm or tool used to compress the logical file. If the compression scheme is unknown or not described, use "Unknown". If the logical file is compressed, but the compression scheme is unknown or not described, use "Compressed". If the logical file is not compressed, use "Not Compressed". This property is inherited from CIM_MediaAccessDevice, and it is set to "Not Compressed".

CreationClassName

Data type: uint16

Access type: Read-only

The name of the class or subclass used in the creation of an instance. This property is inherited from CIM_LogicalDevice.

DefaultBlockSize

Data type: uint64

Access type: Read-only

The default block size, in bytes, for the device. This property is inherited from CIM_MediaAccessDevice, and it is set to 512.

Description

Data type: string

Access type: Read-only

A description of the object. This property is inherited from CIM_ManagedElement.

DetailedStatus

Data type: uint16

Access type: Read-only

Compliments the PrimaryStatus property with additional status detail. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Not Available (0)

No Additional Information (1)

Stressed (2)

Predictive Failure (3)

Non-Recoverable Error (4)

Supporting Entity in Error (5)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

DeviceID

Data type: string

Access type: Read-only

An address or other identifying information to uniquely name the logical device. This property is inherited from CIM_LogicalDevice.

DriveNumber

Data type: uint32

Access type: Read-only

The number of the physical drives on the hosting computer system.

ElementName

Data type: string

Access type: Read-only

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

EnabledDefault

Data type: uint16

Access type: Read-only

An administrator's default or startup configuration for the enabled state of an element. This property is inherited from CIM_EnabledLogicalElement.

EnabledState

Data type: uint16

Access type: Read-only

The enabled and disabled states of an element. It can also indicate the transitions between these requested states. This property is inherited from CIM_EnabledLogicalElement.

Value Meaning
Unknown
0
The state of the element could not be determined.
Other
1
Enabled
2
The element is running.
Disabled
3
The element is turned off.
Shutting Down
4
The element is in the process of going to a Disabled state.
Not Applicable
5
The element does not support being enabled or disabled.
Enabled but Offline
6
The element might be completing commands, and it will drop any new requests.
In Test
7
The element is in a test state.
Deferred
8
The element might be completing commands, but it will queue any new requests.
Quiesce
9
The element is enabled, but it is in a restricted mode. The behavior of the element is similar to the Enabled state (2), but it processes only a restricted set of commands. All other requests are queued.
Starting
10
The element is in the process of going to an Enabled state (2). New requests are queued.

ErrorCleared

Data type: boolean

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

ErrorDescription

Data type: string

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

ErrorMethodology

Data type: string

Access type: Read-only

A string that describes the types of error detection and correction supported by this device. This property is inherited from CIM_MediaAccessDevice, and it is set to "None".

HealthState

Data type: uint16

Access type: Read-only

The current health of the element. This attribute expresses the health of this element but not necessarily that of its subcomponents. The possible values are 0 to 30, where 5 means the element is entirely healthy and 30 means the element is completely nonfunctional. This property is inherited from CIM_ManagedSystemElement, and it is always set to 5.

IdentifyingDescriptions

Data type: string array

Access type: Read-only

This property is inherited from CIM_LogicalDevice, and it is set to Null.

InstallDate

Data type: datetime

Access type: Read-only

The date and time the virtual machine configuration was created. This property is inherited from CIM_ManagedSystemElement.

InstanceID

Data type: string

Access type: Read-only

Qualifiers: Key

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

LastCleaned

Data type: datetime

Access type: Read-only

The date and time when the device was last cleaned. This property is inherited from CIM_MediaAccessDevice, and it is set to Null.

LastErrorCode

Data type: uint32

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

LoadTime

Data type: uint64

Access type: Read-only

The time, in milliseconds, from load to being able to read or write a media. For example, for disk drives, this is the interval between a disk not spinning to the disk reporting that it is ready for read/write (that is, the disk spinning at nominal speeds). For tape drives, this is the time from a media being injected to reporting that it is ready for an application. This is usually at the tape's BOT area. This property is inherited from CIM_MediaAccessDevice and it is set to 0.

MaxAccessTime

Data type: uint64

Access type: Read-only

The time, in milliseconds, to move from the first location on the media to the location that is furthest with respect to time. For a disk drive, this represents full seek and full rotational delay. For tape drives, this represents a search from the beginning of the tape to the most physically distant point. (The end of a tape may be at its most physically distant point, but this is not necessarily true.) This property is inherited from CIM_MediaAccessDevice, and it is set to 0.

MaxBlockSize

Data type: uint64

Access type: Read-only

The maximum block size, in bytes, for media accessed by the device. This property is inherited from CIM_MediaAccessDevice, and it is set to 512 for virtual hard disk drives, variable for pass-through drives.

MaxMediaSize

Data type: uint64

Access type: Read-only

The maximum size, in kilobytes, of media supported by this device. Kilobytes are interpreted as the number of bytes multiplied by 1000 (not the number of bytes multiplied by 1024). This property is inherited from CIM_MediaAccessDevice, and it is set to 2,000,000,000 for virtual hard disk drives, variable for pass-through drives.

MaxQuiesceTime

Data type: uint64

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

MaxUnitsBeforeCleaning

Data type: uint64

Access type: Read-only

The maximum units that can be used before the device should be cleaned. This property is inherited from CIM_MediaAccessDevice, and it is set to 0xffffffffffffffff.

MediaIsLocked

Data type: boolean

Access type: Read-only

True if the media is locked in the device and cannot be ejected; otherwise, False. This property is inherited from CIM_MediaAccessDevice, and it is set to True.

MinBlockSize

Data type: uint64

Access type: Read-only

The minimum block size, in bytes, for media accessed by the device. This property is inherited from CIM_MediaAccessDevice, and it is set to 512.

MountCount

Data type: uint64

Access type: Read-only

For a device that supports removable media, the number of times that media have been mounted for data transfer or to clean the device. For devices accessing nonremovable media, such as hard disks, this property is not applicable and should be set to 0. This property is inherited from CIM_MediaAccessDevice, and it is set to 0.

Name

Data type: string

Access type: Read-only

The label by which the object is known. This property is inherited from CIM_ManagedSystemElement.

NeedsCleaning

Data type: boolean

Access type: Read-only

True if the media access device needs cleaning; otherwise, False. This property is inherited from CIM_MediaAccessDevice, and it is set to False.

NumberOfMediaSupported

Data type: uint32

Access type: Read-only

The maximum number of multiple individual media that can be supported or inserted. This property is inherited from CIM_MediaAccessDevice, and it is set to 1.

OperatingStatus

Data type: uint16

Access type: Read-only

Provides current status information for the operational condition of the element and can be used for providing more detail with respect to the value of the EnabledState property. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

Not Available (1)

Servicing (2)

Starting (3)

Stopping (4)

Stopped (5)

Aborted (6)

Dormant (7)

Completed (8)

Migrating (9)

Emigrating (10)

Immigrating (11)

Snapshotting (12)

Shutting Down (13)

In Test (14)

Transitioning (15)

In Service (16)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

OperationalStatus

Data type: uint16 array

Access type: Read-only

The current statuses of the object. This property is inherited from CIM_ManagedSystemElement.

OtherEnabledState

Data type: string

Access type: Read-only

The enabled or disabled state of the element when the EnabledState property is set to 1 (Other). This property must be set to Null when EnabledState is any value other than 1. This property is inherited from CIM_EnabledLogicalElement, and it is always set to Null.

OtherIdentifyingInfo

Data type: string array

Access type: Read-only

This property is inherited from CIM_LogicalDevice, and it is set to Null.

PowerManagementCapabilities

Data type: uint16 array

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

PowerManagementSupported

Data type: boolean

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

PowerOnHours

Data type: uint64

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

PrimaryStatus

Data type: uint16

Access type: Read-only

Provides high level status information. This property should be used in conjunction with the DetailedStatus property to provide high level and detailed health status of the element and its subcomponents. A Null value indicates that this property is not implemented. This property is inherited from CIM_ManagedSystemElement.

Unknown (0)

OK (1)

Degraded (2)

Error (3)

DMTF Reserved (..)

Vendor Reserved (0x8000.. )

RequestedState

Data type: uint16

Access type: Read-only

The last requested or desired state for the element. The actual state of the element is represented by EnabledState. This property is provided to compare the last requested and current enabled or disabled states. A particular instance of CIM_EnabledLogicalElement might not support the RequestStateChange method. If this occurs, the value 12 (Not Applicable) is used. This property is inherited from CIM_EnabledLogicalElement.

Security

Data type: uint16

Access type: Read-only

The operational security defined for the device. This property is inherited from CIM_MediaAccessDevice, and it is set to 3 (None).

Status

Data type: string

Access type: Read-only

This property is inherited from CIM_ManagedSystemElement, but it is not used.

StatusDescriptions

Data type: string array

Access type: Read-only

Strings that describe the various OperationalStatus array values. This property is inherited from CIM_ManagedSystemElement.

StatusInfo

Data type: uint16

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

SystemCreationClassName

Data type: string

Access type: Read-only

The scoping system's creation class name. This property is inherited from CIM_LogicalDevice.

SystemName

Data type: string

Access type: Read-only

The unique identifier for the scoping virtual machine. This property is inherited from CIM_LogicalDevice.

TimeOfLastMount

Data type: datetime

Access type: Read-only

For a device that supports removable media, the most recent date and time that media was mounted on the device. For devices accessing nonremovable media, such as hard disks, this property has no meaning and is not applicable. This property is inherited from CIM_MediaAccessDevice, and it is set to Null.

TimeOfLastStateChange

Data type: datetime

Access type: Read-only

The date or time when the enabled state of the element last changed. This property is inherited from CIM_EnabledLogicalElement, and it is always set to "NULL".

TotalMountTime

Data type: uint64

Access type: Read-only

For a device that supports removable media, the total time (in seconds) that media have been mounted for data transfer or to clean the device. For devices accessing nonremovable media, such as hard disks, this property is not applicable and should be set to 0. This property is inherited from CIM_MediaAccessDevice, and it is set to 0.

TotalPowerOnHours

Data type: uint64

Access type: Read-only

This property is inherited from CIM_LogicalDevice, but it is not used.

TransitioningToState

Data type: uint16

Access type: Read-only

Indicates the target state to which the instance is transitioning. This property is inherited from CIM_EnabledLogicalElement.

UncompressedDataRate

Data type: uint32

Access type: Read-only

The sustained data transfer rate in KB/sec that the device can read from and write to a media. This is a sustained, raw data rate. Maximum rates or rates assuming compression should not be reported in this property. This property is inherited from CIM_MediaAccessDevice, and it is set to Null.

UnitsDescription

Data type: string

Access type: Read-only

The units relative to its use in MaxUnitsBeforeCleaning. This property is inherited from CIM_MediaAccessDevice, and it is set to Null.

UnitsUsed

Data type: uint64

Access type: Read-only

The current number of units used. This property is inherited from CIM_MediaAccessDevice, and it is set to 0.

UnloadTime

Data type: uint64

Access type: Read-only

The time, in milliseconds, from being able to read or write a media to its unload. This property is inherited from CIM_MediaAccessDevice, and it is set to 0.

Remarks

Access to the Msvm_DiskDrive class might be restricted by UAC Filtering. For more information, see User Account Control and WMI.

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_DiskDrive

CIM_DiskDrive

Storage Classes