When a VM is started on a XenServer host, domain 0, needs to ensure that all resources required by the guest VM are available for it to start. If a VM has had an unexpected shutdown, power failure, etc., we could have a dirty flag on the VDI, which is normally a logical volume in a volume group (Storage Repository). To clear this flag, we need to do the following actions:
- Via the command line, type “xe vm-start vm=” and you will get a better error message than noted in the XenCenter, namely the UUID of the VDI that cannot be used exclusively by the guest VM.
- Make a note of the UUID of the VDI and proceed to remove it from the pool database via the following “xe vdi-forget uuid=. You will then note that the VM no longer is attached to the VDI in XenCenter.
- On the SR that the VDI is located on, proceed to the “Storage” tab and select “Rescan”. You should see the VDI with no name label on it.
- To ensure we have the correct VDI, if there are many VDIs with no name, use the following command “xe vdi-list uuid=. You should see it with no name label or description. We can then label this VDI via “xe vdi-param-set uuid= name-label=”. You should see the labeled VDI in the XenCenter.
- On the VMs storage tab, select “Attach” and proceed to select the VDI on the SR.
- VM should start without issue.
reference: http://blogs.citrix.com/2011/11/08/vdi-not-found-when-starting-a-vm-on-xenserver-5-6-sp2/