- bsc#1201748 - virt-install --graphics vnc fails with not support

for video model 'virtio'
  virtinst-enable-video-virtio-for-arm.patch

- Drop virtman-check-for-valid-display.patch. This patch is no
  longer required.

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=595
This commit is contained in:
Charles Arnold 2023-04-25 12:24:36 +00:00 committed by Git OBS Bridge
parent 47696815a8
commit 58e68dedbe
4 changed files with 59 additions and 28 deletions

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Apr 25 06:14:10 MDT 2023 - carnold@suse.com
- bsc#1201748 - virt-install --graphics vnc fails with not support
for video model 'virtio'
virtinst-enable-video-virtio-for-arm.patch
-------------------------------------------------------------------
Mon Apr 17 13:24:16 MDT 2023 - carnold@suse.com
- Drop virtman-check-for-valid-display.patch. This patch is no
longer required.
-------------------------------------------------------------------
Thu Apr 6 15:06:51 MDT 2023 - carnold@suse.com

View File

@ -74,17 +74,17 @@ Patch125: virtinst-add-caasp-support.patch
Patch126: virtinst-add-sle15-detection-support.patch
Patch127: virtinst-add-pvh-support.patch
Patch128: virtinst-media-detection.patch
Patch129: virtinst-enable-video-virtio-for-arm.patch
# Bug Fixes
Patch151: virtman-increase-setKeepAlive-count.patch
Patch152: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch
Patch153: virtman-check-for-valid-display.patch
Patch154: virtman-allow-creating-i686-vm.patch
Patch155: virtman-dont-specify-vte-version.patch
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-revert-use-of-AyatanaAppIndicator3.patch
Patch153: virtman-allow-creating-i686-vm.patch
Patch154: virtman-dont-specify-vte-version.patch
Patch155: virtman-dont-specify-gtksource-version.patch
Patch156: virtman-fix-restore-vm-menu-selection.patch
Patch157: virtman-disallow-adding-floppy-disk.patch
Patch158: virtman-register-delete-event-for-details-dialog.patch
Patch159: virtman-revert-use-of-AyatanaAppIndicator3.patch
Patch170: virtinst-xen-drive-type.patch
Patch171: virtinst-xenbus-disk-index-fix.patch
Patch172: virtinst-refresh_before_fetch_pool.patch

View File

@ -0,0 +1,38 @@
References: bsc#1201748
Enable video virtio on arm if domain caps reports it is supported.
Index: virt-manager-4.1.0/virtinst/guest.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/guest.py
+++ virt-manager-4.1.0/virtinst/guest.py
@@ -1024,7 +1024,10 @@ class Guest(XMLBuilder):
return
if (not self.os.is_x86() and
not self.os.is_pseries()):
- return
+ if (not self.os.is_arm_machvirt() or
+ not self.lookup_domcaps().supports_video_virtio()):
+ log.debug("Domain caps reports video virtio is not supported.")
+ return
self.add_device(DeviceGraphics(self.conn))
def _add_default_rng(self):
Index: virt-manager-4.1.0/virtinst/devices/video.py
===================================================================
--- virt-manager-4.1.0.orig/virtinst/devices/video.py
+++ virt-manager-4.1.0/virtinst/devices/video.py
@@ -32,8 +32,11 @@ class DeviceVideo(Device):
if guest.os.is_pseries():
return "vga"
if guest.os.is_arm_machvirt():
- # For all cases here the hv and guest are new enough for virtio
- return "virtio"
+ if guest.lookup_domcaps().supports_video_virtio():
+ # For all cases here the hv and guest are new enough for virtio
+ return "virtio"
+ log.debug("Domain caps reports video virtio is not supported.")
+ return "none"
if guest.os.is_riscv_virt():
# For all cases here the hv and guest are new enough for virtio
return "virtio"

View File

@ -1,20 +0,0 @@
References: bnc#907958
Sanity check for those who forget '-X' on ssh and try to start virt-manager
Index: virt-manager-3.3.0/virtManager/virtmanager.py
===================================================================
--- virt-manager-3.3.0.orig/virtManager/virtmanager.py
+++ virt-manager-3.3.0/virtManager/virtmanager.py
@@ -66,8 +66,11 @@ def _import_gtk(leftovers):
print("gtk3 3.22.0 or later is required.")
sys.exit(1)
- # This will error if Gtk wasn't correctly initialized
- Gtk.init()
+ if 'DISPLAY' in os.environ and os.environ['DISPLAY']:
+ # This will error if Gtk wasn't correctly initialized
+ Gtk.Window()
+ else:
+ raise Exception("Error starting virt-manager: No graphical display found")
globals()["Gtk"] = Gtk
# This ensures we can init gsettings correctly