Virtual Environment Platform Setup using Xen
This wiki is currently dedicated at logging information regarding the deployment of a Xen based virtual environment platform I'm willing to setup, mainly as a lab machine.
It also contains some VirtualBox VMs configurations that I need to refer to from time to time.
Xen Terminology
At first, one of the most confusing exercise one have to face once in contact with the Xen project is coping with its (sometimes quite confusing) terminology. Many terms abound in the documentation of which many seem, if not similar, quite identical, and it rapidly becomes hard to clearly understand what the differences are between the various toolstacks, the hypervisor itself and the way the various pieces of the puzzle all fit together. Not to say how to select the ones that may be of interest for your particular purpose.
One of the clearest explanation that I could find covering the most important concepts one need to acquire in order to understand the Xen ecosystem can be found in this StackExchange answer. I'll thus replicate the most part of it hereunder so to give the necessary introduction required to get a good grasp at what those various elements are, how they fit together, and which ones might be of interest to a newcomer like myself.
The Xen Hypervisor (Xen)
The Xen Hypervisor is the thin layer that domains (or vms, referred to as dom0 or domU) talk to when they want resources. It is now part of the linux kernel, so it no longer requires a custom kernel to run. The hypervisor does not have a shell or any easy way to mess with it directly. It is generally configured and managed from a SPECIAL vm we call dom0, on which the toolstack is installed.
The Toolstacks: xm (xend), xl (xenlight/libxl), xe (XAPI/XCP)
The Toolstack is a set of programs used to manage all domains on a host and to generally tell the Xen Hypervisor what to do. […] The primary toolstacks of choice are xe(XAPI/XCP), xl(xenlight/libxl), and xm(xend).
There exist other tools that talk to the various toolstacks and provide another layer of abstraction. The most well known of these is libvirt.
Not too long ago(ok, maybe awhile ago), xen hypervisor development was taken over by the linux foundation, which opened up a lot of doors as far as development was concerned. The most important things that you need to know are:
1. xm (Xend) is going away. This limits your future-proof toolstack choices to xl(libxl) or xapi.
2. The xapi toolstack is working towards building xapi on top of libxl.
Important Note: xm (Xend) is deprecated and it has been removed from Xen 4.5+ !
the xl toolstack
The xl toolstack is effectively a command line tool to manage the xen hypervisor. It generally is given a vm .cfg file […] and turns them into running vms via xl create.
It doesn't manage the creation of filesystems on iscsi targets or lvm systems. It is pretty dead simple and if you are starting with xen, it is imho the best place to get started as you can get a feel for what xen is doing and why. Additionally, the config files are human readable plain text, and when something is misconfigured it's easy to figure out how.
xe, xapi, XCP
The xapi toolstack makes scaling xen vm deployment trivial. There are two parts to xapi, the xe command line tool and the xapi api which is accessible via rpc via a web interface. XAPI is what XenCenter talks to and is a fundamentally different experience from the simplicity of xl. With xapi, there are tools for managing lvm partitions, snapshots, remote storage, advanced networking, performance statistics, patches, etc etc etc.
It is much much more than a hypervisor toolstack in that it manages all parts of the host system. If you want to get used to xapi, the best route is to install Citrix XenServer and manage it from XenCenter. Once you get a feel for the GUI, ssh into your XenServer and start playing with the xe command. Everything, including the uuids that are associated with vms, are tab-completable and the help documentation is fairly complete.
XCP stands for Xen Cloud Platform, XCP is now known as XenServer, which is a full distro.
XAPI and Debian Jessie / Unbuntu 14.04
As unfortunate as it is, you should be aware that, as of this writing (2015-03-02) XAPI is not available under Debian Jessie nor under Ubuntu 14.04. In fact all platforms other than CentOS is no longer supported by Citrix, XCP has deprecated and major dependencies are now broken !