MSFT_VirtualDisk class
Represents a subsystem storage volume.
The following syntax is simplified from Managed Object Format (MOF) code.
Syntax
class MSFT_VirtualDisk : MSFT_StorageObject
{
String FriendlyName;
String Name;
UInt16 NameFormat;
UInt16 UniqueIdFormat;
String UniqueIdFormatDescription;
UInt16 Usage;
String OtherUsageDescription;
UInt16 HealthStatus;
UInt16 OperationalStatus[];
String OtherOperationalStatusDescription;
String ResiliencySettingName;
UInt64 Size;
UInt64 AllocatedSize;
UInt64 LogicalSectorSize;
UInt64 PhysicalSectorSize;
UInt64 FootprintOnPool;
UInt16 ProvisioningType;
UInt16 NumberOfDataCopies;
UInt16 PhysicalDiskRedundancy;
UInt16 ParityLayout;
UInt16 NumberOfColumns;
UInt64 Interleave;
Boolean RequestNoSinglePointOfFailure;
UInt16 Access;
Boolean IsSnapshot;
Boolean IsManualAttach;
Boolean IsDeduplicationEnabled;
Boolean IsEnclosureAware;
UInt16 NumberOfAvailableCopies;
UInt16 DetachedReason;
UInt64 WriteCacheSize;
};
Members
The MSFT_VirtualDisk class has these types of members:
Methods
The MSFT_VirtualDisk class has these methods.
Method | Description |
---|---|
AddPhysicalDisk | Adds one or more physical disks for manual allocation. |
Attach | Attaches the virtual disk. |
CreateClone | Creates a new virtual disk that is a clone of the existing virtual disk. |
CreateReplica | Creates a replication relationship between virtual disks. |
CreateSnapshot | Creates a clone of a virtual disk, resulting in a new virtual disk whose data is identical to that of the original virtual disk. |
DeleteObject | Deletes the virtual disk. |
Detach | Detaches the virtual disk. |
GetSecurityDescriptor | Retrieves the security descriptor that controls access to the virtual disk object instance. |
Hide | Hides the virtual disk. |
RemovePhysicalDisk | Removes one or more physical disks from manual allocation. |
Repair | Initiates a repair of the virtual disk, restoring data and redundancy to different (or new) physical disks within the storage pool. |
Resize | Resizes the virtual disk. |
SetAttributes | Sets or updates various attributes for the virtual disk. |
SetFriendlyName | Sets the friendly name for the virtual disk. |
SetReplicationRelationship | Sets the replication relationship between virtual disks. |
SetSecurityDescriptor | Sets the security descriptor that controls access to the virtual disk object instance. |
SetUsage | Sets the intended usage for the virtual disk. |
Show | Exposes the virtual disk. |
Properties
The MSFT_VirtualDisk class has these properties.
Access
Data type: UInt16
Access type: Read-only
Indicates whether the virtual disk is available for read and write access.
Unknown (0)
Readable (1)
Writeable (2)
Read/Write (3)
Write Once (4)
AllocatedSize
Data type: UInt64
Access type: Read-only
Qualifiers: Required, Units ("Bytes")
The currently allocated size of the virtual disk. If the virtual disk's ProvisioningType is Fixed, AllocatedSize should equal Size. If the ProvisioningType is Thin, this value is the amount of space actually allocated (which must be less than Size).
DetachedReason
Data type: UInt16
Access type: Read-only
The reason why this virtual disk is detached. This property will only be set when the virtual disk's OperationalStatus includes Detached. Note that this field is specific to storage spaces.
Unknown (0)
None (1)
By Policy (2)
Majority Disks Unhealthy (3)
Incomplete (4)
FootprintOnPool
Data type: UInt64
Access type: Read-only
Qualifiers: Units ("Bytes")
The total storage pool capacity, in bytes, that is being consumed by this virtual disk. For example, in the case of a 2-way mirrored virtual disk whose size is 1 GB, the footprint in the pool would be approximately 2 GB.
FriendlyName
Data type: String
Access type: Read-only
Qualifiers: Required
A user-settable, display oriented string containing the name of the virtual disk.
HealthStatus
Data type: UInt16
Access type: Read-only
Qualifiers: Required
The health status of the virtual disk.
Health of a virtual disk is derived from the health of the backing physical disks, and whether or not the virtual disk can maintain the required levels of resiliency.
Value | Meaning |
---|---|
Healthy 0 | All physical disks are present and in a healthy state. |
Warning 1 | The majority of physical disks are healthy, but one or more may be failing I/O requests. |
Unhealthy 2 | The majority of physical disks are unhealthy or in a failed state, and the virtual disk no longer has data integrity. |
Unknown 5 | The health status is unknown. |
Interleave
Data type: UInt64
Access type: Read-only
The number of bytes that will form a strip in common striping-based resiliency settings. The strip is defined as the size of the portion of a stripe that lies on one physical disk. Thus Interleave * NumberOfColumns will yield the size of one stripe of user data.
IsDeduplicationEnabled
Data type: Boolean
Access type: Read/write
TRUE if data deduplication is enabled for the virtual disk.
IsEnclosureAware
Data type: Boolean
Access type: Read-only
The current allocation behavior for this virtual disk. Enclosure-aware virtual disks will intelligently pick the physical disks to use for their redundancy. If TRUE, the virtual disk will attempt to use physical disks from different enclosures to balance the fault tolerance between two or more physical enclosures.
IsManualAttach
Data type: Boolean
Access type: Read/write
TRUE if this virtual disk will only be attached to the system if an explicit call is made to the Attach method. Note that this property is specific to storage spaces.
IsSnapshot
Data type: Boolean
Access type: Read-only
TRUE if this virtual disk is a shadow copy of another virtual disk.
LogicalSectorSize
Data type: UInt64
Access type: Read-only
Qualifiers: Units ("Bytes")
The logical sector size of the virtual disk, in bytes.
Name
Data type: String
Access type: Read-only
Qualifiers: Required
A semi-unique (scoped to the owning storage subsystem), human-readable string that is used to identify the virtual disk.
NameFormat
Data type: UInt16
Access type: Read-only
Qualifiers: Required
The format of the Name property.
Unknown (0)
Other (1)
VPD83NAA6 (2)
VPD83NAA5 (3)
VPD83Type2 (4)
VPD83Type1 (5)
VPD83Type0 (6)
SNVM (7)
NodeWWN (8)
NAA (9)
EUI64 (10)
T10VID (11)
NumberOfAvailableCopies
Data type: UInt16
Access type: Read-only
The number of consistent copies of data that are available.
NumberOfColumns
Data type: UInt16
Access type: Read-only
The number of underlying physical disks across which the data for this virtual disk is striped.
NumberOfDataCopies
Data type: UInt16
Access type: Read-only
The number of complete data copies that are being maintained for the virtual disk. For example, RAID 5 maintains one copy of data, while RAID 1 maintains at least two copies.
OperationalStatus
Data type: UInt16 array
Access type: Read-only
An array of values that indicate the current operating conditions of the virtual disk. Unlike HealthStatus, this property indicates the status of hardware, software, and infrastructure issues related to this virtual disk, and can contain multiple values.
Value | Meaning |
---|---|
Unknown 0 | The operational status is unknown. |
Other 1 | A vendor-specific OperationalStatus has been specified by setting the OtherOperationalStatusDescription property. |
OK 2 | The virtual disk is responding to commands and is in a normal operating state. |
Degraded 3 | The virtual disk is responding to commands, but is not running in an optimal operating state. |
Stressed 4 | |
Predictive Failure 5 | |
Error 6 | |
Non-Recoverable Error 7 | |
Starting 8 | |
Stopping 9 | |
Stopped 10 | The virtual disk is responding to commands, but is not running in an optimal operating state. |
In Service 11 | The virtual disk is being configured, maintained, cleaned, or otherwise administered. |
No Contact 12 | |
Lost Communication 13 | |
Aborted 14 | |
Dormant 15 | |
Supporting Entity in Error 16 | |
Completed 17 | |
Power Mode 18 | |
Relocating 19 | |
Detached 0xD002 | This value is reserved for Windows. The virtual disk that is visible to the host system but does not have a disk device object. |
Incomplete 0xD003 | The virtual disk does not have enough redundancy remaining to successfully repair or regenerate its data. |
OtherOperationalStatusDescription
Data type: String
Access type: Read-only
If OperationalStatus contains Other, this property is a string containing the vendor defined operational status. This property must be NULL if OperationalStatus does not contain Other.
OtherUsageDescription
Data type: String
Access type: Read-only
If the virtual disk's Usage property is set to Other, this property must contain a description of the vendor- or user-defined usage. If Usage is not set to Other, this property must be NULL.
ParityLayout
Data type: UInt16
Access type: Read-only
The type of parity layout that is being used for parity-based resiliency settings. This property should be NULL if the virtual disk does not use a parity-based resiliency setting.
Non-rotated Parity (1)
Rotated Parity (2)
PhysicalDiskRedundancy
Data type: UInt16
Access type: Read-only
The number of backing physical disks that can fail without compromising data redundancy. For example: RAID 0 cannot tolerate any failures, RAID 5 can tolerate a single drive failure, and RAID 6 can tolerate two failures.
PhysicalSectorSize
Data type: UInt64
Access type: Read-only
Qualifiers: Units ("Bytes")
The physical sector size of the virtual disk, in bytes.
ProvisioningType
Data type: UInt16
Access type: Read-only
Qualifiers: Required
The provisioning scheme for the virtual disk.
Value | Meaning |
---|---|
Unknown 0 | The provisioning scheme is unknown. |
Thin 1 | The virtual disk's capacity is allocated on demand. |
Fixed 2 | The virtual disk's capacity is fully allocated at creation time. |
RequestNoSinglePointOfFailure
Data type: Boolean
Access type: Read-only
Set to TRUE to request no single point of failure.
ResiliencySettingName
Data type: String
Access type: Read-only
Qualifiers: Required, ModelCorrespondence {"MSFT_ResiliencySetting.Name"}
The name of the resiliency setting for the virtual disk.
Size
Data type: UInt64
Access type: Read-only
Qualifiers: Required, Units ("Bytes")
The logical size, in bytes, of the virtual disk.
UniqueIdFormat
Data type: UInt16
Access type: Read-only
Qualifiers: Required, Values ( "Vendor Specific", "Vendor Id", "EUI64", "FCPH Name", "SCSI Name String" ), ValueMap ("0", "1", "2", "3", "8"), ModelCorrespondence {"MSFT_StorageObject.UniqueId"}
The type of identifier used in the UniqueId property that this class inherits from the MSFT_StorageObject class. This identifier must be the highest available identifier using the following order of preference: 8 (highest), 3, 2, 1, 0 (lowest).
For example, if the virtual disk device exposes identifiers of type 0, 1, and 3, UniqueId must be the type 3 identifier, and UniqueIdFormat should be set to 3.
UniqueIdFormatDescription
Data type: String
Access type: Read-only
Qualifiers: ModelCorrespondence {"MSFT_StorageObject.UniqueId"}, ModelCorrespondence {"MSFT_VirtualDisk.UniqueIdFormat"}
Certain values for UniqueIdFormat may include various sub-formats. This property is a free-form string used to describe the specific format used in UniqueId.
Usage
Data type: UInt16
Access type: Read/write
Qualifiers: Required
The intended usage for this virtual disk.
Unknown (0)
Other (1)
Unrestricted (2)
Reserved for ComputerSystem (the block server) (3)
Reserved by Replication Services (4)
Reserved by Migration Services (5)
Local Replica Source (6)
Remote Replica Source (7)
Local Replica Target (8)
Remote Replica Target (9)
Local Replica Source or Target (10)
Remote Replica Source or Target (11)
Delta Replica Target (12)
Element Component (13)
Reserved as Pool Contributor (14)
Composite Volume Member (15)
Composite VirtualDisk Member (16)
Reserved for Sparing (17)
WriteCacheSize
Data type: UInt64
Access type: Read-only
The size of the write cache for the virtual disk.
Remarks
Virtual disks are units of usable storage with an expanded set of attributes as compared to physical disks. Examples of the additional attributes include resiliency and dynamic capacity extension.
LUNs and storage spaces are examples of virtual disks.
Virtual disks, when exposed to Windows, appear as (Windows) disks to the rest of the Windows stack.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Namespace | Root\Microsoft\Windows\Storage |
MOF | Storagewmi.mof |