Xen: libvirt.libvirtError: An error occurred, but the cause is unknown

Hi, I'm facing a strange issue with libvirt and the Xen driver. Whenever I try to define or start a domain, I always get this error: "libvirt.libvirtError: An error occurred, but the cause is unknown" (in Python virt-manager interface) Which is not very helpful. Trying to use virsh directly leads to the same error message: virsh # start win10_xen error: Failed to start domain win10_xen error: An error occurred, but the cause is unknown I checked /var/log/libvirt/libxl/libxl-driver.log, but the log file is empty. However, using the xl toolstack directly to start a new domain works fine, so the issue doesn't seem to come from Xen. My environment: - Ubuntu 20.04 LTS - xen-hypervisor-4.11-amd64 (4.11.3+24-g14b62ab3e5-1ubuntu2) - libvirt0 (6.0.0-0ubuntu8.8) I really like libvirt and virt-manager to manage my VMs. Any clue how I could dig deeper and find the root cause ? Thanks.

On Wed, Apr 07, 2021 at 08:14:10 +0000, Mathieu Tarral wrote:
Hi,
I'm facing a strange issue with libvirt and the Xen driver.
Whenever I try to define or start a domain, I always get this error: "libvirt.libvirtError: An error occurred, but the cause is unknown" (in Python virt-manager interface)
Which is not very helpful. Trying to use virsh directly leads to the same error message:
virsh # start win10_xen error: Failed to start domain win10_xen error: An error occurred, but the cause is unknown
This is reported when we fail to set an error message
I checked /var/log/libvirt/libxl/libxl-driver.log, but the log file is empty.
Please try enabling full debug logging, it may at least show what the last thing we were doing is. https://www.libvirt.org/kbase/debuglogs.html#persistent-setting

Hi Peter, ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ Le mercredi 7 avril 2021 à 10:56, Peter Krempa <pkrempa@redhat.com> a écrit :
On Wed, Apr 07, 2021 at 08:14:10 +0000, Mathieu Tarral wrote:
Hi,
I'm facing a strange issue with libvirt and the Xen driver.
Whenever I try to define or start a domain, I always get this error:
"libvirt.libvirtError: An error occurred, but the cause is unknown" (in Python virt-manager interface)
Which is not very helpful.
Trying to use virsh directly leads to the same error message:
virsh # start win10_xen
error: Failed to start domain win10_xen
error: An error occurred, but the cause is unknown
This is reported when we fail to set an error message
I checked /var/log/libvirt/libxl/libxl-driver.log, but the log file is empty.
Please try enabling full debug logging, it may at least show what the
last thing we were doing is.
https://www.libvirt.org/kbase/debuglogs.html#persistent-setting
I enabled the log output in libvirt daemon, and there was one error message that appeared: error : libxlMakeDomBuildInfo:553 : unsupported configuration: emulator '/usr/lib/xen-4.11/bin/qemu-system-i386' not found When searching the path with apt-file, there are no packages providing this file. I have qemu-system-x86-xen however: https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/qemu-system-x86-xen_4.2-... which provides /usr/bin/qemu-system-i386 Creating a symlink solved my issue: cd /usr/lib/xen-4.11/bin sudo ln -s /usr/bin/qemu-system-i386 . -> This seems to be an opened bug report on the libvirt Debian package (since 2016 !) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830307 -> Is there a way for libvirt to actually report meaningful errors in this case ? Thanks !

On 4/7/21 3:25 AM, Mathieu Tarral wrote:
I enabled the log output in libvirt daemon, and there was one error message that appeared:
error : libxlMakeDomBuildInfo:553 : unsupported configuration: emulator '/usr/lib/xen-4.11/bin/qemu-system-i386' not found
libxlMakeDomBuildInfo reports the error via virReportError https://gitlab.com/libvirt/libvirt/-/blob/master/src/libxl/libxl_conf.c#L592
When searching the path with apt-file, there are no packages providing this file.
I have qemu-system-x86-xen however: https://ubuntu.pkgs.org/20.04/ubuntu-universe-amd64/qemu-system-x86-xen_4.2-...
which provides /usr/bin/qemu-system-i386
Creating a symlink solved my issue: cd /usr/lib/xen-4.11/bin sudo ln -s /usr/bin/qemu-system-i386 .
-> This seems to be an opened bug report on the libvirt Debian package (since 2016 !) https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830307
-> Is there a way for libvirt to actually report meaningful errors in this case ?
A meaningful error is reported, it's just not making it back to the client. And I don't spot anywhere along the failure path of libxlDomainCreateWithFlags -> libxlDomainStartNew -> libxlDomainStart -> libxlMakeDomBuildInfo where that helpful error would be unset/overwritten. Regards, Jim
participants (3)
-
Jim Fehlig
-
Mathieu Tarral
-
Peter Krempa