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

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:
  • Enabling root SSH login on an ESX host (8375637)
  • Tech Support Mode for Emergency Support (1003677) (for ESXi 3.5 and 4.0)
  • Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910)

ESXi 5.0

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

    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

  3. Power-on the virtual machine with the command:

    vim-cmd vmsvc/power.on

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

    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

  3. Power-on the virtual machine with the command:

    vim-cmd vmsvc/power.on

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

    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

  3. Power on the virtual machine with the command:

    vmware-vim-cmd vmsvc/power.on

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 getstate

  3. Power on the virtual machine with the command:

    vmware-cmd 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

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

    vim-cmd vmsvc/power.getstate

  3. Power on the virtual machine with the command:

    vim-cmd vmsvc/power.on

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 getstate

  3. Power on the virtual machine with the command:

    vmware-cmd start

Based on VMware KB 1038043
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Hardware and firmware requirements for 64-bit guest operating systems

PurposeThis article explains the host machine hardware and firmware requirements for installing...

Logging in to the vCenter Server 5.0 Web Client fails with the error: unable to connect to vCenter Inventory Service

DetailsAfter upgrading from vCenter Server 4.1 to 5.0, you experience these symptoms:Cannot log...

Multiple network entries in vCenter Server 5.0.x after migrating virtual machines from a virtual switch to a virtual distributed switch

SymptomsAfter migrating virtual machines from a virtual switch to a virtual Distributed...

Minimum requirements for the VMware vCenter Server 5.x Appliance

PurposeIf you are using the VMware vCenter Server Appliance, beginning with vSphere 5.0 you can...