Can't start VirtualBox VMs after update

Can’t start any VM.
Why this did happen and how to solve it?
This is the error I get:

VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE).
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).
Código de resultado:
NS_ERROR_FAILURE (0x80004005)
Componente:
ConsoleWrap
Interfaz:
IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}

This happens because kvm is already using VT-x/AMD-V, so vboxdrv is blocked. You can use either KVM or VirtualBox with hardware virtualization, but not both at the same time.

Why did this happen right after the update? It was working before without me changing anything.
How do I disable the thing that is blocking VirtualBox?

Did you reboot after the kernel upgrade?

Of course.

There are plenty of websites…

Use this boot parameter: kvm.enable_virt_at_load=0

Anyway, the solution is disabling kvm, when using VirtualBox. Virtualbox uses another driver. If KVM is not loaded, there won’t be in conflict, but if it gets loaded at the beginning, it will be in conflict.

There is something else… I have kvm loaded and Virtualbox works fine.

> lsmod | grep kvm
kvm_intel             536576  2
kvm                  1486848  1 kvm_intel
irqbypass              16384  1 kvm

I even think that Virtualbox itself uses kvm. If I close Virtualbox, then kvm_intel is not used:

> lsmod | grep kvm
kvm_intel             536576  0
kvm                  1486848  1 kvm_intel
irqbypass              16384  1 kvm

@Patitud: Do you have the virtualbox-host-modules installed?

The solution I found (using AI assistance), adding kvm_intel to blacklist:

sudo nano /etc/modprobe.d/blacklist-kvm-intel.conf

blacklist kvm_intel

sudo mkinitcpio -P

Then I restarted and everything worked again.

This seems like this problem would affect any of the big virtualisation suites, as they all use kvm.

I didn’t have any issues.

What is your CPU model? And which kernel version are you running?


model name      : 13th Gen Intel(R) Core(TM) i9-13900H
❯ uname -r
6.12.95-1-MANJARO

Indeed, i do not have any issues with that module and QEMU. Intel 10gen, kernel 7.1.

It is one of the cases where trying different kernels might be worth. Seems either kernel of firmware related to me. If anyone with the same gen cpu can report would be nice.

I couldn’t translate the other link before (easily). But getting to my desktop, I can see this basically had the fix.

Seems like a pretty common issue with certain Intel CPUs … and 6.12+ kernels?

The better way is by (with this command you use nano to open grub-text file):

sudo nano /etc/default/grub

Find the line:

GRUB_CMDLINE_LINUX_DEFAULT=“…”`

and add the parameter:

kvm.enable_virt_at_load=0

The line should be looks like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3 kvm.enable_virt_at_load=0

Save the changes by Ctrl+O, after this put Enter and for exit: Ctrl+X

Update the GRUB by:

sudo update-grub

In this way you don’t turn off KVM permanently and you may use Virtual Box at the same time