Thursday, January 03, 2008

Virtualisation (take 3)

Okay, one minor hiccup overcome. I attempted to RDP into one of my VirtualBox VMs yesterday, and found that I couldn't, for one reason and one reason only. By default, VirtualBox (on Linux, anyway) sets up the VM running via a NAT connection, and for those in the know, this basically piggybacks on the current IP address, rather than getting it's own MAC / IP address. This is fine for VMs where you only ever want to communicate "out", i.e. surf the web from the VM etc., but when you want to use them as "servers", i.e. to communicate "to" them, it's no good. And this is precisely what I pretty much exclusively use them for.

Well, it's a bit bizarre to set up a bridging network in Ubuntu, but it is possible, and actually works really well, it's just a little bit more fiddly than VMware, which does it by default.

I'm not going to go into too much detail (if anybody wants the detail, then by all means email me), but you basically have to set up some custom bridging network adapters, (via the bridge-utils package), assign the bridged adapter an IP address, and then associate the VM with the adapter. Now, I've currently only got it working via DHCP, and, unfortunately, my router's not fantastic at this, so, in the past, I've tended to manually assign the IP addresses to my network nodes, but it seems to be working at the moment, fingers crossed.

I suppose a downside, and it's whether you consider it a downside or not, is that, using this approach, you have to have a seperate bridge adapter for each VM, since VirtualBox can't even start a VM which is sharing an adapter, but I can live with this at the moment, even though I have 5 adapters defined. Fortunately, a quick

$ ifconfig down

disables the currently unused adapter.

So, what's the state of play?

Well, I currently have the following VMware VMs :

1. MediaWiki running via a JumpBox
2. Oracle Enterprise Linux 5
3. Minix

And the following VirtualBox VMs :

1. Ubuntu 7.10
2. Ubuntu 7.10 JeOS
3. Google gOS
4. Damn Small Linux 4.2.2

Sad, moi? ;-)