From b91393e6c35b0e2903dbb50bb57a64464a7a3802 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 13 Dec 2018 16:39:43 -0500 Subject: [PATCH] cli: s390x+graphics specified, use video=virtio (bz #1654994) s390x doesn't support any of the PCI graphics cards https://bugzilla.redhat.com/show_bug.cgi?id=1654994 --- .../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 a8038855c..82fe63509 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 @@ + + diff --git a/tests/clitest.py b/tests/clitest.py index 039938dbf..824293e46 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 5978a4213..276f81870 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"