Latest hwe kernel upgrade 6.17.0-14-generic conflicts with virtualbox 7.0.16 under 24.04

Ubuntu Version:
24.04 LTS

Desktop Environment:
Example: GNOME wayland

Problem Description:
I tried to upgrade my system to the latest kernel proposed (see title). The installation didn’t finish completely as I was receiving errors due to conflicts with virtualbox.

Screenshots or Error Messages:
With the command: less /var/crash/virtualbox-dkms.0.crash

These are some errors:

In file included from vboxdrv/SUPDrv.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory

and

compilation terminated.
make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/SUPDrv.o] Error 1
make[4]: *** Waiting for unfinished jobs…
make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/SUPDrvSem.o] Error 1
make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/linux/SUPDrv-linux.o] Error 1
make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/SUPDrvGip.o] Error 1
make[3]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:556: vboxdrv] Error 2
make[2]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:2016: .] Error 2
make[1]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:248: __sub-make] Error 2
make[1]: Leaving directory ‘/var/lib/dkms/virtualbox/7.0.16/build’
make: *** [Makefile:248: __sub-make] Error 2
make: Leaving directory ‘/usr/src/linux-headers-6.17.0-14-generic’
DKMSKernelVersion: 6.17.0-14-generic
Date: Thu Feb 5 00:20:07 2026
Package: virtualbox-dkms 7.0.16-dfsg-2ubuntu1.1
PackageVersion: 7.0.16-dfsg-2ubuntu1.1
SourcePackage: virtualbox
Title: virtualbox-dkms 7.0.16-dfsg-2ubuntu1.1: virtualbox kernel module failed to build

What I’ve Tried:
In the end I purged virtualbox from my system, I rebooted and the installation of kernel went fine. Trying to install anew the virtualbox under repositories brought error messages. So I decided to install the latest proposed virtualbox version 7.2.6 from the virtualbox website. No errors at all.

Just to mention that in order to see my machines, which were left intact, on the left hand side of the virtualbox menu I had to select the second icon (Machines).

Before Posting:
:mag: Similar threads were made for previous kernel versions. In my case virtualbox could run, yet I didn’t want to have a system with error messages.

3 Likes

You did the right thing. VirtualBox depends a lot on the kernel, so sometimes you have no choice but to use the latest VirtualBox.

I am surprised that VirtualBox prevented the kernel from upgrading fully, but at least you fixed it.

5 Likes

I had the same issue on Linux Mint 22.3 (which obviously isn’t supported on this forum, but OP already confirmed that this issue occurs on stock Ubuntu)

I worry less technical users won’t know what to do when the graphical updater throws an error, and that these kind of issues could throw people off Linux. Any chance that some kind of block could be put in place to prevent this (such as marking 6.17.0 as conflicting with the Virtualbox package, although I imagine that specifically wouldn’t be a good idea because the graphical updater would freak out and encourage running a dist-upgrade)

1 Like

The DKMS kernel module packages often need some adjustment for the kernel headers if a new kernel shows up … an update of the virtualbox dkms package should fix this once it gets released …

That would mean holding back security kernel fixes for potentially severe vulnerabilities for some random out-of-tree kernel modules, the virtualbox dkms package will likely just need some adjustments to build against the newer kernel headers as I said above …

I had the same issue on Linux Mint 22.3. When looking at the make logfile at
/var/lib/dkms/virtualbox/7.0.16/build/make.log

it mentioned a missing file named cdefs.h several times:

The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
CC [M] vboxdrv/linux/SUPDrv-linux.o
CC [M] vboxdrv/SUPDrv.o
CC [M] vboxdrv/SUPDrvGip.o
CC [M] vboxdrv/SUPDrvSem.o
CC [M] vboxdrv/SUPDrvTracer.o
CC [M] vboxdrv/SUPLibAll.o
In file included from vboxdrv/linux/SUPDrv-linux.c:42:
vboxdrv/linux/../SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: Datei oder Verzeichnis nicht gefunden
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from vboxdrv/SUPDrvSem.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: Datei oder Verzeichnis nicht gefunden
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from vboxdrv/SUPDrv.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: Datei oder Verzeichnis nicht gefunden
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from vboxdrv/SUPDrvGip.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: Datei oder Verzeichnis nicht gefunden
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
compilation terminated.
In file included from vboxdrv/SUPDrvTracer.c:43:
vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: Datei oder Verzeichnis nicht gefunden
47 | #include <VBox/cdefs.h>
| ^~~~~~~~~~~~~~
compilation terminated.

