Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client (1038043)

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

Note: The steps in this article require root access to the host, either at the physical console or using SSH. For more information on enabling root access, see:

ESXi 5.x

To power on a virtual machine from the command line:
  1. 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.

  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate <vmid>

  3. 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:
  1. 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.

  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate <vmid>

  3. 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:
  1. 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.

  2. Check the power state of the virtual machine with the command:

    vmware-vim-cmd vmsvc/power.getstate <vmid>

  3. 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:
  1. To list the path of all the virtual machines on the host:

    vmware-cmd -l

  2. Get the state of the virtual machine with the command:

    vmware-cmd <path to the VMX file> getstate

  3. Power 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:
  1. List the inventory ID of the virtual machine with the command:

    vim-cmd vmsvc/getallvms |grep <vm name>

  2. Check the power state of the virtual machine with the command:

    vim-cmd vmsvc/power.getstate <vmid>

  3. 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:
  1. To list the path of all the virtual machines on the host:

    vmware-cmd -l

  2. Get the state of the virtual machine with the command:

    vmware-cmd <path to the VMX file> getstate

  3. Power on the virtual machine with the command:

    vmware-cmd <path to the VMX file> start

Additional Information

Tags

start-vm vm-power-on vm-power-options 

See Also

Update History

02/27/2012 - Added procedures for ESXi 5.0

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 19 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 19 Ratings
Actions
KB: