Exporting/Importing Appliances in VirtualBox 4.0

After a rapid slew of public betas, VirtualBox 4.0 was released on December 22 last year - just in time for the holidays.  It was introduced with a revamped GUI as well as additional functionality.  You can view the changelog here for details.  I won't go into the details of the new version but I'd like to point out a few things that I experiened with this new version.
One of the features I love about VirtualBox is the ability to move a virtual machines between different hosts using the export/import appliance wizard.  The export creates a set of virtual disks along with an Open Virtualization Format (OVF) file that describes the appliance's configuration.  You can then copy these files to an external device such as USB disks or make them available via a web/ftp server.  To import appliance you simply specify the location of the OVF file and follow the steps in the wizard. You can also use the VBoxManage commands to export/import. Oracle Technology Network supplies several Oracle developer appliances using this method.  VirtualBox 4.0 introduced the Open Virtualization Archive (OVA) format which creates a complete package.
Firstly, this is my first time using VirtualBox on a Windows platform since the version 2.2 release! No, I didn't switch from Mac - I just happened to buy a Windows 7 laptop for testing Oracle VM (that's another blog post).  Since I had all my previous Oracle RAC VMs on my iMac I decided to use the export/import appliance feature to move them into my shiny new laptop.

I had VirtualBox 3.2.10 running on the iMac.  Export was pretty straightforward.  The import process on the Windows PC did hit a few issues.  What I liked with the 4.0 version of VirtualBox was ability to change the file format during import.  I wasn't able to get it to work in the previous versions. Once I specified my new file locations and disk format the import proceeded normally.  However after importing all the virtual disks a dialog box popped up.  It looked like this:

The import failed because a shared folder was attached to the VM on the iMac and the path is not valid on the Windows host.  Now this sucks - I didn't even get an option to remove the shared folder before importing it.  After I clicked the OK button I had to cancel the import.  However, all the virtual disks had been created.  So to recreate the VMs I could either detach the shared folders on the iMac and then re-export the appliance before trying the import again or I could just create a new VM manually and then add all the virtual disks that were already created by the failed export.  I chose to do the latter since I didn't want to copy the disks all over again.  Once I created the new VM with the same configuration as the source and attached the disks everything seemed to work.  It booted up without any problem.  I repeated the process for my second RAC node VM. The second issue I noticed was when I tried to attach my shared storage (for ASM) it refused to start up.  The shared storage was virtual disks using the 'shareable' variant.  Apparently, the import appliance process converted the fixed-size virtual disks into dynamic disks with the size of the used disk.  Since only fixed-sized disks can be used as shareable disks I had to first clone the disks to a fixed-size using the VBoxManage clonehd command.  Afterwards I modified them to make them shareable using VBoxManage modifyhd.  Everything seems to work just fine afterwards.

The Windows version of VirtualBox 4.0 seems to work just great.  I am still waiting a bit longer before upgrading the MacOSX version since I have been bitten by upgrades in the past.


  1. Hello Leighton.
    As you went on my blog, I do the same for yours.
    I have a question regarding your sharable disk.
    For my different RAC appliances (Vbox4 on my iMac Core i7), I am using OpenFiler to simulate the shared devices (on which I push my ASM stuff). Apparently you are using a lighter solution. Can you be a little clearer on what you did ?
    Is this a viable solution for RAC VMs ?

  2. Hi Gilles,
    I originally used Openfiler as well for my shared storage. However, after the Virtualbox 3.2.8 release shared disks was implemented so I switched to using that feature instead. It allowed me to stop using a third VM guest just for shared storage. Tim Smith has it well documented in his blog here http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVirtualBox.php.


  3. Hi Leighton,
    the trick worked for me..thanx. I was very disappointed as I had several RAC groups and all suddenly could not be restored!
    Now I know how..thanks a lot.



Post a Comment

Popular posts from this blog

Viewing ASM trace files and alert logs in Unix/Linux

ORA-00020: maximum number of processes (%s) exceeded

Troubleshooting RAC Public Network Failure