Bug 483837 - virsh version - libvir: QEMU error : internal error Cannot find QEMU binary
virsh version - libvir: QEMU error : internal error Cannot find QEMU binary
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt (Show other bugs)
5.4
All Linux
medium Severity medium
: rc
: ---
Assigned To: Daniel Veillard
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-03 15:38 EST by Martin Jenner
Modified: 2016-04-26 10:18 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:22:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Jenner 2009-02-03 15:38:11 EST
Description of problem:

Filed under kvm until libvirt component added.

[root@tyan-gt24-13 ~]# virsh version
Compiled against library: libvir 0.6.0
Using library: libvir 0.6.0
Using API: QEMU 0.6.0
libvir: QEMU error : internal error Cannot find QEMU binary /usr/bin/qemu-system-x86_64: No such file or directory
error: failed to get the hypervisor version



Version-Release number of selected component (if applicable):

ovirt-node-0.97-rc3.el5ovirt

How reproducible:
always

Steps to Reproduce:
1. type  virsh version on running node
Comment 1 Perry Myers 2009-02-25 08:49:56 EST
This error came up because hardware virt was not enabled on the host machine.  If hardware virt is not enabled KVM falls back to using the emulator which we explicitly remove from the Node since it is prerequisite that hardware virt is enabled.

The fix for this is to provide visual notification to end user that hardware virt is not enabled.

Perhaps we can as part of sysinit process (in ovirt-post perhaps) check for presence of cpu flags, kernel modules loaded, etc....  If hardware virt is not enabled then we can append something to /etc/issue and /etc/issue.net to give the user visual feedback that hardware virt is not present or enabled on the machine.
Comment 2 Alan Pevec 2009-02-27 11:25:09 EST
upstream patch to append to /etc/issue the warning about missing HW-assisted virt:
http://git.et.redhat.com/?p=ovirt-node.git;a=commit;h=2202fce01aa6daa19269596e15c55633856abf62
Comment 3 Martin Jenner 2009-03-23 15:19:23 EDT
Using 1.0-1.snap5.2.el5ovirt I still get see the original error

[root@dhcp-100-19-45 log]# cat /etc/redhat-release 
Red Hat Enterprise Virtualization Hypervisor release 1.0 Beta (1.snap5.el5ovirt)
[root@dhcp-100-19-45 log]# virsh version
Compiled against library: libvir 0.5.1
Using library: libvir 0.5.1
Using API: QEMU 0.5.1
error: failed to get the hypervisor version


Howerver I can verify that the hardware enablement check put in to output an issue message with the login prompt if hardware virtualization is not enabled in the bios did work correctly on my machine.
Comment 4 Alan Pevec 2009-03-23 15:28:31 EDT
libvirt doesn't even try /usr/bin/qemu-kvm
Comment 5 Darryl L. Pierce 2009-03-23 15:48:44 EDT
(In reply to comment #3)
> Using 1.0-1.snap5.2.el5ovirt I still get see the original error
> 
> [root@dhcp-100-19-45 log]# cat /etc/redhat-release 
> Red Hat Enterprise Virtualization Hypervisor release 1.0 Beta
> (1.snap5.el5ovirt)
> [root@dhcp-100-19-45 log]# virsh version
> Compiled against library: libvir 0.5.1
> Using library: libvir 0.5.1
> Using API: QEMU 0.5.1
> error: failed to get the hypervisor version
> 
> 
> Howerver I can verify that the hardware enablement check put in to output an
> issue message with the login prompt if hardware virtualization is not enabled
> in the bios did work correctly on my machine.  

Can you post the content of /etc/issue on the machine? Also, please post the content of /proc/cpuinfo for the machine for both with hardware virt enabled and with it disabled.
Comment 6 Perry Myers 2009-03-23 16:14:38 EDT
I checked out a box that mjenner left online for me.  The problem exists in libvirt0.5.1 and libvirt0.6.1 even with kvm enabled and the kmods loaded.  Talking to DV online he mentioned that there are differences between upstream libvirt and RHEL in terms of how the hypervisors/emulators are detected and there might need to be a RHEL specific patch to correct this issue.

Question is, should this even be a RHEV bug or is it a RHEL bug?  The end user will never run virsh version in RHEV.  In fact, libvirt is never even be used in RHEV1.0 except for by QE testing.  And this particular bug does not affect QE's ability to do testing of kvm functionality, correct?

I would move for moving this bug from RHEV to RHEL and flagging it as rhel-5.4?
Comment 7 Alan Pevec 2009-03-23 17:50:18 EDT
The same issue with libvirt-0.6.1-1.fc10.x86_64 and only kvm-74-10.fc10.x86_64 installed (without qemu RPM)

Upstream fix
http://www.redhat.com/archives/libvir-list/2009-March/msg00281.html
was committed few days ago
http://git.et.redhat.com/?p=libvirt.git;a=commit;h=b1ca1e1c09b8f4924ee912cc0df4c7d4cbeca9e3

BTW it works with rawhide's qemu-system-x86 (which obsoletes kvm RPM) b/c that RPM contains both /usr/bin/qemu-kvm and /usr/bin/qemu-system-x86_64
Comment 8 Perry Myers 2009-03-30 23:14:28 EDT
Moving to RHEL since libvirt is not supported in RHEV1.0 production builds and this problem will need to be addressed in RHEL5.4 release
Comment 9 Daniel Berrange 2009-03-31 10:21:40 EDT
Fix merged upstream
Comment 10 Daniel Veillard 2009-06-05 14:44:55 EDT
That patch was actually included as part of the 0.6.3 rebase, so the fix
is in the current build,

Daniel
Comment 13 Nan Zhang 2009-06-08 04:04:47 EDT
Verified with libvirt 0.6.3-6 on RHEL-5.4, already fixed.

[root@dhcp-66-70-85 ~]# virsh version
Compiled against library: libvir 0.6.3
Using library: libvir 0.6.3
Using API: QEMU 0.6.3
Running hypervisor: QEMU 0.9.1
Comment 15 errata-xmlrpc 2009-09-02 05:22:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1269.html

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