up vote 1 down vote favorite
share [g+] share [fb]

I'm trying to get kvm installed on CentOS 5.3. Doing "yum install kvm" doesn't quite work. The problem is that the Intel kvm kernel modules won't load:

# modprobe kvm-intel
FATAL: Module kvm_intel not found.

The kvm kernel modules (in the kmod-kvm package) are compiled against kernel 2.6.18-160.el5, but I'm running 2.6.18-164.el5. This means that the kernel module I need to load is /lib/modules/2.6.18-160.el5/extra/kmod-kvm/, but since I'm not running this version of the kernel, it doesn't find the module if I try to load it.

The default kernel in CentOS 5.3 is 2.6.18-128.el5. If I do a "yum upgrade kernel", I get 2.6.18-164.el5. As far as I can tell, the CentOS repositories don't have 2.6.18-160.el5. At least, I can't just do "yum install kernel-2.6.18-160.el5".

I thought I might pull down the kmod-kvm package as a source RPM and build it against my kernel, but doing yumdownloader --source kmod-kvm fails to locate a source version.

link|improve this question

71% accept rate
feedback

2 Answers

up vote 4 down vote accepted

upgrade to 5.4 - it should have KVM inside.

before you do that, check your CPU flags (cat /proc/cpuinfo |grep vm)

if you see the flag, but still can't enabe kvm, check the server BIOS - you might have VT disabled. if it was disabled, enable it and do a full powercycle of the server.

after that

modprobe kvm_intel
link|improve this answer
Yup, the upgrade did it. – Lorin Hochstein Oct 30 '09 at 1:24
feedback

Once upgraded you can follow this steps I wrote to install KVM on CentOS, It's mainly for CentOS 6.2 but I with a few adjustments you can do the same thing on CentOS 5.x.

link
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.