Red Hat Bugzilla – Bug 840444
qemu is built without KVM support
Last modified: 2013-01-09 07:05:14 EST
Description of problem:
As of 2:1.1.0-7, Qemu in Rawhide is built with KVM support disabled.
Since no explicit option for enabling or disabling KVM is passed to configure in qemu.spec, Qemu makes own decision whether to enable or disable KVM.
In http://kojipkgs.fedoraproject.org//packages/qemu/1.1.0/7.fc18/data/logs/x86_64/build.log one can see that KVM is disabled:
Install blobs yes
KVM support no
TCG interpreter no
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install Rawhide
/usr/bin/qemu-system-x86_64 -enable-kvm -no-user-config -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,? -device scsi-disk,?
3. Notice the output
KVM not supported for this target
No accelerator found!
The sources are built twice. The first time:
KVM support yes
as you can see in that build log.
Actually the build process for qemu-kvm is very complex (probably
unnecessarily so) and I haven't really looked at it. Also the
command line options to enable and disable KVM are frustrating
complex and undocumented, so I don't even know whether the output
from the command above is correct or not.
There is a separate bug in upstream qemu-kvm.git which we have
tried to work around with a patch. This bug affects libvirt,
although the patch doesn't help:
The end result is that qemu-system-x86_64 in the package does not have KVM support and the whole libvirtd setup which previously worked does not work.
So what to do with it?
I really think you're seeing a different bug (one which also
affects me). libvirt fails to detect the capabilities of
this version of qemu. I've no idea how to fix this, although
I have made several attempts. Please ask Dan Berrange.
Ok, so what happens is following:
Upon start libvirtd will run system-specific qemu binary to discover possible options. In my case it is qemu-system-x86_64 and it is the version *without* KVM support.
Command line that libvirtd runs is:
/usr/bin/qemu-system-x86_64 -no-user-config -device ? -device pci-assign,? -device virtio-blk-pci,? -device virtio-net-pci,? -device scsi-disk,?
Basically, this commandline fails due to absent accelerator, as instructed in qemu's vl.c:configure_accelerator() (2134-2154 in upstream qemu code). Since all accelerators are not available, no accelerator is initialized and qemu exits.
As a workaround right now I did symlinked qemu-system-x86_64 to qemu-kvm and everything started working.
What is the reason to supply qemu-system-x86_64 binary without kvm support by default?
Can we use alternatives to configure actual qemu-system-x86_64 binary and default to KVM?
For the libvirt problem, try the -8 package from here:
This fixes all known libvirt+qemu problems for me.
I can confirm that 1.1.0-8 solves the issue for me.