Problem:

You want to modify a Hyper-V VHD virtual hard disk, but the wizard ends with an error. The event log shows the error code.

Solution:

You maybe have shadow copies on the guest machine. Start the VM and try the commands „vssadmin list shadows“ and „vssadmin delete shadows /all“. Now it should work

 

(Source)

  [email protected]