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:
- Clone the virtual disks (*.vdi)
- Create a new virtual machine and add the cloned disks
VBoxManage clonevdi machine-A/boot.vdi /media/cdrom/backups/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.