VM not starting when using Linux kernel 6.0

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Ocinio
Posts: 2
Joined: 6. Oct 2022, 12:28

VM not starting when using Linux kernel 6.0

Post by Ocinio »

Hello there,

I tried to find a solution on the web and in the forum as well but without success.

Seems that it is because Linux kernel 6.0 just went out, there is maybe some repos to update.

I'm using Pop_OS 22.04 LTS on Linux 6.0 and i try to launch linux or windows vm with Virtualbox 6.1 or 7.0 Beta.

The system is returning always the same error:

Code: Select all

VM Name: JunkyLinux

The virtual machine 'VMLinux' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code:
NS_ERROR_FAILURE (0X80004005)
Component:
MachineWrap
Interface:
IMachine {300763af-5d6b-46e6-aa96-273eac15538a}
--

Code: Select all

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.
I tried to load the kernel modules with dkms,

And this is the output:

Code: Select all

~$ sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Reinstallation of linux-headers-6.0.0-060000rc7-generic is not possible, since it cannot be downloaded.
The following packages were automatically installed and are no longer required:
  libqt5help5 libqt5sql5 libqt5sql5-sqlite libqt5xml5
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libgsoap-2.8.117 liblzf1 libsdl1.2debian virtualbox virtualbox-qt
Suggested packages:
  vde2 virtualbox-guest-additions-iso
The following packages will be REMOVED:
  virtualbox-7.0
The following NEW packages will be installed:
  libgsoap-2.8.117 liblzf1 libsdl1.2debian virtualbox virtualbox-dkms
  virtualbox-qt
0 upgraded, 6 newly installed, 1 reinstalled, 1 to remove and 0 not upgraded.
Need to get 0 B/46.6 MB of archives.
After this operation, 40.0 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 358444 files and directories currently installed.)
Removing virtualbox-7.0 (7.0.0~beta3-153829~Ubuntu~jammy) ...
(Reading database ... 357718 files and directories currently installed.)
Preparing to unpack .../0-dkms_2.8.7-2ubuntu2_all.deb ...
Unpacking dkms (2.8.7-2ubuntu2) over (2.8.7-2ubuntu2) ...
Selecting previously unselected package libgsoap-2.8.117:amd64.
Preparing to unpack .../1-libgsoap-2.8.117_2.8.117-2build1_amd64.deb ...
Unpacking libgsoap-2.8.117:amd64 (2.8.117-2build1) ...
Selecting previously unselected package liblzf1:amd64.
Preparing to unpack .../2-liblzf1_3.6-3_amd64.deb ...
Unpacking liblzf1:amd64 (3.6-3) ...
Selecting previously unselected package libsdl1.2debian:amd64.
Preparing to unpack .../3-libsdl1.2debian_1.2.15+dfsg2-6_amd64.deb ...
Unpacking libsdl1.2debian:amd64 (1.2.15+dfsg2-6) ...
Selecting previously unselected package virtualbox-dkms.
Preparing to unpack .../4-virtualbox-dkms_6.1.36-dfsg-1pop0~1658725175~22.04~0c8
f1c0_amd64.deb ...
Unpacking virtualbox-dkms (6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1c0) ...
Preparing to unpack .../5-virtualbox_6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1c0_
amd64.deb ...
Unpacking virtualbox (6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1c0) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../6-virtualbox-qt_6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1
c0_amd64.deb ...
Unpacking virtualbox-qt (6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1c0) ...
Setting up libgsoap-2.8.117:amd64 (2.8.117-2build1) ...
Setting up dkms (2.8.7-2ubuntu2) ...
Setting up liblzf1:amd64 (3.6-3) ...
Setting up libsdl1.2debian:amd64 (1.2.15+dfsg2-6) ...
Setting up virtualbox-dkms (6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1c0) ...
Loading new virtualbox-6.1.36 DKMS files...
Building for 6.0.0-060000rc7-generic
Building initial module for 6.0.0-060000rc7-generic
ERROR (dkms apport): kernel package linux-headers-6.0.0-060000rc7-generic is not
 supported
