|
Can't shut down a virtual machine |
|
|
|
|
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.
- 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
- 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
- The third option is to use the vm-support-x command to try and force the VM to shutdown. 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)
 |
|
Last Updated on Tuesday, 25 August 2009 09:14 |