Installing VirtualBox on a PAE Kernel System

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.

Share and Enjoy:
  • Twitter
  • del.icio.us
  • Digg
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Print
  • StumbleUpon

1 Trackbacks

You can leave a trackback using this URL: http://systembash.com/content/installing-virtualbox-pae-kernel-centos/trackback/

  1. By Dave Drager on December 29, 2008 at 7:59 pm

    New blog post: Installing VirtualBox on a PAE Kernel System http://tinyurl.com/84muq6

4 Comments

  1. Tony Palmer

    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!

    Posted June 11, 2009 at 4:38 am | Permalink
  2. Ajitabh Pandey

    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.

    Posted August 22, 2009 at 6:01 am | Permalink
  3. Roger Trancozo

    Com o RHEL5.3 – Linux 2.6.18-164.el5PAE – funcionou.
    Muito obrigado.

    Posted September 15, 2009 at 11:38 am | Permalink
  4. sonic

    Muchas gracias, me solucionaste mi problema. :D

    Posted December 12, 2009 at 7:16 pm | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*