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.