Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrant up and VM doesn't work Fedora 22

I have a problem, when I want use vagrant up I getting error

The provider 'virtualbox' that was requested to back the machine
'default' 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.

After write VBoxManage --version I getting

WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (4.2.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.
4.2.32r101581

and sudo /etc/init.d/vboxdrv setup

I getting error

Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File:  does not exist.
                                                           [  OK  ]
Removing old VirtualBox netadp kernel module               [  OK  ]
Removing old VirtualBox netflt kernel module               [  OK  ]
Removing old VirtualBox kernel module                      [  OK  ]
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 4.2.3-200.fc22.x86_64 (x86_64)
Consult /var/lib/dkms/vboxhost/4.2.32/build/make.log for more information.
                                                           [ERROR]
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules                      [ERROR]
  (Look at /var/log/vbox-install.log to find out what went wrong)

I don't know where is a problem, I tried update kernel-devel, kernel-headers, dkms etc. I downgrade VirtualBox from 4.3.30 to 4.2.32 and nothing work, please, help me with this problem. When I had 4.3.30 version VirtualBox sudo /etc/init.d/vboxdrv setup don't worked, I got problem with vboxdrv - command does not exist.Yesterday I worked normally, I turned off machine and PC, today, when I wanted use vagrant up I got this problem.

Sorry for my English, please, help me with this, thanks for every answer's!

//EDIT:

I adding

/var/lib/dkms/vboxhost/4.2.32/build/make.log /var/log/vbox-install.log

like image 462
Adrian Avatar asked Oct 18 '15 17:10

Adrian


2 Answers

  1. Please run

    sudo yum update

  2. Please make sure Vagrant and Virtualbox are in their latest version.

  3. In case you already installed and updated kernel-devel, and you received the error

vboxdrv - command does not exist

please run:

sudo /usr/lib/virtualbox/vboxdrv.sh setup
like image 183
Tuanitim Avatar answered Sep 22 '22 10:09

Tuanitim


The VirtualBox Linux kernel driver (vboxdrv) is probably not loaded. You may not have the kernel driver installed for the kernel that is running, if so you may do as root:

dnf install akmod-VirtualBox kernel-devel-$(uname -r)

If you installed VirtualBox packages and you don't want to reboot the system, you may need to load the kernel driver, doing as root:

akmods; systemctl restart systemd-modules-load.service

Also, remember to install a supported version of VirtualBox!!

like image 32
Facundo Victor Avatar answered Sep 21 '22 10:09

Facundo Victor