Cloning a VM in VirtualBox
April 30, 2011
No comments
I usually use VirtualBox as the virtualization solution for a simple way to create basic test machines on my desktop computer. This post is about how to clone a virtual machine which doesn’t have any snapshots. It’s short and sweet, and mostly for my own reference so I have the command handy for doing it in the future.
You CANNOT just copy the .vdi file(s) to a new file and create a new VM using that disk image. If you do so you will get UUID conflicts when trying to point a VM at the copied image on the same machine. Yes, I learned that the hard way.
Instead, you need to use the VBoxManage command line utility to do the cloning which will properly change the UUID.
To do so it looks like this:
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonevdi "sourceimage.vdi" "destinationimage.vdi" "c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonevdi "d:\VirtualBox VMs\Win2008Server_1\Win2008Server.vdi" "d:\VirtualBox VMs\Win2008Server_2\Win2008Server.vdi"
Comments
Leave a comment Trackback