Sunday, June 21, 2009

Deleting Stub VMs and their Meta Data in XenServer

Sometimes on a failed XenConvert, the process will leave "stubbed" VM meta data behind on the XenServer. Any attempts to delete this VM through Xen Center will fail. Even though the Xen Convert process will have to be re-evaluated and restarted, there's a quick two step process to remove the stubbed VM from XenServer.

1. From the console of the XenServer containing the VM get a list of uuids by running "xe vm-list".

2. Copy the uuid of the VM in question and then run this command to destroy it "xe vm-destroy uuid="

It might take a couple of minutes for this command to complete but when it does the reference to the VM is now also removed from XenCenter. If a disk was associated with it, there should now be an option to delete it or it can also be attached to a different VM. It's possible that the data on this disk is salvageable but should be verified that it is in tact and consistent.

No comments:

Post a Comment