Sierpień, 2013 browsing by month


A virtual machine gone bad – how to shut down an unresponsive VM

piątek, Sierpień 30th, 2013

Some time ago I encountered a problem with a VM that didn’t want to shut down. First, the problem was the VM was the vCenter server. And I mapped a CD via vCenter to itself (mind: from a local disk, not from a datastore). After I started copying data from the CD to the VM it became frozen. As VM monitoring was configured and the machine stopped sending heartbeats, VM monitorin decided it was time to shut down and power on the VM. The shutdown was stuck at 95%. Now, I know there are many stories about hanged VM all over the Internet but stay with me.

A usual stuff (service mgmt-vmware restart) did clear the status of the poweroff in progress but the VM was still running as I was going to learn. The VM appeared as inactive and the display name changed to unknown. I removed the machine from inventory and tried to register it again but with the same effect. apparently it was still running on the host. I managed to change the name of vmx file and register it correctly but of course it did not power on – the virtual disk files were locked.

In this case find the virtual machine world id:

vm-support -x

and kill the machine:

vm-support -X VM_world_id

Answer „no” to screenshot question and „yes” to the other two. It’s gonna take some time. After that the machine could be registered correctly and I could power it on.