Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
libvirt.33033
0a301b19-qemu-dont-assume-qemukvm.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0a301b19-qemu-dont-assume-qemukvm.patch of Package libvirt.33033
commit 0a301b1969f2e25127ab7bf5733c3e35dd778aac Author: Andrea Bolognani <abologna@redhat.com> Date: Thu Mar 31 11:00:38 2022 +0200 qemu: Don't assume that /usr/libexec/qemu-kvm exists On a machine where no QEMU binary is installed, we end up logging libvirtd: Cannot check QEMU binary /usr/libexec/qemu-kvm: No such file or directory which is not very useful in general, and downright misleading in the case of operating systems that are not derived from RHEL. This is a consequence of treating that specific path in a different way from all other possible QEMU binary paths, and specifically of not checking whether the file actually exists but sort of assuming that it must do if we haven't found another QEMU binary earlier. Address the issue by trying this path out in virQEMUCapsFindBinaryForArch(), along with all the other possible ones, and making sure it exists before returning it. Reported-by: Jim Fehlig <jfehlig@suse.com> Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Jim Fehlig <jfehlig@suse.com> Index: libvirt-8.0.0/src/qemu/qemu_capabilities.c =================================================================== --- libvirt-8.0.0.orig/src/qemu/qemu_capabilities.c +++ libvirt-8.0.0/src/qemu/qemu_capabilities.c @@ -903,6 +903,13 @@ virQEMUCapsFindBinaryForArch(virArch hos return binary; } + /* RHEL doesn't follow the usual naming for QEMU binaries and ships + * a single binary named qemu-kvm outside of $PATH instead */ + if (virQEMUCapsGuestIsNative(hostarch, guestarch)) { + if ((binary = virFindFileInPath("/usr/libexec/qemu-kvm"))) + return binary; + } + return NULL; } @@ -911,18 +918,7 @@ char * virQEMUCapsGetDefaultEmulator(virArch hostarch, virArch guestarch) { - char *binary = NULL; - /* Check for existence of base emulator, or alternate base - * which can be used with magic cpu choice - */ - binary = virQEMUCapsFindBinaryForArch(hostarch, guestarch); - - /* RHEL doesn't follow the usual naming for QEMU binaries and ships - * a single binary named qemu-kvm outside of $PATH instead */ - if (virQEMUCapsGuestIsNative(hostarch, guestarch) && !binary) - binary = g_strdup("/usr/libexec/qemu-kvm"); - - return binary; + return virQEMUCapsFindBinaryForArch(hostarch, guestarch); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor