Failed to start virtualbox linux kernel module centos

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.

Читайте также:  Криптопро linux создать контейнер

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 

Ubuntu: Failed to start LSB: Virtualbox Linux kernel module

Duration: 3:04

Solution 2 — Command-line Fixes

Another solution is to boot to the GRUB menu, select the Advanced Options, Recovery mode, and Root access options, and then run a command to remove and reinstall VirtualBox. Some users have reported needing to manually load the VirtualBox kernel module after installation. Some users have reported needing to blacklist conflicting kernel modules. Some users have reported needing to run VirtualBox as root. Some users have reported needing to manually start the vboxdrv service.

Here are the steps to remove and reinstall VirtualBox:

  1. Reboot the system and select the Advanced Options for Ubuntu in the GRUB menu.
  2. Select the Recovery mode option and press enter.
  3. Choose the Root access option and press enter.
  4. Run the following command to remove VirtualBox:
sudo apt-get remove virtualbox 
sudo apt-get install virtualbox 

If you are still facing the error message, try manually loading the VirtualBox kernel module by running the following command:

If there are any conflicts with other kernel modules, try blacklisting them by running the following command:

sudo nano /etc/modprobe.d/blacklist.conf 

Add the following lines to the file and save:

blacklist kvm blacklist kvm_intel 

If you are still facing the error message, try running VirtualBox as root by using the following command:

If the vboxdrv service is not starting automatically, start it manually by using the following command:

sudo /etc/init.d/vboxdrv start 

Solution 3 — BIOS Settings

Some users have reported that turning off secure boot in the BIOS has helped resolve this issue. This can be done by accessing the BIOS settings during system startup and disabling secure boot. This approach may help avoid conflicts with other virtualization software and ensure that VirtualBox can run smoothly.

Читайте также:  Можно ли ставить линукс

Here are the steps to disable secure boot in the BIOS:

  1. Restart the system and press the key to enter the BIOS settings during the startup process. The key may vary depending on the system.
  2. Navigate to the Security tab using the arrow keys.
  3. Find the Secure Boot option and disable it.
  4. Save the changes and exit the BIOS settings.
  5. Try running VirtualBox again to see if the error message is resolved.

Other Helpful Tips and Considerations

  • Some users have suggested installing the virtualbox-dkms package and appropriate headers for the current kernel version . This can be done using the following command:
sudo apt-get install virtualbox-dkms linux-headers-generic 
  • Some users have reported issues with the virtualbox-ext-pack package causing conflicts. Try uninstalling this package using the following command:
sudo apt-get remove virtualbox-ext-pack 
  • Users may also need to update their system packages, including updates to the kernel and headers, to resolve this issue.
  • VirtualBox supports a wide range of guest operating systems, including various versions of Linux, Windows, and macOS.
  • VirtualBox can be used for a variety of purposes, including software development, testing, and running legacy applications.

Other helpful code examples for fixing the ‘Failed to start LSB: VirtualBox Linux kernel module’ error on Linux

In shell, Failed to start LSB: VirtualBox Linux kernel module. code example

wget -q -O - http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc | sudo apt-key add -

In shell, failed to start lsb: virtualbox linux kernel module. code example

Solution seems to be to not install the virtualbox package that comes with Ubuntu. Following the steps to add a 3rd party repository as shown here, then installing the virtualbox-5.1 package appears to get things working with no further actions required.

Conclusion

The error message “Failed to start LSB: VirtualBox Linux kernel module” can be a frustrating obstacle for users trying to run VirtualBox on Linux systems. However, by following the solutions outlined in this blog post — including third-party repositories, command-line fixes, and BIOS settings — users can overcome this issue and enjoy the many benefits of VirtualBox. Remember to consider helpful tips and considerations, such as updating system packages and avoiding conflicts with other packages .

Источник

Оцените статью
Adblock
detector