Alice asks VirtualBox to delete a snapshot. Not just any snapshot but one whose child snapshot has a snapshot. VirtualBox deletes the snapshot file, but when she launchs the VM, VirtualBox complains:
Failed to open a session for the virtual machine VMName V2.
Could not open the medium 'C:\Users\Alice\VirtualBox VMs\VMName V2\Snapshots/{snapshot_that_should_have_been_deleted}.vdi'.
VD: error VERR_FILE_NOT_FOUND opening image file 'C:\Users\Alice\VirtualBox VMs\VMName V2\Snapshots/{snapshot_that_should_have_been_deleted}.vdi' (VERR_FILE_NOT_FOUND).
Result Code: E_FAIL (0x80004005)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Alice copies an existing snapshot and renames it to the one that should've been deleted: VBoxManage internalcommands sethduuid "{snapshot_that_should_have_been_deleted}.vdi" "snapshot_that_should_have_been_deleted"
Also, Alice sets the Parent UUID of the hd
C:\Users\Alice\VirtualBox VMs\VMName V2\Snapshots>VBoxManage internalcommands sethdparentuuid "{snapshot_on_which_universe_depends}.vdi" snapshot_that_should_have_been_deleted
Otherwise Virtualbox complains about the Parent UUIDs:
Parent UUID {0374ab26-b1e3-43b7-b4a3-3ca785df042b} of the medium 'C:\Users\Alice\VirtualBox VMs\VMName V2\Snapshots/{snapshot_on_which_universe_depends}.vdi' does not match UUID {snapshot_that_should_have_been_deleted} of its parent medium stored in the media registry ('C:\Users\Alice\.VirtualBox\VirtualBox.xml').
Result Code:
E_FAIL (0x80004005)
Component:
MediumWrap
Interface:
IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
- Do not create a snapshot of a snapshot and then delete the grandparent
- Clone from the child snapshot and discard the old