In order to run more recent versions of some guest operating systems, you will need a more recent version of Xen. Unfortunately, the version provided by Red Hat and, subsequently, CentOS is not updated to a new enough version. So to run the newest version of Xen, you will need to update it yourself. Luckily, the process is very simple.
First, you will need to set up the git repository in yum for the latest version of Xen. At writing time of this tutorial, the newest version is 3.4.2, but you should replace that number with whatever the newest version is (found here).
cd /etc/yum.repos.d/ wget http://www.gitco.de/repo/GITCO-XEN3.4.2_x86_64.repo
Next, you’ll need to remove the old version of Xen and replace it with the newest version.
yum groupremove Virtualization yum groupinstall Virtualization
This will install everything, including the correct kernel. As a measure of cleanup, you may wish to remove the i386 version of lib-virt and xen-libs since those are not present in the git repo. They will still be at Xen version 3.0. Note that this step is optional.
yum remove libvirt-0.6.3-20.1.el5_4.i386 xen-libs-3.0.3-94.el5_4.3.i386
The last step is to edit your grub.conf file to ensure that you boot with the correct kernel. Open /etc/grub.conf (which is a symlink to /boot/grub/grub.conf, so you can open either one) and add this to the end:
title CentOS (2.6.18-164.10.1.el5xen) root (hd0,0) kernel /xen.gz-3.4.2 module /vmlinuz-2.6.18-164.10.1.el5xen ro root=LABEL=/ rhgb quiet module /initrd-2.6.18-164.10.1.el5xen.img
This will boot with the new kernel the next time you reboot. Also make sure to set the new default by locating the line that says
default 0
and change it to match where you just placed the new entry. Now simply reboot, and you should be all set!
#1 by Maurits van de Lande on March 4, 2010 - 4:37 am
Quote
Thanks for this post. I have installed xen 3.4.2. as described in this post and added a clustered xen environment with drbd83, gfs and redhat cluster. And it seems to be working fine with Windows server 2008 R2 on Centos 5.4 with Intel XEON processors.
#2 by ac4000 on April 15, 2010 - 2:06 pm
Quote
Fantastic. Thanks for the post.
#3 by K Rodgers on May 17, 2010 - 7:35 am
Quote
Hi i followed the info above but it does not seem to have worked i get the following message:
Error 15:file not found, then get a screen up to alow me to edit the config file.
This displays the following:
root (hd0,0)
kernel /xen.gz-3.4.2
module /vmlinuz-2.6.18-164.10.1.el5xen ro root=LABEL=/ rhgb quiet
module / initrd-2.6.18-164.10.1.el5xen.img
Can you tell me what i did wrong?
Thanks
#4 by fpt on May 17, 2010 - 1:09 pm
Quote
I am encontering some problems during boot:
kernel /xen.gz-3.4.2
[Multiboot-elf, , shtab=0×293078, entry=0×100000
module /vmlinuz-2.6.18-164.10.1.el5xen ro root=LABEL=/ rhgb quiet
Error 15: File not found
Any ideas on how to solve this?
Thanks,
fpt
#5 by Mike on May 18, 2010 - 9:25 am
Quote
You’re both having the same issue. What I’ve found happens sometimes is that this upgrade seems to break the system’s ability to correctly modify the grub.conf file. The way you can quickly fix it right now is to go into the /boot directory and figure out the exact filenames for the files referenced by grub.conf. For instance, if you’re trying to use kernel 2.6.18-164.10.1.el5xen, make sure all files referenced by that section of your grub.conf are actually that version. When I’ve seen it before, I’ll have something like this:
kernel /xen.gz-3.4.2
module /vmlinuz-2.6.18-128.el5xen ro root=/dev/VolGroup00/LogVol00
module /initrd-2.6.18-164.10.1.el5xen.img
The reason it fails with the File Not Found error is because one or more of the files in that config I have there truly isn’t present. Once you edit the file to fix the version numbers to match the files you physically have in your /boot directory, you should be fine again. If you still have problems, post the contents of your /boot directories and your full grub.conf files and I can help you get them right.
#6 by Carl on May 19, 2010 - 7:17 am
Quote
Hi Mike,
Kevin and I work together. We are still having issues but paid for this to be done by another company which we didn’t want to do as it’s a waste knowing you can do it yourself with great guides like this one.
Could you email me your MSN or preferably your Skype name and we can work together to try fix this problem and then we can publish a full step by step guide and FAQ to go along with it?
My Email has been taken when inserting this comment so only an admin can see it I think, Im not sure. If not reply with your email and I’ll send you my information.
Thank You.
#7 by Kevin Rodgers on May 25, 2010 - 1:48 pm
Quote
Hi Mike,
Sorry you not been able to get hold of me been a little busy at the mo. But i believe from carl you where trying to give me a hand to sort out the issue.
Please drop me a mail at anytime and if you can help me sort this problem out that would be great.
My e-mail is in the blogg info.
Kevin
#8 by Jonathan on May 31, 2010 - 2:21 pm
Quote
When I follow your instructions above (I’m using CentOS 5.4), Gnome won’t start up properly anymore (X still starts ok). I have to reinstall the the desktop environment.
Then, virt-managr won’t let me use Local Media or Network boot anymore.
The same thing happens if I use CentOS 5.4 or 5.5.
Any Ideas?
BTW, the kernel and initrd images that gets downloads is newer that what your post says. Could this be causing it?
Thanks
#9 by Jonathan on May 31, 2010 - 2:38 pm
Quote
I’ve even managed to find the kernel version like your post from a site online, and the same thing happens – Local Media Install and Network Boot is greyed out…
#10 by Janez on June 14, 2010 - 6:59 am
Quote
Sam here… gnome dies … wasted some time, ended up nowhere and reinstalled the whole damn thing… will run xen 3.0 until a solution is posted on the web…
#11 by Mike on June 14, 2010 - 10:36 am
Quote
@Jonathon: Ok, the reason you’re having issues is most likely because the upgraded kernel doesn’t see the virtualization extensions on your CPU anymore. It’s only allowing you to do paravirtualized guests, so Windows won’t work. Run this command and see if it returns anything:
egrep ‘(vmx|svm)’ /proc/cpuinfo
If you get no results, it means that your virtualization extensions aren’t active. I have yet to find a solution to this, unfortunately. You’ll probably have to go back to Xen 3.0 or switch to KVM if you need to create Windows 7 or 2008 R2 guests.
@Janez: I have no idea why Gnome would give you problems after this. This doesn’t touch Gnome at all. If you try again and have the same problem, I’d recommend posting exact error messages here or on a Linux help forum. I can try to assist you, but without knowing the error and getting more information from you I can’t do much.
#12 by robin on June 21, 2010 - 5:28 am
Quote
um.. i folowed this instructions and.. same problem with janez.
gnome doesn’t work properly, after i tired to upgrade xen.
and also, version of xen is just 3.1.
#13 by Colin on July 6, 2010 - 7:27 pm
Quote
Hi All,
Came across same GNOME problem.
Apparently
yum groupremove Virtualization
removes the following:
kernel-xen
libvirt
pcmciautils
kernel-xen
gnome-volume-manager
virt-viewer
python-virtinst
libvirt-python
gnome-session
gnome-applet-vm
libvirt
virt-manager
xen
Note gnome-session and gnome-applet-vm.
To fix:
yum groupinstall ‘GNOME Desktop Environment’
Why? I assume gnome-session requires gnome-applet-vm.
Enjoy.
#14 by Mike on July 7, 2010 - 10:34 am
Quote
Before running the remove, run this command:
yum install kernel
The dependency that’s kicking that out is the removal of the kernel. Gnome-volume-manager depends on a kernel to be there, and you briefly remove it. Alternatively, you could also remove the virtualization packages manually using RPM.
rpm -e –nodeps [package]
That will prevent it from checking dependencies prior to removal. You could also try to use yum to just exclude Gnome packages:
yum –exclude=gnome* groupremove Virtualization
I haven’t tested that last one, but it should work. Obviously, verify the yum transaction summary before confirming it.
#15 by ghici on September 7, 2010 - 12:47 pm
Quote
so it`s ok now to make the update?
#16 by Janez on September 24, 2010 - 5:05 pm
Quote
Colin: TNX for reminding me to READ
… didn’t even think about the possibility of removing gnome-session with ‘yum groupremove Virtualization’ …
anyway… no network boot, local iso image problem and no full-virt Jonathan experienced seems to be a virt-manager problem not kernel or xen. One forum post on centos.org claims it to work OK if you recompile virt-manager 0.8.5 and python-virtinst 0.500.4 (fedora pre FC14 stuff) from source. If this is indeed virt-manager problem, it should work OK from command line – Jonathan, can you verify if it does?
If this is true, I ask myself why gitco repo does not include a proper virt-manager and python-virtinst binaries……
Has anyone explored this further?
Trackback: xentutorial.com
Pingback: Upgrade Xen 3.0 on CentOS 5.5 x86_64 to Xen 3.4.2 » /usr/src/redhat