- CentOS 7: VirtualBox is complaining that the kernel module is not loaded
- 3 Answers 3
- CentOS
- [SOLVED]virtualbox — can’t load kernel module
- [SOLVED]virtualbox — can’t load kernel module
- How to Fix «Failed to Start LSB: VirtualBox Linux Kernel Module» Error on Linux
- The Error Message and Its Common Causes
- Solution 1 — Third-party Repositories
- Ubuntu: Failed to start LSB: Virtualbox Linux kernel module
- Solution 2 — Command-line Fixes
- Solution 3 — BIOS Settings
- Other Helpful Tips and Considerations
- Other helpful code examples for fixing the ‘Failed to start LSB: VirtualBox Linux kernel module’ error on Linux
- Conclusion
CentOS 7: VirtualBox is complaining that the kernel module is not loaded
Background: I created a sandbox VM with VirtualBox on my macOS. It correctly spins up a VM (with CentOS7 running on it) on which I can access to. Inside this sandbox vm, I want to spin up several vms in order to test Ansible Playbooks with Kitchen CI & Vagrant, thus I installed VirtualBox by downloading it from the following link: https://download.virtualbox.org/virtualbox/5.2.8/VirtualBox-5.2-5.2.8_121009_el7-1.x86_64.rpm After the installation I executed the command: [david@vmkitchen-env ansible-test]# VBoxManage —version It returned:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (3.10.0-693.2.1.el7.x86_64) or it failed to load. Please recompile the kernel module and install it by sudo /sbin/vboxconfig You will not be able to start VMs until this problem is fixed. 5.2.8r121009
I installed the Development tools, but I keep getting the same issue. I don’t think I need to recompile any kernel module. Any idea? Thanks in advance for your help.
3 Answers 3
So, after searching on the internet, and not just on the VirtualBox website, I found the solution, and I was right: I did not need to compile any module. The following is the reference to the CentOS wiki page:
In a few words, I had to install dkms and kernel-devel packages. In order to do so, I needed to install EPEL repository; but personally I prefer to install and enable the IUS repository.
The following are the set of commands that worked for me:
yum groupinstall «Development tools»
yum install https://centos7.iuscommunity.org/ius-release.rpm
After the machine had rebooted, I was able to get VirtualBox working fine.
I verified by the command line:
[david@vmkitchen-env ansible-test]# VBoxManage —version
And it returned the correct value:
CentOS
[SOLVED]virtualbox — can’t load kernel module
[SOLVED]virtualbox — can’t load kernel module
Post by DT3 » 2016/09/16 13:25:51
I’m trying to run Virtualbox 5.1 on CentOS 7
When i attempt to open session for a new machine error appears. Message points me to run /sbin/vboxconfig but it fails.
I have installed dkms, added mu username to group vbox users, tried /sbin/vboxconfig , rcvboxdrv setup, /usr/lib/virtualbox/vboxdrv.sh setup
all my attmepts failed.
Tried to manually load module
# systemctl start vboxdrv Job for vboxdrv.service failed because the control process exited with error code. See "systemctl status vboxdrv.service" and "journalctl -xe" for details. [root@localhost log]# systemctl status vboxdrv.service ● vboxdrv.service - VirtualBox Linux kernel module Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2016-09-16 15:09:59 CEST; 1min 39s ago Process: 8821 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=1/FAILURE) Sep 16 15:09:08 localhost.localdomain vboxdrv.sh[8821]: vboxdrv.sh: Starting VirtualBox services. Sep 16 15:09:08 localhost.localdomain vboxdrv.sh[8875]: Starting VirtualBox services. Sep 16 15:09:08 localhost.localdomain vboxdrv.sh[8821]: vboxdrv.sh: Building VirtualBox kernel modules. Sep 16 15:09:08 localhost.localdomain vboxdrv.sh[8895]: Building VirtualBox kernel modules. Sep 16 15:09:59 localhost.localdomain vboxdrv.sh[8821]: vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why. Sep 16 15:09:59 localhost.localdomain vboxdrv.sh[11132]: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why. Sep 16 15:09:59 localhost.localdomain systemd[1]: vboxdrv.service: control process exited, code=exited status=1 Sep 16 15:09:59 localhost.localdomain systemd[1]: Failed to start VirtualBox Linux kernel module. Sep 16 15:09:59 localhost.localdomain systemd[1]: Unit vboxdrv.service entered failed state. Sep 16 15:09:59 localhost.localdomain systemd[1]: vboxdrv.service failed. [root@localhost log]#
[root@localhost log]# /usr/lib/virtualbox/vboxdrv.sh setup vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
This is behind my current abilities (i’m just Linux user), not sure wht to do next to make Virtualbox working. What should I look for in dmesg?
Any help appreciated
How to Fix «Failed to Start LSB: VirtualBox Linux Kernel Module» Error on Linux
Learn how to fix the «Failed to start LSB: VirtualBox Linux kernel module» error on Linux, including third-party repositories, command-line fixes, and BIOS settings. Get VirtualBox up and running smoothly with these helpful tips and considerations.
VirtualBox is a popular open-source virtualization software that allows users to run multiple operating systems on a single machine. However, users may encounter an error message “Failed to start LSB: VirtualBox Linux kernel module” while trying to install or run VirtualBox on their Linux system. This error message can occur on different versions of Linux systems, including Ubuntu, Debian, Kali Linux, and CentOS. In this blog post, we will explore various solutions to this problem, including third-party repositories, command-line fixes, and BIOS settings.
The Error Message and Its Common Causes
The error message “Failed to start LSB: VirtualBox Linux kernel module” is a common issue faced while trying to install or run VirtualBox on Linux systems. This error message can occur during installation or while trying to start VirtualBox. The error message can also occur after a kernel upgrade. Some of the common causes of this error message are:
- Incompatibility of VirtualBox with the Linux kernel version
- Conflicts with other packages or software on the Linux system
- Incorrect BIOS settings
- Issues with the VirtualBox kernel module
Solution 1 — Third-party Repositories
The solution to this problem seems to be to not install the VirtualBox package that comes with Ubuntu and instead add a third-party repository and install VirtualBox from there. This can be done using the command-line tools add-apt-repository and apt-get. This approach can provide users with more recent versions of VirtualBox and may help avoid conflicts with other packages.
To add a third-party repository and install VirtualBox, follow these steps:
sudo add-apt-repository multiverse && sudo apt-get update
sudo apt-get install virtualbox