I found a solution. Since Kernel 6.8 or more recent (seems also some
distro with kernel 6.5), the kvm module (example kvm_intel) is used by
the kernel at boot. So you will need to unload the module manually with
kernels version 6.5 to 6.11 (modprobe -r kvm_intel  or modprobe -r
kvm_XXX whatever it is).

For kernels 6.12, there is a bootloader command "kvm.enable_virt_at_load=0" 
which you can use to disable loading kvm at boot.
For grub, do GRUB_CMDLINE_LINUX="kvm.enable_virt_at_load=0" as a command line 
parameter (under debian put it in /etc/default/grub)

But, this is not all. Virtualbox 6.1.50 also needs to be updated some sort 
because it won't compile their modules with kernels higher or equal than 6.8.
So I decided to backports bug fixes by doing diff compare of virtualbox 7.0.22. 
I supply a diff file here so you can update Virtualbox 6.1.50 to make it works 
with kernel 6.8 to 6.12 (and probably working with kernel 6.13 and 6.14 to 
date.) Not all patches has been backported. Just what it needs to support newer 
kernel and some other importants fixes I discovered. You will also need to add 
3 files that are missing in 6.1.50 :
usr/share/virtualbox/src/vboxhost/vboxdrv/include/VBox: VBoxLnxModInline.h
usr/share/virtualbox/src/vboxhost/vboxnetadp/include/VBox: VBoxLnxModInline.h
usr/share/virtualbox/src/vboxhost/vboxnetflt/include/VBox: VBoxLnxModInline.h

Also, note that I tested it with a Normal Kernel. Real-Time RT-PREEMPT
kernels don't work with 6.1.50 (I get Spinlock error and kernel
traceback errors).

The reason why I want to continue using virtualbox 6.1.50 is because it
supports older hardware motherboard and CPU back to date 2009, when
there was no VT-d or VT-c support with those motherboard. Anyway, I made
it works perfectly with debian 10 (buster) from 2020 with a custom
kernel 6.12. I also compiled it with GCC-12 because this old debian
distro had GCC 8.0.

By the way, the Virtualbox's Forum also has many thread to the same bug here:
https://forums.virtualbox.org/viewtopic.php?p=549108
https://forums.virtualbox.org/viewtopic.php?t=111902
https://forums.virtualbox.org/viewtopic.php?p=549757
https://forums.virtualbox.org/viewtopic.php?t=111925
https://forums.virtualbox.org/viewtopic.php?t=111918

Please, if one of you have an account created on those forums, can you
please rely this information there too? Virtualbox dev team decided not
to support 6.1.50 anymore. But it is actually possible to backports
fixes at some point like I did. Actually, i was able to extract the
official DEB package (dpkg-deb -R virtualbox-6.1.50.deb .), then
backports the fixes and recreate a brand new DEB package (dpkg-deb -b
new_virtualbox_folder).

** Patch added: "Virtualbox 6.1.50 Kernel 6.8 to 6.12 support"
   
https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/2073267/+attachment/5866925/+files/virtualbox_6.1.50_DIFF_MODDED_FOR_KERNEL_6.8_to_6.12.diff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2073267

Title:
  Virtualbox Guru meditation on VM start caused by kernel commit in
  v6.9-rc4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2073267/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to