qemu-system-x86-xen default path should match xen libexec_bin path

Bug #1890005 reported by Marietto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Invalid
Undecided
Unassigned
qemu (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Hello to everyone.

I've tried to create a new vm called "windows-10" on the ubuntu 20.04 using virt-manager and the operation does not go well,because the error : "can't complete the installation : internal error : libxenlight failed to create new domain". The steps to reproduce this error are the following:

Step 1 - installing packages:

sudo apt install xen-hypervisor xen-utils libvirt-daemon-driver-xen libvirt-clients libvirt-daemon-system

step 2: enable the nvidia driver metapackage da nvidia-driver-440 from "sofware and updates / more drivers" (this step is not mandatory)

step 3 : detaching the nvidia devices from the host and attaching to xen pciback (this step is not mandatory)

root@zioma-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.0
Binding 0000:01:00.0 to pciback
root@zioma-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.1
Unbinding 0000:01:00.1 from snd_hda_intel
Binding 0000:01:00.1 to pciback
root@zioma-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.2
Unbinding 0000:01:00.2 from xhci_hcd
Binding 0000:01:00.2 to pciback
root@zioma-z390aoruspro:/etc/xen# ./pciback-0000:01:00.0.sh 0000:01:00.3
Unbinding 0000:01:00.3 from nvidia-gpu
Binding 0000:01:00.3 to pciback

step 4 : open virt-manager and try to configure a new xen connection and vm with these parameters

a) hypervisor = fullvirt

b) architecture = x86_64

c) emulator = /usr/lib/xen-4.11/bin/qemu-system-i386 (this file is not present as soon as I do the installation of these packages : xen-hypervisor xen-utils libvirt-daemon-driver-xen libvirt-clients libvirt-daemon-system ; I got it on the xen 4.14 unstable.

d) firmware custom = /usr/lib/xen-4.11/boot/hvmloader

e) added SCSI disk 1 = /dev/sdc ; where is installed my windows 10,which use an MBR partition scheme

f) memory allocated = 2000 MB ; max memory = 2000

press on start installation and you will get the error : "can't complete the installation : internal error : libxenlight failed to create new domain".

It seems that this bug is correlated with this :

https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1889064

Related branches

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The defaults of virt-manager for xen are not 100% compatible for Ubuntu's Xen.
I've shown that when discussing about the last bug in my example how to get it working I mentioned how to adapt (c) of your list above.

Get this fixed by:
1. Install the qemu build you need for yen
  apt install qemu-system-x86-xen
2a. set the emulator path to /usr/bin/qemu-system-i386
OR
2b. link the expected to the real path (avoids that you'd need to do this for every domain)
sudo ln -s /usr/bin/qemu-system-i386 /usr/lib/xen-4.11/bin/qemu-system-i386

One would either need to move the xen default paths in src:xen or teach virt-manager about better defaults. This moved around so much for xen I'm even unsure which component sets the wrong default.
Was at /usr/lib/xen/bin/qemu-dm, /usr/libexec/qemu-kvm, /usr/lib/xen-$(ver)/bin/qemu-system-i386 ...

Since it is listed in the capabilities probing result I'd even expect virt-manager gets it from libvirt - to libvirt might be the right source package of this after all. But since xen was demoted that is low prio - happy to help thou if someone of the community steps up providing a fix after debugging where the probe results gets the wrong path.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

If I'm not mistaken this path is from m4/virt-driver-libxl.m4 build time detection.

 34 if test "x$with_libxl" = "xyes" ; then
 35 LIBXL_FIRMWARE_DIR=$($PKG_CONFIG --variable xenfirmwaredir xenlight)
 36 LIBXL_EXECBIN_DIR=$($PKG_CONFIG --variable libexec_bin xenlight)
 37 fi
 38

root@g:~# apt install libxen-dev
root@g:~# pkg-config --variable libexec_bin xenlight
/usr/lib/xen-4.11/bin

We can't change the path, as all things "really" provided by xen are (and have to be) in that place. But actually this is a benefit of the split qemu build, we could consider making qemu-system-x86-xen to just push things into those paths.

That way defaults would work AND it would no more have to conflict with the non -xen variant.
I'll spin a PPA for this, but we'd want to check for side effects and revert the change on bad reports.

summary: - can't complete the installation : internal error : libxenlight failed to
- create new domain
+ qemu-system-x86-xen default path should match xen libexec_bin path
Changed in libvirt (Ubuntu):
status: New → Invalid
Changed in qemu (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Marietto - you have essentially become our xen-community (feels like from zero to one) which won't make xen fully supported again, but if we identify issues that are rather easy to fix we can try to make them work.

Just to manage expectations thou, those changes will be very unlikely to be SRU backported as that would be plenty of downloads (and slight regression chance) for the majority of users while helping a (almost non existent) minority.

Therefore I'd ask you to help me to polish xen to the needs of ubuntu-xen users with activity on this (and potentially similar bugs), but you'll need to use the most recent Ubuntu versions then to receive the fixes.

For now let's see if the test builds of qemu (once built) will be helpful ...

Revision history for this message
Marietto (marietto2008) wrote :

point 2a and 2b worked. link should be created pointing to /usr/bin/qemu-system-i386 and not to the qemu-system-i386 provided by xen 4.4 unstable.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 1:5.0-5ubuntu4

---------------
qemu (1:5.0-5ubuntu4) groovy; urgency=medium

  * xen: provide compat links to what libxen-dev reports where to find
    the binaries (LP: #1890005)
  * d/p/ubuntu/lp-1883984-target-s390x-Fix-SQXBR.patch: avoid crash on
    SQXBR (LP: #1883984)
  * d/p/lp-1890154-*: fix -no-reboot on s390x secure boot (LP: #1890154)

 -- Christian Ehrhardt <email address hidden> Mon, 03 Aug 2020 07:15:28 +0200

Changed in qemu (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.