Wednesday, January 5, 2011

Linux CentOS 5.5 + Xen 3.4.x and virt-manager 0.8.5

Xen Hypervisor is a very powerful tool for any sysadmin. Loads of virtualization capability and free (GPL "free"). What's there not to like... Well, I don't like the CentOS/RHEL xen-3.0.3 version from 2007 for starters and the equally ancient virt-manager. Solution...  with minimal effort follows:

This pair of updates will be done using 2 distinct parts. One easy one a little harder. Please make sure you start with a CPU with vmx or vt (virtualization or vanderpool technology) enabled and running CentOS 5.5 64bit!

Easy part Xen 3.4.x:
  1. cd /etc/yum.repos.d/
  2. wget http://www.gitco.de/repo/GITCO-XEN3.4.3_x86_64.repo
  3. yum install xen kernel-xen (or "yum update" if you an older xen installed)
You could run/try the xen 4.0.x version if you want. You take a look at the information from http://www.gitco.de/repo/.

Note: 03/25/2011 newer versions of 0.8.6 and 0.8.7 have some hefty dependencies on new and/or updated packages. I have yet to successfully build either on CentOS 5.5.
Harder part virt-manager:
  1. sanely setup a build environment on another box (if possible/practical)
  2. install a usable virt-manager-0.8.5-1.fc14.src.rpm :
    rpm --nomd5 -ihv virt-manager-0.8.5-1.fc14.src.rpm
    rpmbuild -bb virt-manager.spec
  3. note the location of the created virt-manager-0.8.5-1.noarch.rpm
  4. install a usable python-virtinst*src.rpm:
    rpm --nomd5 -ihv python-virtinst-0.500.4-1.fc14.src.rpm
    rpmbuild -bb python-virtinst.spec
  5. note the location of the created  python-virtinst-0.500.4-1.noarch.rpm
  6. install both of the packages created with yum:
    yum install /path/to/virt-manager-0.8.5-1.noarch.rpm /path/to/python-virtinst-0.500.4-1.noarch.rpm

Post install notes:
Some kernel updates create an issue for the /etc/grub.conf kernel line entry. Currently for the Xen 3.4.3 installed system, the line should read:
kernel /xen.gz-3.4.3 or
kernel /boot/xen.gz-3.4.3

For example, if you run "xm list" and get " Error: Unable to connect to xend: No such file or directory. Is xend running?" you may need to check your /etc/grub.conf!

You could also try to get the Xen Hypervisor 3.4.3 yourself and try to build a sane package from the Xen guys. Make sure to get the "Linux 2.6.18 with Xen 3.4.x support source tarball"

Virt Manager official web site is HERE

No comments:

Post a Comment