The '...has more than one child hard disk (n).' message likely occurs because the VDI is being used by more than one VM (currently, or was/is used by another VM's snasphot).
To see which VMs may or may not have the VDI attached, use File>Virtual Media Manager, select the VDI file and expand the tree below it (use * on the numeric keypad).
Is the VDI currently being used by multiple VMs?
- If No, then you should be able to Remove some of the child {hexUUID} VDI files immediately under the main VDI in the tree, until there is only one child {hexUUID} VDI left and then the snapshot can be discarded.
Select each child {hexUUID} file in turn and note what it says below 'Attached to:'.
If it says 'Not Attached', then that file can be Removed.
- If Yes, then you will have to decide which VMs will have their Current State (as relates to that base VDI) discarded and which VM will have it's Current State preserved (if any).
(This is because the snapshot you are trying to discard is snapshotting/protecting the base hard disk and it needs to be protected if it is to be shared by multiple VMs.)
For all VMs that will have their Current State discarded (as relates to that base VDI), do the following:
- In Virtual Media Manager, find the immediate child {hexUUID} file that is attached to the VM
- Does that file have its own '+' sign and a tree under it?
- If Yes, then view the VM's snapshots, and Discard the last (current, bolded) snapshot, (preceeded by a Revert if appropriate...) and repeat until the child does not have a tree
- Select the (treeless) immediate child and use 'Release' followed by 'Remove' to delete that file (this does a 'Revert' on the Current State, as it relates to this base VDI)
In the VM that will have it's Current State preserved, you should now be able to Discard snapshots as normal.
Backup/whatever you need to do with the base VDI, take a snapshot on the main VM and then reattach to the VMs that were 'Released' above.
NOTE: Discarding a snapshot that has a base hard disk attached will copy the following snapshot onto the hard disk, or will copy the Current State onto the hard disk, Confirming/Accepting/Commiting the changes in that snapshot/Current State.If you only want to backup the Current State of the a (main) development machine, then you can 'VBoxManage clonehd' the Current State to a new VDI and then backup that.
(See:
Clonehd'ing a Snapshot or Current State)