Anyone any idea what that’s about?

Yes, read above … the virtualbox dkms package needs to be adjusted for the new kernel …

1 Like

I can confirm that.
Resolved by upgrading to VirtualBox 7.2 via the VirtualBox repository.

It looks like there will be a crash when upgrading to Ubuntu 26.04?!
I guess I’ll have to uninstall and purge Virtualbox 7.2 first?

References:

reproduce() {
    uname -a
    # Linux user-VirtualBox 6.14.0-37-generic #37~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 20 10:25:38 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

    sudo apt update
    sudo apt install virtualbox virtualbox-ext-pack
    sudo reboot
    # Enroll MOK

    sudo apt full-upgrade
    # Linux kernel is being installed (6.17.0-14) -> Crash

    virtualboxApt7-2
    virtualboxExtensionPack # Optional
    # Maybe Reboot & Enroll MOK
}

virtualboxApt7-2() {
    wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
    fingerprint=$(gpg -n -q --import --import-options import-show /usr/share/keyrings/oracle-virtualbox-2016.gpg | awk '/pub/{getline; gsub(/^ +| +$/,""); print $0}')
    if [ "$fingerprint" != "B9F8D658297AF3EFC18D5CDFA2F683C52980AECF" ]; then
        echo "Verification failed: The fingerprint (${fingerprint}) does not match\!"
        [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell
    fi
    . /etc/lsb-release
    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $DISTRIB_CODENAME contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list 1>/dev/null

    sudo apt-get update
    sudo apt-get -y remove virtualbox virtualbox-ext-pack # Remove old VirtualBox version (7.0.16)
    sudo apt-get -y purge virtualbox virtualbox-ext-pack # Purge configuration files
    sudo apt-get -y install virtualbox-7.2
}

virtualboxExtensionPack() {
    # Download extension pack matching installed VirtualBox version
    VBOX_VERSION=$(VBoxManage -v | cut -d'r' -f1 | tail -1); echo "$VBOX_VERSION"
    URL="https://download.virtualbox.org/virtualbox/${VBOX_VERSION}/Oracle_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack"
    wget -q "$URL" -O /tmp/Oracle_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack
    sudo VBoxManage extpack install --replace /tmp/Oracle_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack
    rm /tmp/Oracle_VirtualBox_Extension_Pack-${VBOX_VERSION}.vbox-extpack
}

Same here confirm the behaviour, tried the install and get failure

Ubuntu Version:
24.04 LTS

Environment:
system booted in Ubuntu console mode: ro 3

Problem Description:
I tried to upgrade my system to the latest kernel proposed (see title). The installation didn’t finish completely as I was receiving errors due to conflicts with virtualbox.

Screenshots or Error Messages:
With the command: less /var/crash/virtualbox-dkms.0.crash

ProblemType: Package
DKMSBuildLog:
 DKMS make.log for virtualbox-7.0.16 for kernel 6.17.0-14-generic (x86_64)
 Fri 06 Feb 2026 12:33:34 PM EST
 make: Entering directory '/usr/src/linux-headers-6.17.0-14-generic'
 make[1]: Entering directory '/var/lib/dkms/virtualbox/7.0.16/build'
 warning: the compiler differs from the one used to build the kernel
   The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
   You are using:           gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
   CC [M]  vboxdrv/linux/SUPDrv-linux.o
   CC [M]  vboxdrv/SUPDrv.o
   CC [M]  vboxdrv/SUPDrvGip.o
   CC [M]  vboxdrv/SUPDrvSem.o
   CC [M]  vboxdrv/SUPDrvTracer.o
   CC [M]  vboxdrv/SUPLibAll.o
   CC [M]  vboxdrv/common/string/strformatrt.o
   CC [M]  vboxdrv/combined-agnostic1.o
   CC [M]  vboxdrv/combined-agnostic2.o
   CC [M]  vboxdrv/combined-os-specific.o
 In file included from vboxdrv/SUPDrvSem.c:43:
 vboxdrv/SUPDrvInternal.h:47:10: fatal error: VBox/cdefs.h: No such file or directory
    47 | #include <VBox/cdefs.h>
       |          ^~~~~~~~~~~~~~
.....
 make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/combined-os-specific.o] Error 1
 make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/combined-agnostic2.o] Error 1
 vboxdrv/combined-agnostic1.c:38:10: fatal error: internal/iprt.h: No such file or directory
    38 | #include "internal/iprt.h"
       |          ^~~~~~~~~~~~~~~~~
 compilation terminated.
 make[4]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:287: vboxdrv/combined-agnostic1.o] Error 1
 make[3]: *** [/usr/src/linux-headers-6.17.0-14-generic/scripts/Makefile.build:556: vboxdrv] Error 2
 make[2]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:2016: .] Error 2
 make[1]: *** [/usr/src/linux-headers-6.17.0-14-generic/Makefile:248: __sub-make] Error 2
 make[1]: Leaving directory '/var/lib/dkms/virtualbox/7.0.16/build'
 make: *** [Makefile:248: __sub-make] Error 2
 make: Leaving directory '/usr/src/linux-headers-6.17.0-14-generic'
