“The VDI is not available” message is displayed in XenCenter after attempting to start a Virtual Machine (VM).
The additional details of “VDI is not available” error are not displayed. This article describes the error messages, the reasons for VDI not available error message, extract from the storage management code, and records in the /var/log/SMlog along with possible causes and resolution to the issue.
The errors have been grouped based on the storage activity occurring at the time they were displayed.
The lvs command is used to get the list of logical volumes (LV). The vhd-util scan is used to verify Virtual Disk Images (VDI) information without activating the logical volumes.
If the VHD is corrupted, vhd-util is unable to read this data and it fails.
The following error is generated:
The VDI is not available
Error scanning VDI <uuid>
Errors occur if unable to read the VDI and IO retry fails when collecting VDI information:
Errors returned in this case are:
The VDI is not available
<VDI UUID> not found
A check for a journal on the VDI occurs and if one exists, we do not attach VDI. This is because an operation is ongoing or was not properly completed.
Error returned in this case:
The VDI is not available
Interrupted operation detected on this VDI, scan SR first to trigger auto-repair.
Error returned in this case:
The VDI is not available
VDI <VDI UUID> unavailable
During VDI Attach for iSCSI LUN, if the device path cannot be found in /dev/disk or /dev/sd* the attach fails.
Error returned in this case:
The VDI is not available path for VDI not found.
During path check, if the path is not found, a failure occurs.
Error returned in this case:
The VDI is not available unable to query SCSIid
When performing a detach of LV based VHDs, a deflate operation is performed on snapshots.
Error returned in this case:
The VDI is not available deflate
If the VDI that is being resized is hidden:
Error returned in this case:
The VDI is not available hidden VDI
If a LV in the chain has been removed or missing, the following error is generated:
The VDI is not available
VDI unavailable: <Path to VDI>
If the chain depth is over 30 then a failure occurs.
Error in this case:
The VDI is not available SnapshotChainTooLong.
To resolve this error, complete the following procedure:
Run the following command on each host to verify that the VM is shut down and is not running on any of the hosts:
list_domains | grep <VM UUID>
For Example [root@localhost log]# list_domains | grep c4615dc5-a7ff-bf10-e675-49e64a749fb5
If the response indicates any running VM, then the machine must be shut down and reset the VDI, to allow the VM to start without error.
The resetvdis.py script allows a single VDI to be reset without having to stop all VM running on the same storage repository.
Using the VDI UUID from the error message the resetvdis.py command syntax is:
/opt/xensource/sm/resetvdis.py single <VDI UUID>
Always manually double-check that the VDI is not in use before running this script.
To manually check if a VDI is still attached, use the following command on each host:
tap-ctl list | grep <VDI UUID>
The most common occurrence of the VDI is not available message is VDI already attached RW.
Following are the causes of the preceding issue:
The VM crashed or was interrupted during shut down.
XenMotion failed in the VM, or XenMotion was interrupted.
The VM Storage Repository is out of disk space
Loss of connection to NFS Server
The VM becomes unresponsive where it is off, but the XenServer does not receive the signal about the shutting down of the VM.
CTX138234 - Error: "VDI Not Available"