Recover VM’s from a permanently down XenServer host.

 

We recently had a XenServer node crash to the point it was not possible to recover.

The VM’s that had been operating on the host were no longer visible in XenCenter and had seemingly disappeared.

The first you need to do is locate the UUID of the down host with

 

 

 

Then display a list of all the VM’s on the failed host with

This will output all the VM’s on that host and indicate that they are in a “running” state.

We need to reset the powerstate of each VM.

Once you run this command you will notice the VM appear in XenCenter.  You will more than likely not be able to start the VM due to the VDI being in use by the downed host.

you’ll need to reset the locks on the VDI, this can be done by forgetting the UUID of the VDI and reattaching it to the VM.

One way to do this is to run

 

This will gernate an error but more importanly it will also tell you the UUID of the VDI that is in use.

Then you need to “forget” the VDI

 

this will cause the VM to “lose” the disk, rescan the SR and you’ll see the disk without a VM.

Go to the storage tab of the VM and reattach the VDI and then restart the VM either with XenCenter or

 

note: if the VM has more than one disk youll need to repeat the process of running

 

and each time it will show you the VDI causing the issue.

 

There is a way to reset the VDI’s on a given SR as the above can be time consuming with a large number of virtual machines but this post will not cover that method.

 

 

 

casey jones / March 7, 2016 / Citrix, Virtualization, XenServer

Leave a Reply

Your email address will not be published / Required fields are marked *