To resolve the `VERR_VMX_IN_VMX_ROOT_MODE` error in VirtualBox on Debian Linux,
To resolve the VERR_VMX_IN_VMX_ROOT_MODE error in VirtualBox on Debian Linux, follow these steps:
Cause
The error occurs because the KVM hypervisor is active and monopolizes hardware virtualization (VMX), preventing VirtualBox from accessing it.
Solutions
Choose one of the methods below:
Method 1: Unload KVM Modules Temporarily (Test First)
- Unload KVM modules (reverts after reboot):
sudo rmmod kvm_intel kvm_amd kvm
- Verify modules are unloaded:
lsmod | grep kvm # Should return nothing
- Launch your VirtualBox VM. If successful, make the change permanent with Method 2.
Method 2: Permanently Disable KVM via Blacklisting
- Create a blacklist file:
sudo nano /etc/modprobe.d/blacklist-kvm.conf
- Add these lines (based on your CPU):
- For Intel CPUs:
blacklist kvm_intel blacklist kvm
- For AMD CPUs:
blacklist kvm_amd blacklist kvm
- For Intel CPUs:
- Save (Ctrl+O → Enter → Ctrl+X) and update:
sudo update-initramfs -u
- Reboot:
sudo reboot
Method 3: Kernel Boot Parameter (If KVM is Built-In)
- Edit GRUB configuration:
sudo nano /etc/default/grub
- Append to
GRUB_CMDLINE_LINUX:- For Intel:
modprobe.blacklist=kvm_intel,kvm
- For AMD:
modprobe.blacklist=kvm_amd,kvm
GRUB_CMDLINE_LINUX="...existing options... modprobe.blacklist=kvm_intel,kvm"
- For Intel:
By following these steps, VirtualBox will regain access to hardware virtualization or fall back to software emulation.
Comments
Post a Comment