Sometimes a process involving VM vdi can be interrupted and the VDI is left hanging. It cannot be removed in XenCenter. If you select a SR and go under Storage tab you may see virtual disks that have XenServer host as vrtual machine. It usually says “Control domain on host …”. There is a way to manually remove this virtual disk on the CLI console.
Find out the uuid of your hanging vdi:
xe vdi-list name-label=<vm name label>
Now show all volume groups:
In the response you should identify your SR volume group that the vdi is in. You can do this by looking at the VSize and VFree fields.
Now scan the volume group for vhd-s:
vhd-util scan -m "VHD-*" -f -c -l VG_XenStorage-<volume group id> -p –v
If you see your vhd there then you can now remove it:
lvremove /dev/VG_XenStorage-<volume group id>/VHD-<vdi uuid>
Now re-scan the SR in XenCenter and the hanging virtual disk should be gone.