[SOLVED] Help with Vbox kernel module

Discussions related to using VirtualBox on Linux hosts.
Post Reply
daltonv
Posts: 13
Joined: 7. Feb 2015, 20:47

[SOLVED] Help with Vbox kernel module

Post by daltonv »

I'm running Fedora 22, and after installing and running VirtualBox I get this message:

Code: Select all

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.1.3-200.fc22.x86_64) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /etc/init.d/vboxdrv setup

         You will not be able to start VMs until this problem is fixed.
I ran '/etc/init.d/vboxdrv setup' and it fails at 'Starting VirtualBox kernel modules'. Why is this happening? I've attached the 'dmesg' log.
Attachments
vbox_dmesg.txt
(84.45 KiB) Downloaded 422 times
Last edited by daltonv on 6. Aug 2015, 04:30, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Help with Vbox kernel module

Post by Perryg »

Post the /var/log/vbox-install.log

Where did you get the VirtualBox install from, Repo or VirtualBox.org?
daltonv
Posts: 13
Joined: 7. Feb 2015, 20:47

Re: Help with Vbox kernel module

Post by daltonv »

Perryg wrote:Post the /var/log/vbox-install.log

Where did you get the VirtualBox install from, Repo or VirtualBox.org?
I got it by typing 'dnf install VirtualBox-5.0.x86_64' into terminal. I've attached the vbox-install.log as well.
Attachments
vbox-install.log
(2.75 KiB) Downloaded 397 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Help with Vbox kernel module

Post by Perryg »

I would remove that one and install the one from here: https://www.virtualbox.org/wiki/Linux_Downloads

The location of ../extra/ does not relate to what I see with the official build.
daltonv
Posts: 13
Joined: 7. Feb 2015, 20:47

Re: Help with Vbox kernel module

Post by daltonv »

Perryg wrote:I would remove that one and install the one from here: https://www.virtualbox.org/wiki/Linux_Downloads

The location of ../extra/ does not relate to what I see with the official build.
I uninstalled the current one I had and installed the one from the Virtualbox.ord downloads. When I ran it, I still got the same error telling me to execute '/etc/init.d/vboxdrv setup', and the setup failed again in the same way. Seems like if it is possible to see why the kernel module installation is failing, virtualbox will work normally.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Help with Vbox kernel module

Post by Perryg »

What does it show in the terminal window while installing?
daltonv
Posts: 13
Joined: 7. Feb 2015, 20:47

Re: Help with Vbox kernel module

Post by daltonv »

Perryg wrote:What does it show in the terminal window while installing?
This is what the installation says:
vbox_install.png
vbox_install.png (57.76 KiB) Viewed 46294 times

And this is what shows when I run virtualbox:
vbox_start.png
vbox_start.png (59.55 KiB) Viewed 46294 times

For some reason the installation is doing something weird, it's like I didn't fully uninstall it before.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Help with Vbox kernel module

Post by Perryg »

There is something really wrong. I just installed version 5 on f-22 to see if there was a problem and it installed and worked just fine. I did youse the yum extender to install it though just in case that is what you were using. After doing a dnf update and reboot, I downloaded V-5 and let yum do its thing. It did add several packages on a new install of F-22 so I will post the screen shot of that in case it helps.
fedora-22-vbox-install.png
fedora-22-vbox-install.png (44.13 KiB) Viewed 46293 times
daltonv
Posts: 13
Joined: 7. Feb 2015, 20:47

Re: Help with Vbox kernel module

Post by daltonv »

Perryg wrote:There is something really wrong. I just installed version 5 on f-22 to see if there was a problem and it installed and worked just fine. I did youse the yum extender to install it though just in case that is what you were using. After doing a dnf update and reboot, I downloaded V-5 and let yum do its thing. It did add several packages on a new install of F-22 so I will post the screen shot of that in case it helps.
fedora-22-vbox-install.png
Ok. I completely reinstalled Fedora, and did nothing else to it but go to virtualbox.org downloads and download the one for Fedora 22. I used the default software installer to do this, and after it was done I ran virtualbox. When I tried to boot up a VM, it gave the same error about the kernel module (????). This time when I ran the thing it said I should, it failed earlier on 'Recompiling VirtualBox kernel modules', and said to look in vbox-install.log. In the log, it says: 'Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.' This is extremely frustrating; why wouldn't it work on a completely fresh install??? Do I need to update some things?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Help with Vbox kernel module

Post by Perryg »

The first thing to do after a new install is to run the update so you have the packages that have not been updated yet. Then you should be able to run the install and it pick up the remaining packages. If not then you need to install them manually.

These should be installed if they are not already.

linux-headers-$(uname -r)
dkms
gcc
daltonv
Posts: 13
Joined: 7. Feb 2015, 20:47

Re: Help with Vbox kernel module

Post by daltonv »

Solved it. I just had to change the boot mode from 'UEFI' to 'UEFI with CSM'. Virtualbox now works fine.
Christopher Ryan
Posts: 1
Joined: 26. Apr 2016, 01:02

Re: [SOLVED] Help with Vbox kernel module

Post by Christopher Ryan »

Greetings,

This is my first post and I registered for the simple sake of saving anyone else the trouble in the future with this error. This is the result of your Linux workstation not having the kernel source installed. I ran into this error on a fresh installation of OpenSuse Leap 42.1 with Oracle VirtualBox 5.0.18 r106667.

To resolve, I simply ran sudo zypper install kernel-devel gcc
This installed kernel sources and gcc compiler to compile the missing kernel module. Once complete, running the following again should compile and load the correct kernel module to allow vagrant to create new virtual machines:
sudo /sbin/rcvboxdrv setup

I believe this is the true solution as this thread is marked SOLVED by a UEFI option that I believe has nothing to do with this working for the previous post by daltonv.
Djak
Posts: 1
Joined: 15. Dec 2016, 11:45

Re: [SOLVED] Help with Vbox kernel module

Post by Djak »

Christopher Ryan wrote:Greetings,

This is my first post and I registered for the simple sake of saving anyone else the trouble in the future with this error. This is the result of your Linux workstation not having the kernel source installed. I ran into this error on a fresh installation of OpenSuse Leap 42.1 with Oracle VirtualBox 5.0.18 r106667.

To resolve, I simply ran sudo zypper install kernel-devel gcc
This installed kernel sources and gcc compiler to compile the missing kernel module. Once complete, running the following again should compile and load the correct kernel module to allow vagrant to create new virtual machines:
sudo /sbin/rcvboxdrv setup

I believe this is the true solution as this thread is marked SOLVED by a UEFI option that I believe has nothing to do with this working for the previous post by daltonv.
Thank you, Christopher, you saved a lot of my time.
On CentOS 7:

sudo yum install kernel-devel gcc

And Guest Additions installed well after
Post Reply