The dpmhv-importVM command imports an exported VM, which was exported using dpmhv-exportVM command. You can import VM for only one time as it is imported to a location similar to the exported VM.
This command has the following format:
dpmhv-importVM -host hostname -path pathname [-vm vmname] [-nonewid] [-async] [-retval] [-silent]
Specifies the name of the Hyper-V server host.
Specifies the path of the VM that you want to import.
Specifies the name of the VM.
(Optional) Specifies not to generate a unique GUID for the VM that you want to import. The imported VM has the GUID similar to the source VM (exported VM). Two VMs with same GUID creates conflicts and is not recommended.
(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-importVM 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: Import a VM
This example imports a VM which is exported using dpmhv-exportVM command.
dpmhv-exportVM -host hvserver -vm TestVM -dest c:\Ex\MyVM dpmhv-importVM -host hvserver -path c:\Ex\MyVM -vm TestVM1
Additionally, you can issue dpmhv-importVM command to create multiple VMs from the originally exported VM.
Copyright © 2013 CA. All rights reserved. |
|