Bug 1060726

Summary: Error Changing VM configuration: /usr/bin/qemu: no such file or directory
Product: [Fedora] Fedora Reporter: Steve Grubb <sgrubb>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: berrange, crobinso, sgrubb, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-03 15:55:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Debug log
none
config file none

Description Steve Grubb 2014-02-03 13:08:26 UTC
Description of problem:
I was in the details view and clicked on processor. In the CPU section, I went into the configuration area and changed the model to Haswell. When I clicked "Apply", I got this:

Error changing VM configuration: Cannot check QEMU binary /usr/bin/qemu: No such file or directory

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 2411, in _change_config_helper
    self.vm.redefine_cached()
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 194, in redefine_cached
    self._redefine_xml(xml)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 219, in _redefine_xml
    return self._redefine_helper(origxml, newxml)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 211, in _redefine_helper
    self._define(newxml)
  File "/usr/share/virt-manager/virtManager/domain.py", line 943, in _define
    self.conn.define_domain(newxml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 743, in define_domain
    return self._backend.defineXML(xml)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2935, in defineXML
    if ret is None:raise libvirtError('virDomainDefineXML() failed', conn=self)
libvirtError: Cannot check QEMU binary /usr/bin/qemu: No such file or directory

Version-Release number of selected component (if applicable):
virt-manager-0.10.0-5.git1ffcc0cc.fc20

How reproducible:
Every time.

Additional info:
 This is a i686 VM. Not sure if that makes any difference.

Comment 1 Cole Robinson 2014-02-03 15:10:35 UTC
Very strange, I don't think /usr/bin/qemu has existed on fedora for a while. Can you provide

ls -l /usr/bin/qemu*
sudo virsh dumpxml $vmname
virt-manager --debug output when reproducing

Comment 2 Steve Grubb 2014-02-03 15:45:24 UTC
Created attachment 858664 [details]
Debug log

Comment 3 Steve Grubb 2014-02-03 15:48:30 UTC
Created attachment 858666 [details]
config file

Also, maybe a clue:

ls -l /etc/libvirt/qemu/
total 36
-rw-------. 1 root root 3551 Feb  3 08:10 BackTrack.xml
-rw-------. 1 root root 1158 Jul  7  2009 F-11-i686.xml

It might be a case that /usr/bin/qemu used to exist and the settings were never migrated when it was replaced.

Comment 4 Daniel Berrangé 2014-02-03 15:52:37 UTC
The /usr/bin/qemu binary was deleted by QEMU upstream in their 1.0 release, replaced with qemu-system-i686. This arrived in Fedora 17. So any VMs created prior to Fedora 17 which used /usr/bin/qemu would need to be manually updated to deal with new binary name. We didn't attempt to automate this update at all in Fedora 17.

Comment 5 Cole Robinson 2014-02-03 15:55:59 UTC
You will need to sudo virsh edit $vmname, change the emulator to point to /usr/bin/qemu-system-i386

We probably should have added a symlink back then, but since we've made it this far with only one report, it's not work adding it :)

Comment 6 Daniel Berrangé 2014-02-03 17:40:21 UTC
(In reply to Cole Robinson from comment #5)
> You will need to sudo virsh edit $vmname, change the emulator to point to
> /usr/bin/qemu-system-i386

it is even simpler to just delete the <emulator> line. Libvirt will automatically detect the right emulator and then add the line back in with a good value.

> We probably should have added a symlink back then, but since we've made it
> this far with only one report, it's not work adding it :)

NB when QEMU made this rename, they explicitly requested that OS vendors do *not* add any compat symlink, because they wish to have the possibility of introducing a new command called "qemu" with different semantics. IOW they want people to stop using the old name as soon as possible and not maintain it for compat.