If you’re encounter the issue with following error messages when start the VirtualBox machine VirtualBox can't enable the AMD-V extension. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_SVM_IN_USE).
, that mean there are another kernel module that running, to check it use lsmod
sudo lsmod | grep -E 'kvm|vbox' # output vboxnetadp 32768 0 vboxnetflt 40960 0 vboxdrv 700416 2 vboxnetadp,vboxnetflt kvm_amd 249856 0 kvm 1449984 1 kvm_amd
kvm modules and vbox* modules are competing each other.
Check the currently in use modules
$ modprobe -r kvm modprobe: FATAL: Module kvm is in use.
That the reason VirtualBox failed to run, because the KVM module are in use, it’s conflict with vbox kernel module. To quick fix this issue disable the kvm and kvm_amd module
sudo rmmod kvm_amd sudo rmmod kvm
after execute those command, re-run again the VirtualBox machine, it should work, because the KVM module is gone.
$ sudo lsmod | grep -E 'kvm|vbox' vboxnetadp 32768 0 vboxnetflt 40960 0 vboxdrv 700416 2 vboxnetadp,vboxnetflt
this is only temporary, once the computer restarted, we need to re-run the command again.
In case you need to revert the changes, for example because you want to run Virtual Machine Manager (virt-manager) instead of VirtualBox and enable kvm and kvm_amd module run
sudo modprobe kvm sudo modprobe kvm_amd
Disable KVM and KVM_AMD Permanent
To disable kvm and kvm_amd permanently, we’ll create a config for modprobe. Create a /etc/modprobe.d/blacklist.conf
file with following lines
blacklist kvm_amd blacklist kvm
then after the restart/reboot those module will disable by default.