Wednesday, January 19, 2011

Cloning a Virtual Hard Drive in VirtualBox 3.0

VirtualBox doesn't make it easy to clone/copy the configured virtual machines and their hard drive image files. To create an exact clone of an existing VM, you have to first clone the .vdi disk image file from the command line. Then you create a new VM with the same configuration, but point it to use the cloned .vdi image instead of the original. You'd think this would be provided as a one-click menu option, but it's not.

In Ubuntu, the .vdi files are stored in:
~/.VirtualBox/HardDisks/
and the command to clone a .vdi is:
VBoxManage clonevdi [source .vdi] [new .vdi]
More (and better) info can be found from this article.

No comments:

Post a Comment