Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950667 - =app-emulation/virtualbox-7.1.4 fails to start VMs under =sys-kernel/gentoo-sources-6.12.16
Summary: =app-emulation/virtualbox-7.1.4 fails to start VMs under =sys-kernel/gentoo-s...
Status: RESOLVED DUPLICATE of bug 945135
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Viorel Munteanu
URL: https://wiki.gentoo.org/wiki/VirtualB...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-05 21:11 UTC by Robert Gill
Modified: 2025-03-07 05:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kernel-config-6.12.16-gentoo-x86_64 (kernel-config-6.12.16-gentoo-x86_64,155.50 KB, text/plain)
2025-03-05 21:13 UTC, Robert Gill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gill 2025-03-05 21:11:53 UTC
VMs started under virtualbox-7.1.4 on a system running kernel version 6.12.16 fail to start with the following 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).
  Result Code: NS_ERROR_FAILURE (0x80004005)
  Component: ConsoleWrap
  Interface: IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}

=app-emulation/virtualbox-modules-7.1.4-r1 have been recompiled and loaded successfully on boot.

Although the following appears under dmesg when a VM is attempted to be started:

  [   99.177565] vboxdrv: 0000000000000000 VMMR0.r0
  [   99.272123] vboxdrv: 0000000000000000 VBoxDDR0.r0

Reproducible: Always
Comment 1 Robert Gill 2025-03-05 21:13:11 UTC
Created attachment 920290 [details]
kernel-config-6.12.16-gentoo-x86_64
Comment 2 Robert Gill 2025-03-05 21:15:05 UTC
KVM has been enabled on previous kernel versions with no issues. I believe it's required for qemu, which I also use.
Comment 3 Robert Gill 2025-03-05 21:51:12 UTC
virtualbox-7.1.6a, virtualbox-modules-7.1.6 also fail.
Comment 4 Robert Gill 2025-03-05 21:57:16 UTC
I suppose the answer is to compile KVM as a module and load it and unload it as needed. Does not feel like the cleanest solution.
Comment 5 Robert Gill 2025-03-05 22:02:54 UTC
I'm not certain, but setting the kernel command line parameter "kvm.enable_virt_at_load=0" may allow the kernel to enable and disable KVM as required by applications.
Comment 6 Viorel Munteanu gentoo-dev 2025-03-07 05:38:36 UTC
Known issue, we have an entry about this in the wiki.  I added your error message there, we only had the AMD equivalent.

If kvm is compiled as a module, there is an entry in /etc/modprobe.d to add enable_virt_at_load=0 to it.  For built-in, adding kvm.enable_virt_at_load=0 to the kernel command line should solve it.

*** This bug has been marked as a duplicate of bug 945135 ***