Virtualbox tools – cloning images
** Update – 11/2009 – Seems that some tinkering has occurred with VBoxManage since I first wrote this post. In 2008 I wrote a shell script to handle cloning and after a recent update the shell script was ‘broken’. If you are seeing errors about ‘disk image already exists’ then try using the FULL PATH for both your SOURCE and TARGET clone images, i.e.
VboxManage clonevdi /some_path/Source.VDI /some_path/New_clone.VDI
Note that as of VirtualBox 3.0.10 ‘clonevdi’ is deprecated but supported via ‘clonehd‘…
** End of Update #################
Start by creating your virtual machine image (including installing your OS of choice) – in my example this is Source.VDI.
Duplicating a virtual machine (VM) image with Virtualbox is simple but requires using the command line:
VBoxManage clonevdi Source.VDI New_clone.VDI
The time required to clone a VirtualBox image (VDI) is dependant upon the size of the your VDI image and the processing power of your computer system. The cloning process creates a ‘converted’ disk image so you can clone your image from one drive to another drive or other storage resource and the new, cloned image will work (make sure to change/confirm network attached shares/resources used within the cloned image PRIOR to using them.) Note that the VirtualBox GUI tool has a ‘help link’ where the command line options are explained.
You will get an error message if you use a command without the appropriate options:
# VBoxManage clonevdi
VirtualBox Command Line Management Interface Version 2.0.4
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.
Usage:
VBoxManage clonevdi <uuid>|<filename> <outputfile>|
Syntax error: Incorrect number of parameters
While most options are accessible via the VirtualBox GUI interface you may need to use some command line options. Here is a partial list of the VBoxManage options.
- VBoxManage list
- VBoxManage showvminfo
- VBoxManage registervm
- VBoxManage unregistervm
- VBoxManage createvm
- VBoxManage modifyvm
- VBoxManage startvm
- VBoxManage controlvm
- VBoxManage discardstate
- VBoxManage adoptstate
- VBoxManage snapshot
- VBoxManage registerimage
- VBoxManage unregisterimage
- VBoxManage showvdiinfo
- VBoxManage createvdi
- VBoxManage modifyvdi
- VBoxManage clonevdi
- VBoxManage convertdd
- VBoxManage addiscsidisk
- VBoxManage getextradata
- VBoxManage setextradata
- VBoxManage setproperty
- VBoxManage usbfilter
- VBoxManage sharedfolder
- VBoxManage vmstatistics
- VBoxManage guestproperty
- VBoxManage metrics
Related posts:
- VirtualBox – Security Tools – running Live CDs VirtualBox Security Tools – testing or installing Live CD images as...
- VirtualBox 2.1.2 – missing tools? I expect things to improve when I update/upgrade software –...
- Open Solaris (VDI) under Fedora (FC9) using VirtualBox I get vendor emails on a daily basis - I...
- Wordpress – importing images (media) I have not found a simple way to batch import ...
- Cobbler/Linux OS Provisioning via Virtual NICs (VirtualBox) This seems to be a topic of interest so here...