Unable to delete differential disks from Logical Volume Manager (LVM) or ext3 storages. The error message is displayed on XenCenter as "Vdi_delete: EXCEPTION SR.SROSError, Failed to mark VDI hidden [opterr=error 22] or attempt to mark VDI as hidden failed."
To resolve this, complete the following procedure:
Ensure that you have a functional back up of your corrupted Vhd, because you need to remove the same from your shared or local storage.
If the affected Virtual Disk Image (VDI) resides on Logical Volume Manager (LVM), run the following command to remove the Vhd:
lvremove /dev/VG_XenStorage-<uuid from LUN which the VDI resides>/vhd-<uuid of affected VDI>
Note: To get the Universally Unique Identifier (UUID) of the VM, run xe vm-list name-label=<Name of the VM>.
Example:
Ivremove /dev/VG_XenStorage-b0a1ad60-dbdc-92a4-eba1-e2da7803097c/VHD-71cc1048-4481-410a-9aeb-f79eb42894c3
cd /var/run/sr-mount/b0a1ad60-dbdc-92a4-eba1-e2da7803097c
xe vdi-forget 71cc1048-4481-410a-9aeb-f79eb42894c3.vhd
rm –f 71cc1048-4481-410a-9aeb-f79eb42894c3.vhd
Common error messages seen in the logs and XenCenter
The following screen shots display the common error messages seen in the logs and XenCenter:
This error occurs because of the corrupted VDI.