When a VDI (Virtual Disk Image) in XenServer becomes orphaned or only partially deleted, it can cause SR metadata corruption errors that prevent VM migration or storage edits. The fix involves two steps: first, remove the stale VDI by locating and deleting its logical volume with lvremove, then destroying it via xe vdi-destroy. If the SR still has metadata issues, the MGT (management volume) may be corrupt and can be rebuilt by renaming the existing MGT LV and rescanning the SR, which forces XenServer to regenerate it without requiring VMs to be powered off.
Sort: