Virtualization Blog

Discussions and observations on virtualization.

Tech preview of XenServer + libvirt + ceph

One of the benefits of making XenServer fully open-source is that it’s easier to integrate directly with other great open-source projects. A project that I’m particularly interested in is Ceph: a distributed storage system which is particularly suitable for storing VM disk images in the cloud. The Ceph community has already integrated support directly into two other open-source projects:

  • qemu: the virtual hardware emulator used by Xen and KVM
  • libvirt: an open-source virtualisation toolkit 

All that’s needed to make Ceph work with XenServer is therefore:

  1. to use a newer version of qemu (in Xen jargon this is called “the upstream qemu”)
  2. to integrate libvirt with the XenServer toolstack (i.e. xapi, xenopsd and friends)

After much coffee-fuelled late-night hacking^Wsoftware development, I’m pleased to announce the availability of a “technology preview” of XenServer integrated with Ceph via libvirt. To give it a go, first install yourself a normal CentOS 6.4 x86_64 system. Second login as root and type:

rpm -ihv

This will add the experimental preview software repository based on the Xen code already in CentOS. Next type:

yum install xenserver-core

-- notice how easy it is to install the core packages of XenServer using the normal CentOS distro tools. Now that XenServer is fully open-source, expect to see more like this in future!

It’s now necessary to set up a basic XenServer configuration. The easiest way is to use a simple install “wizard” by typing:


After the wizard has done its magic and you’ve rebooted, you should be able to connect XenCenter like you would with a regular XenServer.

Assuming you have already configured a Ceph cluster, you need to configure your machine to be a Ceph client, as you would with a regular CentOS host. I recommend having a read of the excellent Ceph documentation. Once complete you should be able to list the currently available Ceph storage pools:

ceph osd lspools

Next you should create a XenServer “Storage Repository” to allow VM virtual disks to be stored on Ceph-- this is where libvirt comes in. In dom0, create a libvirt “storage pool” XML file, as if you were going to issue a “virsh pool-create”. I created a file “ceph.xml” which looks like the following:

<pool type='rbd'>
    <host name='' port='6789'/>

Then type:

xe sr-create type=libvirt name-label=ceph device-config:xml-filename=ceph.xml

You should now have a functioning XenServer Storage Repository which can be managed via the XenAPI and from XenCenter. At this point you should be able to install VMs (both PV and HVM should work) and run them from the Ceph storage.

For more in-depth info about how it all works, known issues and ways you could get involved, have a look at the:


Recent Comments
Tobias Kreidl
Dave, Awesome... Ceph (or something that can be extended to huge storage farms, supports thin provisioning, block and logical I/O,... Read More
Monday, 08 July 2013 11:03
Neil Levine
Hi Tobias, I'm the VP Product at Inktank, who sponsor the Ceph project. We are working on a GUI for Ceph which will be avaiable as... Read More
Tuesday, 09 July 2013 16:17
Tobias Kreidl
Hello, Neil: Thank you for your note. Will Inktank's ceph GUI be integrated with the general XenServer management interface (not s... Read More
Wednesday, 10 July 2013 05:01
Continue reading
84625 Hits

About XenServer

XenServer is the leading open source virtualization platform, powered by the Xen Project hypervisor and the XAPI toolstack. It is used in the world's largest clouds and enterprises.
Technical support for XenServer is available from Citrix.