Virtualisation with FreeBSD and VirtualBox

There's not a lot of choice for FreeBSD users who want to run virtual machines on a FreeBSD server. There's of course Jails, which is perfect if you want to run only FreeBSD guests. And there's some development taking place in order to run Xen Dom0 on FreeBSD, but I don't think that's anywhere near usable yet. That leaves us "only" with VirtualBox. To be honest, I haven't taken it seriously so far, because I perceived it as a tool to quickly spin up VMs on a desktop environment only. (With its main benefit being that it runs on a number of operating systems for free. This comes in handy if you need to provide OS images to developers, for example.)

It wasn't until I gave it a go on a Linux server that I realised how powerful it has become over the last few years. And the good news: There's a FreeBSD port for it, which is under active development. Armed with a FreeBSD 9.0 server, it was time to give it a spin there too. Admittedly I'm surprised how well it works and performs. Obviously you cannot compare VirtualBox guests with optimised guests on Xen (which leverage paravirtualisation, if possible). Or can you? Depends on your use-case, guest OS, hardware and a number of other factors, I suppose. I'm sure the performance battle between different hypervisors is going to continue for some time to come and will sport all sorts of biased or inappropriate benchmarks for marketing and fanboi-ism purposes :-)

However, if you compare Linux/KVM and FreeBSD/VirtualBox, you're in for surprises. Positive surprises. That's my personal observation anyway, which I won't back up with benchmarks for the reasons stated a second ago.

Apart from the performance discussion, VirtualBox also offers a plethora of useful features, which you don't typically read about:

  • iSCSI support
  • Teleporting (aka live migration, even if the hosts run VirtualBox on top of different operating systems, like FreeBSD, Windows, OSX, Linux)
  • Snapshots, Cloning, Export/Import via OVF, Conversion of disk images between different types
  • built-in VNC server (much better than Xen's)
  • I/O bandwidth limitation and grouping
  • CPU usage limitation
  • (and for desktop users all the gimmicks like USB/DVD pass-through, shared folders, seamless integration etc pp, but that's irrelevant for me personally)

If you'd like to try VirtualBox on a FreeBSD server yourself, head over to my wiki to get you started.

Comments !