Power on a virtual machine from ESXi cli: Difference between revisions

From LinuxizeNet
No edit summary
No edit summary
Line 1: Line 1:
<div style = "line-height: 1.2">
{{clear}}</div></div><div style = "margin-top: 1.5em; border: 3px solid #ae8c55; border-radius: .5em; padding: 1em 1.5em; font-size: 1.2em">
<strong></strong>
To power on, shutdown or reboot a virtual machine from the command line:
To power on, shutdown or reboot a virtual machine from the command line:



Revision as of 03:50, 19 January 2024

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>

See also Manage ESXi VM Processes with CLI