April 23, 2023 · Fix VMWare

How to Terminate Unresponsive ESXi VMs

Issue

Sometimes virtual machines become unresponsive - they cannot be connected to via SSH or VMware's console, and attempting to shut them down or forcefully power them off in the ESXi web client also fails. In such cases, the VMs must be terminated via CLI.


Fix

  1. If you haven't already, enable SSH on your ESXi host:

esxi_enable-ssh

  1. SSH into your ESXi host and follow any one of the two methods below.

Method 1 - Using Stop-VM

Stop-VM -kill <name> -Confirm:$false

Where <name> is the display name of the VM you wish to stop.

Method 2 - Using ESXCLI

  1. Get the World ID of the VM you wish to stop:
esxcli vm process list
  1. Copy & paste the VM's World ID into the following command:
esxcli vm process kill --type=soft -w=<world_id>

Explanation

type=x: Specifies how we want to terminate the VM.


  • LinkedIn
  • Tumblr
  • Reddit
  • Pocket