Move, Backup or Clone a VirtualBox

Virtualbox is a virtualisation technology owned by Oracle which allows you to install virtual machines on top of your operating system. If you like to setup a test lab or maybe try a new Linux/Windows distro, Virtualbox is a great choice. This article explains how to move, backup or clone a VirtualBox.

Most people run important setups on VirtualBoxes and one may need to move them across other servers, or directories, or maybe take backups to a DVD. Unfortunately this is not trivial as copying the virtualdisk and pasting it to the desired location. In VirtualBox, moving a virtual machine involves these two steps:

  1. Clone the virtual disks (*.vdi)
  2. Create a new virtual machine and add the cloned disks
Cloning a virtual disk can be performed by using the following code:

VBoxManage clonevdi machine-A/boot.vdi 

In windows, the code is slightly modified as follows (make sure you enclose the path in double quotes):

VBoxManage clonevdi "c:\machine A\boot.vdi" 
"E:\media\cdrom\backups\machine A\boot.vdi"
Finally create a new virtual machine but use the previously created cloned disk.

No comments: