Compile the XAPI toolstack from source

From Xen

There are 2 reasonably simple ways to build XAPI and related components:

via opam

Opam is a source-based package manager which has a developer-friendly workflow. The following commands assume an Ubuntu host, update to match your distro of choice:

apt-get install opam -y

Next the dependencies of xapi can be installed:

sudo apt-get install $(opam install xapi -e ubuntu)

Finally xapi itself can be built:

opam install xapi

via RPM

The open-source XenServer "buildroot" has a convenient Makefile to build Xapi via RPM (and experimentally via .debs also):

On a CentOS 6 machine:

yum install -y epel-release

After adding EPEL, install and set up mock:

yum install -y mock redhat-lsb-core

Mock will refuse to run as root. You must choose a non-privileged user to run mock as. Type the following as root:

(Note select a <user> which isn't "mock" when typing the commands below)

useradd <user> -G mock
passwd <user>
su - <user>

You are now ready to clone the buildroot repository and build the packages:

git clone git://
cd buildroot