Search the VMware Knowledge Base (KB)
View by Article ID

Determine the power status of a virtual machine on an ESX or ESXi host (1003737)

  • 10 Ratings

Purpose

This article provides information on how to determine the power status of a virtual machine on an ESX or ESXi host. In some instances, the power status of a virtual machine on an ESX or ESXi host cannot be determined just by looking at the VMware graphical interface. The article also allows you to determine the process ID (PID) of a powered on virtual machine.

If you are using VMware ESXi 5.x, refer to Mapping a virtual machine world number to a virtual machine name (1001101) for information.

Resolution

To confirm that your virtual machine is powered on:
  1. Check the state of the virtual machine according to the vCenter Server by pointing the vSphere Client at your vCenter Server host.

    1. Launch the vSphere Client.
    2. In Server, enter the IP of the vCenter Server host.
    3. Provide a valid log in for the vCenter Server host, such as administrator and its password.

    Verify that the virtual machine is powered off.

    Notes:

    • This may not always be accurate. Complete the following steps to determine the status of the virtual machine.
    • If the option to power on the virtual machine is unavailable, try restarting the vCenter Server service.
    • If the virtual machine is shown as powered on in vCenter Server but is powered off in the following steps, restart the vCenter Server service.


      Note: For more information, see Stopping, starting or restarting the vCenter Server service (1003895).

  2. Check the state of the virtual machine according to the ESX/ESXi host by directly pointing the vSphere Client at the ESX/ESXi Server host.
    1. Launch the vSphere Client
    2. Enter the IP of the ESX/ESXi Server host under server
    3. Provide a valid log in for the ESX/ESXi Server host such as root and it's password.

    Verify that the virtual machine is powered off.

  3. Open an SSH session directly to the ESX/ESXi host. For more information, see Opening a command or shell prompt (1003892).
  4. Run this command to verify the power state of the virtual machine.

    • In ESX – vmware-cmd <cfg> getstate

      Where <cfg> is the path to the configuration file as determined by the vmware-cmd –l command.

      For more information on the vmware-cmd command, see the VMware Scripting API.

    • In ESXi – # vm-support -x ( Note: For ESXi 5.x - # vm-support -V ) OR # vim-cmd vmsvc/getallvms

      From the output, get the ID and then use it to run this command to check the power state:

      # vim-cmd vmsvc/power.getstate <Vmid>

  5. For virtual machines on the ESX host, run this command to check if there is a process running for the virtual machine:

    ps –auxwww | grep –i VM_NAME

    This is a standard Linux command to list processes. If a process other than the grep command that you have just run shows up in this list, note the second value in the column. It is the process ID (PID) and may be required in later troubleshooting steps to resolve your issue.

For virtual machines on an ESXi host, see Powering off a virtual machine on an ESXi host (1014165).

Tags

access-vm boot-guest-os cannot-power-on files-locked power-off-vm power-off-vm process-id-running vm-files vm-process zombie-process-id

See Also

Update History

09/17/2012 - Added "For ESXi 5.x - # vm-support -V"

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

  • 10 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)




Please enter the Captcha code before clicking Submit.
  • 10 Ratings
Actions
KB: