Search This Blog

Showing posts with label xenapi. Show all posts
Showing posts with label xenapi. Show all posts

Tuesday, May 20, 2014

What is the difference between XenServer vs Xen vx XCP vs XAPI

It wasn't clear to me at fist what the differences are between XenServer, Xen and XCP. To make it even more confusing the documentation in many place were referring to XAPI and its importance in managing the hypervisors.

To understand what the XAPI is and how it can be used please take a look at this demo I wrote: How to install ipython on XenServer and test XAPI. As we can see the XAPI is an elegant way on top of the hypervisor itself that exposes some more advance API operation to help to control and managed the VM and hypervisor live cycle.

In a very simplistic way you can think of Xen as a 'hypervisor kernel'. The kernel itself may be difficult to use so we need some management software bundled with it.

It is similar comparing Linux kernel and a distribution together. It is hard to use the kernel on its own, we need a more user friendly tools to do this and this is the place where GNU toolchain is coming into play.

Once we understand this it is now easy to understand this FAQ: What's the difference between Xen hypervisor (from xen.org) and Citrix XenServer or XCP?

If you understood what the last link is about please take a look at these for more advance comparisons:
Here is an example showing the differences between the XenServer and Xen management cli:

How to install ipython on XenServer and test XAPI

We've been using the more user friendly shell to interact with python before: ipython. The example below are showing first how to install and enable EPEL repository to be able to install ipython. Next we are going to write a simple XAPI demo program.

Install ipython
  • Find the distro your XenServer is based on
cat /etc/issue.net
CentOS release 5.7 (Final)
Kernel \r on an \m
  • Check enabled repository 
yum repolist
  • From the EPEL install the relevant rpm packets that will add new repository to your yum
# http://fedoraproject.org/wiki/EPEL
# http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html

rpm --force -i http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
  • Update the repo info
yum list 
yum list | grep ipython
  • Install ipython
yum install ipython.noarch
  • Start and verify that ipython is working fine
ipython

In [3]: import sys
In [4]: sys.version
Out[4]: '2.4.3 (#1, Sep 21 2011, 20:06:00) \n[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)]'

Xapi example using ipython

References

XAPI:
http://blogs.citrix.com/2011/05/18/so-what-is-xenserver-xapi/
http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/sdk.html#language_bindings-python

Packages:
http://xmodulo.com/2012/05/how-to-install-additional-packages-in.html
http://thomas-cokelaer.info/blog/2012/01/installing-repositories-under-centos-6-2-to-get-ipython-r-and-other-packages/
http://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F