Tuesday, September 29, 2009

Open source Xen vs. XenServer

So, I already convinced you to choose Xen hypervisor for your servers. Great. Now you're wondering whether to choose a community-supported Xen or commercial (but free of charge) XenServer? The usual answer is: it depends.


Both projects share most of the code. Xen is developed as an open source project, but Citrix - the company behind the XenServer - is the main contributor. Once a year or so, the current version of Xen is bundled with some additional software, tested thouroghly and branded as XenServer. You should get the same performance from both versions. With open source Xen, you can run the bleeding-edge development version with more features, but doing so on a production server is a really bad idea. XenServer is a complete product, open source Xen is more like a component - only coupled with your Linux distribution and some additional software it will provide a full solution. In short - more work to set it up properly, but more flexibility.

XenServer pros

The best point of XenServer is extremally easy setup. You can have your software installed and virtual machines running in literally 10 minutes. Advanced features like live migration don't take much longer. All you have to do is:
- download 2 CDs - base installer and Linux guest support.
- install them, following on-screen instructions, on as many servers as you like - the installer looks just like the one in RedHat
- install XenCenter management console on a Windows(!) workstation,
and you're ready to go. You can put all your servers in one group and manage them centrally. Live migration only requires a shared network storage. Spawning a new VM is just a few clicks, as is snapshoting, suspending/restoring and other typical administration tasks.

XenServer cons

Starting with minor issues: XenCenter management console only works on Windows. Many sysadmins prefer to work with Linux, but there's usually a Windows machine somewhere, so it's not a big deal. Upgrade process is awkward - you can only do it from XenCenter. I wish Citrix used something like Yum or apt-get, so it could be initiatied from the server or in many cases completely automated. On the plus side, it's easy to perform a rolling upgrade: migrate your VMs out of the box you're upgrading to other machines, upgrade it, restart, move machines back, empty another box, repeat until done. XenServer doesn't use xm tool familar to many sysadmins. It uses xe instead as a CLI interface. It has more features, but a different syntax - yet another thing to learn.

Middle-weight problem: XenServer only works on 64-bit CPUs. New servers are usually 64-bit anyway, but many companies have few year old servers which are completely fine, except they're 32-bit. Mine has.

The biggest drawback of XenServer is it's closed nature. Open source Xen management tools don't work with Xen Server. That includes provisioning apps like xen-tools, all monitoring tools based on RedHat's libvirt and goes up to private cloud systems. XenServer offers it's own management tools: command-line xe, text-mode menu system xsconsole and GUI XenCenter (pictured above). If you're not satisfied with them, tough luck. Many advanced or even not-so-advanced features like e-mail alerts are possible with community Xen, but blocked in XenServer unless you buy Citrix Essentials license. There are also some 3rd party products that would give you more features. Neither them nor Citrix Essentials offer as much as Eucalyptus or Nimbus. Of course, also neither of them requires 2 weeks to learn and setup properly.

What to choose?

If you only want to run a few servers for typical business app (none of private cloud fancy stuff) and all of them are 64-bit, XenServers is a great choice. It will save you many days of work. Otherwise, you have no choice but to run community Xen. Choose wisely, because it's not easy to switch. Converting VM image between these versions of Xen is complicated manual process. In fact, it's easier to migrate a physical server.

More info on XenServer:
Citrix website
IBM Redbook article


  1. FInally - some 4 years later, XenServer and Xen are converging... XenServer 6.2 should put paid to the biggest drawback mentioned here...?

  2. Thank you. Your writing helped my decision. :)