Clone a VirtualBox Guest VM

0

Having a clone of a particular VM is helpful whether you want to keep a backup vanilla image to use in the future, or create a cluster of identical machines that can run in parallel. This process is not well documented and can be slightly tricky. Hopefully this guide will help many of you through the process.

First off make sure your Guest virtual machine is shut down and not running or suspended and then run:
$ VBoxManage clonevdi source.vdi target.vdi

This may take a few minutes depending on the size of your VM
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: c18b8549-33ab-41a1-8d66-25f884fef86a

Now that you have cloned your disk image, you need to create another VM. Duplicate the exact setup you had with the previous VM, making sure to create the same network adapters, shared folders, memory limits, etc.

The final step is to attach the cloned vdi to your new VM and start it.

Common Issues:

– VirtualBox will create new random MAC addresses for network adapters. This may or may not cause a problem. If it does you will have to reconfigure the device within the cloned VM if you want to use the old and cloned VM simultaneously, otherwise you can change the MAC address to be the same as the original.

– You may want to change the hostname as well as the IP address if it is statically allocated. Again if you are not running multiple machines simultaneously this may not be a problem for you.

Share.