It is a bug, VirtualBox 6 isn't compatible with the new kernel. You have to revert-back to the old kernel or install the VirtualBox 7 from oracle:
Stop the virtualbox service:
sudo systemctl stop virtualbox.service
then:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib" |
sudo tee /etc/apt/sources.list.d/vbox.list
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc |
sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
sudo apt-get update
sudo apt-get install virtualbox-7.0
Bug #2048956 : virtualbox-dkms 6.1.38-dfsg-3~ubuntu1.22.04.1: virtualbox kernel module failed to build
Update
As said @ArryBbolt3 A fix has been released solving the kernel module failed to build
error.
The new VirtualBox 6.1.48-dfsg-1~ubuntu1.22.04.1
and its dependencies is available from jammy-updates
. You should have the following line in your /etc/apt/sources.list
( sudo apt edit-sources
):
deb http://cz.archive.ubuntu.com/ubuntu jammy-updates main multiverse
@ArrayBolt3 Thank you for this update.