Ceph and libvirt technology preview
This "technology preview" is an experimental set of software packages which allow you to experiment and play with XenServer (formerly XCP) + CentOS 6.4 + ceph storage + libvirt. Obviously the packages should not be used in production! However now is a good time to play, discover issues, suggest things, build things and generally get involved.
Pre-requesities
You need a CentOS 6.4 x86_64 physical host.
Installing the tech preview
The tech preview consists of an RPM repo for CentOS 6.4 which contains the experimental software. It can be installed by first adding the repository:
rpm -ihv http://xenbits.xen.org/djs/xenserver-tech-preview-release-0.3.0-0.x86_64.rpm
and then installing the xenserver-core metapackage:
yum install -y xenserver-core
Once the packages have been installed, you can create a basic system configuration by running:
xenserver-install-wizard
Note the wizard works best on 'clean' environments (i.e. like that just after a fresh CentOS install). If it fails either: correct the problem and re-run, or perhaps inspect what the script is doing and adapt to your environment. Once the basic configuration is completed, you must reboot your system. Note: it should be possible to polish the script so that a reboot becomes unnecessary.
Once the machine reboots, you should be able to connect XenCenter to the management IP, or to login to dom0 and use the 'xe' CLI (with tab completion)
Observe that:
- we're installing the tech preview XenServer via a normal-looking package repository rather than via a custom .iso. Hopefully we'll be able to use 'yum' more in future.
- we're installing on top of a vanilla 64-bit CentOS 6.4, rather than a 32-bit CentOS 5.7. Hopefully we'll be able to track the underlying distro more closely in future.
Connecting to ceph storage
Next you must connect your CentOS host to an existing ceph cluster. Typically this involves writing a /etc/ceph/ceph.conf and exchanging keys. Have a look at the Ceph documentation
Before you can run VMs from ceph storage, you must create a XenServer "Storage Repository" (libvirt calls this a "storage pool"). Create a small text file describing the ceph storage, as if you were going to run "virsh pool-create" on it. My sr.xml which describes a ceph pool named "ceph" looks like:
<pool type='rbd'> <name>ceph</name>
<name>rbd</name>
<host name='10.80.237.208' port='6789'/>
</pool>
Then type
xe sr-create type=libvirt name-label=ceph device-config:xml-filename=sr.xml
You should now be able to manage your ceph SR via XenCenter and the 'xe' CLI.