大网数据广告活动
Hyper-V与虚拟化

Msvm_VirtualHardDiskState class

· 52CE 我爱测

Provides state information for an existing virtual hard disk image.

Provides state information for an existing virtual hard disk image.

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

Syntax

[AMENDMENT]
class Msvm_VirtualHardDiskState
{
  uint64   FileSize;
  boolean  InUse;
  uint64   MinInternalSize;
  uint32   PhysicalSectorSize;
  uint32   Alignment;
  uint32   FragmentationPercentage;
  DATETIME Timestamp;
};

Members

The Msvm_VirtualHardDiskState class has these types of members:

Properties

The Msvm_VirtualHardDiskState class has these properties.

Alignment

Data type: uint32

Access type: Read-only

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

Value Meaning
0 512 byte alignment.
1 4 KB alignment.

FileSize

Data type: uint64

Access type: Read-only

The size of the virtual hard disk file (the actual amount of storage being consumed by the file), in bytes.

FragmentationPercentage

Data type: uint32

Access type: Read-only

An approximation of the percentage of virtual disk blocks that are fragmented in the virtual hard disk file.

InUse

Data type: boolean

Access type: Read-only

This property is reserved for future use.

MinInternalSize

Data type: uint64

Access type: Read-only

The minimum size that the virtual hard disk can be shrunk to, in bytes. This size is rounded up to the next largest multiple of the sector size.

PhysicalSectorSize

Data type: uint32

Access type: Read-only

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

Timestamp

Data type: DATETIME

Access type: Read-only

The timestamp of the virtual hard disk

Note:
Added in Windows 10 and Windows Server 2016.

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

GetVirtualHardDiskState

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。