VirtualBox is a cool virtualization product, similar to Microsoft VirtualPC or VMWare. It is free and available on Mac, Windows and Linux. It is capable of running Windows, DOS, Linux distributions and more. It is worth checking out.

It has an easy to use interface, and so far I have been pleased with the hardware support. Today though, I ran into a problem where I wanted to clone an existing virtual machine, so as to avoid going through the painful reinstallation process. Simply copying the .vdi file and trying to create a new virtual machine did not work. Instead you are greeted with this great message: "A hard disk with UUID {73e6fde6-9406-7e49-f29e-f0e927454f1a} or with the same properties ('/Users/Nick/VM/HardDisk1.vdi') is already registered."

Here are the steps to correctly copy a virtual hard drive to use in another VM. This enables you to keep a "clean" installation drive around to base other instances off of.

  1. Make sure the machine that contains the hard drive you want to copy, is turned off

  2. Go to "File" > "Virtual Disk Manager..."

  3. Select the virtual disk you want to copy, and press "Release"

  4. Open terminal, and navigate to the folder containing your hard drive files (*.vdi)

  5. Type: vboxmanage clonevdi image_original.vdi image_copy.vdi

  6. Go back to the Virtual Disk Manager, and select "Add". Then find the image_copy.vdi file you just created

  7. You can now use that new file in any new virtual machines you create through VirtualBox!

Note: using xVM VirtualBox by Sun, version 2.0.4