So, I recently got myself a MacBook. So far I have been impressed with lot’s of things! And then there some stuff that I obviously have been less impressed with. One of these things has been the migration from the Linux version to the Mac OS X of VirtualBox 2.1.4. Maybe I was naive to start with, thinking that hey VirtualBox exists on Linux and it also exists on Mac, then it should be a matter of copying the files over and I should be up and running! Well, well, well it wasn’t quite that simple. Looking back, I could probably have made things a lot easyer by shutting down all machines instead of moving them in their saved state.

Copying the lot from Linux to Mac simply broke the whole VirtualBox installation which failed to start at all once the files were in place. I had expected some errors, however not total breakage. Simply creating new machine configurations and re-attaching the disks was out of the questions as most of my machines had several snapshots which I didn’t manage to reconnect to the new machine configuration. So I started to look for trouble in the old configuration files.

For starters several configuration files had absolute paths to disk files, dvd/cd images, snapshots etc. As my files now resided in different folders this had to be changed. I started modyfying the VirtualBox.xml by hand and finally made som quick search and replaces. I also took the chance to remove some older dvd/cd images which were no longer on the system. Oh and then there was the version attribute of the VirtualBox element that had to be changed from 1.6-linux to 1.6-macosx.

Then for each VirtualBox machine I had to open the Machines/<machine name>/<machine name>.xml file and first correct the version stuff from 1.6-linux to 1.6 macosx.  Ones this was done I needed to remove any cd/dvd images no longer accessible by the machine such as the installation dvd for the guest additions which was “left in the drive” for most machines. This was a matter of simply deleting the Image element between each DVDDrive element. Now the configuration was correct and the Machine could be loaded by the interface. For every machine that was in their saved state I hade to discard the state as the CPU did not match the one under which the image was saved. Once discarded the Machine could be opened by the VirtualBox interface where it was a matter of clicking through all the options to make sure they were correct. One option that needed to be changed for each machine was the audio configuration. In linux it was set to Pulse audio and in Mac OS X it needed to be CoreAudio. Also any old network interfaces no longer available, such as host interfaces pointing at interface names such as eth0, eth1 or any tun interface not present in the new system had to be corrected.

So with the configuration all changed both manually and in the GUI the Machine was good to go. Once corrected and started it all worked great and I was very happy with VirtualBox! It even works better than it did in Linux as so far I have had a lot less problems with machines in their saved state breaking and refusing to start because of image inconsistencies.

  • Share/Bookmark

Posted by patrik in Virtualization

Post a Comment

Get Adobe Flash playerPlugin by wpburn.com wordpress themes