# qemu complains about missing kvm - but it's there [SOLVED]

## fidel

I am stuck trying to run qemu on my machine. I followed the guide on https://wiki.gentoo.org/wiki/QEMU/Linux_guest but I'm getting the following error:

```
"kvm" accelerator not found.

No accelerator found!
```

This happens, when I try the following:

```
qemu-system-arm -enable-kvm \

    -cpu host \

    -drive file=${HOME}/Arm.img,if=virtio \

    -netdev user,id=vmnic,hostname=arm-vm -device virtio-net,netdev=vmnic \

    -m 2G \

    -monitor stdio \

    -name "Arm VM" \

    -machine virt
```

The module is loaded:

```
$ lsmod | grep kvm

kvm_intel             136029  0 

kvm                   278305  1 kvm_intel
```

The device exists:

```
$ ls -l /dev/kvm

crw-rw---- 1 root kvm 10, 232  7. Sep 10:59 /dev/kvm
```

I am in the kvm group:

```
id | grep kvm

.... 78(kvm),...
```

I installed qemu with the following use flags:

```
$ eix -I app-emulation/qemu

[I] app-emulation/qemu

     Available versions:  2.3.0-r4 2.3.0-r5 ~2.3.0-r6 ~2.3.1 ~2.4.0 **9999 {accessibility +aio alsa bluetooth +caps +curl debug +fdt +filecaps glusterfs gtk gtk2 infiniband iscsi +jpeg lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png pulseaudio python rbd sasl sdl sdl2 +seccomp selinux smartcard snappy spice ssh static static-softmmu static-user systemtap tci test +threads tls usb usbredir +uuid vde +vhost-net virtfs +vnc vte xattr xen xfs KERNEL="FreeBSD linux" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="aarch64 alpha arm cris i386 lm32 m68k microblaze microblazeel mips mips64 mips64el mipsel moxie or32 ppc ppc64 ppcemb s390x sh4 sh4eb sparc sparc64 unicore32 x86_64 xtensa xtensaeb" QEMU_USER_TARGETS="aarch64 alpha arm armeb cris i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el or32 ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64 unicore32 x86_64"}

     Installed versions:  2.3.0-r5(18:23:11 11.08.2015)(aio alsa bluetooth caps curl fdt filecaps gtk jpeg ncurses nfs nls numa opengl pin-upstream-blobs png sdl seccomp static-user threads usb uuid vhost-net vnc xattr -accessibility -debug -glusterfs -gtk2 -infiniband -iscsi -lzo -pulseaudio -python -rbd -sasl -selinux -smartcard -snappy -spice -ssh -static -static-softmmu -systemtap -tci -test -tls -usbredir -vde -virtfs -xen -xfs KERNEL="linux -FreeBSD" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="arm i386 m68k x86_64 -aarch64 -alpha -cris -lm32 -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -or32 -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="arm armeb i386 m68k x86_64 -aarch64 -alpha -cris -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -or32 -ppc -ppc64 -ppc64abi32 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -unicore32")

     Homepage:            http://www.qemu.org http://www.linux-kvm.org

     Description:         QEMU + Kernel-based Virtual Machine userland tools
```

Am I missing or overseeing something? Thanks for any hint!Last edited by fidel on Tue Sep 08, 2015 2:55 pm; edited 1 time in total

----------

## silent_Walker

Are you running hpet? I read somewhere that KVM does not like hpet

----------

## szatox

 *Quote:*   

> qemu-system-arm -enable-kvm
> 
> $ lsmod | grep kvm
> 
> kvm_intel             136029  0
> ...

 

Correct me if I'm wrong: you're trying to run ARM software in a qemu on x86 machine.

You are aware that those 2 have diferent instruction sets, aren't you? You can use KVM to mix incompatable architectures, it's purpose is to let the code run directly on hardware and only intercept certain instructions.

For pretending different hardware you need full machine emulation. Qemu can do that, but KVM won't work.

Try running qemu-system-x86_64 -enable-kvm to confirm your KVM works  :Rolling Eyes:  but it's not going to serve your purpose anyway

----------

## WWWW

 *silent_Walker wrote:*   

> Are you running hpet? I read somewhere that KVM does not like hpet

 

Running HPET where, in guest or host? Here host with hpet is fine with qemu. Also is this claim old or recent? Sometimes things get fixed to make it work in time.

----------

## fidel

Thanks a lot for your reply! In fact, I didn't know that!   :Embarassed: 

Indeed, qemu-system-x86_64 -enable-kvm works! And the following now seems to work as well - almost:

```
qemu-system-arm \

-cpu cortex-m3 \

-drive file=${HOME}/arm.img,if=virtio \

-netdev user,id=vmnic,hostname=arm-vm \

-device virtio-net,netdev=vmnic \

-m 2G \

-monitor stdio \

-name "Arm VM" \

-machine smdkc210
```

Now I get the error

```
No 'PCI' bus found for device 'virtio-net-pci'
```

But thats another story. I will investigate and mark this as solved.

Thanks!

----------

## WWWW

 *fidel wrote:*   

> 
> 
> Now I get the error
> 
> ```
> ...

 

Missing module most likely. There are extra modules on the host to load to help virtio stuff.

----------

## fidel

Thanks, true! After loading some virtio- modules (pci, net, blk) I now get:

```
No 'virtio-bus' bus found for device 'virtio-net-device'
```

But I cannot find any such module.   :Sad: 

----------

