Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1334554 - Provide back compat /usr/lib/xen/bin/qemu-system-i386
Summary: Provide back compat /usr/lib/xen/bin/qemu-system-i386
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xen
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Young
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-10 02:09 UTC by Konrad Rzeszutek Wilk
Modified: 2016-05-28 23:55 UTC (History)
13 users (show)

Fixed In Version: xen-4.6.1-8.fc24 xen-4.5.3-5.fc22 xen-4.5.3-5.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-28 23:22:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
virt-install -v -n F24-64 --memory 1024 --cdrom /root/Fedora-Server-dvd-x86_64-24_Alpha-1.7.iso --disk /var/lib/libvirt/images/f24-i686.img --network bridge=switch,mac=00:0f:4b:01:00:87 --debug 2>~ (5.91 KB, text/plain)
2016-05-10 17:11 UTC, Konrad Rzeszutek Wilk
no flags Details
virsh capabilities output (2.09 KB, text/plain)
2016-05-10 18:00 UTC, Konrad Rzeszutek Wilk
no flags Details

Description Konrad Rzeszutek Wilk 2016-05-10 02:09:08 UTC
Description of problem:

When trying to create a guest under virt-manager with Xen installed
(dnf install xen; reboot; boot in it) I get this message:
nable to complete install: 'unsupported configuration: emulator '/usr/lib/xen/bin/qemu-system-i386' not found'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 90, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 2277, in _do_async_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 501, in start_install
    noboot)
  File "/usr/share/virt-manager/virtinst/guest.py", line 416, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3701, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: unsupported configuration: emulator '/usr/lib/xen/bin/qemu-system-i386' not found


Which is true. There is no such file anymore:
[root@tst032 ~]# rpm -ql xen-runtime | grep qemu | grep -v share
/etc/xen/scripts/qemu-ifup
/usr/bin/qemu-img-xen
/usr/bin/qemu-nbd-xen
/usr/lib/systemd/system/xen-qemu-dom0-disk-backend.service
/usr/lib/xen/bin/qemu-dm


Version-Release number of selected component (if applicable):
[root@tst032 ~]# rpm -qa | grep virt-manager
virt-manager-common-1.3.2-3.fc24.noarch
virt-manager-1.3.2-3.fc24.noarch


How reproducible:

100%
Steps to Reproduce:
1. virt-manager
2. create a guest (fully virt)
3. try launching it.

Actual results:

Error message

Expected results:

VNC window

Additional info:

Comment 1 Konrad Rzeszutek Wilk 2016-05-10 02:11:19 UTC
My work-around was to link qemu-dm:

cd /usr/lib/xen/bin;ln -s qemu-dm qemu-system-i386

Comment 2 Konrad Rzeszutek Wilk 2016-05-10 02:17:15 UTC
What is weird that xen.spec has:
./configure --prefix=%{_prefix} --libdir=%{_libdir} --with-system-seabios=%{seabiosloc} --with-system-qemu=/usr/bin/qemu-system-i386

Which means that the Xen package won't built its own version of qemu-system-i386 but expects one at /usr/bin/qemu-system-i386

But the only ones there are:
[root@tst032 SPECS]# ls -al /usr/bin/ | grep qemu-
-rwxr-xr-x.  1 root root    1293984 May  2 16:42 qemu-img
lrwxrwxrwx.  1 root root          8 Apr 18 17:35 qemu-img-xen -> qemu-img
-rwxr-xr-x.  1 root root    1380512 May  2 16:42 qemu-io
-rwxr-xr-x.  1 root root    1269760 May  2 16:42 qemu-nbd
lrwxrwxrwx.  1 root root          8 Apr 18 17:35 qemu-nbd-xen -> qemu-img


?
Adding MA Young on this bug.

Comment 3 Cole Robinson 2016-05-10 15:40:00 UTC
Thanks for the report, please provide virt-manager --debug when reproducing

Comment 4 Konrad Rzeszutek Wilk 2016-05-10 17:11:13 UTC
Created attachment 1155802 [details]
virt-install   -v -n F24-64 --memory 1024 --cdrom /root/Fedora-Server-dvd-x86_64-24_Alpha-1.7.iso --disk /var/lib/libvirt/images/f24-i686.img --network bridge=switch,mac=00:0f:4b:01:00:87 --debug 2>~

#cd /usr/lib/xen/bin
# # Delete the work-around:
# rm qemu-system-i386 
# virt-install   -v -n F24-64 --memory 1024 --cdrom /root/Fedora-Server-dvd-x86_64-24_Alpha-1.7.iso --disk /var/lib/libvirt/images/f24-i686.img --network bridge=switch,mac=00:0f:4b:01:00:87 --debug 2>~/stderr.1334554.txt

