Bug 813735 - Non detection of qemu TCG mode support within a RHEL VM
Summary: Non detection of qemu TCG mode support within a RHEL VM
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2012-04-18 10:43 UTC by Pádraig Brady
Modified: 2016-01-04 14:43 UTC (History)
10 users (show)

Fixed In Version: libvirt-0.10.0-0rc0.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-21 07:11:49 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 21:18:26 UTC

Description Pádraig Brady 2012-04-18 10:43:25 UTC
When running Openstack nova compute within a RHEL 6.3 VM,
it fails with this error on startup:
"Cannot find suitable emulator for x86_64".

But we should be able to fall back to slower TCG mode.
libguestfs (which doesn't use libvirt for detection) is able
to start up its nested VMs fine, albeit slowly.

This is with the latest libvirt-0.9.10-11.el6.x86_64

The handiest way to test is to run virt-manager.
and you get the error:
"Cannot find suitable emulator for x86_64".

This work around from Daniel Berrange,
allows one to start slower nested VMs (in TCG mode):
  ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
  service libvirtd restart

Comment 2 Dave Allan 2012-04-23 20:40:27 UTC
I'm somewhat conflicted about this BZ, as unaccelerated qemu isn't supported in RHEL, so that would make this not a bug.  OTOH, I'm personally in favor of allowing unaccelerated qemu, for exactly the situation you're in, so I'm not inclined to close this BZ too quickly.

Comment 5 Jiri Denemark 2012-07-16 09:50:32 UTC
Fixed upstream as v0.9.13-66-g8e6fb68:

commit 8e6fb68f1ff224cdf1a4ed929fa92332fe533dec
Author: Jiri Denemark <jdenemar@redhat.com>
Date:   Fri Jul 13 16:30:55 2012 +0200

    qemu: Fix probing for guest capabilities
    Even though qemu-kvm binaries can be used in TCG mode, libvirt would
    only detect them if /dev/kvm was available. Thus, one would need to make
    a /usr/bin/qemu symlink to be able to use TCG mode with qemu-kvm in an
    environment without KVM support.
    And even though QEMU is able to make use of KVM, libvirt would not
    advertise KVM support unless there was a qemu-kvm symlink available.
    This patch fixes both issues.

Comment 8 Jiri Denemark 2012-08-06 14:33:24 UTC
Steps to reproduce:

1. modprobe -r kvm_intel    # or kvm_amd on AMD host
2. modprobe -r kvm
3. virsh capabilities

With unfixed libvirt, the capabilities XML won't contain any <guest> element, while fixed libvirt will correctly report /usr/libexec/qemu-kvm is usable for creating qemu domains.

The second issue can be reproduced with
0. make sure kvm_intel is properly loaded, i.e., undo steps 1 and 2 from the 
   first test
1. mv /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
2. virsh capabilities

Fixed version will report /usr/bin/qemu-system-x86_64 is usable for kvm domains. Unfixed version will only list qemu domain type. In other words, only fixed libvirt will put the following elements into capabilities XML:

      <domain type='kvm'>

Comment 9 zhe peng 2012-08-07 02:52:25 UTC
Hi Jiri:

    Very thanks for your help!
 I can reproduce this with libvirt-0.9.13-3.el6.x86_64.
verify with libvirt-0.10.0-0rc0.el6.x86_64

 first point:
    1: modprobe -r kvm_intel
    2: modprobe -r kvm
    3: virsh capabilities
    <arch name='i686'>
    <arch name='x86_64'>
 second point:
     1:make sure kvm module loaded
      # lsmod | grep kvm
kvm_intel              52890  0 
kvm                   314931  1 kvm_intel
     2:# mv /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
     3: virsh capabilities
     <domain type='kvm'>
   verification passed.

Comment 10 errata-xmlrpc 2013-02-21 07:11:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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