VirtualBox can't operate in VMX root mode

Updated: January 28, 2026

Weird problems rarely manifest solo. To wit, I recently encountered several issues running my virtual machines in VirtualBox on top of Kubuntu 24.04. These problems occurred after I upgraded my system to Kubuntu 24.04, and then added a new kernel into the mix. First, I couldn't run any guests because the program's drivers weren't loaded into memory. I had to install headers manually, and recompile the kernel. Whatever.

Then, as soon as I solved this issue, there was a fresh one. It read: 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). Uh oh. Lots of words. Kernel compilation? Sounds very naughty. Well, let's debug.

Old old problem

As it happens, I've been using VirtualBox on this machine from day one. But now, apparently, it couldn't run anymore, due to a clash with KVM. Luckily for me, I just happen to have written about this exact problem more than a decade ago, and explained how you can have both these two hypervisors coexist. Not run at the same time, no, but live happily side by side, yes.

Indeed, I wanted to make sure this was the case. And it was. KVM was loaded into memory:

lsmod | grep kvm
kvm_intel             487424  0
kvm                  1425408  1 kvm_intel
irqbypass              12288  1 kvm

Why? Now, that's a rather brilliant question. I have no good answer. Something in my upgrade path or the setup of the 6.14 kernel introduced KVM into the mix, despite the fact I never did this on my own, or the fact I'm using a different virtualization product, with known conflicts between the two. On its own, I find this quite annoying. But the solution is quite simple.

Remove KVM module

As an immediate quick fix, I unloaded the KVM module, and thereafter, VirtualBox runs fine:

sudo modprobe -r kvm_intel

But you can make this declaration permanent by blacklisting the KVM module. However, if you do want some flexibility, and you do want to run KVM in addition to VirtualBox (though not at the same time), you can simply do nothing else. Just remember to insert or remove the kvm module (intel or amd, based on architecture) when you need it. And that's really all there is to it.

Conclusion

I think the biggest issue with VirtualBox is that the error messages aren't always easy to understand or parse. One, the GUI usually only throws a subset of text, and you won't always be able to pinpoint the exact issue just based on that. You need to see what gives on the command line, for more fine details. After that, it's easier to go through the support tickets and bugs and figure out the solution.

In today's case, the VMX mode thingie, the error is far more alarming than it should be. It points toward kernel compilation, when it's completely unnecessary. All it takes is to unload the KVM module, and Bob's your uncle. What irks me is that the issue happened in the first place, as I've not intentionally set up KVM. Thus, in one of the upgrades or whatnot, something changed, and it represents yet another desktop usability problem in my ongoing Linux saga. Well, you know what to do now. Load, unload the kernel modules, enjoy virtualization. Maximum flexibility, no compilation, not even a reboot is needed. Take care, folks.

Cheers.