The dpmhyperv GetVMState command returns the current state of a VM. The following list describes the four states:
This command has the following format:
GetVMState [-ws_user username] [-ws_password password] [-ws_encrypted_password] -hypervHost hostname -vm vmname|-vmguid vm_ID [-pre] [-post] [-locale iso639value]
(Optional) Specifies the CA Server Automation user name.
(Optional) Specifies the CA Server Automation user password.
(Optional) Indicates whether the CA Server Automation password is encrypted.
Specifies the name of the Hyper-V host.
Specifies the VM name.
Specifies the unique GUID of the VM.
(Optional) Generates an event before the operation is complete.
(Optional) Generates an event after the operation is complete.
(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: Get a VM State Using the VM Name
This example returns the state of the VM, "vm01" on the host, "hserver."
dpmhyperv GetVMState -ws_user admin -ws_password #test# -hypervHost hserver -vm test-vm01
Example: Get a VM State Using the VM GUID
This example returns the state of the virtual machine having the GUID, "38FTESTED14644376" on the host, "hserver."
dpmhyperv GetVMState -ws_user admin -ws_password #test# -hypervHost hserver -vmguid 38FTESTED14644376
Copyright © 2013 CA. All rights reserved. |
|