topleft
topright

 


 

Can't shut down a virtual machine PDF Print E-mail
Tuesday, 23 December 2008 20:53


Having problems with shuting down a VM using the VM power controls. You can try using command line methods to try and manually kill your stuck VM. There are several methods for doing this below. Employ these methods only as a last resort, short of restarting your ESX host.

 

  1. The first option you should always try is the command line equivalent to using the VI Client which is the vmware-cmd command.
    • Login to the service console
    • Type "vmware-cmd –l" to get a list of all VMs and their paths
    • You can check the VM state by typing "vmware-cmd /vmfs/volumes/.../vm.vmx getstate"
    • To forcibly stop type "vmware-cmd /vmfs/volumes/.../vm.vmx stop hard" (may or may not work depending how screwed up the vm is)
    • Check VM state again, it should now be off
    • Type "vmware-cmd /vmfs/volumes/.../vm.vmx start" to power on VM
  2. The second option is to try and manually kill the VM's process by finding its process identifier (pid) and issuing the kill command to terminate it.
    • Login to the service console
    • Type "ps -ef | grep vm"
    • The second column is your pid of the vmkload_app of the virtual machine, you can also type "ps –eaf" to see all running processes
    • Type "kill -9 pid"
    • Check VM state again by typing "vmware-cmd /vmfs/volumes/.../vm.vmx getstate", it should now be off
    • Type "vmware-cmd /vmfs/volumes/.../vm.vmx start" to power on VM
  3. The third option is to use the vm-support-x command to try and force the VM to shutdown.
    • Login to the service console
    • Get the vmid of the VM you want to kill by typing "vm-support –x" or "cat /proc/vmware/vm/*/names"
    • Kill the VM and generate core dumps and logs by typing "vm-support –X vmid"
    • You will be prompted if you want to include a screenshot of the VM, send an NMI to the VM and send an abort command to the VM. You must answer yes to the abort question to kill the VM. The entire process will take about 5-10 minutes to run. It will create a tar archive in the directory.

      (This way leaves you info for vmware support, but it takes forever to actually kill the vm)

    If all this doen't work. To bad. You have probably to reboot the ESX Host. Try to Vmotion the other Vm's running on this host. Good Luck!

 

Trackback(0)
Comments (0)Add Comment

Write comment

security code
Write the displayed characters


busy
Last Updated on Tuesday, 25 August 2009 09:14
 
2008 - All Rights Reserved - Mikes.eu - Design by R. Mikes
Joomla Templates by JoomlaShack Joomla Templates