virt-manager/SOURCES/virt-manager-cli-s390x-graphics-specified-use-video-virtio-bz-1654994.patch
2021-09-10 05:41:51 +00:00

64 lines
3.1 KiB
Diff

From 533879fd8da90eba207c63e2d70472efda9dc612 Mon Sep 17 00:00:00 2001
Message-Id: <533879fd8da90eba207c63e2d70472efda9dc612@dist-git>
From: Pavel Hrdina <phrdina@redhat.com>
Date: Thu, 13 Dec 2018 16:39:43 -0500
Subject: [PATCH] cli: s390x+graphics specified, use video=virtio (bz #1654994)
From: Cole Robinson <crobinso@redhat.com>
s390x doesn't support any of the PCI graphics cards
https://bugzilla.redhat.com/show_bug.cgi?id=1654994
(cherry picked from commit b91393e6c35b0e2903dbb50bb57a64464a7a3802)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
.../cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml | 4 ++++
tests/clitest.py | 2 +-
virtinst/devices/video.py | 2 ++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml b/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml
index a8038855..82fe6350 100644
--- a/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml
+++ b/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml
@@ -36,6 +36,10 @@
<console type="pty">
<target type="sclp"/>
</console>
+ <graphics type="vnc" port="-1"/>
+ <video>
+ <model type="virtio"/>
+ </video>
<watchdog model="diag288" action="reset"/>
<panic model="s390"/>
</devices>
diff --git a/tests/clitest.py b/tests/clitest.py
index 039938db..824293e4 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -720,7 +720,7 @@ c.add_compare("--connect %(URI-KVM-PPC64LE)s --import --disk %(EXISTIMG1)s --os-
# s390x tests
c.add_compare("--arch s390x --machine s390-ccw-virtio --connect %(URI-KVM-S390X)s --boot kernel=/kernel.img,initrd=/initrd.img --disk %(EXISTIMG1)s --disk %(EXISTIMG3)s,device=cdrom --os-variant fedora21", "s390x-cdrom", skip_check=OLD_OSINFO)
-c.add_compare("--arch s390x --machine s390-ccw-virtio --connect " + utils.URIs.kvm_s390x_KVMIBM + " --boot kernel=/kernel.img,initrd=/initrd.img --disk %(EXISTIMG1)s --disk %(EXISTIMG3)s,device=cdrom --os-variant fedora21 --watchdog diag288,action=reset --panic default", "s390x-cdrom-KVMIBM")
+c.add_compare("--arch s390x --machine s390-ccw-virtio --connect " + utils.URIs.kvm_s390x_KVMIBM + " --boot kernel=/kernel.img,initrd=/initrd.img --disk %(EXISTIMG1)s --disk %(EXISTIMG3)s,device=cdrom --os-variant fedora21 --watchdog diag288,action=reset --panic default --graphics vnc", "s390x-cdrom-KVMIBM")
# qemu:///session tests
c.add_compare("--connect " + utils.URIs.kvm_session + " --disk size=8 --os-variant fedora21 --cdrom %(EXISTIMG1)s", "kvm-session-defaults", skip_check=OLD_OSINFO)
diff --git a/virtinst/devices/video.py b/virtinst/devices/video.py
index 5978a421..276f8187 100644
--- a/virtinst/devices/video.py
+++ b/virtinst/devices/video.py
@@ -46,6 +46,8 @@ class DeviceVideo(Device):
return "vga"
if guest.os.is_arm_machvirt():
return "virtio"
+ if guest.conn.is_qemu() and guest.os.is_s390x():
+ return "virtio"
if guest.has_spice() and guest.os.is_x86():
if guest.has_gl():
return "virtio"
--
2.19.2