Ask Your Question
3

VirtualBox not working in Fedora21

asked 2014-11-01 19:42:48 -0500

pgrm gravatar image

updated 2014-11-01 19:43:28 -0500

Hi,

I've upgraded to f21, and so far the only thing really broken seems to be VirtualBox. I've found many other posts about it, but none of which worked for me.

I've installed VirtualBox from rpmfusion - because VirtualBox's repository doesn't exist for f21 and these are the packages / dependencies installed:

================================================================================
 Package            Arch   Version                         Repository      Size
================================================================================
Installing:
 VirtualBox         x86_64 4.3.18-1.fc21                   rpmfusion-free  21 M
Installing for dependencies:
 VirtualBox-kmodsrc x86_64 4.3.18-1.fc21                   rpmfusion-free 652 k
 akmod-VirtualBox   x86_64 4.3.18-1.fc21                   rpmfusion-free  21 k
 akmods             noarch 0.5.1-3.fc19                    rpmfusion-free  19 k
 kmod-VirtualBox    x86_64 4.3.18-1.fc21                   rpmfusion-free  14 k
 kmodtool           noarch 1-23.fc20                       rpmfusion-free  13 k
 rpmdevtools        noarch 8.5-1.fc21                      fedora         102 k
 xemacs-filesystem  noarch 21.5.34-8.20140605hgacf1c26e3019.fc21 fedora    20 k

The kernels I've tried it with are:

Linux lati6520 3.17.1-300.fc21.x86_64 #1 SMP Wed Oct 15 20:53:21 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

and

Linux lati6520 3.17.1-303.fc21.x86_64 #1 SMP Wed Oct 15 20:53:21 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

but I always get the error that drivers are missing.

Usually I would have installed drivers like kmod-VirtualBox-KERNEL_VERSION but those I could only find up to 3.16.x versions of the kernel and nothing for 3.17.x.

Any ideas where else I could get the kernel drivers from?

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
2

answered 2014-11-01 21:42:39 -0500

sergiomb gravatar image

updated 2014-11-01 21:46:41 -0500

Hi, seems correct, you just need install kernel-devel of running kernel and do as root:

akmods

akmods will generate and install kmod-VirtualBox-KERNEL_VERSION you may do :

cd /lib/modules/
ls
akmods --kernel 3.16.6-203.fc20.x86_64

to generate kmods for kernels that appears in ls

edit flag offensive delete link more

Comments

thx, this worked, but only after I've uninstalled the debug kernel which came somehow on my fedora due to testing being active (see cgonz31 answer)

pgrm gravatar imagepgrm ( 2014-11-02 09:31:27 -0500 )edit

akmods need kernel-devel so you may do : yum install "kernel-devel-uname-r == $(uname -r)" akmods at install can't require kernel devel that system is running, because don't have way to know it , so we need force install it or else kernel-debug-devel is choose by yum . using rpmfusion you don't need do anything more , rpm should add you to vboxusers and also don't need to reboot at most systemctl restart systemd-modules-load.service (as root)

sergiomb gravatar imagesergiomb ( 2014-11-02 14:41:36 -0500 )edit

So this has to be done EVERY time there is a kernel upgrade and I want to use Virtualbox on the system running the newly upgarded kernel?

cuchumino gravatar imagecuchumino ( 2014-12-13 14:08:51 -0500 )edit

no, I think you only need to configure it once - at least that's how I'm using Virtual Box now and there have been kernel updates, but I didn't need to do anything - neither before, The problem just appeared when I was using the alpha version - and it is fixed now.

pgrm gravatar imagepgrm ( 2014-12-14 05:00:32 -0500 )edit
3

answered 2014-11-02 01:44:19 -0500

cgonz31 gravatar image

updated 2014-11-02 13:51:45 -0500

I am running VirtualBox from the Oracle RPM repo in Fedora 21 Workstation Alpha (64-bit). If you want to know how I got it working, read on. If you want to fix your current problem, I do not have an answer to your issues with the VirtualBox package from the RPM Fusion repo.

VirtualBox Repo Workaround

All I did was to hard code the F20 repo in the Oracle repo file. Not the best solution but until there's an F21 repo, this will work.

On /etc/yum.repos.d/virtualbox.repo change the following:

[virtualbox]
name=Fedora $releasever - $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

In the baseurl line, change $releasever to 20.

Debug Kernel Issues

As you probably know, VirtualBox needs the dkms package to update the VirtualBox kernel module with kernel updates. I can't be sure but I think when I installed the dkms package (after a fresh F21 Alpha installation), it installed the debug devel kernel as a dependency. I think it was because the F21 Updates - Testing repo was enabled by default. Like I said, I can't be sure. So when VirtualBox wanted to register the kernel module it could not find the kernel headers because they were stored in /usr/src/kernels/$(uname -r)+debug/. VirtualBox is looking for them in /usr/src/kernel/$(uname -r)/.

Solution: Check if you have any debug-devel kernels installed. Uninstall them and install regular kernel and kernel-devel packages. Also make sure you have the right kernel headers to match the current kernel package. dkms should still work. You might also want to disable the F21 Testing repos. Reboot. Install VirtualBox through yum. Make sure you get the package from the VirtualBox repo. I think it registers the kernel module during installation. If not, run sudo /etc/init.d/vboxdrv setup and the VirtualBox kernel module will register successfully.

EDIT: Missed a step there. Like @donniezazen said: Add yourself to the vboxusers group. Change will take place on next login.

Secure Boot Interference

Do you have Secure Boot enabled? If so, VirtualBox will not detect the VirtualBox kernel module because it will not be loaded during boot. Unless you signed the module with your key and enrolled it in the firmware. If Secure Boot is interfering, look at this post for a solution:

https://ask.fedoraproject.org/en/question/54155/virtualbox-not-working-on-fedora-20/

edit flag offensive delete link more

Comments

Although I didn't do it entirely your way, disabling the testing repo and getting rid of the debug kernel made the other answer work

pgrm gravatar imagepgrm ( 2014-11-02 09:32:33 -0500 )edit

No problem. Whatever works for you. Glad we could help. Welcome to Ask Fedora.

cgonz31 gravatar imagecgonz31 ( 2014-11-02 13:50:50 -0500 )edit
1

answered 2014-11-02 01:53:15 -0500

updated 2014-11-02 01:57:20 -0500

You don't need both akmod and kmod. You only need one. I prefer akmod because it can general right modules for you.

This is how I have installed a working VirtualBox from RPMFusion on Fedora 21 KDE.

  yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms VirtualBox

Add yourself of vboxusers group.

usermod -a -G vboxusers $USER

Reboot

edit flag offensive delete link more

Comments

This solution worked for my problem, where VirtualBox complained that several kernel modules weren't loaded.

Barbarrosa gravatar imageBarbarrosa ( 2015-01-31 12:14:34 -0500 )edit

you are right rpm doesn't add you to vboxusers , groupadd -r vboxusers, -r means create a system group. I though that means recursive ... So we need sudo usermod -a -G vboxusers $USER

sergiomb gravatar imagesergiomb ( 2016-10-07 16:48:57 -0500 )edit
0

answered 2014-12-29 08:55:32 -0500

Same problems on my system.

I deleted all -debug packages for my kernel and, at the Grub boot prompt, selected non-debug boot for my kernel and this problem went away on my system.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-11-01 19:42:48 -0500

Seen: 24,968 times

Last updated: Dec 29 '14