I recently got stuck while trying to install Headless Virtualbox on a Centos 5.2 server per the directions at Howtoforge here. The RPM failed with the error that it couldn’t find the kernel source. I thought I had already installed kernel-devel, and confirmed that I did. The instructions were to define the KERN_DIR variable like so:
$ export KERN_DIR=/usr/src/kernels/2.6.18-92.1.22.el5-i686/ $ /etc/init.d/vboxdrv setup Stopping VirtualBox kernel module [ OK ] Removing old VirtualBox netflt kernel module [ OK ] Removing old VirtualBox kernel module [ OK ] Recompiling VirtualBox kernel module [ OK ] Starting VirtualBox kernel module [FAILED] (modprobe vboxdrv failed. Please use 'dmesg' to find out why)
dmesg shows this:
vboxdrv: disagrees about version of symbol struct_module
Interesting!
After several missteps, it turns out there is a separate development rpm for the PAE kernel:
$ yum install kernel-PAE-devel
After that installs, we are good:
$ export KERN_DIR=/usr/src/kernels/2.6.18-92.1.22.el5-PAE-i686/ $ /etc/init.d/vboxdrv setup Stopping VirtualBox kernel module [ OK ] Removing old VirtualBox netflt kernel module [ OK ] Removing old VirtualBox kernel module [ OK ] Recompiling VirtualBox kernel module [ OK ] Starting VirtualBox kernel module [ OK ]
Golden.
Tagged: error, kernel, virtualbox

1 Trackbacks
You can leave a trackback using this URL: http://systembash.com/content/installing-virtualbox-pae-kernel-centos/trackback/
New blog post: Installing VirtualBox on a PAE Kernel System http://tinyurl.com/84muq6
4 Comments
I tried to install VirtualBox on a Xen Kernel. After about 7 hours of banging my head and searching for the correct headers, dealing with build errors etc I gave up! (very unlike me). It just wasnt worth the hassle. I am now working on a PAE kernel, lets hope its more straightforward!
That’s because you must have installed kernel-devel instead of kernel-xen-devel. This will compile the module. But when you try to load the module, it will reboot the system and then you wont be able to boot it unless you boot in single user mode and then disable the vboxdrv init script.
Xen and VirtualBox are incompatible (at least at the time of writing this). Someone filed bug with virtualbox but that was closed with the status as “wont fix”. So I guess you will need some other kernel and not xen.
Com o RHEL5.3 – Linux 2.6.18-164.el5PAE – funcionou.
Muito obrigado.
Muchas gracias, me solucionaste mi problema.