power off / get state of vm vim-cmd
from VMware's own www
Using the ESXi command-line utility vim-cmd to power off the virtual
machine
- On the ESXi console, enter Tech Support mode and log in as root.
- Get a list of all registered virtual machines, identified by their VMID,
Display Name, and path to the
.vmx
configuration file, using this
command:
vim-cmd vmsvc/getallvms
- To get the current state of a virtual machine
vim-cmd
vmsvc/power.getstate VMID
- Power off the virtual machine using the VMID found in Step 2 and
run:
vim-cmd vmsvc/power.off VMID
Note: If the virtual machine fails to power
off, use the following command:
vim-cmd vmsvc/power.shutdownVMID
No comments:
Post a Comment