I installed system updates on my F41 machine yesterday, and now VirtualBox fails to start:
Failed to start the virtual machine Win11.
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)
Result Detail:-4011 (0xfffff055)
Component:ConsoleWrap
Interface:IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}
There’s already a bug report. Evidently, with kernel 6.12, kvm is enabled by default and this conflicts with VirtualBox.
My question for you Fedora folks, as I’m not well versed enough in kernel-ology:
Can I safely use the suggested work-arounds, or do I have to expect side effects?
P.S. to myself: currently I got VirtualBox running after adding the kernel parameter.
Updated 18-Dec-2024: Use grubby as pointed out by @icher below
Original post:
sudo vim /etc/default/grub
# add kvm.enable_virt_at_load=0 to the line starting with GRUB_CMDLINE_LINUX
# then don't forget
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# and reboot
Still I worry that I might have broken something without knowing yet…
I added that line as well to grub and have not had any issues.I am guessing it is a work around until virtualbox releases there next version.Either way it does not affect anything other than lets virtualbox start with kernel 6.12.
Sorry, my bad. update-grub is from my Ubuntu days, and I have ingrained this command so much that I first issued it on the command line myself, only to end up recommending it in this thread :-/
The correct command to update the grub configuration on Fedora is
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
This is taken straight from my terminal’s history, so I hope it does work for you now as well
Just to add to what @bovender posted you can also use
sudo nano /etc/default/grub to edit the file then crtl x and save the changes.Myself I have never used vim and nano seems easier for me.
This is what worked for me. These are the commands you do. Now when you edit grub (the first step, it is not a simple copy and paste. You have to go to the line that starts with GRUB_CMDLINE_LINUX and put the kvm.enable_virt_at_load=0 at the end. I believe you leave a space from the last thing on the line. then save and exit. Then run the next command.
Here is an example of that line, BUT DO NOT COPY THIS EXACTLY. It just shows what it looks like after adding this to the end. You will have to look at your line, and add the kvm.enable_virt-at_load=0 to the end just like this example.
sudo nano /etc/default/grub
# add kvm.enable_virt_at_load=0 to the line starting with GRUB_CMDLINE_LINUX
#CTRL-X will exit, and it will ask you to save, hit Y
# then don't forget
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# and reboot
Now if it says nano is not found, you will have to do a
This added what was needed to get virtualbox to work.
sudo grubby --update-kernel=ALL --args=“kvm.enable_virt_at_load=0”
If you desided to remove it this will remove the line.
sudo grubby --update-kernel=ALL --remove-args=“kvm.enable_virt_at_load=0”
You need that first line to get virtualbox to work.
If for some reason you need KVM back, then you run the second line. Doing both like you did just added then removed it again, meaning no change. Only run the first command