Kernel update and virtualbox kernel modules blues

My manjaro kde system is up-to-date and running on kernel 5.15 LTS. Virtualbox 7.0.6 r155176 is running fine.

virtualboxhost-dkms 7.06 and vb-guest-iso 7.06 and vb-guest-utils 7.06 are installed.

Recently upgraded the kernel to 6.1. because it is the next LTS.

I expected that because Manjaro Settings Manager reads

offers an easy way to add and remove kernel (including the necessary kernel modules).
New kernels can be installed by pressing the "Install" button. All necessary kernel modules will be installed automatically with a new kernel as well.

the VMs would run again without issues but they don’t. The Windows VMs start but do not shut down. When restarted Windows wants to repair itself but fails.

The MacOS VM does run without issues.

This thread Virtualbox-host-dkms vs linux*-virtualbox-host-modules - #7 by champignoom suggests that it should work OK, but it doesn’t. There are other threads also indicating this.

My question is I’d like to understand what is going on. With every major kernel upgrade I am confronted with these issues. Am I missing something?

Welcome to Manjaro! :smiling_face_with_three_hearts:

  1. Please read the information behind this link. It will help you to post necessary information.

[HowTo] Provide System Information

  1. Please press the three dots below your post and then press the :pencil2:
  • If you give us information about your system, we can see what we’re talking about and make better suggestions.
  • You can do this by using inxi in a terminal or in console.
sudo inxi --admin --verbosity=7 --filter --no-host --width
  • Personally identifiable information such as serial numbers and MAC addresses are filtered out by this command
  • Presenting the information in this way allows everyone to be familiar with the format and quickly find the items they need without missing anything.
  1. Copy the output from inxi (including the command) and paste it into your post.
  • To make it more readable, add 3 backticks ``` on an extra line before and after the pasted text.

(Wisdom lies in reading :wink: )

Yes, I know about that. My question is not related to my exact machine configuration. My question is about understanding the mechanism of the Manjaro Settings Manager and the automatic (or not?) installation of required kernel modules.

When you use dkms - the kernel-host-modules is not installed - instead you need the kernel-headers package.

The mhwd-kernel tool - will install the headers and modules for a new kernel if those are installed for running kernel - so the discriminator is - what is installed for the currently active kernel.

Thanks. So how can I check whether the kernel-headers package is installed?
Using pamac searching for ‘kernel-headers’ shows none for the installed category in the All category only kernel-headers-musl with version 4.19.81 All (and 4 in the AUR). Is this the one to install? and remove the virtualbox-host-dkms vs 7.06?

On the running kernel 5.15. vbox is running OK. This must? mean that the required kernel modules are loaded (or else vbox would fail to run).

yochanan posts in the referenced post:

So I am still confused!

When I upgrade a kernel like from 6.1 to 6.2.I reinstall nvidia-dkms and virtualbox-host-dkms.That way I am sure they build for the next kernel.

The phrase kernel-headers is a generic reference to any kernel headers package.

You will have to substitute the generic phrase with what-ever kernel you are lusering.

e.g. linux61-headers if it is linux61 kernel

And yes - mhwd-kernel - installs the necessary packages for a kernel you add based on the packages installed for your current active running kernel.

mhwd-kernel is not a :magic_wand: - it only checks what you are using for current active running kernel.

@linux-aarhus OK, so ‘linux515-headers’ is installed. And also ‘virtualboxhost-dkms 7.06’.
Are these mutually exclusive? Should I remove e.g. ‘virtualboxhost-dkms 7.06’ before adding the 6.1. kernel? And then mhwd works its magic?

@straycat Thanks, but a reinstall seems unnecessary because of the mhwd-kernel package if it is working as advertised.

virtualbox-host-dkms depends on linuxXX-headers - so I would say mutual inclusive :slight_smile:

If you install linux61 using pacman - you must include linux61-headers

if you install linux 61 using mhwd-kernel - the headers will be included by mhwd-kernel as they are present for the running linux515 kernel

I will 1st run TimeShift, 2nd use mhwd-kernel to install 6.1 kernel, 3rd boot with kernel 6.1, 4th check results.

It will work - it has done the same thing for years - nothing new.

Below is part of the detailed output of mhwd-kernel. There is an error that is only visible when details are shown (so that is why I did not see this the first time). mhwd-kernel reports ‘Changes were made succesfully’ This is clearly not correct. Any idea what is the cause / fix?

resolving dependencies...
looking for conflicting packages...
Packages (2) linux61-6.1.12-1  linux61-headers-6.1.12-1
Total Installed Size:  313.53 MiB
:: Proceed with installation? [Y/n]
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
:: Processing package changes...
installing linux61...
Optional dependencies for linux61
    wireless-regdb: to set the correct wireless channels of your country [installed]
installing linux61-headers...
:: Running post-transaction hooks...
(1/5) Arming ConditionNeedsUpdate...
(2/5) Updating module dependencies...
(3/5) Install DKMS modules
==> dkms install --no-depmod vboxhost/7.0.6_OSE -k 6.1.12-1-MANJARO
Error! Bad return status for module build on kernel: 6.1.12-1-MANJARO (x86_64)
Consult /var/lib/dkms/vboxhost/7.0.6_OSE/build/make.log for more information.
==> WARNING: `dkms install --no-depmod vboxhost/7.0.6_OSE -k 6.1.12-1-MANJARO' exited 10
(4/5) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux61.preset: 'default'
-> -k /boot/vmlinuz-6.1-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.1-x86_64.img
==> Starting build: 6.1.12-1-MANJARO
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [autodetect]
-> Running build hook: [modconf]
-> Running build hook: [block]


