Previous Topic: dpmhyperv ChangeVMState Command--Change the State of a VMNext Topic: dpmhyperv CreateVirtDisk Command--Create a Virtual Disk Image


dpmhyperv CreateTemplateFromVM Command--Create a Template from a VM

The dpmhyperv CreateTemplateFromVM command creates a template from an existing VM.

This command has the following format:

dpmhyperv CreateTemplateFromVM 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] 
-hypervHost hostname 
-vmname vm_name|-vmguid vm_ID 
-template template_name 
[-description template_description] 
[-path template_location] 
[-async] 
[-pre] 
[-post]
[-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.

-vm vm_name

Specifies the VM name.

-vmguid vm_ID

Specifies the unique GUID of the VM.

-template template_name

Defines the name of the new template.

-description template_description

(Optional) Specifies the template description.

-path template_location

(Optional) Defines the full path of the directory where you want to create the template.

-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: Create a Template from a VM

This example creates the template, "MyTemplate" from the VM, "TestVM."

dpmhyperv -CreateTemplateFromVM -ws_user admin -ws_password #test# 
-hypervHost hvserver -vm TestVM -template MyTemplate