How to merge old VirtualBox snapshots into single VDI

I was recently faced with a situation where I had a the data of an old VirtualBox VM including .xml file, .vdi/.sav snapshots and main .vdi hard disk from 2012 that I wanted to merge into a single .vdi.

Crucially these files were from another machine and not registered/present in any way in my active copy of VirtualBox.

There doesn’t seem to be a clear set of instructions for doing this online, but the process is:

  1. VBoxManage showhdinfo [harddisk.vdi]
    • Note ‘showhdinfo’ is, confusingly, not just showing the info but also registering the disk so VirtualBox can find it later
  2. VBoxManage showhdinfo [snapshot.vdi] for each of the snapshots in order of oldest to newest
  3. VBoxManage clonehd [newest-snapshot.vdi] [output.vdi]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.