I think I solved the problem using the following procedure:
VM name:
Workbench64
Complete Hard Drive with snapshot parts:
HDD1
Already Merged Hard Drive without that particular snapshot part:
HDD2
- I backed up the vm directory of Workbench64, in case of further damage
- I checked the broken snapshot in the VBox Gui to find out the UUID of the missing vdi-part, by right clicking it and selecting "Snapshot details".
In case an attached storage device is not accessible its UUID will be shown in bold. Mine was "{5c95...}"
- I closed the VBox Gui, so that it wouldn't override the Workbench64.vbox file.
- I moved the HDD2.vdi file out of the Workbench64 VM directory. (maybe unnecessary)
- I opened the Workbench64.vbox in a text editor and searched for occurrences of "{5c95...}" (the entire UUID, obviously).
The first occurrence is in the "<HardDisks> section. It will look something like this:
Code: Select all
<HardDisk uuid="{5c95...}" location="Snapshots/{5c95...}.vdi" format="VDI">
If there is a "/>" at the end, just delete that entire line. If there is no "/>" at the end, like in my example, delete the entire line and one "</HardDisk>" below (which one shouldn't matter, but to be extra sure, use the one that has the same level of indentation (spaces in front) as the line you deleted).
- The next occurrence should be in a "<Image>" tag similar to this:
Code: Select all
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device=0">
<Image uuid="{5c95...}" />
</AttachedDevice">
Delete the "<Image>" and the surrounding "<AttachedDevice>[...]</AttachedDevice>" tag. Only of the UUID you are searching for, leave the other ones alone!)
This will remove the missing snapshot vdi-part from the VM-Snapshot.
- Save the file and quit your text editor.
- Open the VBox Gui and check the details of the Snapshot in your VM again to see, if it is still complaining about a missing vdi-part. (It shouldn't.)
- Try deleting/merging the snapshot now. It should merge the vdi-part of (in my case) HDD1 into it and remove the Snapshot from the VM.
If everything worked out you now have
HDD1 merged as well and a VM without the broken snapshot. Move
HDD2.vdi back into the VM folder if you followed step 4 and it should boot into the latest state/snapshot you have on that VM.
I don't seem to have lost any data, since the Snapshot merge crashed in between the actual merging, so maybe I was just lucky. Hope this helps people with similar problems.