VirtualBox - AMD-V is being used by another hypervisor (VERR_SVM_IN_USE)

So I had to manually sign kernel modules in order for secure boot to not block Virtual Box from running. I did this by following instructions from here: https://stackoverflow.com/questions/61248315/sign-virtual-box-modules-vboxdrv-vboxnetflt-vboxnetadp-vboxpci-centos-8

This seems to be successfull becuase I can now run Virtual Box without getting errors related to the kernels. I thought I’d mention this just incase it relates somehow to the new issue I’m having.

I added a new vm in Virtual Box but when I launch the vm to run the installation it aborts with error:

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).

Result Code: NS_ERROR_FAILURE (0x80004005)

Component: ConsoleWrap

Interface: Console {6ac83d89-6ee7-4e33-8ae6-b257b2e81be8}

I did some digging and found this: https://askubuntu.com/questions/403591/amd-v-is-being-used-by-another-hypervisor-verr-svm-in-use

It says I need to remove one of the kernel modules so they don’t conflict with eachother. I’m afraid if I remove the virtbox modules then VirtualBox will fail to function and I’m afraid that if I delete the kvm and kvm_amd modules then something else in my system might break. I’m not quite sure if it’s safe to remove either of these modules. I ran some commands below to get the modules that are currently on my system.

sudo lsmod | grep vbox (VirtualBox module)

vboxdrv 696320 0

sudo lsmod| grep kvm (other modules on my system)

kvm_amd 241664 0
kvm 1396736 1 kvm_amd
irqbypass 12288 1 kvm
ccp 180224 1 kvm_amd

As you can see kvm and kvm_amd is being used by ccp and irqbypass. I checked with an LLM and it seems to think that I have the potential to cause system instability or other issues if I delete the kvm and kvm_amd modules.

I need some clarification on how to proceed with this. Is it safe to delete kvm and kvm_amd? Maybe I should disable them instead of deleting them? Maybe there is another way forward?

Please keep in mind that I have no backup system in place so I need to be very careful with how I proceed. Thanks in advanced for anyone who may know the way forward on this. =)

In the meantime I’m going to continue to read up on this while I wait for a response.

modprobe -r kvm_amd

modprobe -r kvm

This is temporary so it will be undone the next time you reboot your computer.

1 Like

You need to add this to your kernel commandline:
kvm.enable_virt_at_load=0
You do that by using the “grubby” command thus:

sudo grubby --update-kernel=ALL  --args=kvm.enable_virt_at_load=0

The “ALL” argument creates the file /etc/kernel/cmdline which is sourced upon future kernel updates.
Read man grubby for further understanding.
Your only other choice is to discard VirtualBox and use the native virt manager.
Frank has given you another option that is temporary if you want to test.

1 Like

This is what I was thinking. I’ll probably give this a try and report back. Thanks.

I’ll be looking into more permanent solutions once I’ve experimented with disabling the modules.

I think I’ll take your advice and take another look at another virtual management application. I do find those ones to be pretty advanced to set up though.

I’ll report back once I’ve tried a couple things. Thank you.

KVM is far better than VirtualBox. KVM is a level 1 hypervisor, whereas VirtualBox is level 2 and thus far worse in terms of performance, etc.

Ditch VirtualBox, use KVM instead.

If I had a dollar for every time someone has recommended I ditch VirtBox for something else lol.

Alright so when you say KVM what do you mean exactly? Is there an app called KVM? I see an app in the Software Center called Virtual Machine Manager. Is that the one? I’ve been confused in the past with what people mean by KVM. Do I need to run KVM as some background or base process then use QEMU as a replacement for Virtual Box? How does this work exactly?

EDIT:

So I used Gpt-oss to explain this to me. Apparently KVM is the kernel module that acts as a hypervisor. Whatever that means. lol. Then I use QEMU to manage the vm’s. I’m going to be looking into this some more and might give it a go.

Thanks for the recommendation.

Yes, KVM is the modules that were mentioned higher up in this thread to have them unloaded so that VirtualBox would work. KVM = Kernel Virtual Machine.

There used to be a nice GUI app called VMM or Virtual Machine Manager, but you can now manage the VM’s with Cockpit and do all that in the web browser. You can use the qemu tools and do it from the command line, but in reality the GUI tools will be better and easier.

1 Like

Cockpit sounds like it’s meant for remoting into vm’s using ssh. I’m just running vm’s locally on my desktop. Not sure if Cockpit is best suited for my needs.

I found Virtual Machine Manager. It’s available for download from FlatPak. It also has a higher rating than CockPit.

Yes, I prefer it. Luckily it is still in Fedora, which I have on my laptop/desktop so I still have it as well. Cockpit is OK, if you have no alternative. I did use it on a server at work, and it did what it needed to. You can create and manage VM’s in cockpit too.

1 Like

Virtual Machine Manager is an easy to use GUI to create & Manage QEMU/KVM VM’s. You should be able to install through Repo’s, not Flatpak. If you install it via the Repo using dnf, it should also pickup all the necessary Dependencies needed for QEMU/KVM.

I agree that KVM is far superior from VirtualBox.It is also directly supported by the Kernel, & Red-Hat itself actively markets it together with Cisco as Hardware Partner for it’s HyperVisor & Cloud solutions.

Unfortunately Virtual Machine Manager has been deprecated by Red Hat, which means it appears in EL9 but not in EL10. Therefore, rpm installation in Rocky 10 is not possible anymore. At least until someone packages it - maybe EPEL will do it if requested.

1 Like

[UNSOLVED]

Hopping to a different distro as a workaround for all the issues I’m having.

What, exactly is “unsolved”?

Disabling the kvm modules still doesn’t allow you to run Virtual Box?

You don’t know how to install and/or run kvm on your computer?

Something else?

All of the above plus more. I found a linux distro that’s meeting all of my requirements so I most likely won’t be returning to Rocky. I may attempt KVM on my new distro at some point but I’ll cross that bridge when I get there.

ps. I just hopped on this forum to tie up loose messages. I won’t be returning.