Comment 5 Cole Robinson 2016-05-10 17:32:07 UTC
Can you provide 'sudo virsh capabilities' as well ? virt-manager --debug has it but I forgot virt-install --debug doesn't have it

Comment 6 Cole Robinson 2016-05-10 17:37:14 UTC
capabilities will confirm, but I suspect this is an issue with libvirt libxl code, which has this:

# ifndef LIBXL_FIRMWARE_DIR
#  define LIBXL_FIRMWARE_DIR "/usr/lib/xen/boot"
# endif
# ifndef LIBXL_EXECBIN_DIR
#  define LIBXL_EXECBIN_DIR "/usr/lib/xen/bin"
# endif

Maybe there's a way this can be programmatically determined via libxl? Does xen --with-system-qemu=/usr/bin/qemu-system-i386 make it into libxl somehow?

CCing jfehlig who's the libvirt libxl maintainer

Comment 7 Jim Fehlig 2016-05-10 17:51:40 UTC
What version of Xen? LIBXL_{EXECBIN,FIRMWARE}_DIR come from the corresponding entries in /usr/share/pkgconfig/xenlight.pc. I guess those are not updated when specifying alternate firmwares or qemu (--with-system-seabios, --with-system-qemu).

Comment 8 Konrad Rzeszutek Wilk 2016-05-10 17:57:44 UTC
(In reply to Jim Fehlig from comment #7)
> What version of Xen? LIBXL_{EXECBIN,FIRMWARE}_DIR come from the
> corresponding entries in /usr/share/pkgconfig/xenlight.pc. I guess those are
> not updated when specifying alternate firmwares or qemu
> (--with-system-seabios, --with-system-qemu).

[root@tst032 ~]# rpm -qa | grep xen
xen-licenses-4.6.1-6.fc24.x86_64
xen-libs-4.6.1-6.fc24.x86_64
xen-runtime-4.6.1-6.fc24.x86_64
libvirt-daemon-driver-xen-1.3.3.1-1.fc24.x86_64
xen-hypervisor-4.6.1-6.fc24.x86_64
xen-4.6.1-6.fc24.x86_64

And said file:
[root@tst032 ~]# more /usr/share/pkgconfig/xenlight.pc 
prefix=/usr
includedir=${prefix}/include
libdir=/usr/lib64
xenfirmwaredir=/usr/lib/xen/boot
libexec_bin=/usr/lib/xen/bin

Name: Xenlight
Description: The Xenlight library for Xen hypervisor
Version: 4.6.0
Cflags: -I${includedir}
Libs: -L${libdir} -lxenlight

Comment 9 Konrad Rzeszutek Wilk 2016-05-10 18:00:32 UTC
Created attachment 1155823 [details]
virsh capabilities output

(In reply to Cole Robinson from comment #5)
> Can you provide 'sudo virsh capabilities' as well ? virt-manager --debug has
> it but I forgot virt-install --debug doesn't have it

Pls see attached.

Comment 10 Konrad Rzeszutek Wilk 2016-05-10 18:06:54 UTC
..
> Maybe there's a way this can be programmatically determined via libxl? Does
> xen --with-system-qemu=/usr/bin/qemu-system-i386 make it into libxl somehow?
> 
Means:
  --with-system-qemu[=PATH]                                                     
                          Use system supplied qemu PATH or qemu (taken from        
                          $PATH) as qemu-xen device model instead of building   
                          and installing our own version        

And
#dnf provides /usr/bin/qemu-system-i386
Last metadata expiration check: 0:00:43 ago on Tue May 10 14:04:30 2016.
qemu-system-x86-2:2.6.0-0.2.rc4.fc24.x86_64 : QEMU system emulator for x86
Repo        : updates-testing

qemu-system-x86-2:2.6.0-0.1.rc2.fc24.x86_64 : QEMU system emulator for x86
Repo        : fedora

.. which of course I don't have installed.


Perhaps the xen.spec file needs an extra Requires: qemu-system-x86?
It has:

[root@tst032 SPECS]# cat xen.spec |grep Requires | grep qem
BuildRequires: seabios-bin ipxe-roms-qemu
#Requires: /usr/bin/qemu-img /usr/bin/qemu-nbd
Requires: /usr/bin/qemu-img

Comment 11 Konrad Rzeszutek Wilk 2016-05-10 18:11:49 UTC
(In reply to Konrad Rzeszutek Wilk from comment #10)
> ..
> > Maybe there's a way this can be programmatically determined via libxl? Does
> > xen --with-system-qemu=/usr/bin/qemu-system-i386 make it into libxl somehow?
> > 
> Means:
>   --with-system-qemu[=PATH]                                                 
> 
>                           Use system supplied qemu PATH or qemu (taken from 
> 
>                           $PATH) as qemu-xen device model instead of
> building   
>                           and installing our own version        
> 
> And
> #dnf provides /usr/bin/qemu-system-i386

<facepalm>

/usr/lib/xen/bin/qemu-system-i386!

Right, so now I caught up on what you folks were talking about!

Comment 12 Jim Fehlig 2016-05-10 20:22:00 UTC
(In reply to Cole Robinson from comment #6)
> Maybe there's a way this can be programmatically determined via libxl? Does
> xen --with-system-qemu=/usr/bin/qemu-system-i386 make it into libxl somehow?

Sadly it doesn't. If using the qemu, seabios, etc built by Xen, then the pkgconfig variables are correct. But obviously the information is useless when using the system variants of those. I'm not sure how to best fix this. Options are adding similar configure options to libvirt or allow the paths to be specified in /etc/libvirt/libxl.conf. Opinions or other suggestions?

Comment 13 Cole Robinson 2016-05-10 20:31:46 UTC
The simplest fix for Fedora is probably to have xen set up those symlinks for the time being

But if this is configured at the xen level, then maybe the proper fix is to add a libxl API to report the default emulator to libvirt. Adding a libvirt configure flag to match is not ideal since it means the packages need to coordinate.

Comment 14 Jim Fehlig 2016-05-10 20:41:48 UTC
(In reply to Cole Robinson from comment #13)
> The simplest fix for Fedora is probably to have xen set up those symlinks
> for the time being

Yes. Or install a wrapper that invokes the system qemu. It is probably needed anyhow for all the existing VM config containing <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>

> But if this is configured at the xen level, then maybe the proper fix is to
> add a libxl API to report the default emulator to libvirt.

Yes, that would be ideal. libxl needs to gain the ability to report capabilities info.

Comment 15 Cole Robinson 2016-05-10 20:45:43 UTC
(In reply to Jim Fehlig from comment #14)
> (In reply to Cole Robinson from comment #13)
> > The simplest fix for Fedora is probably to have xen set up those symlinks
> > for the time being
> 
> Yes. Or install a wrapper that invokes the system qemu. It is probably
> needed anyhow for all the existing VM config containing
> <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>

That's a very good point, so bouncing this to the xen package. xen will probably need to ship symlinks forever unfortunately, it's roughly what we have to do in the qemu package for /usr/bin/qemu-kvm which was once a distinct binary

Comment 16 Dario Faggioli 2016-05-11 15:10:04 UTC
Looks like duplicate of this one (or vice versa):

https://bugzilla.redhat.com/show_bug.cgi?id=1299745

Comment 17 Fedora Update System 2016-05-11 23:05:47 UTC
xen-4.6.1-8.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a21b2cb7a0

Comment 18 Konrad Rzeszutek Wilk 2016-05-12 01:59:51 UTC
Thanks! Fix verified.

Comment 19 Fedora Update System 2016-05-12 17:47:50 UTC
xen-4.5.3-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-beba065b97

Comment 20 Fedora Update System 2016-05-12 22:27:24 UTC
xen-4.6.1-8.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a21b2cb7a0

Comment 21 Fedora Update System 2016-05-12 22:31:24 UTC
xen-4.5.3-4.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a54261a145

Comment 22 Fedora Update System 2016-05-16 15:21:20 UTC
xen-4.5.3-4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a54261a145

Comment 23 Fedora Update System 2016-05-16 15:24:09 UTC
xen-4.5.3-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-beba065b97

Comment 24 Fedora Update System 2016-05-16 16:19:32 UTC
xen-4.6.1-8.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2016-05-17 22:05:31 UTC
xen-4.5.3-5.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-19c82866bb

Comment 26 Fedora Update System 2016-05-17 22:25:30 UTC
xen-4.5.3-5.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8fd9019541

Comment 27 Fedora Update System 2016-05-21 01:23:54 UTC
xen-4.5.3-5.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8fd9019541

Comment 28 Fedora Update System 2016-05-21 02:28:49 UTC
xen-4.5.3-5.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-19c82866bb

Comment 29 Fedora Update System 2016-05-28 23:21:33 UTC
xen-4.5.3-5.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2016-05-28 23:54:57 UTC
xen-4.5.3-5.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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