Previous Topic: dpmhyperv GetVMState Command--Get a VM StateNext Topic: dpmhyperv ImportVMEx Command--Copy and Import a VM


dpmhyperv ImportVM Command--Import a VM

The dpmhyperv ImportVM command lets you import a VM to a Hyper-V hypervHost.

This command has the following format:

dpmhyperv ImportVM 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] -hypervHost hostname 
-path location 
[-name vm_name] 
[-noNewID] 
[-async]
[-locale iso639value] 
-ws_user username

(Optional) Specifies the CA Virtual Assurance user name.

-ws_password password

(Optional) Specifies the CA Virtual Assurance user password.

-ws_encrypted_password

(Optional) Indicates whether the CA Virtual Assurance password is encrypted.

-hypervHost hostname

Specifies the name of the Hyper-V host.

-path location

Defines the location of the imported VM.

-vm vm_name

Specifies the VM name.

-noNewID

(Optional) Indicates not to generate a new VM GUID. In this case, the imported VM and the imported from VM have the same GUID. We recommend not to use this option to avoid potential conflicts with other VMs.

-async

(Optional) Runs the command in the asynchronous mode.

-pre

(Optional) Generates an event before the operation is complete.

-post

(Optional) Generates an event after the operation is complete.

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination to override the default English output, for example, fr_FR for French. To use the locale of the command prompt, specify "native".

Example: Import a VM to a Hyper-V Host

This example imports the VM, "test-vm01-imported" to the Hyper-V host, "hserver." This command does not generate a new ID.

dpmhyperv ImportVM -ws_user admin -ws_password #test# -hypervHost hserver -path C:\data\Export\test-vm01 -name test-vm01-imported -noNewID.