From 8d9c2a319769fa6628270e083c05308195d6e58c Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Fri, 23 Oct 2020 20:23:22 +0000 Subject: [PATCH 1/3] - bsc#1177763 - Cannot install an existing virtual machine two error messages with Virtual Machine Manager virtman-append-usr-sbin-to-search-path.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=517 --- virt-manager.changes | 7 +++++++ virt-manager.spec | 2 ++ virtman-append-usr-sbin-to-search-path.patch | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 virtman-append-usr-sbin-to-search-path.patch diff --git a/virt-manager.changes b/virt-manager.changes index a9050db7..2ee67fc1 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 23 13:25:38 MDT 2020 - carnold@suse.com + +- bsc#1177763 - Cannot install an existing virtual machine two + error messages with Virtual Machine Manager + virtman-append-usr-sbin-to-search-path.patch + ------------------------------------------------------------------- Wed Sep 30 17:07:44 MDT 2020 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index f946329e..ab88c025 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -62,6 +62,7 @@ Patch156: virtman-dont-specify-gtksource-version.patch Patch157: virtman-fix-restore-vm-menu-selection.patch Patch158: virtman-disallow-adding-floppy-disk.patch Patch159: virtman-register-delete-event-for-details-dialog.patch +Patch160: virtman-append-usr-sbin-to-search-path.patch Patch170: virtinst-xen-drive-type.patch Patch171: virtinst-xenbus-disk-index-fix.patch Patch172: virtinst-refresh_before_fetch_pool.patch @@ -184,6 +185,7 @@ machine). %patch157 -p1 %patch158 -p1 %patch159 -p1 +%patch160 -p1 %patch170 -p1 %patch171 -p1 %patch172 -p1 diff --git a/virtman-append-usr-sbin-to-search-path.patch b/virtman-append-usr-sbin-to-search-path.patch new file mode 100644 index 00000000..e2d52a44 --- /dev/null +++ b/virtman-append-usr-sbin-to-search-path.patch @@ -0,0 +1,19 @@ +References: bsc#1177763 +When virt-manager is launched by a user (non-root) for the first +time and no connection was previously defined, the user path +typically does not have /usr/sbin and will therefore fail to find +the installed libvirtd. + + +--- virt-manager-3.1.0/virtManager/lib/connectauth.py.orig 2020-10-23 13:18:59.894366558 -0600 ++++ virt-manager-3.1.0/virtManager/lib/connectauth.py 2020-10-23 13:20:03.050368102 -0600 +@@ -204,7 +204,8 @@ def connect_error(conn, errmsg, tb, warn + ################################## + + def setup_first_uri(config, tryuri): +- libvirtd_installed = bool(shutil.which("libvirtd")) ++ # Add /usr/sbin to the path in case non-root user launches virt-manager ++ libvirtd_installed = bool(shutil.which("libvirtd", path=os.environ['PATH'] + os.pathsep + "/usr/sbin")) + if config.CLITestOptions.fake_no_libvirtd: + libvirtd_installed = False + From 52d4ba61c3160217e253e32e0c9d6169d0ae1b49 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Mon, 26 Oct 2020 18:51:31 +0000 Subject: [PATCH 2/3] Accepting request 844150 from home:bfrogers:branches:Virtualization - boo#1178141 - Accomodate qemu modularization with respect to spice and spice related optional modules. If full spice support is not detected due to missing qemu modules (v5.1 qemu and newer), use vnc as the default install-time graphics type used OBS-URL: https://build.opensuse.org/request/show/844150 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=518 --- virt-manager.changes | 8 +++ virt-manager.spec | 2 + ...ck-for-qemu-modules-in-spice-graphic.patch | 57 +++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch diff --git a/virt-manager.changes b/virt-manager.changes index 2ee67fc1..013132c3 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Oct 25 02:34:44 UTC 2020 - Bruce Rogers + +- boo#1178141 - Accomodate qemu modularization with respect to + spice and spice related optional modules. If full spice support + is not detected due to missing qemu modules (v5.1 qemu and newer), + use vnc as the default install-time graphics type used + ------------------------------------------------------------------- Fri Oct 23 13:25:38 MDT 2020 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index ab88c025..a69eae42 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -52,6 +52,7 @@ Patch126: virtinst-add-caasp-support.patch Patch127: virtinst-add-sle15-detection-support.patch Patch128: virtinst-add-pvh-support.patch Patch129: virtinst-media-detection.patch +Patch130: virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch # Bug Fixes Patch151: virtman-increase-setKeepAlive-count.patch Patch152: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch @@ -175,6 +176,7 @@ machine). %patch127 -p1 %patch128 -p1 %patch129 -p1 +%patch130 -p1 # Bug Fixes %patch151 -p1 %patch152 -p1 diff --git a/virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch b/virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch new file mode 100644 index 00000000..3d43c429 --- /dev/null +++ b/virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch @@ -0,0 +1,57 @@ +From 2919f40ac931dce5dedf326f84e83e8c04e1fabe Mon Sep 17 00:00:00 2001 +From: Bruce Rogers +Date: Sat, 24 Oct 2020 08:10:29 -0600 +Subject: [PATCH] graphics: add check for qemu modules in spice graphics + detection + +For SLE and openSUSE qemu, starting with v5.1, spice and spice related +qemu modules have been split away from the main system emulator and +are packaged as Recommends, meaning that they may not be present. +Up to now virt-manager has assumed spice is available for x86 qemu, but +that is no longer the case. Unfortunately the standard libvirt feature +detection can't yet help us out here, so we leapfrog libvirt by doing +our own detection of whether the qemu modules needed to support the +default guest install using spice, usb redirection, and qxl video are +present. + +Signed-off-by: Bruce Rogers +--- + virtinst/devices/graphics.py | 9 +++++++++ + virtinst/support.py | 1 + + 2 files changed, 10 insertions(+) + +diff --git a/virtinst/devices/graphics.py b/virtinst/devices/graphics.py +index a514b455..f5083e68 100644 +--- a/virtinst/devices/graphics.py ++++ b/virtinst/devices/graphics.py +@@ -135,6 +135,15 @@ class DeviceGraphics(Device): + # Spice has issues on some host arches, like ppc, so allow it + if self.conn.caps.host.cpu.arch not in ["i686", "x86_64"]: + return False ++ if self.conn.support.conn_spice_modular(): ++ if self.conn.caps.host.cpu.arch in ["x86_64"]: ++ if not (os.path.exists("/usr/lib64/qemu/hw-usb-redirect.so") and ++ os.path.exists("/usr/lib64/qemu/hw-display-qxl.so")): ++ return False ++ else: ++ if not (os.path.exists("/usr/lib/qemu/hw-usb-redirect.so") and ++ os.path.exists("/usr/lib/qemu/hw-display-qxl.so")): ++ return False + return True + + def _listen_need_port(self): +diff --git a/virtinst/support.py b/virtinst/support.py +index de73629e..29dad32b 100644 +--- a/virtinst/support.py ++++ b/virtinst/support.py +@@ -281,6 +281,7 @@ class SupportCache: + conn_disk_driver_name_qemu = _make( + hv_version={"qemu": 0, "xen": "4.2.0"}, + hv_libvirt_version={"qemu": 0, "xen": "1.1.0"}) ++ conn_spice_modular = _make(hv_version={"qemu": "5.1.0", "test": 0}) + + # Domain checks + domain_xml_inactive = _make(function="virDomain.XMLDesc", run_args=(), +-- +2.29.0 + From d131530f832469bc1a90f7f7c77ca53d775f2349 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Mon, 26 Oct 2020 19:04:29 +0000 Subject: [PATCH 3/3] Add patch name to changelog virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=519 --- virt-manager.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/virt-manager.changes b/virt-manager.changes index 013132c3..3193cf1d 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -5,6 +5,7 @@ Sun Oct 25 02:34:44 UTC 2020 - Bruce Rogers spice and spice related optional modules. If full spice support is not detected due to missing qemu modules (v5.1 qemu and newer), use vnc as the default install-time graphics type used + virtinst-graphics-add-check-for-qemu-modules-in-spice-graphic.patch ------------------------------------------------------------------- Fri Oct 23 13:25:38 MDT 2020 - carnold@suse.com