Power on a virtual machine from ESXi cli

From Energy Wiki
Revision as of 11:29, 11 August 2019 by Energy (talk | contribs) (Created page with "To power on, shutdown or reboot a virtual machine from the command line: ;List the inventory ID of the virtual machine with the command: :vim-cmd vmsvc/getallvms |grep <vm n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To power on, shutdown or reboot a virtual machine from the command line:

List the inventory ID of the virtual machine with the command
vim-cmd vmsvc/getallvms |grep <vm name>

Note: The first column of the output shows the vmid.

Check the power state of the virtual machine with the command
vim-cmd vmsvc/power.getstate <vmid>
Power-on the virtual machine with the command
vim-cmd vmsvc/power.on <vmid>

Related Commands:

Power-off the virtual machine with the command
vim-cmd vmsvc/power.off <vmid>
Reboot the virtual machine with the command
vim-cmd vmsvc/power.reboot <vmid>