Welcome to our page on how to fix the “VDI not available” error when starting a virtual machine (VM) on Citrix XenServer. If you are an IT admin or sys admin and you are using XenServer, it is likely at some point you will encounter this issue while trying to start a VM on XenServer. The error message suggests that the Virtual Disk Image (VDI) associated with the VM is not available, which prevents the VM from starting, which is a big stinking problem! This error can be caused by quite a few different things, such as storage connectivity issues, misconfiguration, or even hardware failures.
Background: When a VM is started on a XenServer host, domain 0, the system tries to ensure that all resources required by the guest VM are available for it to start. However, if that VM has had an unexpected shutdown, power failure, etc., it will likely 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.
We hope that resolves the issue for you like it did for us! This error was a recurring issue for us when we used XenServer and based on the number of views on this page each month, I believe it still is quite a large problem.
Thank you for visiting our website and we hope that our instructions for fixing VDI not available Errors on Xenserver have been helpful to you. If you found our guide informative and useful, please consider sharing it with your friends and colleagues who might also benefit from this knowledge. Your support in spreading the word about our website is greatly appreciated and will help us continue to provide valuable resources to the world. Thank you again for your time and we look forward to your continued support.
reference: http://blogs.citrix.com/2011/11/08/vdi-not-found-when-starting-a-vm-on-xenserver-5-6-sp2/