MrSloth Labs
Guide 4 min readJuly 30, 2026

How to Power Off a Virtual Machine in VMware vSphere

Multiple methods to gracefully or forcefully power off a VM using vSphere Client, esxcli, esxtop, or vim-cmd.

VMwarevSpherePower OffESXiTroubleshooting

Powering Off a Virtual Machine Using vSphere Client/vSphere Web Client

  1. Connect the vSphere Client or vSphere Web Client to VMware vCenter Server.
  2. Right-click the virtual machine and click Power off.
  3. If the virtual machine remains running, attempt the same operation directly from the ESXi host:
    • Connect the vSphere Client or VMware Host Client directly to the ESXi host running the virtual machine.
    • Right-click the virtual machine and select Power off.

Note: From vSphere 6.5, you can enable Virtual Machine Encryption to protect virtual machine and its files. If encryption is enabled, you must have a set of Cryptographic Operations privileges; otherwise, you will not be able to power off the virtual machine. For more information, see Prerequisites and Required Privileges for Encryption Tasks in the ESXi and vCenter Server 6.5 Documentation.

If the virtual machine cannot be powered off gracefully using the client, use one of the command-line options below.

Using ESXi esxcli Command to Power Off a Virtual Machine

The esxcli command can be used locally or remotely to power off a virtual machine running on ESXi 5.x or later.

  1. Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the .vmx configuration file:

    esxcli vm process list
  2. Power off the virtual machine from the list using:

    esxcli vm process kill --type=[soft,hard,force] --world-id=WorldNumber

    Notes:

    • Three power-off methods are available:
      • soft is the most graceful
      • hard performs an immediate shutdown
      • force should be used as a last resort
  3. Repeat Step 2 and validate that the virtual machine is no longer running.

Using esxtop to Kill a Virtual Machine

You can use the k command in esxtop to send a signal to, and kill, a running virtual machine process.

  1. On the ESXi console, enter Tech Support mode and log in as root.

  2. Run the esxtop utility:

    esxtop
  3. Press c to switch to the CPU resource utilization screen.

  4. Press Shift+v to limit the view to virtual machines (makes it easier to find the Leader World ID in step 7).

  5. Press f to display the list of fields.

  6. Press c to add the column for the Leader World ID.

  7. Identify the target virtual machine by its Name and Leader World ID (LWID).

  8. Press k.

  9. At the World to kill prompt, type the Leader World ID from step 7 and press Enter.

  10. Wait 30 seconds and validate that the process is no longer listed.

Using vim-cmd to Power Off the Virtual Machine

  1. On the ESXi console, enter Tech Support mode and log in as root.

  2. Get a list of all registered virtual machines, identified by their VMID, Display Name, and path to the .vmx configuration file:

    vim-cmd vmsvc/getallvms
  3. Get the current state of a virtual machine:

    vim-cmd vmsvc/power.getstate VMID
  4. Shutdown the virtual machine using the VMID found in Step 2:

    vim-cmd vmsvc/power.shutdown VMID

    Note: If the virtual machine fails to shut down, run:

    vim-cmd vmsvc/power.off VMID

Additional Notes

If the above procedures did not resolve the issue and the ESXi host is responsive, you may need to reboot the host to put the virtual machine in a powered-off state. To avoid downtime, you can migrate all virtual machines to other ESXi hosts using vMotion.