1

I am trying to run a program that uses QEMU on an Ubuntu VM in VirtualBox hosted on a Windows 10 computer with an AMD CPU. When I try to run the program it gives me this error:

Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: failed to initialize kvm: No such file or directory

I've tried a lot of solutions posted online. This one appeared the most promising. However, when I run

sudo modprobe kvm_amd

it gives me this error:

modprobe: ERROR: could not insert 'kvm_amd': Operation not supported

Tried to fix that with no luck. I ran virt-host-validate and got:

QEMU: Checking for hardware virtualization                                 : FAIL (Only emulated CPUs are available, performance will be significantly limited)

  QEMU: Checking if device /dev/vhost-net exists                             : PASS

  QEMU: Checking if device /dev/net/tun exists                               : PASS

  QEMU: Checking for cgroup 'cpu' controller support                         : PASS

  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS

  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS

  QEMU: Checking for cgroup 'memory' controller support                      : PASS

  QEMU: Checking for cgroup 'devices' controller support                     : WARN (Enable 'devices' in kernel Kconfig file or mount/enable cgroup controller in your system)

  QEMU: Checking for cgroup 'blkio' controller support                       : PASS

  QEMU: Checking for device assignment IOMMU support                         : WARN (Unknown if this platform has IOMMU support)

  QEMU: Checking for secure guest support                                    : WARN (Unknown if this platform has Secure Guest support)

Other solutions have suggested messing around with VirtualBox settings, this is what I got from trying those: enter image description here enter image description here

This hasn't helped fix it. Other solutions mention going to the BIOS to fix it, but since this is a VM there doesn't seem to be a way to do that in VirtualBox.

2
  • I'm having the same issue, trying to use podman (start virtual machine), in Ubuntu.
    – BuddhiLW
    Jul 5, 2023 at 19:05
  • Unfortunately never found a solution to this problem. My solution was to just dual boot Ubuntu on an old laptop. I've left it up in case someone ever figures it out. Jul 8, 2023 at 1:55

1 Answer 1

0

it may be too late, but i meet the same problem just now. this is my solution:

1.dmesg | grep kvm ,look if have kvm: disabled by bios,then reboot and go to bios setting.

2.if cpu is amd, look for svm mode, enable.

3.lsmod | grep kvm, if there is

   kvm_amd                29264  0
   kvm                    244765  1 kvm_amd

then means kvm load successfully.

4.start your virtual machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .