Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client
This article provides steps to power on virtual machines from the command line (either through the ESX host console or through the RCLI/vSphere CLI) if the host cannot be managed from vCenter Server or from vSphere Client.
ESXi 5.x
To power on 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>
ESXi 4.1
To power on 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>
Leave a comment