3

I am trying to use vagrant on Fedora 23, but it isn't working at all.

It isn't working because virtualbox's kernel modules will not install and compile with 4.4.4-301.fc23.x86_64.

I installed virtualbox using the RPM instructions here: https://www.virtualbox.org/wiki/Linux_Downloads

However, vagrant still does not work:

$ vagrant up --provider=virtualbox
The provider 'virtualbox' that was requested to back the machine
'vccw.dev' is reporting that it isn't usable on this system. The
 reason is shown below:

VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.

Okay, let's try that.

$ VBoxManage --version
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
     available for the current kernel (4.4.4-301.fc23.x86_64) or it failed to
     load. Please recompile the kernel module and install it by

       sudo /sbin/rcvboxdrv setup

     You will not be able to start VMs until this problem is fixed.

Indeed.

daniel@EndlessSummer ~/W/s/vccw-2.19.0> modprobe vboxdrsv
modprobe: FATAL: Module vboxdrsv not found in directory /lib/modules/4.4.4-301.fc23.x86_64

Strange.

$ sudo  /usr/lib/virtualbox/vboxdrv.sh setup

Stopping VirtualBox kernel modules                         [  OK  ]
Recompiling VirtualBox kernel modules                      [FAILED]

(Look at /var/log/vbox-install.log to find out what went wrong)

Okay.

$ cat /var/log/vbox-install.log 
Makefile:185: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

Even stranger. Let's make sure...

$ sudo dnf install kernel-devel kernel-headers gcc patch <etc>
$ rpm -qva "kernel-*"
kernel-modules-4.3.5-300.fc23.x86_64
kernel-devel-4.4.6-300.fc23.x86_64
kernel-modules-4.4.6-300.fc23.x86_64
kernel-core-4.4.4-301.fc23.x86_64
kernel-core-4.3.5-300.fc23.x86_64
kernel-headers-4.4.6-300.fc23.x86_64
kernel-core-4.4.6-300.fc23.x86_64
kernel-modules-4.4.4-301.fc23.x86_64

Do we have the kernel sources?

$ ls /usr/src/kernels/
4.4.6-300.fc23.x86_64/

$ uname -r
4.4.4-301.fc23.x86_64

No, we don't.

sudo dnf install kernel-headers-(uname -r) kernel-devel-(uname -r)
Last metadata expiration check: 0:10:22 ago on Thu Mar 24 18:47:50 2016.
No package kernel-headers-4.4.4-301.fc23.x86_64 available.
Error: Unable to find a match.

At this point it is rather beyond my ability to fix. But it seems like a Fedora problem?

(In case you're wondering, setting $KERN_DIR to /usr/src/xx300xx didnt work either.)

DMCoding
  • 223
  • 3
  • 12
  • 1
    Do you need to use virtualbox, or can you use the vagrant-libvirt provider? – mattdm Mar 24 '16 at 19:05
  • Excellent question, and yes, that was the first option @mattdm. See here: http://superuser.com/questions/1056975/fedora-vagrant-and-libvirt ;-) – DMCoding Mar 24 '16 at 19:13
  • In any case, they are available here: http://koji.fedoraproject.org/koji/buildinfo?buildID=741821 – Tom Yan Mar 24 '16 at 19:28
  • @Tom Yan I am struggling to install those sources. I downloaded the src RPM my kernel but when I install it using rpm -i it says warning: user mockbuild does not exist - using root and warning: group mockbuild does not exist - using root but /usr/src/kernel remains empty... :-S – DMCoding May 10 '16 at 13:24
  • sudo groupadd mock ; usermod -aG mock daniel – linuxdev2013 Apr 05 '17 at 18:21

0 Answers0