The dpmhv-changeVMState command changes the state of the VM. The various states are: start, suspend, stop, pause, shutdown, and reboot.
This command has the following format:
dpmhv-changeVMState -host hostname -vm vmname|-vmid vmguid -state {start,suspend,stop,pause,shutdown,reboot} [-retval] [-silent]
Specifies the name of the Hyper-V server host.
Specifies the name of the VM.
Specifies the unique ID of the VM.
Specifies the state of the VM. State options are the following:
Starts or resumes the VM.
Suspends the VM temporarily.
Stops the VM.
Stops the VM temporarily.
Shuts down the VM.
Restarts the VM.
Note:
If you specify an invalid state change, the system reports an exception.
Returns a value for further processing.
Specifies not to direct the output to the screen.
Example: Change the state of a VM
This example starts the VM, "TestVM."
dpmhv-changeVMState -host hvserver -vm TestVM -state start
Copyright © 2013 CA. All rights reserved. |
|