Virtualization allows easy creation of base computing environment, software / network testing, application deployment, etc. Virtualization can help tremendously especially if it is free, lightweight and easy to use. This is where Sun VirtualBox comes to play.
VirtualBox is a great desktop virtualization solution which has a number of advantages such as free to use (for personal and evaluation purpose), open source, less resource usage in host, performance benefits, snapshots, save and resume time of virtual machine (VM). ( more here )
It is very flexible and there is a good article "Virtualisation for Developers with VirtualBox" (can be found here) which provides a great inside on how to create, configure and fast start virtual machine (VM) using VirtualBox.
Once a basic Guest OS configuration created it might be copied into a safe place in order to be reused which would save a valuable time creating a new VM. However, managing VM cloning/copying and Hard drive expansion are not so straightforward as they are used in VMware Workstation or Virtual PC.
A number of posts on the web explain how to handle these in one or the other way. The article here describes both clone and copy ways.
I would like to put it in more details though. Below is how we can copy VM:
- Find your VM file, which is located in your user folder within .VirtualBox/HardDisks folder (by default) with .vdi extension.
- Open Windows command line from VirtualBox installation folder and issue the following command: VBoxManage internalcommands setvdiuuid "Path_to_copied_vdi". The setvdiuuid command will create a new UUID and assign it the copied disk.- Copy your .vdi file and rename.
- Shut down the Guest OS.
- Create second .vdi hard drive image with a bigger size by going to the File > Virtual Media Manager and click New button to start Create New Virtual Disk wizard.
- Click on the Settings button for your VM, and choose the Storage category. Mount hdclone.iso (located in the bootimages folder of the HDClone's installation) in CD/DVD Device.
- The old hard drive can be deleted or reformatted.
That's it. Enjoy it!