GET_VIRTUAL_DISK_INFO structure

Contains virtual hard disk (VHD) information.

Syntax


typedef struct _GET_VIRTUAL_DISK_INFO {
  GET_VIRTUAL_DISK_INFO_VERSION Version;
  union {
    struct {
      ULONGLONG VirtualSize;
      ULONGLONG PhysicalSize;
      ULONG     BlockSize;
      ULONG     SectorSize;
    } Size;
    GUID                 Identifier;
    struct {
      BOOL  ParentResolved;
      WCHAR ParentLocationBuffer[1];
    } ParentLocation;
    GUID                 ParentIdentifier;
    ULONG                ParentTimestamp;
    VIRTUAL_STORAGE_TYPE VirtualStorageType;
    ULONG                ProviderSubtype;
    BOOL                 Is4kAligned;
    struct {
      ULONG LogicalSectorSize;
      ULONG PhysicalSectorSize;
      BOOL  IsRemote;
    } PhysicalDisk;
    ULONG                VhdPhysicalSectorSize;
    ULONGLONG            SmallestSafeVirtualSize;
    ULONG                FragmentationPercentage;
  };
} GET_VIRTUAL_DISK_INFO, *PGET_VIRTUAL_DISK_INFO;

Members

Version

A value of the GET_VIRTUAL_DISK_INFO_VERSION enumeration that specifies the version of the GET_VIRTUAL_DISK_INFO structure being passed to or from the virtual disk functions. This determines what parts of this structure will be used.

Size

A structure with the following members. Set the Version member to GET_VIRTUAL_DISK_INFO_SIZE.

VirtualSize

Virtual size of the virtual disk, in bytes.

PhysicalSize

Physical size of the virtual disk on physical disk, in bytes.

BlockSize

Block size of the virtual disk, in bytes.

SectorSize

Sector size of the virtual disk, in bytes.

Identifier

Unique identifier of the virtual disk. Set the Version member to GET_VIRTUAL_DISK_INFO_IDENTIFIER.

ParentLocation

A structure with the following members. Set the Version member to GET_VIRTUAL_DISK_INFO_PARENT_LOCATION.

ParentResolved

Parent resolution. TRUE if the parent backing store was successfully resolved, FALSE if not.

ParentLocationBuffer

If the ParentResolved member is TRUE, contains the path of the parent backing store.

If the ParentResolved member is FALSE, contains all of the parent paths present in the search list.

ParentIdentifier

Unique identifier of the parent disk backing store. Set the Version member to GET_VIRTUAL_DISK_INFO_PARENT_IDENTIFIER.

ParentTimestamp

Internal time stamp of the parent disk backing store. Set the Version member to GET_VIRTUAL_DISK_INFO_PARENT_TIMESTAMP.

VirtualStorageType

VIRTUAL_STORAGE_TYPE structure containing information about the type of virtual disk. Set the Version member to GET_VIRTUAL_DISK_INFO_VIRTUAL_STORAGE_TYPE.

ProviderSubtype

Provider-specific subtype. Set the Version member to GET_VIRTUAL_DISK_INFO_PROVIDER_SUBTYPE.

ValueMeaning
2

Fixed.

3

Dynamically expandable (sparse).

4

Differencing.

 

Is4kAligned

Indicates whether the virtual disk is 4 KB aligned. Set the Version member to GET_VIRTUAL_DISK_INFO_IS_4K_ALIGNED.

Windows 7 and Windows Server 2008 R2:  This is not supported before Windows 8 and Windows Server 2012.
PhysicalDisk

Details about the physical disk on which the virtual disk resides. Set the Version member to GET_VIRTUAL_DISK_INFO_PHYSICAL_DISK.

Windows 7 and Windows Server 2008 R2:  This is not supported before Windows 8 and Windows Server 2012.
LogicalSectorSize

The logical sector size of the physical disk.

PhysicalSectorSize

The physical sector size of the physical disk.

IsRemote

Indicates whether the physical disk is remote.

VhdPhysicalSectorSize

The physical sector size of the virtual disk. Set the Version member to GET_VIRTUAL_DISK_INFO_VHD_PHYSICAL_SECTOR_SIZE.

Windows 7 and Windows Server 2008 R2:  This is not supported before Windows 8 and Windows Server 2012.
SmallestSafeVirtualSize

The smallest safe minimum size of the virtual disk. Set the Version member to GET_VIRTUAL_DISK_INFO_SMALLEST_SAFE_VIRTUAL_SIZE.

Windows 7 and Windows Server 2008 R2:  This is not supported before Windows 8 and Windows Server 2012.
FragmentationPercentage

The fragmentation level of the virtual disk. Set the Version member to GET_VIRTUAL_DISK_INFO_FRAGMENTATION.

Windows 7 and Windows Server 2008 R2:  This is not supported before Windows 8 and Windows Server 2012.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Header

VirtDisk.h (include Windows.h)

See also

About VHD
GetVirtualDiskInformation
GET_VIRTUAL_DISK_INFO_VERSION
VHD Reference

 

 

Build date: 10/26/2012

Community Additions

ADD
Show:
© 2014 Microsoft