Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
start [2014/03/24 16:54]
admin [Debian Installation]
start [2015/03/04 08:56] (current)
admin [The Toolstacks: xm (xend), xl (xenlight/libxl), xe (XAPI/XCP)]
Line 1: Line 1:
-====== Virtual Environment Platform Setup ======+====== Virtual Environment Platform Setup using Xen ======
  
-This wiki is currently dedicated at login information regarding the deployment of a virtual environment platform ​on Clevo H150RW laptop.+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 lab machine.
  
-===== Hypervisor Layer ===== +It also contains some VirtualBox VMs configurations that I need to refer to from time to time.
-As the hypervisor layer, we'll first try to setup a Debian Wheezy (7.4.0) base OS using [[http://​www.xenproject.org/​|Xen]] and [[http://​virt-manager.org/​|virt-manager]].\\ +
-Later, for production server deployment, we might try to go for some other configuration,​ in particular using [[http://​www.ovirt.org|oVirt]] will be one of our goals.+
  
-==== Debian Installation ​==== +===== Xen Terminology =====
-The latest Debian installer was used, booted from a USB stick.\\ +
-In case you have no idea how to make a bootable Debian installer USB stick, please refer to the [[http://​www.debian.org/​releases/​stable/​i386/​ch04s03.html.en|Debian documentation on the subject]], our attempt was made using the latest [[http://​http.us.debian.org/​debian/​dists/​wheezy/​main/​installer-i386/​current/​images/​netboot/​mini.iso|netboot mini.iso]] image.+
  
-We won't go into the details ​of installing Debianfollowing ​are simply a few notes that might be of interest ​during this step.+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 seemif 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.
  
-=== Desktop Environment === +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 [[http://​askubuntu.com/​questions/​461471/​ubuntu-14-04-xen-4-4-and-xapi-toolstack#​answer-481704|this StackExchange answer]]. I'll thus replicate the most part of it hereunder so to give the necessary introduction required to get good grasp at what those various elements arehow they fit together, and which ones might be of interest ​to a newcomer like myself.
-Although choosing ​the right desktop environment shouldn'​t ​be a main preoccupationwe decided ​to go for KDE on our first trial install.+
  
-=== Additional Packages ​=== +==== The Xen Hypervisor (Xen) ====
-Also, you might want to add some proprietary drivers on the the space that is left free on your USB key. In our case, the Realtek WiFi interface required the [[https://​packages.debian.org/​fr/​wheezy/​firmware-realtek|rtlwifi/​rtl8192cfw.bin]] package to be present.\\ +
-You'll need to create a new partition in the free space left, using GParted is one of the easiest way to do this.+
  
-Once the packages are present on this extra spaceit seems the Debian installer automatically detects them and uses them.+> The Xen Hypervisor is the thin layer that domains (or vmsreferred 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.
  
-=== Partitionning ​=== +==== The Toolstacks: xm (xend), xl (xenlight/​libxl),​ xe (XAPI/XCP) ====
-In the case of the hypervisor layer, what we'd like is to have as much disk space as possible available for the virtual machines. Therefore we'll apply the following partition schema when the Debian installer asks for the partition method:+
  
-Partitioning method: Manual\\ +> The Toolstack is a set of programs used to manage ​all domains on 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).
-Partition disks: Select your main HD (to delete ​all existing partitions)\\ +
-Create new partitions: Select pri/log FREE SPACE, then create new partition\\ +
-Create ​1GB for /boot filesystem -> Primary -> Beginning -> Ext4 journaling file systemMount point: ​/boot -> Label: Boot -> Bootable flag: on -> Done\\+
  
-Repeat partition setup for another ​one\\ +> There exist other tools that talk to the various toolstacks and provide ​another ​layer of abstraction. The most well known of these is libvirt.
-Use full space available -> Primary -> Use as: Physical volume for LVM -> Done+
  
-**Configure ​the Logical Volume Manager**\\ +> 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:
-Write changes ​to disk and configure LVM?Yes\\ +
-Create volume group: xenvg +
-Select devices: (select only the LVM partition (/dev/sdX2)+
  
-**Create logical volume**\\ +>  1. <color darkslateblue>​**xm (Xend) is going away**</​color>​. This limits your future-proof toolstack choices to xl(libxl) or xapi. 
-Volume group: xenvg\\ +>  2. The xapi toolstack is working towards building xapi on top of libxl.
-Logical volume name: root\\ +
-Logical volume size: 4GB+
  
-**Create logical volume**\\ +<color darkorange>​**Important Note:**</​color>​ xm (Xend) is deprecated and <color darkslateblue>​**it has been removed from Xen 4.5+ !**</​color>​
-Volume group: xenvg\\ +
-Logical volume name: swap\\ +
-Logical volume size: 4GB+
  
-**Create logical volume**\\ +==== the xl toolstack ====
-Volume group: xenvg\\ +
-Logical volume name: var\\ +
-Logical volume size: 20GB+
  
-Finish+> 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//.
  
-=== Set mount points === +> 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 textand when something is misconfigured it's easy to figure out how.
-On top of the listselect ​the first entry +
-<​code>​ +
-LVM  VG  xenvgLV root - 4.0 GB Linux device-mapper (linear) +
-     #​1 ​         4.0GB +
-</​code>​ +
-Use as: Ext4 -> Mount point: / -> Done+
  
-Second: **LV swap** entry: +==== xe, xapi, XCP ====
-Use as: Swap -> Done+
  
-Third: **LV var**: +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.
-Use as: Ext4 -Mount point: /var -> Done+
  
-**Finish partitioning and write changes ​to disk**+> 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.
  
-=== Software selection === +XCP stands for Xen Cloud Platform, XCP is now known as XenServer, which is a full distro.
-[*] SSH server +
-[*] Laptop +
-[*] Standard system utilities+
  
-=== GRUB === +===== XAPI and Debian Jessie / Unbuntu 14.04 =====
-Install the GRUB boot loader to the master boot record? Yes+
  
-**Boot into the new system**+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 !