Xen: 'this operation could not be performed' (VDI is in use) error?

How do I resolve the error:

This operation could not be performed because a VDI is in use by some other operation

I see this when trying to (re)start a stopped VM.


(For Xen 6.2) If you have access to XenCenter go to 'view' 'show hidden' and make sure that there isn't a job running for this VM already. If there is, stop and delete it.

This may happen if you tried to export a VM and it didn't complete (for whatever reason).