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.