DKMSKernelVersion: 6.17.0-14-generic
Date: Fri Feb  6 12:33:35 2026
Package: virtualbox-dkms 7.0.16-dfsg-2ubuntu1.1
PackageVersion: 7.0.16-dfsg-2ubuntu1.1
SourcePackage: virtualbox
Title: virtualbox-dkms 7.0.16-dfsg-2ubuntu1.1: virtualbox kernel module failed to build

Removed the install using: sudo apt purge virtualbox and it failed as well, get rid of installation doing:

> sudo apt purge virtualbox
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'virtualbox' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  dkms libdouble-conversion3 libgsoap-2.8.132t64 liblzf1 libmd4c0 libpcre2-16-0 libqt5core5t64 libqt5dbus5t64 libqt5gui5t64 libqt5help5 libqt5network5t64 libqt5opengl5t64
  libqt5printsupport5t64 libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5sql5-sqlite libqt5sql5t64 libqt5svg5 libqt5waylandclient5 libqt5waylandcompositor5 libqt5widgets5t64
  libqt5x11extras5 libqt5xml5t64 libsdl2-2.0-0 libtpms0 libvncserver1 libxcb-xinerama0 libxcb-xinput0 qt5-gtk-platformtheme qttranslations5-l10n qtwayland5 virtualbox-dkms
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up virtualbox-dkms (7.0.16-dfsg-2ubuntu1.1) ...
Removing old virtualbox-7.0.16 DKMS files...
Module virtualbox-7.0.16 for kernel 6.14.0-37-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
...
depmod...
Building initial module for 6.17.0-14-generic
Error! Bad return status for module build on kernel: 6.17.0-14-generic (x86_64)
Consult /var/lib/dkms/virtualbox/7.0.16/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
Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

> sudo apt autoremove
The following packages will be REMOVED:
  dkms libdouble-conversion3 libgsoap-2.8.132t64 liblzf1 libmd4c0 libpcre2-16-0 libqt5core5t64 libqt5dbus5t64 libqt5gui5t64 libqt5help5 libqt5network5t64 libqt5opengl5t64
  libqt5printsupport5t64 libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5sql5-sqlite libqt5sql5t64 libqt5svg5 libqt5waylandclient5 libqt5waylandcompositor5 libqt5widgets5t64
  libqt5x11extras5 libqt5xml5t64 libsdl2-2.0-0 libtpms0 libvncserver1 libxcb-xinerama0 libxcb-xinput0 qt5-gtk-platformtheme qttranslations5-l10n qtwayland5 virtualbox-dkms
0 upgraded, 0 newly installed, 33 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 79.5 MB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 205453 files and directories currently installed.)
Removing virtualbox-dkms (7.0.16-dfsg-2ubuntu1.1) ...
Module virtualbox-7.0.16 for kernel 6.14.0-37-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
...

vboxdrv.ko.zst:
 - Uninstallation
   - Deleting from: /lib/modules/6.14.0-37-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

