Accepting request 330548 from Virtualization

Bug fixes specific to s390x

OBS-URL: https://build.opensuse.org/request/show/330548
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/virt-manager?expand=0&rev=127
This commit is contained in:
Dominique Leuenberger 2015-09-13 07:45:18 +00:00 committed by Git OBS Bridge
commit 55d9d303a3
22 changed files with 510 additions and 261 deletions

View File

@ -0,0 +1,71 @@
Subject: virtinst: correctly find the sles s390x kernel and initrd
From: Charles Arnold carnold@suse.com Fri Sep 11 09:41:09 2015 -0600
Date: Fri Sep 11 12:48:52 2015 -0400:
Git: 360fe11040b0d7dc0235aecf10e96536619c616b
Allow virt-install to correctly find the SLES kernel/initrd on the media
when installing an s390x VM.
Signed-off-by: Charles Arnold <carnold@suse.com>
(crobinso: fix minor pep8 issues)
diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
index c48e9d5..40f7c05 100644
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -369,6 +369,8 @@ def _distroFromSUSEContent(fetcher, arch, vmtype=None):
arch = "x86_64"
elif cbuf.find("i586") != -1:
arch = "i586"
+ elif cbuf.find("s390x") != -1:
+ arch = "s390x"
dclass = GenericDistro
if distribution:
@@ -934,16 +936,22 @@ class SuseDistro(Distro):
oldkern += "64"
oldinit += "64"
- # Tested with Opensuse >= 10.2, 11, and sles 10
- self._hvm_kernel_paths = [("boot/%s/loader/linux" % self.arch,
- "boot/%s/loader/initrd" % self.arch)]
- # Tested with Opensuse 10.0
- self._hvm_kernel_paths.append(("boot/loader/%s" % oldkern,
- "boot/loader/%s" % oldinit))
+ if self.arch == "s390x":
+ self._hvm_kernel_paths = [("boot/%s/linux" % self.arch,
+ "boot/%s/initrd" % self.arch)]
+ # No Xen on s390x
+ self._xen_kernel_paths = []
+ else:
+ # Tested with Opensuse >= 10.2, 11, and sles 10
+ self._hvm_kernel_paths = [("boot/%s/loader/linux" % self.arch,
+ "boot/%s/loader/initrd" % self.arch)]
+ # Tested with Opensuse 10.0
+ self._hvm_kernel_paths.append(("boot/loader/%s" % oldkern,
+ "boot/loader/%s" % oldinit))
- # Matches Opensuse > 10.2 and sles 10
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
- "boot/%s/initrd-xen" % self.arch)]
+ # Matches Opensuse > 10.2 and sles 10
+ self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
+ "boot/%s/initrd-xen" % self.arch)]
def _variantFromVersion(self):
distro_version = self.version_from_content[1].strip()
@@ -971,6 +979,13 @@ class SuseDistro(Distro):
self._variantFromVersion()
self.os_variant = self._detect_osdict_from_url()
+
+ # Reset kernel name for sle11 source on s390x
+ if self.arch == "s390x":
+ if self.os_variant == "sles11" or self.os_variant == "sled11":
+ self._hvm_kernel_paths = [("boot/%s/vmrdr.ikr" % self.arch,
+ "boot/%s/initrd" % self.arch)]
+
return True
def _get_method_arg(self):

View File

