6

I have been using VirtualBox on every regular Ubuntu version from 18.10 to 25.04 as host, i.e. every six months upgrading my Ubuntu host system.

Previously, I never had this problem. But, starting with version 25.04 of Ubuntu, every time I try to start a virtual machine, VirtualBox (ver. 7.0.20_Ubuntu r163906) gives me the error:

VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).

This problem can be prevented by doing

# rmmod kvm_intel

before starting VirtualBox.

Why is this so? And what is the recommended action?

FedKad
  • 13,900

1 Answers1

12

The Linux kernel, starting with version 6.12, changed the behavior of KVM kernel modules.

They now enable virtualization directly upon module load.

This prevents VirtualBox VMs from starting.

To prevent this, you need to add "kvm.enable_virt_at_load=0" to the kernel command line.

It must be added to /etc/default/grub.

On the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet kvm.enable_virt_at_load=0"

And then run

sudo update-grub
sudo reboot
kyodake
  • 18,075