Accepting request 948012 from Virtualization

Fix for bsc#1194323 detecting win2k22 ISO media.

OBS-URL: https://build.opensuse.org/request/show/948012
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=229
This commit is contained in:
Dominique Leuenberger 2022-01-23 11:15:34 +00:00 committed by Git OBS Bridge
commit 6be9187ca0
5 changed files with 83 additions and 17 deletions

View File

@ -0,0 +1,46 @@
Subject: console: Don't block console reconnect for non-error
From: Cole Robinson crobinso@redhat.com Thu Jan 20 14:14:54 2022 -0500
Date: Fri Jan 21 11:03:23 2022 -0500:
Git: 8bb64ad5afd5eb1bb15c25affc5544a3acefe48f
https://listman.redhat.com/archives/virt-tools-list/2022-January/msg00012.html
On xen, a guest reboot will trigger a non-error viewer-disconnected
signal, but we treat it like an error, which makes it difficult to
reconnect to the VM console.
If there's no error message raised, treat the disconnect like a
non-error cases.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
--- a/virtManager/details/console.py
+++ b/virtManager/details/console.py
@@ -824,14 +824,23 @@ class vmmConsolePages(vmmGObjectUI):
return
msg = _("Viewer was disconnected.")
+ errmsg = ""
if errdetails:
- msg += "\n" + errdetails
+ errmsg += "\n" + errdetails
if ssherr:
log.debug("SSH tunnel error output: %s", ssherr)
- msg += "\n\n"
- msg += _("SSH tunnel error output: %s") % ssherr
+ errmsg += "\n\n"
+ errmsg += _("SSH tunnel error output: %s") % ssherr
- self._activate_gfx_unavailable_page(msg)
+ if errmsg:
+ self._activate_gfx_unavailable_page(msg + errmsg)
+ return
+
+ # If no error message was reported, this isn't a clear graphics
+ # error that should block reconnecting. So use the top level
+ # 'VM unavailable' page which makes it easier for the user to
+ # reconnect.
+ self._activate_vm_unavailable_page(msg)
def _viewer_disconnected(self, ignore, errdetails, ssherr):
self._activate_gfx_unavailable_page(_("Viewer disconnected."))

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jan 20 15:46:02 MST 2022 - carnold@suse.com
- bsc#1194323 - [jsc#SLE-19237][virt-manager] Detected the wrong
win2k22 guest system version from the local install media
virtinst-windows-server-detection.patch
- Upstream bug fixes (bsc#1027942)
8bb64ad5-console-Dont-block-console-reconnect-for-non-error.patch
Drop virtman-init-viewer-on-reboot.patch
-------------------------------------------------------------------
Thu Jan 13 13:33:50 MST 2022 - carnold@suse.com

View File

@ -44,6 +44,7 @@ Patch9: 9363e1e6-virt-xml-add-support-for-mediated-devices.patch
Patch10: f87e96d3-hostdev-use-method-get_mdev_uuid.patch
Patch11: 9d4002ee-tests-verify-MDEV-support.patch
Patch12: 0e15cd51-virt-manager-enable-MDEV-support.patch
Patch13: 8bb64ad5-console-Dont-block-console-reconnect-for-non-error.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
@ -79,7 +80,6 @@ Patch158: virtman-disallow-adding-floppy-disk.patch
Patch159: virtman-register-delete-event-for-details-dialog.patch
Patch160: virtman-show-no-firmware-for-xenpv.patch
Patch161: virtman-legacy-bios-support.patch
Patch162: virtman-init-viewer-on-reboot.patch
Patch170: virtinst-xen-drive-type.patch
Patch171: virtinst-xenbus-disk-index-fix.patch
Patch172: virtinst-refresh_before_fetch_pool.patch
@ -94,6 +94,7 @@ Patch180: virtinst-keep-iso-for-xenpv.patch
Patch181: virtinst-add-slem-detection-support.patch
Patch182: virtinst-add-sle-hpc-support.patch
Patch183: virtinst-add-oracle-linux-support.patch
Patch184: virtinst-windows-server-detection.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -184,6 +185,7 @@ machine).
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1
@ -219,7 +221,6 @@ machine).
%patch159 -p1
%patch160 -p1
%patch161 -p1
%patch162 -p1
%patch170 -p1
%patch171 -p1
%patch172 -p1
@ -234,6 +235,7 @@ machine).
%patch181 -p1
%patch182 -p1
%patch183 -p1
%patch184 -p1
%build
%if %{default_hvs}

View File

@ -0,0 +1,23 @@
References: bsc#1194323
Windows server 2k16, 2k19, and 2k22 have the volumen ID
so libosinfo can't really tell them apart.
This hack after detecting a windows ISO just looks at the
ISO filename for an extra clue.
--- virt-manager-3.2.0/virtinst/install/installer.py.orig 2022-01-20 15:40:27.849623677 -0700
+++ virt-manager-3.2.0/virtinst/install/installer.py 2022-01-20 15:42:22.229628567 -0700
@@ -541,6 +541,14 @@ class Installer(object):
osguess = OSDB.guess_os_by_iso(self.cdrom)
if osguess:
ret = osguess[0]
+ # Hack because windows ISOs contain same volume ID
+ if ret and ret.startswith("win"):
+ if "windows_server_2022" in self.cdrom:
+ ret = "win2k22"
+ elif "windows_server_2019" in self.cdrom:
+ ret = "win2k19"
+ elif "windows_server_2016" in self.cdrom:
+ ret = "win2k16"
else:
log.debug("No media for distro detection.")

View File

@ -1,15 +0,0 @@
References: bsc#1191358
Index: virt-manager-3.2.0/virtManager/details/console.py
===================================================================
--- virt-manager-3.2.0.orig/virtManager/details/console.py
+++ virt-manager-3.2.0/virtManager/details/console.py
@@ -923,6 +923,8 @@ class vmmConsolePages(vmmGObjectUI):
return
cpage = self.widget("console-pages").get_current_page()
+ if cpage == _CONSOLE_PAGE_GRAPHICS:
+ self._init_viewer()
if cpage != _CONSOLE_PAGE_UNAVAILABLE:
return