Previous Topic: dpmhyperv AgentSet Command--Set an Agent ValueNext Topic: dpmhyperv CreateTemplateFromVM Command--Create a Template from a VM


dpmhyperv ChangeVMState Command--Change the State of a VM

The dpmhyperv ChangeVMState command changes the state of a VM on a Hyper-V host.

This command has the following format:

dpmhyperv ChangeVMState 
[-ws_user username] 
[-ws_password password] 
[-ws_encrypted_password] -hypervHost hostname 
-vm vm_name|-vguid vm_ID 
-state {Start|Suspend|Stop|Pause|Shutdown|Reboot} 
-[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.

-state {Start|Suspend|Stop|Pause|Shutdown|Reboot}

Specifies the state of the VM. Options include the following:

Start

Turns on the VM.

Suspend

Suspends the VM temporarily.

Stop

Stops the VM.

Pause

Stops the VM temporarily.

Shutdown

Shuts down the VM.

Reboot

Performs a hard reset of the VM.

-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: Change the State of a VM

This example sets the state of the VM, "vmtest" to enabled.

dpmhyperv ChangeVMState -ws_user admin -ws_password #test# -hypervHost hvserver -vm vmtest -state start