Latest Version of VirtualBox Kernel Errors on CentOS 5, i386
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Latest Version of VirtualBox Kernel Errors on CentOS 5, i386
Hello everyone. I installed VirtualBox on my CentOS system as an alternative to Xen.
However, when I tried to run it from the .run file it got an error. I got the .rpm file, thinking maybe there was an error with the .run file on my system. The RPM installed fine. I made a 10 GB Virtual Hard Drive and targeted my image: ~/iso/dfly-1.8.1.iso
When I tried to run the machine, however, I got a message that the VirtualBox Kernel had not been setup.
I ran:
Code:
/etc/init.d/vboxdrv setup
It failed, saying that kernel files were not found.
Code:
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
The logfile printed out the following:
Code:
which: no dkms in (/sbin:/usr/sbin:/bin:/usr/bin)
Makefile:127: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
Getting CentOS kernel sources to build VirtualBox kernel module
Hi. You're in luck because I'm doing the same exact thing (except my server is x86_64.)
You will need the kernel sources. Downloading kernel-devel or kernel-headers does not work. CentOS kernel sources aren't available through yum, so I used these steps from the CentOS wiki. http://wiki.centos.org/HowTos/I_need_the_Kernel_Source
Getting CentOS kernel sources to build VirtualBox kernel module
of course, you may not run some of these commands if you already have the packages installed.
Hi,
A few notes that may save someone somewhere a little bit of time.
I could not get VirtualBox to run on a Xen kernel which I had installed on a clean Poweredge 1900, 4Gb RAM, 2xQuad core Xeon. The final straw was my inability to get the actual Xen headers. Any builds I did complete complained about structs.
There were several people on different forums having lots of difficulty trying to get that configuration to work. Then I researched and found that there were issues over the future of Xen anyway so I made an executive decision to abandon it. (yes I got lazy and fustrated) So after hours of fustration I installed a PAE kernel.
So here is how I installed VirtualBox on a PAE kernel
uname-a
Linux xxxxxx 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST 2009 i686 i686 i386 GNU/Linux
On initial install of Virtual Box I had the following error:
VirtualBox-2.2.4_47978_rhel5-1.i386
Creating group 'vboxusers'. VM users must be member of that group!
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.
Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute
/etc/init.d/vboxdrv setup
as root.
After hours messing with Xen kernel I was expecting as much!
So as recommended I carried out the setup
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
Darn, here we go again..
So I updated headers for PAE kernel.
Tried the setup again but forgot that I had a clean install of centos so had to install gcc!
yum install gcc
and redid the setup
I still had errors as the compilers could not find the headers.
** Compiling vboxdrv
Makefile:145: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
The following declaration stating where the correct headers were did the trick.
(Note that this directory depends on the kernel version!)
export KERN_DIR=/usr/src/kernels/2.6.18-128.1.10.el5-PAE-i686/
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [ OK ]
So here is how I installed VirtualBox on a PAE kernel
uname-a
Linux xxxxxx 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST 2009 i686 i686 i386 GNU/Linux
On initial install of Virtual Box I had the following error:
VirtualBox-2.2.4_47978_rhel5-1.i386
Creating group 'vboxusers'. VM users must be member of that group!
No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.
Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute
/etc/init.d/vboxdrv setup
as root.
After hours messing with Xen kernel I was expecting as much!
So as recommended I carried out the setup
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
Darn, here we go again..
So I updated headers for PAE kernel.
Tried the setup again but forgot that I had a clean install of centos so had to install gcc!
yum install gcc
and redid the setup
I still had errors as the compilers could not find the headers.
** Compiling vboxdrv
Makefile:145: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
The following declaration stating where the correct headers were did the trick.
(Note that this directory depends on the kernel version!)
export KERN_DIR=/usr/src/kernels/2.6.18-128.1.10.el5-PAE-i686/
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [ OK ]
Yay.#
Tony
After doing this I see the following message
Quote:
/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)
Quote:
vboxdrv: version magic '2.6.29.5-191.fc11.i686.PAE SMP mod_unload 686 ' should be '2.6.29.4-167.fc11.i586 SMP mod_unload 586 '
Hi,
I freshly installed and updated my centos 5 2.6.18-164.elPAE (uname -r) with yum upgrade.
As a precaution I installed the kernel development headers in advance of previous issues but it was not needed.
I installed VirtualBox 3.0.8 r53138 and there has been no installation, configuration or running issues so far. (Why cant everything be like this?)
Happy days,
T
# export KERN_DIR=/home/local/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/
# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [ OK ]
You should now be able to start VirtualBox. Hopefully I didn't forget anything; it took me the whole morning to sort this out.
My machine was compiling the kernel and my machine crashed. My computer just restart. Now when boot up it get to where it said starting Virtual Box kernel module (something like that, i dont remember the message correctly) then the machine just restart again.
How do i fix it? Anyway to restore the previous kernel?
[root@191474 yum.repos.d]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMS
Error! Your kernel headers for kernel 2.6.35.4-grsec-hostnoc-4.3.0-x86_64-libata cannot be found at
/lib/modules/2.6.35.4-grsec-hostnoc-4.3.0-x86_64-libata/build or /lib/modules/2.6.35.4-grsec-hostnoc-4.3.0-x86_64-libata/source.
[FAILED]
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@191474 yum.repos.d]#
[root@191474 yum.repos.d]# You will not be able to start VMs until this problem is fixed.
I have searched all over the place i have tried everything that people have posted. I think there might be something wrong with my Kernel i am new to Linux idk how to update that and also i notice that my repos are looking at my data-center idk how to make them look at the CentOS ones or how to tell it to look there first. I played around with Priority for a bit and fixed a few problems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.