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:
VBoxManage showhdinfo [harddisk.vdi]
- Note ‘showhdinfo’ is, confusingly, not just showing the info but also registering the disk so VirtualBox can find it later
VBoxManage showhdinfo [snapshot.vdi]for each of the snapshots in order of oldest to newest
VBoxManage clonehd [newest-snapshot.vdi] [output.vdi]