virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Discussions related to using VirtualBox on Linux hosts.
Locked
arx
Posts: 6
Joined: 3. Apr 2019, 03:55

virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by arx »

Hello,

I've been using virtualbox 6.1 on Ubuntu 20.04 for months with no issues. But today, without my doing any changes on the system, virtualbox refused to start throwing the following message:

Code: Select all

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing

'modprobe vboxdrv'

as root.
Since virtualbox-dkms was already installed, I removed and installed it again. But the error message persisted.

So, I purged the virtualbox package entirely (apt purge virtualbox), and installed it again from the Ubuntu repo. However, the following error lines appear during the installation:

Code: Select all

(...)
Unpacking virtualbox-qt (6.1.6-dfsg-1) ...
Setting up virtualbox (6.1.6-dfsg-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/vboxweb.service → /l
ib/systemd/system/vboxweb.service.
Job for vboxweb.service failed because the service did not take the steps requir
ed by its unit configuration.
See "systemctl status vboxweb.service" and "journalctl -xe" for details.
Job for virtualbox.service failed because the control process exited with error 
code.
See "systemctl status virtualbox.service" and "journalctl -xe" for details.
invoke-rc.d: initscript virtualbox, action "restart" failed.
● virtualbox.service - LSB: VirtualBox Linux kernel module
     Loaded: loaded (/etc/init.d/virtualbox; generated)
     Active: failed (Result: exit-code) since Fri 2021-01-08 11:31:36 -05; 12ms 
ago
       Docs: man:systemd-sysv-generator(8)
    Process: 3463 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/
FAILURE)

Jan 08 11:31:35 myPC systemd[1]: Starting LSB: VirtualBox Linux kernel module..
.
Jan 08 11:31:35 myPC virtualbox[3463]:  * Loading VirtualBox kernel modules...
Jan 08 11:31:36 myPC virtualbox[3463]:  * No suitable module for running kernel
 found
Jan 08 11:31:36 myPC virtualbox[3463]:    ...fail!
Jan 08 11:31:36 myPC systemd[1]: virtualbox.service: Control process exited, co
de=exited, status=1/FAILURE
Jan 08 11:31:36 myPC systemd[1]: virtualbox.service: Failed with result 'exit-c
ode'.
Jan 08 11:31:36 myPC systemd[1]: Failed to start LSB: VirtualBox Linux kernel m
odule.
(...)
In journalctl -xe, I find the following output:

Code: Select all

-- The job identifier is 3038.
Jan 08 11:31:35 myPC virtualbox[3463]:  * Loading VirtualBox kernel modules...
Jan 08 11:31:36 myPC virtualbox[3463]:  * No suitable module for running kernel found
Jan 08 11:31:36 myPC virtualbox[3463]:    ...fail!
Jan 08 11:31:36 myPC systemd[1]: virtualbox.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- 
-- An ExecStart= process belonging to unit virtualbox.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jan 08 11:31:36 myPC systemd[1]: virtualbox.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- 
-- The unit virtualbox.service has entered the 'failed' state with result 'exit-code'.
Jan 08 11:31:36 myPC systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
-- Subject: A start job for unit virtualbox.service has failed
-- Defined-By: systemd
-- 
-- A start job for unit virtualbox.service has finished with a failure.
-- 
-- The job identifier is 3038 and the job result is failed.
Jan 08 11:31:36 myPC systemd[1]: Reloading.
Jan 08 11:31:36 myPC systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references a path below legacy directory /var/run/, updating /var/run/dbus/system_>
Jan 08 11:31:36 myPC systemd[1]: Starting Process error reports when automatic reporting is enabled...
-- Subject: A start job for unit apport-autoreport.service has begun execution
-- Defined-By: systemd
I don't know what other steps I could take to get virtualbox to work again. Can I please get some help on this?

Thank you!
pika75
Posts: 2
Joined: 9. Jan 2021, 00:33

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by pika75 »

Your problem may be related to a recent kernel upgrade.

Can you check which kernel are you using? If it is 5.8, then the VirtualBox package from the Ubuntu repositories won't work. There's an open bug in Launchpad, number 1891916.

For a workaround until Ubuntu fixes this (nobody knows when will that be...), my suggestion would be to reboot your computer and get into the grub menu, and choose to boot using the former 5.4 kernel that you may still have installed. It was the last good kernel from Ubuntu 20.04 to work with VirtualBox 6.1.

Hope that helps.
arx
Posts: 6
Joined: 3. Apr 2019, 03:55

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by arx »

Yes, $ uname -r says I'm on 5.8.0-36-generic. But in GRUB, all advanced options are just variants of 5.8. I seem to be stuck on it. Would installing a test build work with this kernel? Or any other option?
pika75
Posts: 2
Joined: 9. Jan 2021, 00:33

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by pika75 »

