Performance – Quickest way to merge all snapshots in virtualbox?

I have vdi with quite a number of snapshots taken from it – say, 50 or 70 snapshots.I want to have one plain vdi with a current state. These snapshots take way too much disk space and are not needed as snapshots.

I know that if I call

VBoxManage clonehd thedisk.vdi thedisk-full.vdi(50-70 times) VBoxManage clonehd {uuid-of-snapshot}.vdi thedisk-full.vdi --existing

I will get what I want. But it takes very very long time (more than 5 hours given my hardware and 16G initial disk size).

And, of course, I tried VBoxManage snapshot delete and it is strange: doesn’t work on stopped machine, can fail on running machine and when it fails once, it will fail all subsequent calls.

Is there a way to make plain vdi from a number of snapshots – quicker?

$ VBoxManage --version3.2.14r75509

(asked it on ServerFault but decided this place is more appropriate for this question)

Solution:

Found the solution. It is as simple as the last step from the commands I wrote here.I.e.

VBoxManage clonehd fullpath/{uuid-of-last-snapshot}.vdi thedisk-full.vdi

So I should clonehd only the last snapshot, not every snapshot from the chain. And it is thousands percent faster.

The uuid can be found from VBoxManage list hdds | grep VmName | tail

In the GUI (on Windows), select the VM, select Snapshots from the top right, right click on the snapshot you want, select Clone…, and select Full Clone in the dialog.