Error! Bad return status for module build on kernel: 6.0.0-060000rc7-generic (x8
6_64)
Consult /var/lib/dkms/virtualbox/6.1.36/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
 installed virtualbox-dkms package post-installation script subprocess returned 
error exit status 10
dpkg: dependency problems prevent configuration of virtualbox:
 virtualbox depends on virtualbox-dkms (>= 6.1.36-dfsg-1pop0~1658725175~22.04~0c
8f1c0) | virtualbox-source (>= 6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1c0) | vir
tualbox-modules; however:
  Package virtualbox-dkms is not configured yet.
  Package virtualbox-source is not installed.
  Package virtualbox-modules is not installed.
  Package virtualbox-dkms which provides virtualbox-modules is not configured ye
t.

dpkg: error processing package virtualbox (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of virtualbox-qt:
 virtualbox-qt depends on virtualbox (= 6.1.36-dfsg-1pop0~1658725175~22.04~0c8f1
c0); however:
  Package virtualbox is not configured yet.
  Package virtualbox-7.0 which provNo apport report written because the error me
ssage indicates its a followup error from a previous failure.
                                                             No apport report wr
itten because the error message indicates its a followup error from a previous f
ailure.
       ides virtualbox is not installed.
  Package virtualbox-6.1 which provides virtualbox is not installed.

dpkg: error processing package virtualbox-qt (--configure):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for shared-mime-info (2.1-2) ...
Errors were encountered while processing:
 virtualbox-dkms
 virtualbox
 virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM not starting when using Linux kernel 6.0

Post by mpack »

The latest VirtualBox version (6.1.38) does not claim support for Linux 6.x kernels.

Also, you fail to mention what VirtualBox version you tried.
Ocinio
Posts: 2
Joined: 6. Oct 2022, 12:28

Re: VM not starting when using Linux kernel 6.0

Post by Ocinio »

Tried on 6.1.38 and 7.0 Beta 3.

But yes, true, it does not state to support, only for the guest if i read the last changelog, but i'd like to know if it's planned in a near future or if there is a way to get it work.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM not starting when using Linux kernel 6.0

Post by scottgus1 »

It usually takes a couple months for the devs to support a new OS release. Best to only update the host OS on test PCs and leave the production hosts on old working versions, until the test hosts work too.
Yuking
Posts: 4
Joined: 11. Oct 2022, 14:48

Re: VM not starting when using Linux kernel 6.0

Post by Yuking »

I meet the same problem. The kernel is 6.0.

Code: Select all

00:01:24.716523 nspr-3 Launched VM: 3489673264 pid: 5701 (0x1645) frontend: GUI/Qt name: Win10
00:01:24.725143 nspr-3 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={300763af-5d6b-46e6-aa96-273eac15538a} aComponent={MachineWrap} aText={The machine is not mutable (state is PoweredOff)}, preserve=false aResultDetail=0
00:01:25.217120 Watcher ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={300763af-5d6b-46e6-aa96-273eac15538a} aComponent={MachineWrap} aText={The virtual machine 'Win10' has terminated unexpectedly during startup with exit code 1 (0x1)}, preserve=false aResultDetail=0
00:01:25.233418 nspr-5 ERROR [COM]: aRC=VBOX_E_INVALID_VM_STATE (0x80bb0002) aIID={300763af-5d6b-46e6-aa96-273eac15538a} aComponent={MachineWrap} aText={The machine is not mutable (state is PoweredOff)}, preserve=false aResultDetail=0
multiOS
Volunteer
Posts: 800
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: VM not starting when using Linux kernel 6.0

Post by multiOS »

Have you tried the VirtualBox 6.1.40 ? (released 11 Oct 2022)

Changelog states:
• Linux Host and Guest Additions: Introduced additional fixes for kernel 6.0
Yuking
Posts: 4
Joined: 11. Oct 2022, 14:48

Re: VM not starting when using Linux kernel 6.0

Post by Yuking »

I tried VBox 7.0 on kernel-5.19.14 but failed with the same error messages as kernel-6.0.
Downgrade to vbox-6.1.40, and everything is ok immediately ( 6.1.38 is OK, too) .

My OS is linux from scratch and the kernel is compiled by myself.
DavidBowmann
Posts: 8
Joined: 18. Jul 2018, 22:45

Re: VM not starting when using Linux kernel 6.0

Post by DavidBowmann »

Same for me Ubuntu 22.04 with kernel 6.0.8 Virtualbox 7.0.2 or 6.1.40 does not work.
Someone any clue?
agaskew
Posts: 1
Joined: 16. Nov 2022, 22:30

Re: VM not starting when using Linux kernel 6.0

Post by agaskew »

This isn't pretty, but it worked for me.
I had this error with VirtualBox 7 and Kernel 6.0.8 on Linux Mint:

The VirtualBox Linux kernel driver is either not loaded or not set up correctly....etc

I reran 'sudo /sbin/vboxconfig' manually and it failed to build the kernel module. Checked the log file /var/log/vbox-setup.log. The log file indicated syntax errors with the gcc command, and at the top was a warning that the 6.0.8 kernel had been built with gcc version 12 whereas the system was still using gcc version 11.
Installed gcc-12 via 'sudo apt get gcc-12'
Deleted /usr/bin/gcc as its just a symlink to /usr/bin/gcc-11 and recreated it via 'sudo ln -s /usr/bin/gcc-12 /usr/bin/gcc'. Checked the version of gcc being called is correct via 'gcc --version' - result shows 'gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0'
After that I moved /var/log/vbox-setup.log out of the way, reran 'sudo /sbin/vboxconfig' and this time no errors were generated.

Finally my Guest VMs would run.
Rudolf-CZ
Posts: 1
Joined: 20. Nov 2022, 23:13

Re: VM not starting when using Linux kernel 6.0

Post by Rudolf-CZ »

agaskew wrote:This isn't pretty, but it worked for me.
I had this error with VirtualBox 7 and Kernel 6.0.8 on Linux Mint:

The VirtualBox Linux kernel driver is either not loaded or not set up correctly....etc

I reran 'sudo /sbin/vboxconfig' manually and it failed to build the kernel module. Checked the log file /var/log/vbox-setup.log. The log file indicated syntax errors with the gcc command, and at the top was a warning that the 6.0.8 kernel had been built with gcc version 12 whereas the system was still using gcc version 11.
Installed gcc-12 via 'sudo apt get gcc-12'
Deleted /usr/bin/gcc as its just a symlink to /usr/bin/gcc-11 and recreated it via 'sudo ln -s /usr/bin/gcc-12 /usr/bin/gcc'. Checked the version of gcc being called is correct via 'gcc --version' - result shows 'gcc (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0'
After that I moved /var/log/vbox-setup.log out of the way, reran 'sudo /sbin/vboxconfig' and this time no errors were generated.

Finally my Guest VMs would run.
God bless you! This was exactly my issues a Virtualbox works flawlessly since then (Kernel 5.19.17 & Virtualbox 6.1.40). Just to add existing symlink could be directly changed by using "-f" so using "sudo ln -s /usr/bin/gcc-12 /usr/bin/gcc -f" so deleting is not required.
vespina
Posts: 2
Joined: 1. Dec 2009, 04:57
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows Server 2008

Re: VM not starting when using Linux kernel 6.0

Post by vespina »

I face this problem frequently. What I do is to run 'sudo /sbin/vboxconfig' and the response will include the hipothetical name of the packages you require. Then just call apt-get to install those packages and then rerun vboxconfig.
Post Reply