vboxnetadp.ko.zst:
 - Uninstallation
   - Deleting from: /lib/modules/6.14.0-37-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

vboxnetflt.ko.zst:
 - Uninstallation
   - Deleting from: /lib/modules/6.14.0-37-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.
depmod...
Deleting module virtualbox-7.0.16 completely from the DKMS tree.
Removing dkms (3.0.11-1ubuntu13) ...
Removing qtwayland5:amd64 (5.15.13-1) ...
Removing libqt5waylandcompositor5:amd64 (5.15.13-1) ...
Removing libqt5quick5:amd64 (5.15.13+dfsg-1ubuntu0.1) ...
Removing libqt5qmlmodels5:amd64 (5.15.13+dfsg-1ubuntu0.1) ...
Removing libqt5qml5:amd64 (5.15.13+dfsg-1ubuntu0.1) ...
Removing qt5-gtk-platformtheme:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libgsoap-2.8.132t64:amd64 (2.8.132-2.1build2) ...
Removing liblzf1:amd64 (3.6-4) ...
Removing libqt5x11extras5:amd64 (5.15.13-1) ...
Removing libqt5waylandclient5:amd64 (5.15.13-1) ...
Removing libqt5help5:amd64 (5.15.13-1) ...
Removing libqt5opengl5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libqt5printsupport5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libqt5sql5-sqlite:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libqt5sql5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libqt5svg5:amd64 (5.15.13-1) ...
Removing libqt5widgets5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libqt5xml5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libsdl2-2.0-0:amd64 (2.30.0+dfsg-1ubuntu3.1) ...
Removing libtpms0:amd64 (0.9.3-0ubuntu4.24.04.1) ...
Removing libvncserver1:amd64 (0.9.14+dfsg-1build2) ...
Removing qttranslations5-l10n (5.15.13-1) ...
Removing libqt5gui5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libmd4c0:amd64 (0.4.8-1build1) ...
Removing libqt5network5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libqt5dbus5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libxcb-xinerama0:amd64 (1.15-1ubuntu2) ...
Removing libxcb-xinput0:amd64 (1.15-1ubuntu2) ...
Removing libqt5core5t64:amd64 (5.15.13+dfsg-1ubuntu1) ...
Removing libdouble-conversion3:amd64 (3.3.0-1build1) ...
Removing libpcre2-16-0:amd64 (10.42-4ubuntu2.1) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.7) ...

After all installation only the virtualbox related package there is

> dpkg --list | grep virtualbox
ic  virtualbox                                    7.0.16-dfsg-2ubuntu1.1                   amd64        x86 virtualization solution - base binaries 

As already stated, uninstall VirtualBox, and reinstall the latest version. The instructions are on the VirtualBox website.

2 Likes

Hi,

Are you experiencing any Windows guest stability/crash issues after upgrading to HWE 6.17 kernel and upgrading to virtualbox version 7.2.6? (during VM running)

Please indicate you Win guest OS version.

Especially insterested in Win 7 64 guest.
There’s an issue open on Github for Windows 11 guest crash.

link to the issue? Unless I’m just missing it, I’m not seeing anything specific to hwe 6.17 and windows 11 guest.

https://github.com/VirtualBox/virtualbox/issues/336

The bug report is confusing. It says that the host is Windows and that it is Linux. It also says that the guest is Windows and that it is Linux. It doesn’t make sense.

I am running Windows 11 with VirtualBox 7.2.6 on Ubuntu 24.04 without any problem.

Is it feasible to add an automated test to ensure future kernel updates don’t conflict with Virtualbox dkms (or that the DKMS package gets updated beforehand)? Or is it not worth it because Virtualbox would have a relatively small install base?

1 Like

Closing.

The OP had a problem…and solved it themselves one way (there are others). The support question is answered. This topic is not a conversation about every Virtualbox-related error.

If you are encountering problems, please open a new question with enough information for support volunteers to clearly understand your version of Ubuntu, your version of VirtualBox, and the source you installed VB from.

The most common VirtualBox problems that we see occur when folks install VirtualBox onto an older LTS release of Ubuntu from an upstream source (like the VB website) instead of using the tested, compatible version of VB in the Ubuntu repos.

2 Likes