Kill a Virtual Machine by Method of Last Resort

I recall watching the Twitter stream as it occurred and have now just had the chance to use the research provided by Sean Clark.  Although a different scenario the fix suited the situation.  I had an issue with a non-responsive Windows Server 2003 VM, the admins were unable to get to the console and were unable to issue a guest shutdown from the VI Client.  I attempted to perform a shutdown from the VI Client and also from command line with vmware-cmd stop and the hard option, no success there either.  See Sean’s page, steps are basically;

  1. ‘cat /proc/vmware/vm/*/names | grep [vmname]’ and get the “vmid” value
  2. ‘cat /proc/vmware/vm/[vmid]/cpu/status` and get the “group” value (group = world Id)
  3. “/usr/lib/vmware/bin/vmkload_app -k 9 [group id]″
  4. received the following “success” message: “Warning: Apr 20 16:22:22.710: Sending signal ‘9′ to world [group id].”  Runn esxtop to verify the VM dies.
  5. If necessary, re-add VM to inventory

http://seanclark.us/?p=250

Thanks Sean!

Edit: Updates have been made to KB articles on VMware’s support site.

Powering off an unresponsive virtual machine on an ESX host

Powering off a virtual machine on an ESXi host