Purpose
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.
Resolution
Tech Support Mode for Emergency Support (1003677) (for ESXi 3.5 and 4.0)
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>
ESXi 4.0
To power on a virtual machine from the command line:
List the inventory ID of the virtual machine with the command:
vmware-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:
vmware-vim-cmd vmsvc/power.getstate <vmid>Power on the virtual machine with the command:
vmware-vim-cmd vmsvc/power.on <vmid>
ESX 4.0 and ESX 4.1
To power on a virtual machine from the command line:
To list the path of all the virtual machines on the host:
vmware-cmd -lGet the state of the virtual machine with the command:
vmware-cmd <path to the VMX file> getstatePower on the virtual machine with the command:
vmware-cmd <path to the VMX file> start
ESXi 3.5
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>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>
ESX 3.5
To power on a virtual machine from the command line:
- To list the path of all the virtual machines on the host:
vmware-cmd -l
Get the state of the virtual machine with the command:
vmware-cmd <path to the VMX file> getstatePower on the virtual machine with the command:
vmware-cmd <path to the VMX file> start