VirtualBox
HowTo: Clone a VirtualBox HDD (.vdi)
by Drew Dahl on Dec.06, 2009, under HowTo, Linux, VirtualBox, Windows
Okay, this will be short and sweet. Here’s how you clone a VirtualBox HDD in Windows:
“C:\Program Files\Sun\VirtualBox\VBoxManage.exe” clonevdi “C:\Users\Andrew\.VirtualBox\HardDisks\Windows XP.vdi” “C:\Users\Andrew\.VirtualBox\HardDisks\Windows XP Clone.vdi”
and in Linux:
VBoxManage clonevdi /home/andrew/.VirtualBox/HardDisks/WindowsXP.vdi /home/andrew/.VirtualBox/HardDisks/WindowsXPClone.vdi
The basic form is “VBoxManage clonevdi sourcevdi destinationvdi”. Now you may ask, why clone a virtual machine’s hard drive? Well, if you want to back them up, this works for that. Or, if you want to duplicate that same virtual machine without having to do a second installation/activation.
Also to note, doing it this way will change the HDD’s UID, so you don’t get the error: “A hard disk with UUID {92c7da90-00f3-4bda-b338-57d24dad7f4b} or with the same properties (’/home/andrew/.VirtualBox/HardDisks/WindowsXP.vdi’) is already registered.”
Also, last thing to note… Instead of the directory “HardDrives”, yours may be “VDI”. I believe in older versions of VirtualBox it was VDI; however, these days it’s HardDrives.
