VirtualBox – a VMware alternative?

Been trying out VirtualBox (now owned by Sun) on my Ubuntu 8.04 PC.  Have hit a couple of glitches, but to be fair these are partly due to our corporate network and needing to understand the differences between VMware workstation and Virtualbox.

Problem area one was networking.  Compared with VMware, VirtualBox does it’s networking slightly differently.  First it’s NAT connection for Guests is isolated on a per guest basis – so all guests have the same fixed IP address (10.0.x.15) with the same gateway (10.0.x.1) and DNS (10.0.x.2) where “x” is a number fixed for each adapter – so starts at 2 for adapter one. With Vmware the NAT network is shared across all guests, so that two guests can chat to each other on this virtual network.  So to get my two guests talking together and to the internet (for Updates etc), I looked at host based connectivity…

Host based connects in Vmware are dealt with by Vmware custom code, so each guest presents a Mac address to the network.  Here we have a network which requires that host Mac addresses are registered centrally so that the get allocated to the correct VLAN (dynamic VLANs), so providing both the host and the guests are all registered to the same VLAN all works tidily.  Virtualbox makes use of Linix “tap” interfaces and bridges which after much tinkering reveal the fact that the bridge (aka the host NIC), the guest AND the tap all have Mac addresses which need to be registered before it’ll work, and worse the tap interfaces create random Mac addresses on reboot which need to be overidden with an ifconfig command – I need to script this – but that’s basically two Macs for one guest.  Tolerable for a couple of guests, but not for the number needed for some of my test scenarios.

So I devised a scheme which works, and in some ways is more flexible that the Vmware setup – though the same scheme could be used.  I’ve created a VM running the free Endian firewall which provides a NAT router.  One side is connected via a tap and a bridge to the real network, the other (trusted and dmz) networks are just internal networks inside VirtualBox – unlike VMware these can be named. So not only do I have a tidier system, all my test VMs are protected by a firewall – very important as I don’t really want to worry that much about security for them.  I can use the usual port forwarding stuff to “publish” to the world if necessary.  Also have another possible setup which replaces the internal networks with bridges so that wireshark can be used to monitor all the traffic without having to have a VM with that installed.

Other than that, VirtualBox seems as good as Vmware.  In particular it’s “seamless” mode which allows Windows windows (and the taskbar) to appear on my Ubuntu desktop is way cool – Vmware 6.5 (currently in Beta) will do this too.

VirtualBox is free for personal and evaluation use.

This entry was posted in Virtualisation and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.