Facebook Twitter Gplus RSS
 
 
Home » CentOS 5.4 Tutorials » How to install XEN 3.4.1 on CentOS 5.4
formats

How to install XEN 3.4.1 on CentOS 5.4

Published on October 23rd, 2009

centosxenWhat is Xen?

The Xen hypervisor, the powerful open source industry standard for virtualization, offers a powerful, efficient, and secure feature set for virtualization of x86, x86_64, IA64, ARM, and other CPU architectures. It supports a wide range of guest operating systems including Windows, Linux, Solaris, and various versions of the BSD operating systems.

Preliminary Note:

I’m using a CentOS 5.4 x86_64 base installation in this tutorial

* server1.example.co.za (IP 10.0.0.100): CentOS 5.4 x86_64 Base installation

Install the Gitco repository

Browse to http://www.gitco.de/repo/ and grab the latest repo for your arch. (in this case x86_64)

# cd /etc/yum.repos.d/
# wget http://www.gitco.de/repo/GITCO-XEN3.4.1_x86_64.repo

Remove previous installations of XEN before re-installing XEN 3.4.1

# yum groupremove Virtualization
# yum groupinstall Virtualization

Edit grub.conf to reflect the correct default Kernel

# vi /etc/grub.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-128.7.1.el5xen)
        root (hd0,0)
        kernel /xen.gz-3.4.1
        module /vmlinuz-2.6.18-128.7.1.el5xen ro root=/dev/VolGroup00/LogVol00
        module /initrd-2.6.18-128.7.1.el5xen.img
title CentOS (2.6.18-128.1.16.el5xen)
        root (hd0,0)
        kernel /xen.gz-3.4.1
        module /vmlinuz-2.6.18-128.1.16.el5xen ro root=/dev/VolGroup00/LogVol00
        module /initrd-2.6.18-128.1.16.el5xen.img
title CentOS (2.6.18-128.el5xen)
        root (hd0,0)
        kernel /xen.gz-3.4.1
        module /vmlinuz-2.6.18-128.el5xen ro root=/dev/VolGroup00/LogVol00
        module /initrd-2.6.18-128.el5xen.img
title CentOS (2.6.18-164.el5xen)
        root (hd0,0)
        kernel /xen.gz-3.4.1
        module /vmlinuz-2.6.18-164.el5xen ro root=/dev/VolGroup00/LogVol00
        module /initrd-2.6.18-164.el5xen.img

Reboot the machine for new XEN kernel to take effect

# reboot

After the reboot check the Kernel to reflect the change

# uname -r
2.6.18-128.7.1.el5xen

 
  • http://www.facebook.com/people/Ciprian-Pantea/1638527549 Ciprian Pantea

    Hey,

    I followed your tut and I have a problem… the system doesn’t boot up. everything is fine, grub.conf is fine, the files are there, no errors installing, just system doesn’t boot but it’s remote so I can’t see what’s the error message that it’s failing with…

    Any ideas?

    PS: centos 5.5 on a core 2 quad.

  • Anonymous

    Hey Ciprian,

    Without a monitor attached to see any errors we’re pretty much shooting in the dark.

    Your machine might need human intervention in the form of hit F1 to continue or something similar.

    Is there somebody on site that could have a look?

  • Anonymous

    Hey Ciprian,

    Without a monitor attached to see any errors we’re pretty much shooting in the dark.

    Your machine might need human intervention in the for of hit F1 to continue or something similar.

    Is there somebody on site that could have a look?

  • Leon Baker

    Thanks, It worked great. Just one issue with multiple nics and bridges. Every few hours all my VM’s loose all network connectivity for a few minutes. Strange thing is that network connectivity to dom0 is fine, but dom0 has no network connectivity with the VM’s. It magically comes right after a while. I tried turning on stp for the bridges but it didn’t help. Unfortunately it is a show stopper, so I went back to the default xen 3.0.3 and problem fixed.

  • Anonymous

    Leon – Do your VM’s use the xenbr0 ?

  • http://www.TheMarketingDeviant.com Mitch Sanders

    Hey,

    Thanks for this excellent article. Helped alot.

    I found that its easier to use the following command rather than doing a groupinstall

    “yum install kernel-xen xen”

    The reason being is that I am installing via command line on a CLI only web server, so I do not need all the gnome stuff or any of the GUI based apps. So it only installed the bare essentials to get Xen to work and purrrrrrr nicely on my shinny new server.

    Thanks again for the great user guide!

© [How2CentOS]
credit