Well, maybe your old 5.4 kernel was removed as well when 5.8 was installed. You could manually install the old kernel again, and update-grub would re-create the menu entries.

If that's too complicated, I guess installing a newer VirtualBox version directly from the Oracle repository (as described in the "Linux_Downloads" section from the VirtualBox Wiki) may solve the problem, too. But I never tried to install VirtualBox from there, so I don't know how easy the process is.
arx
Posts: 6
Joined: 3. Apr 2019, 03:55

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by arx »

I installed VirtualBox's repo and then, package virtualbox-6.1, which installed version 6.1.16 on my machine. This solved the problem. Back to rock and roll! Thank you very much, specially for the pointer to Launchpad bug 1891916, where somebody posted that doing this had helped him.

Happy 2021!
pomegranate99
Posts: 1
Joined: 9. Jan 2021, 11:11

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by pomegranate99 »

Im having the same issues. Im also on the 5.8 kernel and i cant install virtualbox. :(
zombypc
Posts: 2
Joined: 9. Jan 2021, 11:31

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by zombypc »

Ran into the same issue this morning on Ubuntu 20.04

I tried several guides to fix similar issues. And found a solution that works for me.
Sadly, as a new user I can't post links until tomorrow.

If you google "computinforgeeks virtualbox 6.1 ubuntu 20.04" and click on the first result, it should be a post by Josphat Mutai from May 7,2020.

I can't promise it'll work for everyone but it got me going again.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by mpack »

@zombypc: Is this spam? That article seems to describe a standard VirtualBox-on-Linux installation, it's not even specific to Ubuntu 20.04. And given the introductory marketing spiel I'm going to bet that the text is lifted from an Oracle website.

I find it hard to believe that that solves any new problem being discussed in this topic.
zombypc
Posts: 2
Joined: 9. Jan 2021, 11:31

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by zombypc »

mpack wrote:@zombypc: Is this spam? That article seems to describe a standard VirtualBox-on-Linux installation, it's not even specific to Ubuntu 20.04. And given the introductory marketing spiel I'm going to bet that the text is lifted from an Oracle website.

I find it hard to believe that that solves any new problem being discussed in this topic.
No, it's not spam.

I tried several other suggestions resolve the issue with the new kernel from Ubuntu today and this was the only way I found to get VirtualBox to stop complaining about 'modprobe vboxdrv'

It may well be a simple guide on how to install Virtualbox but it did indeed solve my issue.
Xavi
Posts: 1
Joined: 10. Jan 2021, 19:14

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by Xavi »

I run into the same issue. Last Friday it just stopped working anymore and I run two VMs that I usually use for work.
- I tried removing and purging virtualbox and not luck.
- I upgraded everything which was worse because it upgraded the kernel
- Manually tried to install Virtual Box like someone suggested above but same issue.
- Last resource I followed the link and steps which is almost the same as manual installation. Here was my problem:

Code: Select all

linux-headers-5.8.0-36-generic is already the newest version (5.8.0-36.40~20.04.1).
linux-headers-5.8.0-36-generic set to manually installed.
The following packages were automatically installed and are no longer required:
  libgsoap-2.8.91 libvncserver1 virtualbox-dkms
Use 'sudo apt autoremove' to remove them.
Autoremove fixed the issue and the day. Then I installed Vbox and it works like always.
This is my first time posting and giving a feedback to the community.
@zombypc thank you for the article and @arx thank you for reporting the issue.
Last edited by mpack on 10. Jan 2021, 20:37, edited 1 time in total.
Reason: Deleted unnecessary verbatim quote.
fmosquera
Posts: 1
Joined: 16. Jan 2021, 02:25

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by fmosquera »

zombypc wrote:Ran into the same issue this morning on Ubuntu 20.04

I tried several guides to fix similar issues. And found a solution that works for me.
Sadly, as a new user I can't post links until tomorrow.

If you google "computinforgeeks virtualbox 6.1 ubuntu 20.04" and click on the first result, it should be a post by Josphat Mutai from May 7,2020.

I can't promise it'll work for everyone but it got me going again.
ZombyPC thank you for posting the computingforgeeks post by Josphat Mutuai, it saved our Minecraft bacon! - My kids run their own Minecraft server on VirtualBox, and the Ubuntu 20.04 update broke it. Same error and I followed the instructions in the post and it worked.

Thanks again!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: virtualbox 6.1 stopped working on Ubuntu 20.04. How to fix?

Post by mpack »

I still find it very suspicious that the linked website says absolutely nothing about a special problem with VirtualBox 6.1.x and Ubuntu 20.04 referred to by the OP, and AFAICS simply gives generic instructions on how to install VirtualBox on a Linux host, which is info you should be getting from the user manual.

As these myths of a glorious past have a tendency to grow I think I'm going to lock this topic now.
Locked