Previous Topic: dpmhv-expandVirtDisk (Funclet) Command--Expand Virtual DiskNext Topic: dpmhv-exportVMEx (Funclet) Command--Export a VM


dpmhv-exportVM (Funclet) Command--Export a VM

The dpmhv-exportVM command lets you export VM specifications, including their related virtual disks and floppy disks. This command is deprecated, use dpmhv-exportVMEx instead.

This command has the following format:

dpmhv-exportVM 
-host hostname 
-vm vmname|-vmid vmguid 
-dest dest 
[-nostate] 
[-async]
[-retval] 
[-silent]
-host hostname

Specifies the name of the Hyper-V server host.

-vm vmname

Specifies the name of the VM.

-vmid vmguid

Specifies the unique ID of the VM.

-dest dest

Specifies the destination path of the VM that you want to export.

-nostate

(Optional) Specifies that only the VM specification is exported. This option prevents the exported VM from referring to the original VM disk images.

-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.

Return Value

The dpmhv-exportVM command returns an empty string when it is executed synchronously. If executed asynchronously, a string representing job ID is passed to dpmhv-getJobErrorInfo, dpmhv-getJobInfo, or dpmhv-getJobStatus. In synchronous mode, if an error occurs during execution, the command returns the error code and reports the error.

Example: Export a VM

This example you export VM specifications, including its related virtual disks and floppy disks.

dpmhv-exportVM -host hvserver -vm VM_0000001 -dest c:\DATA\Export\