Bug 840444 - qemu is built without KVM support
qemu is built without KVM support
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Fedora Virtualization Maintainers
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-07-16 08:01 EDT by Alexander Bokovoy
Modified: 2013-01-09 07:05 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-18 17:34:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Bokovoy 2012-07-16 08:01:47 EDT
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):

How reproducible:

Steps to Reproduce:
1. Install Rawhide
2. Run
/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

Actual results:
KVM not supported for this target
No accelerator found!
Comment 1 Richard W.M. Jones 2012-07-16 08:10:07 EDT
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:

Comment 2 Alexander Bokovoy 2012-07-16 08:16:12 EDT
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?
Comment 3 Richard W.M. Jones 2012-07-16 08:24:45 EDT
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.
Comment 4 Alexander Bokovoy 2012-07-16 08:46:09 EDT
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?
Comment 5 Richard W.M. Jones 2012-07-16 11:51:16 EDT
For the libvirt problem, try the -8 package from here:
This fixes all known libvirt+qemu problems for me.
Comment 6 Alexander Bokovoy 2012-07-17 06:34:52 EDT
I can confirm that 1.1.0-8 solves the issue for me.


Note You need to log in before you can comment on or make changes to this bug.