View previous topic :: View next topic |
Author |
Message |
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Mon Sep 07, 2015 3:47 pm Post subject: qemu complains about missing kvm - but it's there [SOLVED] |
|
|
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:
Code: | "kvm" accelerator not found.
No accelerator found! |
This happens, when I try the following:
Code: | 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:
Code: | $ lsmod | grep kvm
kvm_intel 136029 0
kvm 278305 1 kvm_intel |
The device exists:
Code: | $ ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 7. Sep 10:59 /dev/kvm |
I am in the kvm group:
Code: | id | grep kvm
.... 78(kvm),... |
I installed qemu with the following use flags:
Code: | $ 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 |
|
Back to top |
|
|
silent_Walker Tux's lil' helper
Joined: 25 Jul 2012 Posts: 100 Location: forums.gentoo.org
|
Posted: Mon Sep 07, 2015 4:06 pm Post subject: |
|
|
Are you running hpet? I read somewhere that KVM does not like hpet _________________ ^.^ |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3493
|
Posted: Mon Sep 07, 2015 6:09 pm Post subject: |
|
|
Quote: | qemu-system-arm -enable-kvm
$ lsmod | grep kvm
kvm_intel 136029 0
kvm 278305 1 kvm_intel
|
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 but it's not going to serve your purpose anyway |
|
Back to top |
|
|
WWWW Tux's lil' helper
Joined: 30 Nov 2014 Posts: 143
|
Posted: Tue Sep 08, 2015 10:43 am Post subject: |
|
|
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. |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Tue Sep 08, 2015 2:55 pm Post subject: |
|
|
Thanks a lot for your reply! In fact, I didn't know that!
Indeed, qemu-system-x86_64 -enable-kvm works! And the following now seems to work as well - almost:
Code: | 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
Code: | No 'PCI' bus found for device 'virtio-net-pci' |
But thats another story. I will investigate and mark this as solved.
Thanks! |
|
Back to top |
|
|
WWWW Tux's lil' helper
Joined: 30 Nov 2014 Posts: 143
|
Posted: Wed Sep 09, 2015 7:25 am Post subject: |
|
|
fidel wrote: |
Now I get the error
Code: | No 'PCI' bus found for device 'virtio-net-pci' |
|
Missing module most likely. There are extra modules on the host to load to help virtio stuff. |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Wed Sep 09, 2015 8:04 am Post subject: |
|
|
Thanks, true! After loading some virtio- modules (pci, net, blk) I now get:
Code: | No 'virtio-bus' bus found for device 'virtio-net-device' |
But I cannot find any such module. |
|
Back to top |
|
|
|