VirtualBox can't enable the AMD-V extension
VirtualBox can't enable the AMD-V extension. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_SVM_IN_USE).Result Code:NS_ERROR_FAILURE (0x80004005)Component:ConsoleWrapInterface:IConsole {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}
[
VirtualBox no longer working after latest update - openSUSE Forums
](https://forums.opensuse.org/t/virtualbox-no-longer-working-after-latest-update/181406)[Fedora Discussion](https://discussion.fedoraproject.org/t/after-upgrading-to-kernel-6-12-virtualbox-fails-to-start/139896)
[
After upgrading to kernel 6.12, VirtualBox fails to start
youtube
How to fix AMD-V Is Disabled In The BIOS Error on Oracle VM...Launchpad
[
All Virtualbox VM crash after upgrade of Host to Linux 6.14
This error occurs because both VirtualBox and the KVM kernel extension (commonly used for QEMU/virt-manager) attempt to control hardware virtualization, which creates a conflict on modern Linux kernels (6.12 and above) where KVM is automatically enabled at boot.bugs.launchpad +2
Causes
- When the KVM module (
kvm_amdfor AMD chips, orkvm_intelfor Intel) is loaded, it claims the virtualization hardware, preventing VirtualBox from enabling AMD-V.github +2 - Running both KVM (QEMU, Virt-Manager, etc.) and VirtualBox at the same time, or having the module loaded, triggers this failure.
Solutions
Temporary Fixes
- Unload the KVM modules before launching VirtualBox:
(For Intel CPUs, usebash sudo modprobe -r kvm_amd kvmkvm_intelinstead ofkvm_amd).diogoferreira +1 - If you need to re-enable KVM for QEMU, reload the modules:
Restarting the machine may also reload the modules automatically.diogoferreirabash sudo modprobe kvm_amd kvm
Permanent Workaround
- To prevent KVM from automatically grabbing virtualization on boot, add the following parameter to your kernel command line:
Refer to your Linux distribution's documentation on how to modify kernel parameters (usually intext kvm.enable_virt_at_load=0/etc/default/grub, then runsudo update-gruband reboot).github +1 - Alternatively, blacklist the KVM modules:
- Create a blacklist file, e.g.
/etc/modprobe.d/blacklistvm.conf, with:
This will prevent the modules from loading, but disables KVM-based virtualization entirely.reddittext blacklist kvm blacklist kvm_amd
- Create a blacklist file, e.g.
Additional Notes
- If QEMU/KVM is required for other purposes, you will need to switch between enabling/disabling the KVM modules before using VirtualBox vs QEMU.reddit +1
- This issue became widespread with recent kernel updates, so future VirtualBox releases or kernel patches may address it.bugs.launchpad +1
Summary Table
| Solution | Permanent | Compatible with QEMU | How-To |
|---|---|---|---|
| Unload KVM modules | No | Yes (reload modules) | sudo modprobe -r ... |
Kernel parameter kvm.enable_virt... |
Yes | Yes (opt-in) | Edit grub, update, reboot |
| Blacklist KVM modules | Yes | No | Create blacklist file |
Always cite actions to reliable distribution documentation for making kernel changes.github +2
The error "modprobe: FATAL: Module kvm_amd is in use" means the kvm_amd module is currently in use by some process or service and cannot be unloaded directly. This often happens because there are running virtual machines or services (like libvirt or QEMU) that depend on the KVM modules.
How to unload kvm_amd properly:
-
Check if any virtual machines are running:
bash
virsh list --allStop any that are running with:
bash
virsh shutdown <vm-name> -
Check and stop any services that use KVM, such as libvirt or QEMU:
bash
sudo systemctl stop libvirtd sudo systemctl stop qemu-kvm -
Unload the relevant kernel modules in the correct order (AMD example):
bash
sudo modprobe -r kvm_amd sudo modprobe -r kvmIf the dependency is on
kvm_amd, unload it first, thenkvm. -
If the modules still cannot be unloaded but you are sure no VMs or services are using them, you can force removal (careful: this may cause system instability):
bash
sudo rmmod -f kvm_amd sudo rmmod -f kvm -
If all else fails, rebooting will reset the modules and dependencies.
It is important to ensure all virtual machines and services using KVM are fully stopped before unloading these modules to avoid this error and maintain system stability.bobcares+2
- https://bobcares.com/blog/rmmod-error-module-kvm-is-in-use-by-kvm_intel/
- https://www.adminbyaccident.com/gnu-linux/how-to-gnu-linux/how-to-load-and-unload-kernel-modules-in-linux/
- https://bobcares.com/blog/modprobe-kvm_amd-error/
- https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/html/deployment_guide/sec-unloading_a_module
- https://stackoverflow.com/questions/14644904/fatal-module-kvm-intel-is-in-use
- https://www.reddit.com/r/linuxadmin/comments/e6ox9t/on_most_linux_systems_why_is_the_kvm_kernel/
STOPPING
sudo systemctl stop libvirtd sudo systemctl stop qemu-kvm
shows
libvirtd-admin.socket
libvirtd-ro.socket
libvirtd.socket
sudo systemctl stop libvirtd-admin.socket sudo systemctl stop libvirtd-ro.socket sudo systemctl stop libvirtd.socket
sudo modprobe -r kvm_amd sudo modprobe -r kvm
or
sudo rmmod -f kvm_amd sudo rmmod -f kvm
Alternatively, blacklist the KVM modules:
- Create a blacklist file, e.g. `/etc/modprobe.d/blacklistvm.conf`, with:
text
`blacklist kvm blacklist kvm_amd`
This will prevent the modules from loading, but disables KVM-based virtualization entirely.
reboot
Move to /home/garyrust/tmp if you don't want to blacklist - then reboot