cat /var/lib/dkms/vboxhost/7.0.6_OSE/build/make.log
DKMS make.log for vboxhost-7.0.6_OSE for kernel 6.1.12-1-MANJARO (x86_64)
Sun Feb 26 20:35:32 CET 2023
make: Entering directory '/usr/lib/modules/6.1.12-1-MANJARO/build'
  CC [M]  /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
  CC [M]  /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetflt/VBoxNetFlt.o
  CC [M]  /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxdrv/linux/SUPDrv-linux.o
make[2]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC [M]  /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
make[2]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetflt/VBoxNetFlt.o] Error 1
make[1]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetflt] Error 2
make[1]: *** Waiting for unfinished jobs....
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
  CC [M]  /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxdrv/SUPDrv.o
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
make[2]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetadp/linux/VBoxNetAdp-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
  CC [M]  /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetadp/VBoxNetAdp.o
make[2]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxdrv/SUPDrv.o] Error 1
make[1]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxdrv] Error 2
gcc: fatal error: cannot execute 'cc1': execvp: No such file or directory
compilation terminated.
make[2]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetadp/VBoxNetAdp.o] Error 1
make[1]: *** [scripts/ /var/lib/dkms/vboxhost/7.0.6_OSE/build/vboxnetadp] Error 2
make: *** [Makefile:2005: /var/lib/dkms/vboxhost/7.0.6_OSE/build] Error 2
make: Leaving directory '/usr/lib/modules/6.1.12-1-MANJARO/build'

I am using VirtualBox for years on a daily base and I have been using the virtualbox-host-dkms for a long, long time - the problems you have are local to your system.

I cannot say what or why - as I cannot know what you have done previous to this - I can only help you interpret the messages - but I suspect this is a XY problem - stemming from to the members of the forum - unknown actions and conditions local to your system.

The mhwd-kernel script executes successfully - as there was no pacman errors with relation to kernel and headers. The error message is printed by dkms install as a result of return codes from the make process.

Basically the above tells that dkms and headers are installed but the script or binary cc1 is missing.

 $ pkgfile cc1
 $ gcc --version
gcc (GCC) 12.2.1 20230201
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

From the above it can be seen that several packages including core/gcc contains the binary cc1 in question so

  • have you been ‘cleaning’ your system - removing files/packages you deem unnecessary?
  • have you ensured you have base-devel meta package synced to your system?

Ensure the needed package is complete and that base-devel is present and up-to-date

sudo pacman -Syu gcc base-devel

The rerun the command

sudo dkms install --no-depmod vboxhost/7.0.6_OSE -k 6.1.12-1-MANJARO

Thanks very much for your effort in understanding what is going wrong. Indeed this looks like a local problem. I will follow your advice and report back. :smiley:

The two commands you suggested executed without errors. Booting in kernel 6.1. and launching a VM in virtualbox was not succesfull:
window title ‘error in suplibOsInit’ with contents:

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


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. 

/sbin/vboxconfig does not exist. There are posts about this on the arch forum. I will study these.
I am typing this running manjaro on kernel 5.15. virtualbox runs OK. There is an error I ignored all the time (since it does not seem to have consequences)

Failed to acquire VirtualBox parameter.

Callee RC:

dkms status (in 5.15) returns:

Error! Could not locate dkms.conf file.
File: /var/lib/dkms/vboxhost/6.1.26_OSE/source/dkms.conf does not exist.

So my system and me are still confused!

Just to emphasize - it is not Manjaro which is at fault here - it is your local config.

Please note the difference with respect to the virtualbox environment version as expressed by above quotes.

You are messing with us - you have somehow messed up your system - with relation to a normal Manjaro installation.

I cannot say what or why - but your issue is most certainly self inflicted …

I am not going to use 5 more minutes on this - you are on your own …

I am sorry, I did not mean to accuse manjaro or mess with anyone. I really appreciate your help and afaik I am not messing with my system!

Dear Fredrik, I really appreciate what you do to help manjaro users!

I don’t think it’s your fault or a local problem on your machine.

Today I installed the new LTS Kernel 6.1 and I had your Virtualbox problem too.
I resolved installing the package “linux61-virtualbox-host-modules” instead of “virtualbox-host-dkms”.

When I installed Virtualbox I decided to use “virtualbox-host-dkms” because it was the default suggestion of pamac. I have only LTS kernels and the Arch documentation says to select dkms per those kernels, so what’s the right way to follow?

I’m a bit confused. :thinking:


It is helpful to see where Manjaro and Arch differ. For example:

  • Manjaro currently supports Linux kernels 4.19, 5.4, 5.10, 5.15, 6.1, and 6.2.
  • Arch supports only 6.1 (linux-lts) and 6.2 (linux).

For VirtualBox:

  • Manjaro provides pre-built VirtualBox modules for all of those kernels.
  • Arch provides pre-built modules for kernel 6.2, but for no other versions, thus the need for virtualbox-host-dkms if using linux-lts.

This makes it look like you are using Arch Linux, or have added an Arch repository to Manjaro.

You’re right about the screenshot because I took it on the fly from my Arch VM only to show the pamac option between dkms and modules.

I thought dkms was the best option also on Manjaro to build modules for every kernel on my machine so I don’t undestand because my Virtualbox stopped working after the kernel update.
Maybe I must use anyway mhwd-kernel for the kernel update instead of the GUI tool?

I fixed using the pre-build linux61 module as you can see on my Manjaro host: