Previous Topic: dpmhv-createTemplateFromVM (Funclet) Command--Create a Template from a VMNext Topic: dpmhv-createVirtFloppy (Cmdlet) Command--Create a Virtual Floppy


dpmhv-createVirtDisk (Funclet) Command--Create a Virtual Disk

The dpmhv-createVirtDisk command lets you create virtual disk.

This command has the following format:

dpmhv-createVirtDisk 
-host hostname 
-path pathname 
-type{fixed,dynamic} 
-sizeGB size 
[-async]
[-retval]
[-silent]
-host hostname

Specifies the name of the Hyper-V server host.

-path pathname

Specifies the path of the virtual disk that you want to create.

-type {fixed, dynamic}

Specifies the type of the virtual disk that you want to create. Options include the following:

fixed

Specifies the virtual disk type as fixed.

dynamic

Specifies the virtual disk type as dynamic.

-sizeGB size

Specifies the size of the virtual disk in gigabytes.

-async

(Optional) Specifies the option to execute the command asynchronously. By default, this command is executed synchronously.

Note: If this command completes the execution before executing this option, it returns a job ID that is used to view the operation status.

-retval

Returns a value for further processing.

-silent

Specifies not to direct the output to the screen.

Example: Create a Virtual Disk

This example creates the virtual disk of size 1 GB.

dpmhv-createVirtDisk -host hvserver -path C:\data\Disks\01.vhd -type fixed -sizeGB 1