The dpmhv-exportVMEx command lets you export VM specifications, including its related virtual disks, floppy disks and snapshots.
This command has the following format:
dpmhv-exportVMEx -host hostname -vm vmname|-vmid vmguid -dest dest [-noruntimeInfo] [-nosnapshots] [-nostorage] [-nosubdir] [-snapshot ss] [-snapshotid ssguid] [-async] [-retval] [-silent]
Specifies the name of the Hyper-V server host.
Specifies the name of the VM.
Specifies the unique ID of the VM.
Specifies the destination path of the VM that you want to export.
(Optional) Specifies not to export runtime information of the VM.
(Optional) Specifies not to export snapshots of the VM. This option exports only the current state of the VM.
(Optional) Specifies not to export the virtual disk of the VM.
Note: Do not use this option when you export the snapshot of the VM.
(Optional) Specifies not to create a sub directory with the VM display name underneath the directory specified as the export path.
(Optional) Specifies the display name of the snapshot of the VM. The exported VM is in the state (snapshot) similar to the source VM. The exported VM does not include snapshot.
Note: Use
-ssid option as snapshot display name is not unique in the Hyper-V environment.
(Optional) Specifies the unique ID (GUID) of the snapshot of the VM. The exported VM is in the state (snapshot) similar to the source VM. The exported VM does not include snapshot.
(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.
Returns a value for further processing.
Specifies not to direct the output to the screen.
The dpmhv-exportVMEx 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 Without Snapshots
This example exports a VM without snapshots.
dpmhv-exportVMEx -host hvserver -vm TestVM -dest c:\Ex\TestVM1 -nosubdir -nosnapshots
Copyright © 2013 CA. All rights reserved. |
|