9

When I try to open any OS on Oracle VirtualBox an error accurate.

Failed to open a session for the virtual machine xp efendi.
AMD-V is being used by another hypervisor. (VERR_SVM_IN_USE).
VirtualBox can't enable the AMD-V extension. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_SVM_IN_USE).

How can I repair this problem?

Braiam
  • 69,112
Huseyin
  • 802

7 Answers7

16

This error is because you have virtualbox and kvm installed. The kernel modules conflict.

The "simple" solution is to use one or the other, but not both. You can, however, use both as long as you are willing to manually (or script) loading / unloading the kernel modules.

To see your modules

#Virtualbox modules
sudo lsmod | grep vbox

#kvm
sudo lsmod| grep kvm

To remove a module

# remove virtualbox
sudo rmmod vboxdrv
sudo rmmod vboxnetflt

#remove kvm
sudo rmmod kvm
sudo rmmod kvm_amd

use insmod

sudo insmod /full/path/to/your/modules

You can find the module with

locate kvm | grep .ko
locate vbox | grep .ko

Use the modules for your current kernel.

Braiam
  • 69,112
Panther
  • 104,528
3

This problem has solved by following codes in terminal:

sudo killall VBoxSVC
export VBOX_HWVIRTEX_IGNORE_SVM_IN_USE=true
VirtualBox
Huseyin
  • 802
3

For me, there was no kvm module loaded (lsmod | grep kvm, shows nothing), thus it was enough to simply set the VBOX_HWVIRTEX_IGNORE_SVM_IN_USE=true as Huseyin pointed out.

For my particular case when I was running virtualbox without sudo, my existing win 7 vdi was trapped in a recovery console screen. (every action eventually restarted my machine) Maybe some permission issues, (solved by running sudo virtualbox, however I'm not sure this is the recommended way)

Another great read about how to script your way into "Using KVM and VirtualBox side by side" http://www.dedoimedo.com/computers/kvm-virtualbox.html

2

I solved that problem by closing Docker Desktop so be sure you have turned off docker or other virtualization technologies.

0

In my case KVM was used in background by multipass, this is how to stop it:

sudo systemctl stop multipass

To disable it from starting at startup

sudo snap disable multipass
0

In my case it was virt-manager using KVM. Simple solution:

  • stop virt-manager / KVM / virsh machines that are running

  • restart VirtualBox:

    sudo killall VBoxSVC

    VirtualBox

The option in between as mentioned above :

export VBOX_HWVIRTEX_IGNORE_SVM_IN_USE=true

may also work, but I suppose you lose some acceleration then.

0

Run System Monitor, search for KVM and kill it.