Wednesday, September 07, 2011

A stuck and hang VM on Xenserver

Yesterday I found our development server can not be accessed. It's a VM under Xenserver and trying to fix things through XenCenter is quite a deadend. The console can not be accessed from XenCenter, there's only blank whitescreen and when the VM was being forced to shutdown it complained "Another operation involving the object is currently in progress class: VM".

There's some discussion and proposed solution from this and this thread forum. Here's quote from one of the post that  finally fix it for me (you need to login to server's shell to execute the below command) :

1 - "xe vm-list" to get the uuid of the VM that is hung
2 - "list_domains" to list the domain uuid's so you can determine the domain # of the VM above by matching the uuids from this output with the uuid for your VM from the previous command.
3 - "/opt/xensource/debug/destroy_domain -domid XX" where XX is the domain number from the previous command
4 - "xe vm-reboot uuid=XXXX --force" where XXXX is the uuid from the first vm-list command for your VM. (name-label may work but didn't work this time for me so I used the uuid)

5 comments:

Deano said...

I was having the same issue this morning with one of the production machines, I followed your steps and it worked for me.

the destroy command took few min to complete.

Anonymous said...

thank u. it was of great help. Appreciated.
Shiraz

Anonymous said...

Thanks! it was of gr8 help.
appreciated.
shiraz

Anonymous said...

Save me!!! thanks

Reg Natarajan said...

Great post. Saved me tonight.