@ -0,0 +1,254 @@
Subject: virt-manager : add support for architecture type "s390x".
From: Kevin Zhao kevinzs@linux.vnet.ibm.com Mon Jul 13 07:35:24 2015 -0400
Date: Tue Jul 14 12:45:32 2015 -0400:
Git: 8dbe96fc01c1b563a3720fd9292bca1fcb97f326
For architecture "s390x",the disk and the network device are base
on "virtio" bus.The cdrom is based on "scsi".So set the default
cdrom bus as "scsi",the default bus as "virtio".Also the default
machine type is set to "s390-ccw-virtio" as it is the only supported
in "s390x".Also add a test cast of virt-install by cdrom in s390x.
(crobinso: Tweak test suite and minor formatting stuff)
diff --git a/tests/capabilities-xml/kvm-s390x.xml b/tests/capabilities-xml/kvm-s390x.xml
new file mode 100644
index 0000000..039c2e0
--- /dev/null
+++ b/tests/capabilities-xml/kvm-s390x.xml
@@ -0,0 +1,73 @@
+<capabilities>
+
+ <host>
+ <uuid>b88e553c-5920-4aa8-bb09-cc0ab8e6e0c2</uuid>
+ <cpu>
+ <arch>s390x</arch>
+ <model>host</model>
+ <topology sockets="2" cores="2" threads="1"/>
+ <pages unit="KiB" size="4"/>
+ <pages unit="KiB" size="1024"/>
+ </cpu>
+ <power_management>
+ <suspend_disk/>
+ <suspend_hybrid/>
+ </power_management>
+ <migration_features>
+ <live/>
+ <uri_transports>
+ <uri_transport>tcp</uri_transport>
+ <uri_transport>rdma</uri_transport>
+ </uri_transports>
+ </migration_features>
+ <topology>
+ <cells num="1">
+ <cell id="0">
+ <memory unit="KiB">2878860</memory>
+ <cpus num="4">
+ <cpu id="0" socket_id="0" core_id="0" siblings="0"/>
+ <cpu id="1" socket_id="0" core_id="1" siblings="1"/>
+ <cpu id="2" socket_id="1" core_id="0" siblings="2"/>
+ <cpu id="3" socket_id="1" core_id="1" siblings="3"/>
+ </cpus>
+ </cell>
+ </cells>
+ </topology>
+ <secmodel>
+ <model>selinux</model>
+ <doi>0</doi>
+ <baselabel type="kvm">system_u:system_r:svirt_t:s0</baselabel>
+ <baselabel type="qemu">system_u:system_r:svirt_tcg_t:s0</baselabel>
+ </secmodel>
+ <secmodel>
+ <model>dac</model>
+ <doi>0</doi>
+ <baselabel type="kvm">+107:+107</baselabel>
+ <baselabel type="qemu">+107:+107</baselabel>
+ </secmodel>
+ </host>
+
+ <guest>
+ <os_type>hvm</os_type>
+ <arch name="s390x">
+ <wordsize>64</wordsize>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <machine canonical="s390-virtio" maxCpus="255">s390</machine>
+ <machine canonical="s390-ccw-virtio" maxCpus="255">s390-ccw</machine>
+ <domain type="qemu">
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ </domain>
+ <domain type="kvm">
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <machine canonical="s390-virtio" maxCpus="255">s390</machine>
+ <machine canonical="s390-ccw-virtio" maxCpus="255">s390-ccw</machine>
+ </domain>
+ </arch>
+ <features>
+ <cpuselection/>
+ <deviceboot/>
+ <disksnapshot default="on" toggle="no"/>
+ </features>
+ </guest>
+
+</capabilities>
diff --git a/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml b/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml
new file mode 100644
index 0000000..4d7b9c1
--- /dev/null
+++ b/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml
@@ -0,0 +1,43 @@
+<domain type="kvm">
+ <name>foobar</name>
+ <uuid>00000000-1111-2222-3333-444444444444</uuid>
+ <memory>65536</memory>
+ <currentMemory>65536</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type arch="s390x" machine="s390-ccw-virtio">hvm</type>
+ <kernel>/kernel.img</kernel>
+ <initrd>/initrd.img</initrd>
+ </os>
+ <features>
+ <acpi/>
+ <apic/>
+ </features>
+ <clock offset="utc"/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <disk type="file" device="disk">
+ <driver name="qemu" type="qcow2"/>
+ <source file="/dev/default-pool/testvol1.img"/>
+ <target dev="vda" bus="virtio"/>
+ </disk>
+ <disk type="file" device="cdrom">
+ <driver name="qemu"/>
+ <source file="/tmp/__virtinst_cli_exist1.img"/>
+ <target dev="sda" bus="scsi"/>
+ <readonly/>
+ </disk>
+ <interface type="bridge">
+ <source bridge="eth0"/>
+ <mac address="00:11:22:33:44:55"/>
+ </interface>
+ <console type="pty"/>
+ <channel type="unix">
+ <source mode="bind"/>
+ <target type="virtio" name="org.qemu.guest_agent.0"/>
+ </channel>
+ </devices>
+</domain>
diff --git a/tests/clitest.py b/tests/clitest.py
index 2e5df3b..fb63191 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -76,6 +76,7 @@ test_files = {
'URI-KVM-ARMV7L' : utils.uri_kvm_armv7l,
'URI-KVM-AARCH64' : utils.uri_kvm_aarch64,
'URI-KVM-PPC64LE' : utils.uri_kvm_ppc64le,
+ 'URI-KVM-S390X' : utils.uri_kvm_s390x,
'URI-XEN': utils.uri_xen,
'URI-LXC': utils.uri_lxc,
@@ -694,6 +695,9 @@ c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)
c.add_compare("--arch ppc64 --boot network --disk %(EXISTIMG1)s --os-variant fedora20 --network none", "ppc64-machdefault-f20")
c.add_compare("--connect %(URI-KVM-PPC64LE)s --import --disk %(EXISTIMG1)s --os-variant fedora20", "ppc64le-kvm-import")
+# 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")
+
c.add_compare("--disk none --location %(EXISTIMG3)s --nonetworks", "location-iso") # Using --location iso mounting
c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel6.4", "kvm-rhel6") # RHEL6 defaults
c.add_compare("--disk %(EXISTIMG1)s --pxe --os-variant rhel7.0", "kvm-rhel7") # RHEL7 defaults
diff --git a/tests/utils.py b/tests/utils.py
index 811016c..fe99155 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -46,6 +46,7 @@ uri_kvm = (_uri_kvm_domcaps + _capsprefix + "kvm-x86_64.xml")
uri_kvm_armv7l = (_uri_kvm_domcaps + _capsprefix + "kvm-armv7l.xml")
uri_kvm_aarch64 = (_uri_kvm_domcaps + _capsprefix + "kvm-aarch64.xml")
uri_kvm_ppc64le = (_uri_kvm_domcaps + _capsprefix + "kvm-ppc64le.xml")
+uri_kvm_s390x = (_uri_kvm_domcaps + _capsprefix + "kvm-s390x.xml")
uri_xen = uri_test + _capsprefix + "xen-rhel5.4.xml,xen"
uri_lxc = uri_test + _capsprefix + "lxc.xml,lxc"
diff --git a/virtManager/create.py b/virtManager/create.py
index 8401a7a..1005398 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -409,7 +409,7 @@ class vmmCreate(vmmGObjectUI):
can_remote_url = self.conn.get_backend().support_remote_url_install()
installable_arch = (self.capsinfo.arch in
- ["i686", "x86_64", "ppc64", "ppc64le", "ia64"])
+ ["i686", "x86_64", "ppc64", "ppc64le", "ia64", "s390x"])
if self.capsinfo.arch == "aarch64":
try:
@@ -676,7 +676,8 @@ class vmmCreate(vmmGObjectUI):
archs.remove("i686")
archs.sort()
- prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le"]
+ prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le",
+ "s390x"]
if self.conn.caps.host.cpu.arch not in prios:
prios = []
else:
diff --git a/virtinst/capabilities.py b/virtinst/capabilities.py
index bed8596..5823da2 100644
--- a/virtinst/capabilities.py
+++ b/virtinst/capabilities.py
@@ -323,6 +323,10 @@ class _CapsInfo(object):
if "vexpress-a15" in self.machines:
return "vexpress-a15"
+ if self.arch in ["s390x"]:
+ if "s390-ccw-virtio" in self.machines:
+ return "s390-ccw-virtio"
+
return None
diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py
index 6ca76e5..679b0cd 100644
--- a/virtinst/devicedisk.py
+++ b/virtinst/devicedisk.py
@@ -897,6 +897,9 @@ class VirtualDisk(VirtualDevice):
if self.is_cdrom():
self.read_only = True
+ if self.is_cdrom() and guest.os.is_s390x():
+ self.bus = "scsi"
+
if (guest.os.is_xenpv() and
self.type == VirtualDisk.TYPE_FILE and
self.driver_name is None and
diff --git a/virtinst/guest.py b/virtinst/guest.py
index bf4b70b..c958068 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -987,6 +987,8 @@ class Guest(XMLBuilder):
d.bus = "sd"
elif self.os.is_q35():
d.bus = "sata"
+ elif self.os.is_s390x():
+ d.bus = "virtio"
else:
d.bus = "ide"
diff --git a/virtinst/osxml.py b/virtinst/osxml.py
index 77771bd..f195f19 100644
--- a/virtinst/osxml.py
+++ b/virtinst/osxml.py
@@ -71,6 +71,9 @@ class OSXML(XMLBuilder):
def is_pseries(self):
return self.is_ppc64() and self.machine == "pseries"
+ def is_s390x(self):
+ return self.arch == "s390x"
+
_XML_ROOT_NAME = "os"
_XML_PROP_ORDER = ["arch", "os_type", "loader", "loader_ro", "loader_type",
"nvram", "nvram_template", "kernel", "initrd",

View File

@ -15,7 +15,7 @@ Index: virt-manager-1.2.1/tests/clitest.py
===================================================================
--- virt-manager-1.2.1.orig/tests/clitest.py
+++ virt-manager-1.2.1/tests/clitest.py
@@ -742,8 +742,8 @@ c.add_valid("--mac 22:22:33:44:55:AF")
@@ -746,8 +746,8 @@ c.add_valid("--mac 22:22:33:44:55:AF")
c.add_valid("--bridge mybr0 --mac 22:22:33:44:55:AF") # Old bridge w/ mac
c.add_valid("--network bridge:mybr0,model=e1000") # --network bridge:
c.add_valid("--network network:default --mac RANDOM") # VirtualNetwork with a random macaddr

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Sep 11 11:17:43 MDT 2015 - carnold@suse.com
- Add upstream s390x support patch (bnc#869024)
360fe110-add-s390x-arch-support.patch
virtinst-add-ppc64-arch-support.patch
Drop virtinst-add-s390x-ppc64-arch-support.patch
-------------------------------------------------------------------
Thu Sep 10 13:46:12 MDT 2015 - carnold@suse.com
- Add upstream s390x support patch (bnc#869024)
8dbe96fc-add-s390x-arch-support.patch
virtinst-add-s390x-ppc64-arch-support.patch
virtinst-s390x-disable-graphics.patch
Drop virtman-add-s390x-arch-support.patch
Drop virtman-s390x-default-to-vminstall.patch
-------------------------------------------------------------------
Tue Sep 8 15:59:53 MDT 2015 - carnold@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package virt-manager
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -42,22 +42,23 @@ Patch2: fc93e154-fix-udp-tcp-host-vs-mode-UI.patch
Patch3: 34db1af7-fix-adding-iscsi-pools.patch
Patch4: 76bad650-fix-virt-xml-define-and-update.patch
Patch5: a9b303fb-fix-copy-host-cpu-definition.patch
Patch6: f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch
Patch7: aebebbf8-report-an-error-for-pxe-install-without-network.patch
Patch8: 4970615f-fix-qemu-vs-lxc-detection.patch
Patch9: eb92178e-virtinst-fix-storage-pool-lookup.patch
Patch10: 5e68b0fc-dont-try-to-set-vmport-on-non-x86.patch
Patch6: 8dbe96fc-add-s390x-arch-support.patch
Patch7: f81358b0-dont-display-error-if-machine-is-missing-in-XML.patch
Patch8: aebebbf8-report-an-error-for-pxe-install-without-network.patch
Patch9: 4970615f-fix-qemu-vs-lxc-detection.patch
Patch10: eb92178e-virtinst-fix-storage-pool-lookup.patch
Patch11: 5e68b0fc-dont-try-to-set-vmport-on-non-x86.patch
Patch12: 360fe110-add-s390x-arch-support.patch
# SUSE Only
Patch70: virtman-desktop.patch
Patch71: virtman-kvm.patch
Patch72: virtman-keycombo.patch
Patch73: virtman-vminstall.patch
Patch74: virtman-show-suse-install-repos.patch
Patch75: virtman-s390x-default-to-vminstall.patch
Patch76: virtman-libvirtd-not-running.patch
Patch77: virtman-dont-allow-grub.xen-to-be-deleted.patch
Patch78: virtinst-pvgrub2-bootloader.patch
Patch79: virtinst-nfs-install-sanitize.patch
Patch75: virtman-libvirtd-not-running.patch
Patch76: virtman-dont-allow-grub.xen-to-be-deleted.patch
Patch77: virtinst-pvgrub2-bootloader.patch
Patch78: virtinst-nfs-install-sanitize.patch
# Features or Enhancements
Patch100: virtman-eepro100.patch
Patch101: virtman-default-guest-from-host-os.patch
@ -65,16 +66,17 @@ Patch102: virtman-default-to-xen-pv.patch
Patch103: virtman-autoyast-support.patch
Patch104: virtman-packages.patch
Patch105: virtman-load-stored-uris.patch
Patch106: virtman-add-s390x-arch-support.patch
Patch107: virtman-add-connect-default.patch
Patch106: virtman-add-connect-default.patch
Patch120: virtinst-storage-ocfs2.patch
Patch121: virtinst-default-xen-to-qcow2-format.patch
Patch123: virtinst-detect-oes-distros.patch
Patch124: virtinst-modify-gui-defaults.patch
Patch125: virtinst-vol-default-nocow.patch
Patch126: virtinst-set-cache-mode-unsafe-for-install.patch
Patch127: virtinst-add-default-rng-device.patch
Patch128: virtinst-set-qemu-emulator.patch
Patch122: virtinst-detect-oes-distros.patch
Patch123: virtinst-modify-gui-defaults.patch
Patch124: virtinst-vol-default-nocow.patch
Patch125: virtinst-set-cache-mode-unsafe-for-install.patch
Patch126: virtinst-add-default-rng-device.patch
Patch127: virtinst-set-qemu-emulator.patch
Patch128: virtinst-add-ppc64-arch-support.patch
Patch129: virtinst-s390x-disable-graphics.patch
# Bug Fixes
Patch150: virtman-supported-disk-formats.patch
Patch151: virtman-prevent-double-click-starting-vm-twice.patch
@ -178,6 +180,8 @@ machine).
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
# SUSE Only
%patch70 -p1
%patch71 -p1
@ -188,7 +192,6 @@ machine).
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch79 -p1
# Enhancements
%patch100 -p1
%patch101 -p1
@ -197,15 +200,16 @@ machine).
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
%patch128 -p1
%patch129 -p1
# Bug Fixes
%patch150 -p1
%patch151 -p1

View File

@ -12,7 +12,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
class Guest(XMLBuilder):
@@ -675,6 +676,15 @@ class Guest(XMLBuilder):
@@ -670,6 +671,15 @@ class Guest(XMLBuilder):
return
self.add_device(VirtualGraphics(self.conn))
@ -28,7 +28,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
def add_default_devices(self):
self.add_default_graphics()
self.add_default_video_device()
@@ -682,6 +692,7 @@ class Guest(XMLBuilder):
@@ -677,6 +687,7 @@ class Guest(XMLBuilder):
self.add_default_console_device()
self.add_default_usb_controller()
self.add_default_channels()

View File

@ -0,0 +1,32 @@
Reference: bnc#869024
Add s390x and ppc64 support
Index: virt-manager-1.2.1/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/urlfetcher.py
+++ virt-manager-1.2.1/virtinst/urlfetcher.py
@@ -373,6 +373,10 @@ def _distroFromSUSEContent(fetcher, arch
arch = "i586"
elif cbuf.find("s390x") != -1:
arch = "s390x"
+ elif cbuf.find("ppc64") != -1:
+ arch = "ppc64"
+ elif cbuf.find("ppc64le") != -1:
+ arch = "ppc64le"
dclass = GenericDistro
if distribution:
@@ -942,10 +946,12 @@ class SuseDistro(Distro):
oldkern += "64"
oldinit += "64"
- if self.arch == "s390x":
+ if self.arch == "s390x" or \
+ self.arch == "ppc64" or self.arch == "ppc64le":
+
self._hvm_kernel_paths = [("boot/%s/linux" % self.arch,
"boot/%s/initrd" % self.arch)]
- # No Xen on s390x
+ # No Xen on s390x or ppc64
self._xen_kernel_paths = []
else:
# Tested with Opensuse >= 10.2, 11, and sles 10

View File

@ -1,10 +1,10 @@
Enhancement to correctly detect Open Enterprise Server media is
selected as the installation source.
Index: virt-manager-1.2.0/virtinst/urlfetcher.py
Index: virt-manager-1.2.1/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.2.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.2.0/virtinst/urlfetcher.py
@@ -383,6 +383,10 @@ def _distroFromSUSEContent(fetcher, arch
--- virt-manager-1.2.1.orig/virtinst/urlfetcher.py
+++ virt-manager-1.2.1/virtinst/urlfetcher.py
@@ -385,6 +385,10 @@ def _distroFromSUSEContent(fetcher, arch
dclass = SLEDDistro
if distro_version is None:
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]

View File

@ -0,0 +1,51 @@
Reference: bnc#869024
Disable graphics on s390x
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -123,7 +123,10 @@ class Guest(XMLBuilder):
self.skip_default_channel = False
self.skip_default_sound = False
self.skip_default_usbredir = False
- self.skip_default_graphics = False
+ if self.os.is_s390x():
+ self.skip_default_graphics = True
+ else:
+ self.skip_default_graphics = False
self.x86_cpu_default = self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY
self.__os_object = None
@@ -619,11 +622,13 @@ class Guest(XMLBuilder):
self.conn.check_support(
self.conn.SUPPORT_CONN_VIRTIO_CONSOLE)):
dev.target_type = "virtio"
+ elif self.os.is_s390x():
+ dev.target_type = "sclp"
self.add_device(dev)
def add_default_video_device(self):
- if self.os.is_container():
+ if self.os.is_container() or self.os.is_s390x():
return
if self.get_devices("video"):
return
@@ -668,7 +673,7 @@ class Guest(XMLBuilder):
return
if self.os.is_container():
return
- if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "ia64"]:
+ if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "ia64", "s390x"]:
return
self.add_device(VirtualGraphics(self.conn))
@@ -996,7 +1001,7 @@ class Guest(XMLBuilder):
if self._hv_only_supports_virtio():
return True
- if self.os.is_x86():
+ if self.os.is_x86() or self.os.is_s390x():
return True
if (self.os.is_arm_vexpress() and

View File

@ -12,7 +12,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
class Guest(XMLBuilder):
@@ -357,6 +358,14 @@ class Guest(XMLBuilder):
@@ -354,6 +355,14 @@ class Guest(XMLBuilder):
self._set_osxml_defaults()
@ -27,7 +27,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
self.bootloader = None
if (not install and
self.os.is_xenpv() and
@@ -374,7 +383,10 @@ class Guest(XMLBuilder):
@@ -371,7 +380,10 @@ class Guest(XMLBuilder):
self.bootloader = "/usr/bin/pygrub"
self.os.clear()

View File

@ -13,7 +13,7 @@ Index: virt-manager-1.2.1/virtinst/guest.py
import logging
import urlgrabber.progress as progress
@@ -811,14 +812,29 @@ class Guest(XMLBuilder):
@@ -806,14 +807,29 @@ class Guest(XMLBuilder):
self.emulator = None
return

View File

@ -6,11 +6,11 @@ types (ide vs xen) it added xvda with hda. These disks were then
passed to qemu where it error'ed out with the disks having the same
index (in this case both are 0).
Index: virt-manager-1.1.0/virtinst/devicedisk.py
Index: virt-manager-1.2.1/virtinst/devicedisk.py
===================================================================
--- virt-manager-1.1.0.orig/virtinst/devicedisk.py
+++ virt-manager-1.1.0/virtinst/devicedisk.py
@@ -1012,6 +1012,17 @@ class VirtualDisk(VirtualDevice):
--- virt-manager-1.2.1.orig/virtinst/devicedisk.py
+++ virt-manager-1.2.1/virtinst/devicedisk.py
@@ -1015,6 +1015,17 @@ class VirtualDisk(VirtualDevice):
@rtype C{str}
"""
prefix, maxnode = self.get_target_prefix(skip_targets)
@ -28,7 +28,7 @@ Index: virt-manager-1.1.0/virtinst/devicedisk.py
skip_targets = [t for t in skip_targets if t and t.startswith(prefix)]
skip_targets.sort()
@@ -1025,7 +1036,12 @@ class VirtualDisk(VirtualDevice):
@@ -1028,7 +1039,12 @@ class VirtualDisk(VirtualDevice):
ran = range(pref_ctrl * 7, (pref_ctrl + 1) * 7)
for i in ran:

View File

@ -1,10 +1,10 @@
Enhancement for when no hypervisor can be found locally it opens
the new connection dialog.
Index: virt-manager-1.1.0/virtManager/engine.py
Index: virt-manager-1.2.1/virtManager/engine.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/engine.py
+++ virt-manager-1.1.0/virtManager/engine.py
@@ -203,9 +203,6 @@ class vmmEngine(vmmGObject):
--- virt-manager-1.2.1.orig/virtManager/engine.py
+++ virt-manager-1.2.1/virtManager/engine.py
@@ -202,9 +202,6 @@ class vmmEngine(vmmGObject):
except:
logging.exception("Error talking to PackageKit")
@ -14,7 +14,7 @@ Index: virt-manager-1.1.0/virtManager/engine.py
warnmsg = _("The 'libvirtd' service will need to be started.\n\n"
"After that, virt-manager will connect to libvirt on\n"
"the next application start up.")
@@ -219,7 +216,11 @@ class vmmEngine(vmmGObject):
@@ -218,7 +215,11 @@ class vmmEngine(vmmGObject):
if not connected and do_start:
manager.err.ok(_("Libvirt service must be started"), warnmsg)

View File

@ -1,86 +0,0 @@
Reference: bnc#869024
Add s390x support
Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -417,7 +417,7 @@ class vmmCreate(vmmGObjectUI):
can_remote_url = self.conn.get_backend().support_remote_url_install()
installable_arch = (self.capsinfo.arch in
- ["i686", "x86_64", "ppc64", "ppc64le", "ia64"])
+ ["i686", "x86_64", "ppc64", "ppc64le", "ia64", "s390x"])
if self.capsinfo.arch == "aarch64":
try:
@@ -684,7 +684,7 @@ class vmmCreate(vmmGObjectUI):
archs.remove("i686")
archs.sort()
- prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le"]
+ prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le", "s390x"]
if self.conn.caps.host.cpu.arch not in prios:
prios = []
else:
Index: virt-manager-1.2.1/virtinst/osxml.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/osxml.py
+++ virt-manager-1.2.1/virtinst/osxml.py
@@ -70,6 +70,8 @@ class OSXML(XMLBuilder):
return self.arch == "ppc64" or self.arch == "ppc64le"
def is_pseries(self):
return self.is_ppc64() and self.machine == "pseries"
+ def is_s390x(self):
+ return self.arch == "s390x"
_XML_ROOT_NAME = "os"
_XML_PROP_ORDER = ["arch", "os_type", "loader", "loader_ro", "loader_type",
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -120,7 +120,10 @@ class Guest(XMLBuilder):
self.skip_default_channel = False
self.skip_default_sound = False
self.skip_default_usbredir = False
- self.skip_default_graphics = False
+ if self.os.is_s390x():
+ self.skip_default_graphics = True
+ else:
+ self.skip_default_graphics = False
self.x86_cpu_default = self.cpu.SPECIAL_MODE_HOST_MODEL_ONLY
self.__os_object = None
@@ -605,11 +608,13 @@ class Guest(XMLBuilder):
self.conn.check_support(
self.conn.SUPPORT_CONN_VIRTIO_CONSOLE)):
dev.target_type = "virtio"
+ elif self.os.is_s390x():
+ dev.target_type = "sclp"
self.add_device(dev)
def add_default_video_device(self):
- if self.os.is_container():
+ if self.os.is_container() or self.os.is_s390x():
return
if self.get_devices("video"):
return
@@ -654,7 +659,7 @@ class Guest(XMLBuilder):
return
if self.os.is_container():
return
- if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "ia64"]:
+ if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "ia64", "s390x"]:
return
self.add_device(VirtualGraphics(self.conn))
@@ -957,7 +962,7 @@ class Guest(XMLBuilder):
if self._hv_only_supports_virtio():
return True
- if self.os.is_x86():
+ if self.os.is_x86() or self.os.is_s390x():
return True
if (self.os.is_arm_vexpress() and

View File

@ -1,10 +1,10 @@
References: bsc#919692
Because openSUSE repos combine 32 and 64 bit sources we need to
continue showing the 'Architecture' pop-up.
Index: virt-manager-1.1.0/virtManager/create.py
Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/create.py
+++ virt-manager-1.1.0/virtManager/create.py
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -689,11 +689,6 @@ class vmmCreate(vmmGObjectUI):
for guest in self.conn.caps.guests:
if guest.os_type == self.capsinfo.os_type:
@ -16,4 +16,4 @@ Index: virt-manager-1.1.0/virtManager/create.py
- archs.remove("i686")
archs.sort()
prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le", "s390x"]
prios = ["x86_64", "i686", "aarch64", "armv7l", "ppc64", "ppc64le",

View File

@ -6,10 +6,10 @@ Steps to get a KVM VM in the crashed state:
4) Edit the VM's /etc/default/grub file and remove the crashkernel information
and then run grub2-mkconfig /boot/grub2/grub.cfg.
5) Start the VM and within the VM's terminal type "echo 'c' > /proc/sysrq-trigger"
Index: virt-manager-1.1.0/virtManager/manager.py
Index: virt-manager-1.2.1/virtManager/manager.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/manager.py
+++ virt-manager-1.1.0/virtManager/manager.py
--- virt-manager-1.2.1.orig/virtManager/manager.py
+++ virt-manager-1.2.1/virtManager/manager.py
@@ -864,7 +864,7 @@ class vmmManager(vmmGObjectUI):
show_pause = bool(vm and vm.is_unpauseable())
else:
@ -19,19 +19,11 @@ Index: virt-manager-1.1.0/virtManager/manager.py
if vm and vm.managedsave_supported:
self.change_run_text(vm.has_managed_save())
Index: virt-manager-1.1.0/virtManager/vmmenu.py
Index: virt-manager-1.2.1/virtManager/vmmenu.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/vmmenu.py
+++ virt-manager-1.1.0/virtManager/vmmenu.py
@@ -22,6 +22,7 @@ from gi.repository import Gtk
from virtManager import config
import platform
+import logging
####################################################################
# Build toolbar new button menu (manager and details toolbar) #
@@ -53,6 +54,7 @@ class _VMMenu(Gtk.Menu):
--- virt-manager-1.2.1.orig/virtManager/vmmenu.py
+++ virt-manager-1.2.1/virtManager/vmmenu.py
@@ -50,6 +50,7 @@ class _VMMenu(Gtk.Menu):
self._parent = src
self._current_vm_cb = current_vm_cb
self._show_open = show_open
@ -39,7 +31,7 @@ Index: virt-manager-1.1.0/virtManager/vmmenu.py
self._init_state()
@@ -114,6 +116,7 @@ class VMShutdownMenu(_VMMenu):
@@ -111,6 +112,7 @@ class VMShutdownMenu(_VMMenu):
name = getattr(child, "vmm_widget_name", None)
if name in statemap:
child.set_sensitive(statemap[name])
@ -47,7 +39,7 @@ Index: virt-manager-1.1.0/virtManager/vmmenu.py
if name == "reset":
child.set_tooltip_text(None)
@@ -130,7 +133,8 @@ class VMActionMenu(_VMMenu):
@@ -127,7 +129,8 @@ class VMActionMenu(_VMMenu):
self._add_action(_("_Pause"), "suspend", Gtk.STOCK_MEDIA_PAUSE)
self._add_action(_("R_esume"), "resume", Gtk.STOCK_MEDIA_PAUSE)
s = self._add_action(_("_Shut Down"), "shutdown", addcb=False)
@ -57,7 +49,7 @@ Index: virt-manager-1.1.0/virtManager/vmmenu.py
self.add(Gtk.SeparatorMenuItem())
self._add_action(_("Clone..."), "clone", None)
@@ -146,7 +150,7 @@ class VMActionMenu(_VMMenu):
@@ -143,7 +146,7 @@ class VMActionMenu(_VMMenu):
def update_widget_states(self, vm):
statemap = {
"run": bool(vm and vm.is_runable()),
@ -66,7 +58,7 @@ Index: virt-manager-1.1.0/virtManager/vmmenu.py
"suspend": bool(vm and vm.is_stoppable()),
"resume": bool(vm and vm.is_paused()),
"migrate": bool(vm and vm.is_stoppable()),
@@ -163,6 +167,8 @@ class VMActionMenu(_VMMenu):
@@ -160,6 +163,8 @@ class VMActionMenu(_VMMenu):
child.get_submenu().update_widget_states(vm)
if name in statemap:
child.set_sensitive(statemap[name])

View File

@ -4,7 +4,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -1256,11 +1256,34 @@ class vmmCreate(vmmGObjectUI):
@@ -1257,11 +1257,34 @@ class vmmCreate(vmmGObjectUI):
self.populate_os_type_model()
return
@ -39,7 +39,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
# 'show all OS' was clicked
# Get previous type to reselect it later
type_row = self._selected_os_row()
@@ -1625,7 +1648,10 @@ class vmmCreate(vmmGObjectUI):
@@ -1626,7 +1649,10 @@ class vmmCreate(vmmGObjectUI):
if extra:
extraargs += extra
if ks:
@ -51,7 +51,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
if extraargs:
self.guest.installer.extraargs = extraargs
@@ -2068,6 +2094,7 @@ class vmmCreate(vmmGObjectUI):
@@ -2069,6 +2095,7 @@ class vmmCreate(vmmGObjectUI):
dl = self.set_os_val(self.widget("install-os-type"), distro_type)
vl = self.set_os_val(self.widget("install-os-version"), distro_var)
self.set_distro_labels(dl, vl)

View File

@ -13,7 +13,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
from gi.repository import GObject
from gi.repository import Gtk
@@ -842,7 +844,7 @@ class vmmCreate(vmmGObjectUI):
@@ -843,7 +845,7 @@ class vmmCreate(vmmGObjectUI):
preferred = self.config.preferred_distros
variants = virtinst.OSDB.list_os(typename=_type, sortpref=preferred)
supportl = virtinst.OSDB.list_os(typename=_type, sortpref=preferred,
@ -22,7 +22,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
for v in variants:
supported = v in supportl or v.name == "generic"
@@ -1173,6 +1175,53 @@ class vmmCreate(vmmGObjectUI):
@@ -1174,6 +1176,53 @@ class vmmCreate(vmmGObjectUI):
return
self.start_detection(forward=forward)
@ -76,7 +76,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
def toggle_detect_os(self, src):
dodetect = src.get_active()
@@ -1185,6 +1234,8 @@ class vmmCreate(vmmGObjectUI):
@@ -1186,6 +1235,8 @@ class vmmCreate(vmmGObjectUI):
self.widget("install-os-version-entry").set_text("")
self.mediaDetected = False
self.detect_media_os()

View File

@ -3,7 +3,7 @@ Index: virt-manager-1.2.1/virtManager/create.py
===================================================================
--- virt-manager-1.2.1.orig/virtManager/create.py
+++ virt-manager-1.2.1/virtManager/create.py
@@ -877,7 +877,12 @@ class vmmCreate(vmmGObjectUI):
@@ -878,7 +878,12 @@ class vmmCreate(vmmGObjectUI):
if gtype is None:
# If none specified, prefer HVM so install options aren't limited
# with a default PV choice.

View File

@ -2,11 +2,11 @@ Reference: bnc#867749
When booted into the native kernel don't ask libvirt to make a
local Xen connection and likewise when booted into the Xen kernel
don't ask libvirt to connect to the local qemu.
Index: virt-manager-1.1.0/virtManager/engine.py
Index: virt-manager-1.2.1/virtManager/engine.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/engine.py
+++ virt-manager-1.1.0/virtManager/engine.py
@@ -227,9 +227,22 @@ class vmmEngine(vmmGObject):
--- virt-manager-1.2.1.orig/virtManager/engine.py
+++ virt-manager-1.2.1/virtManager/engine.py
@@ -226,9 +226,22 @@ class vmmEngine(vmmGObject):
if not uris:
return
logging.debug("About to connect to uris %s", uris)

View File

@ -4,10 +4,10 @@ This is not a normal situation on a suse distro. Split out required
libvirt packages (kvm vs xen). Only install those libvirt packages
for which the host is booted. This patch has a corresponding spec
file change (%define libvirt_kvm_packages and %define libvirt_xen_packages).
Index: virt-manager-1.2.0/setup.py
Index: virt-manager-1.2.1/setup.py
===================================================================
--- virt-manager-1.2.0.orig/setup.py
+++ virt-manager-1.2.0/setup.py
--- virt-manager-1.2.1.orig/setup.py
+++ virt-manager-1.2.1/setup.py
@@ -280,8 +280,11 @@ class configure(Command):
("prefix=", None, "installation prefix"),
("qemu-user=", None,
@ -45,10 +45,10 @@ Index: virt-manager-1.2.0/setup.py
if self.kvm_package_names is not None:
template += "hv_packages = %s\n" % self.kvm_package_names
if self.askpass_package_names is not None:
Index: virt-manager-1.2.0/virtcli/cliconfig.py
Index: virt-manager-1.2.1/virtcli/cliconfig.py
===================================================================
--- virt-manager-1.2.0.orig/virtcli/cliconfig.py
+++ virt-manager-1.2.0/virtcli/cliconfig.py
--- virt-manager-1.2.1.orig/virtcli/cliconfig.py
+++ virt-manager-1.2.1/virtcli/cliconfig.py
@@ -84,7 +84,8 @@ class _CLIConfig(object):
_get_param("preferred_distros", ""))
self.hv_packages = _split_list(_get_param("hv_packages", ""))
@ -59,10 +59,10 @@ Index: virt-manager-1.2.0/virtcli/cliconfig.py
self.default_graphics = _get_param("default_graphics", "spice")
self.default_hvs = _split_list(_get_param("default_hvs", ""))
Index: virt-manager-1.2.0/virtManager/config.py
Index: virt-manager-1.2.1/virtManager/config.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/config.py
+++ virt-manager-1.2.0/virtManager/config.py
--- virt-manager-1.2.1.orig/virtManager/config.py
+++ virt-manager-1.2.1/virtManager/config.py
@@ -165,7 +165,8 @@ class vmmConfig(object):
self.default_qemu_user = CLIConfig.default_qemu_user
self.preferred_distros = CLIConfig.preferred_distros
@ -73,11 +73,11 @@ Index: virt-manager-1.2.0/virtManager/config.py
self.askpass_package = CLIConfig.askpass_package
self.default_graphics_from_config = CLIConfig.default_graphics
self.default_hvs = CLIConfig.default_hvs
Index: virt-manager-1.2.0/virtManager/engine.py
Index: virt-manager-1.2.1/virtManager/engine.py
===================================================================
--- virt-manager-1.2.0.orig/virtManager/engine.py
+++ virt-manager-1.2.0/virtManager/engine.py
@@ -193,21 +193,18 @@ class vmmEngine(vmmGObject):
--- virt-manager-1.2.1.orig/virtManager/engine.py
+++ virt-manager-1.2.1/virtManager/engine.py
@@ -192,21 +192,18 @@ class vmmEngine(vmmGObject):
ret = None
try:

View File

@ -1,87 +0,0 @@
Reference: bnc#888173
Force the use of vm-install on s390. The viewer in virt-manager
and virt-viewer needs a graphics adapter defined in the VM to show
the display correctly. On s390 you can't have a graphics adapter
(you get the error 'No PCI buses available'). Vm-install gets
around this problem by starting an xterm window in which to run the
VM.
Index: virt-manager-1.1.0/virtManager/engine.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/engine.py
+++ virt-manager-1.1.0/virtManager/engine.py
@@ -27,6 +27,7 @@ import re
import Queue
import threading
import traceback
+import platform
import os
from subprocess import *
@@ -821,7 +822,7 @@ class vmmEngine(vmmGObject):
obj.connect("action-clone-domain", self._do_show_clone)
obj.connect("action-show-domain", self._do_show_vm)
obj.connect("action-show-preferences", self._do_show_preferences)
- obj.connect("action-show-create", self._do_show_create)
+ obj.connect("action-show-create", self._do_show_create_virtinstall)
obj.connect("action-show-create-vminstall", self._do_show_create_vminstall)
obj.connect("action-show-about", self._do_show_about)
obj.connect("action-show-host", self._do_show_host)
@@ -869,7 +870,20 @@ class vmmEngine(vmmGObject):
self.windowCreate = None
def _do_show_create_vminstall(self, src, uri):
- self._do_show_create(src, uri, True)
+ # When pop-down menu is selected
+ if platform.machine() == "s390x":
+ # For s390, the pop-down is virt-install
+ self._do_show_create(src, uri, False)
+ else:
+ self._do_show_create(src, uri, True)
+
+ def _do_show_create_virtinstall(self, src, uri):
+ # When 'Create a new virtual machine' button is selected
+ if platform.machine() == "s390x":
+ # For s390, the button is vm-install
+ self._do_show_create(src, uri, True)
+ else:
+ self._do_show_create(src, uri, False)
def _do_show_create(self, src, uri, use_vminstall=False):
if uri is None:
@@ -952,7 +966,10 @@ class vmmEngine(vmmGObject):
def show_domain_creator(self, uri):
self.show_manager()
- self._do_show_create(self.get_manager(), uri)
+ if platform.machine() == "s390x":
+ self._do_show_create(self.get_manager(), uri, True)
+ else:
+ self._do_show_create(self.get_manager(), uri, False)
def _find_vm_by_cli_str(self, uri, clistr):
Index: virt-manager-1.1.0/virtManager/vmmenu.py
===================================================================
--- virt-manager-1.1.0.orig/virtManager/vmmenu.py
+++ virt-manager-1.1.0/virtManager/vmmenu.py
@@ -21,6 +21,7 @@
from gi.repository import Gtk
from virtManager import config
+import platform
####################################################################
# Build toolbar new button menu (manager and details toolbar) #
@@ -33,8 +34,10 @@ def build_new_button_menu(widget, vminst
widget.set_menu(menu)
vminstallimg = Gtk.Image.new_from_icon_name(icon_name, Gtk.IconSize.MENU)
-
- vminstall = Gtk.ImageMenuItem.new_with_mnemonic(_("_Vm-install"))
+ if platform.machine() == "s390x":
+ vminstall = Gtk.ImageMenuItem.new_with_mnemonic(_("_Virt-install"))
+ else:
+ vminstall = Gtk.ImageMenuItem.new_with_mnemonic(_("_Vm-install"))
vminstall.set_image(vminstallimg)
vminstall.show()
vminstall.connect("activate", vminstall_cb)