Skip to content

Latest commit

 

History

History
366 lines (283 loc) · 11.1 KB

ns-virtdisk-create_virtual_disk_parameters.md

File metadata and controls

366 lines (283 loc) · 11.1 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:virtdisk._CREATE_VIRTUAL_DISK_PARAMETERS
CREATE_VIRTUAL_DISK_PARAMETERS (virtdisk.h)
Contains virtual hard disk (VHD) creation parameters, providing control over, and information about, the newly created virtual disk.
*PCREATE_VIRTUAL_DISK_PARAMETERS
CREATE_VIRTUAL_DISK_PARAMETERS
CREATE_VIRTUAL_DISK_PARAMETERS structure [VHD]
CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_BLOCK_SIZE
CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_SECTOR_SIZE
CREATE_VIRTUAL_DISK_VERSION_1
CREATE_VIRTUAL_DISK_VERSION_2
PCREATE_VIRTUAL_DISK_PARAMETERS
PCREATE_VIRTUAL_DISK_PARAMETERS structure pointer [VHD]
_CREATE_VIRTUAL_DISK_PARAMETERS
vdssys/CREATE_VIRTUAL_DISK_PARAMETERS
vdssys/PCREATE_VIRTUAL_DISK_PARAMETERS
vhd.create_virtual_disk_parameters
virtdisk/CREATE_VIRTUAL_DISK_PARAMETERS
virtdisk/PCREATE_VIRTUAL_DISK_PARAMETERS
vhd\create_virtual_disk_parameters.htm
VStor
797e21ae-a4c4-48df-8124-e5c2fad22f33
07/28/2020
*PCREATE_VIRTUAL_DISK_PARAMETERS, CREATE_VIRTUAL_DISK_PARAMETERS, CREATE_VIRTUAL_DISK_PARAMETERS structure [VHD], CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_BLOCK_SIZE, CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_SECTOR_SIZE, CREATE_VIRTUAL_DISK_VERSION_1, CREATE_VIRTUAL_DISK_VERSION_2, PCREATE_VIRTUAL_DISK_PARAMETERS, PCREATE_VIRTUAL_DISK_PARAMETERS structure pointer [VHD], _CREATE_VIRTUAL_DISK_PARAMETERS, vdssys/CREATE_VIRTUAL_DISK_PARAMETERS, vdssys/PCREATE_VIRTUAL_DISK_PARAMETERS, vhd.create_virtual_disk_parameters, virtdisk/CREATE_VIRTUAL_DISK_PARAMETERS, virtdisk/PCREATE_VIRTUAL_DISK_PARAMETERS
virtdisk.h
Windows
Windows 7
Windows Server 2008 R2
Windows
CREATE_VIRTUAL_DISK_PARAMETERS, *PCREATE_VIRTUAL_DISK_PARAMETERS
19H1
_CREATE_VIRTUAL_DISK_PARAMETERS
virtdisk/_CREATE_VIRTUAL_DISK_PARAMETERS
PCREATE_VIRTUAL_DISK_PARAMETERS
virtdisk/PCREATE_VIRTUAL_DISK_PARAMETERS
CREATE_VIRTUAL_DISK_PARAMETERS
virtdisk/CREATE_VIRTUAL_DISK_PARAMETERS
c++
APIRef
kbSyntax
HeaderDef
VirtDisk.h
vdssys.h
CREATE_VIRTUAL_DISK_PARAMETERS

CREATE_VIRTUAL_DISK_PARAMETERS structure

-description

Contains virtual hard disk (VHD) creation parameters, providing control over, and information about, the newly created virtual disk.

-struct-fields

-field Version

A value from the CREATE_VIRTUAL_DISK_VERSION enumeration that is the discriminant for the union.

Value Meaning
CREATE_VIRTUAL_DISK_VERSION_1
1
Use the Version1 member of this structure.
CREATE_VIRTUAL_DISK_VERSION_2
2
Use the Version2 member of this structure.

-field Version1

This structure is used if the Version member is CREATE_VIRTUAL_DISK_VERSION_1 (1).

-field Version1.UniqueId

Unique identifier to assign to the virtual disk object. If this member is set to zero, a unique identifier is created by the system.

-field Version1.MaximumSize

The maximum virtual size, in bytes, of the virtual disk object. Must be a multiple of 512.

If a ParentPath is specified, this value must be zero.

If a SourcePath is specified, this value can be zero to specify the size of the source virtual disk to be used, otherwise the size specified must be greater than or equal to the size of the source disk.

-field Version1.BlockSizeInBytes

Internal size of the virtual disk object blocks, in bytes. This must be set to one of the following values.

