Select Page

virtualbox logo

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2… – http://www.virtualbox.org/

VirtualBox is under constant development. It runs on Linux, Macintosh, Solaris and Windoz and supports many guest operating systems.

So, to make a long story short…

VirtualBox gets done, what many other virtualization products can’t, and does it without cost to it’s users.

I’ve been using VirtualBox, on a Linux desktop (Debian GNU/Linux, Ubuntu & Kubuntu), for a long time. It’s a great virtualization tool, and I’m looking forward to upgrading to the NEW 4.1 release.

Just recently, I’ve established a need to duplicate a VirtualBox, virtual machine. I have an old version of the Adobe Creative Suite, licensed for Windoz. However, I don’t want to install it on top of an Windoz XP virtual machine that is running so perfectly now. Neither do I want to go through the whole Windoz XP installation process, to create a new virtual machine.

Solution?

Duplicate a VirtualBox Virtual Machine.

The solution was easy, but how do I duplicate a VirtualBox virtual machine in Kubuntu?

The steps below describe how I did this. These steps start with a couple assumptions

  1. You are running Kubuntu 10.10 or newer.
  2. You already know where your .VDI file for your virtual machine is located.

We will start by creating a copy of your existing .VDI file.

Right-click on the .VDI file and choose Copy (Ctrl+C).

right click on the vdi file

Right-click in an empty area, within the same directory and choose Paste One File (Ctrl+V).

paste one file

Your .VDI file has been successfully duplicated. However, it can’t be used without a few more steps.

Right-click on the duplicate .VDI file and choose Rename (F2).

rename

You will be presented with the Rename Item dialogue.

rename item

Type in a new name to the left of the .VDI extension. It is best that you use a name that describes the virtual machine well enough for your to remember why it was necessary. Remember the name you used, as you will use it again later.

“32bit_Windoz_XP.vdi” was the name of my original .VDI file. “32bit_Windoz_XP_AdobeCS3.vdi” is what I renamed the duplicate .VDI file.

If you think you can continue from here on your own, I implore you to keep reading. Many people think you can go right into the Oracle VM VirtualBox Manager and add the duplicated .VDI file. This will most likely result in an VirtualBox error similar to:

virtualbox error

This error exists because VirtualBox cannot have more then one virtual machine with the same Universally Unique Identifier (UUID). You will have to assign a new UUID in order to be able to use the duplicated .VDI file.

Hit Alt+F2 on you keyboard. In the “Run Command” dialog, type: “konsole” and hit the [enter] key.

run command dialogue

Navigate to the location of the .VDI files.

Type the following command, changing only the end of the command, which identifies the .VDI file (32bit_Windoz_XP_AdobeCS3.vdi). The .VDI file must be the name of the duplicate .VDI file we created in the steps above. FYI: If you used any spaces in the naming of your duplicate .VDI file, you must add quotes around the .VDI file name.

bamajr@9H38PJ1:/media/SATA-Disk-2_$ sudo vboxmanage internalcommands sethduuid 32bit_Windoz_XP_AdobeCS3.vdi

or…

bamajr@9H38PJ1:/media/SATA-Disk-2_$ sudo vboxmanage internalcommands sethduuid "32bit Windoz XP AdobeCS3.vdi"

vboxmanage command

When you run this command, you should get a “UUID changed to:” message, as shown in the image below:

UUID changed to

Now, we can use the duplicate .VDI file.


Open the “Oracle VM VirtualBox Manager” application and click on the “New” button.

You’ll be presented with the “Create New Virtual Machine” wizard, where you will click the “Next” button.

create new virtual machine

At the “VM Name and Host Type” screen, type in the name of your duplicate .VDI file (used in the steps above), without the .VDI extension.

You will also need to verify the Operating System and Version. These must match the configuration of the virtual machine represented by the original .VDI file.

vm name and os type

Click on the “New” button.

At the “Memory” screen, set the amount of system memory (RAM) you wish to provide the virtual machine, when it is running. FYI: What I used is not necessarily what you will use. I may have more or less RAM available.

memory

Click on the “New” button.

At the “Virtual Hard-disk” screen, “Boot Hard Disk” must be checked and the “Use existing hard disk” option must be selected. You will need to locate the duplicate .VDI file, created in the steps above. FYI: You may have to browse to the correct directory in order to locate it.

virtual hard disk

Click on the “New” button.

At the “Summary” screen, click on the “Finish” button.

summary

Your new, duplicate, virtual machine should now appear in the list of virtual machines available in the Oracle VM VirtualBox Manager.

oracle vm virtualbox manager


I hope these steps help.