Rocky 9.6 - Virtualbox quit (includes the fix)

I haven’t used Virtualbox for a few weeks so I’m not entirely sure if this is related to an update to Virtualbox itself or to the new Rocky 9.6 update, though I suspect the latter.

Maybe something changed in regard to what kernel modules are loaded by default?

When you load a Virtualbox image on 9.6, this error shows up:

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).

As stated in the error message, the fix is to remove the kvm kernel module.

I just did this:

modprobe -r kvm_intel
modprobe -r kvm

And it works now.
1 Like

You can also add this to your kernel commandline:

kvm.enable_virt_at_load=0

For me this was cleared up with VirtaulBox 7.1.6 and I have since removed the parameter.

I attempted Frank’s solution, and “modprobe -r kvm_intel” works, but “modprobe -r kvm” fails with
“$ sudo modprobe -r kvm
modprobe: FATAL: Module kvm is in use.”
even immediately after reboot.

what’s the preferred incantation to get rid of it entirely?

Thanks!

Fred

Try

lsof | grep kvm

and find out what’s using kvm.

turns out there is also amd_kvm, and once I removed it then the kvm module was removable.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.