Value Meaning
CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_BLOCK_SIZE
0
This is the default value and represents a block size of 2 MB.
524288 (0x80000)
The block size is 512 KB.
2097152 (0x200000)
The block size is 2 MB

-field Version1.SectorSizeInBytes

Internal size of the virtual disk object sectors. Must be set to 512.

Value Meaning
CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_SECTOR_SIZE
0x200
The default and only allowable size, 512 bytes.

-field Version1.ParentPath

Optional fully qualified path to a parent virtual disk object. Associates the new virtual disk with an existing virtual disk.

If this parameter is not NULL, SourcePath must be NULL.

-field Version1.SourcePath

Optional fully qualified path to pre-populate the new virtual disk object with block data from an existing disk. This path may refer to a virtual disk or a physical disk.

If this parameter is not NULL, ParentPath must be NULL.

-field Version2

This structure is used if the Version member is CREATE_VIRTUAL_DISK_VERSION_2 (2).

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

-field Version2.UniqueId

Unique identifier to assign to the virtual disk object. If this member is set to zero, a unique identifier is created by the system.

-field Version2.MaximumSize

The maximum virtual size, in bytes, of the virtual disk object. Must be a multiple of 512.

If a ParentPath is specified, this value must be zero.

If a SourcePath is specified, this value can be zero to specify the size of the source virtual disk to be used, otherwise the size specified must be greater than or equal to the size of the source disk.

-field Version2.BlockSizeInBytes

Internal size of the virtual disk object blocks, in bytes. For VHDX this must be a multiple of 1 MB between 1 and 256 MB. For VHD 1 this must be set to one of the following values.

Value Meaning
CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_BLOCK_SIZE
0
This is the default value and represents a block size of 2 MB. This is the only supported value for fixed VHD 1 virtual disks.
524288 (0x80000)
The block size is 512 KB. This value is not supported on fixed VHD 1 virtual disks.
2097152 (0x200000)
The block size is 2 MB. This value is not supported on fixed VHD 1 virtual disks.

-field Version2.SectorSizeInBytes

Internal size of the virtual disk object sectors. For VHDX must be set to 512 (0x200) or 4096 (0x1000). For VHD 1 must be set to 512.

-field Version2.PhysicalSectorSizeInBytes

-field Version2.ParentPath

Optional fully qualified path to a parent virtual disk object. Associates the new virtual disk with an existing virtual disk.

If this parameter is not NULL, SourcePath must be NULL.

-field Version2.SourcePath

Optional fully qualified path to pre-populate the new virtual disk object with block data from an existing disk. This path may refer to a virtual disk or a physical disk.

If this parameter is not NULL, ParentPath must be NULL.

-field Version2.OpenFlags

Zero or more flags from the OPEN_VIRTUAL_DISK_FLAG enumeration describing how the virtual disk is to be opened.

-field Version2.ParentVirtualStorageType

A VIRTUAL_STORAGE_TYPE structure describing the parent virtual disk specified in the ParentPath member.

-field Version2.SourceVirtualStorageType

A VIRTUAL_STORAGE_TYPE structure describing the source virtual disk specified in the SourcePath member.

-field Version2.ResiliencyGuid

Resiliency GUID for the file.

Note

The following parameters prefaced Version3 and Version4 are intended for internal use.

-syntax

typedef struct _CREATE_VIRTUAL_DISK_PARAMETERS {
  CREATE_VIRTUAL_DISK_VERSION Version;
  union {
    struct {
      GUID      UniqueId;
      ULONGLONG MaximumSize;
      ULONG     BlockSizeInBytes;
      ULONG     SectorSizeInBytes;
      PCWSTR    ParentPath;
      PCWSTR    SourcePath;
    } Version1;
    struct {
      GUID                   UniqueId;
      ULONGLONG              MaximumSize;
      ULONG                  BlockSizeInBytes;
      ULONG                  SectorSizeInBytes;
      ULONG                  PhysicalSectorSizeInBytes;
      PCWSTR                 ParentPath;
      PCWSTR                 SourcePath;
      OPEN_VIRTUAL_DISK_FLAG OpenFlags;
      VIRTUAL_STORAGE_TYPE   ParentVirtualStorageType;
      VIRTUAL_STORAGE_TYPE   SourceVirtualStorageType;
      GUID                   ResiliencyGuid;
    } Version2;
  };
} CREATE_VIRTUAL_DISK_PARAMETERS, *PCREATE_VIRTUAL_DISK_PARAMETERS;

-see-also

About VHD

CreateVirtualDisk

Naming Files, Paths, and Namespaces

VHD Reference

VHD Structures