2.2.2.18.2.1 VDS_CREATE_VDISK_PARAMETERS

The VDS_CREATE_VDISK_PARAMETERS structure contains the parameters to be used when a virtual disk is created.

 typedef struct _VDS_CREATE_VDISK_PARAMETERS {
   GUID UniqueId;
   ULONGLONG MaximumSize;
   ULONG BlockSizeInBytes;
   ULONG SectorSizeInBytes;
   [string] LPWSTR pParentPath;
   [string] LPWSTR pSourcePath;
 } VDS_CREATE_VDISK_PARAMETERS,
  *PVDS_CREATE_VDISK_PARAMETERS;

UniqueId: A unique and non-zero GUID value to be assigned to the virtual disk.

MaximumSize: The maximum virtual size, in bytes, of the virtual disk object.

BlockSizeInBytes: The internal block size, in bytes, of the virtual disk object. If the virtual disk object being created is a differencing disk, this value MUST be 0. If the virtual disk object being created is not a differencing disk, setting this value to 0 causes the virtual disk object being created to use the default block size.<50>

SectorSizeInBytes: Internal sector size, in bytes, of the virtual disk object. This value MUST be set to 512 (CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_SECTOR_SIZE).

pParentPath: A null-terminated wide-character string containing an optional path to a parent virtual disk object. This member associates the new virtual hard disk with an existing virtual hard disk. Used when creating a differencing disk. The differencing disk gets its size from its parent.

A differencing disk represents the current state of the virtual disk as a set of modified blocks in comparison to a parent disk. A differencing disk is not independent; it depends on the parent disk to be fully functional. A differencing disk MUST be created using the CREATE_VIRTUAL_DISK_FLAG_NONE flag. The parent disk can be created using either the CREATE_VIRTUAL_DISK_FLAG_NONE or CREATE_VIRTUAL_DISK_FLAG_FULL_PHYSICAL_ALLOCATION flag. The parent disk can be another differencing disk.

pSourcePath: A null-terminated wide-character string containing an optional path to a source of data to be copied to the new virtual hard disk. When pSourcePath is specified, data from the input virtual disk file is copied block for block from the input virtual disk file to the created virtual disk file. There is no parent-child relationship established.