Tossing Out Unresponsive Guests

Ever have a guest you wish you could throw out of your house?  The unresponsive lump of flesh that sits in your favorite chair, eating your food, using up your soap, smelling up the facilities, while contributing nothing to the household economy?  I know I have, but unfortunately social decorum prevents me from acting on my base desire to toss the sponger out into the rain.

Fortunately, we are not bound my the same laws of etiquette in the IT world.  When your VM Guest cops and attitude with you, you can kill it.  Unfortunately, VMWare does not document all of the ways in which you can put an end to pestilential guests.  Fortunately, we have a Platinum support contract, and I was thus able to learn how to send a proper kill signal to a guest.  Here is the drill:

  • Verify that ESX “thinks” your guest is still running:
    • vmware-cmd "<pathToVmxFile>/<vmxfile>.vmx" getstate
    • Should return:
      getstate() = on
  • Scan the running VM Guest process names to find the VM “World ID” of the hung guest:
    • cat /proc/vmware/vm/*/names
    • Output returned should be similar to this:
      vmid=1105 pid=-1 cfgFile="/vmfs/volumes/46f13af6-27b2dd91-6873-00145e6d4c2c/hyperion11/hyperion11.vmx" uuid="50 26 41 af 30 dd cb 48-2d 9a ed 48 6e 6d db 6c" displayName="hyperion11"
    • Take note of the “vmid” above (in this case, “1105”.  This is the vmid of the “world”, or “cartel” of you guest OS.
  • Send a “kill signal 9” to the discovered world ID:
    • /usr/lib/vmware/bin/vmkload_app -k 9 <vmid>
    • Output should be similar to this:
      08 09:40:43.189: Sending signal '9' to world 1104.
  • Verify that the guest is not running:
    • vmware-cmd "<pathToVmxFile>/<vmxfile>.vmx" getstate
    • Returns:
      getstate() = off
  • You should then be able to start the guest normally.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s