126 lines
5.1 KiB
Diff
126 lines
5.1 KiB
Diff
|
Reference: bnc#869024
|
||
|
Add s390x support
|
||
|
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
|
||
|
--- virt-manager-1.2.1/virtinst/urlfetcher.py.orig 2015-09-10 15:05:22.973065632 -0600
|
||
|
+++ virt-manager-1.2.1/virtinst/urlfetcher.py 2015-09-10 15:07:15.127199219 -0600
|
||
|
@@ -371,6 +371,12 @@ def _distroFromSUSEContent(fetcher, arch
|
||
|
arch = "x86_64"
|
||
|
elif cbuf.find("i586") != -1:
|
||
|
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:
|
||
|
@@ -383,6 +389,10 @@ def _distroFromSUSEContent(fetcher, arch
|
||
|
dclass = SLEDDistro
|
||
|
if distro_version is None:
|
||
|
distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
|
||
|
+ elif re.match(".*Open Enterprise Server*", distribution[1]):
|
||
|
+ dclass = SLESDistro
|
||
|
+ if distro_version is None:
|
||
|
+ distro_version = ['VERSION', distribution[1].strip().rsplit(' ')[4]]
|
||
|
elif re.match(".*openSUSE.*", distribution[1]):
|
||
|
dclass = OpensuseDistro
|
||
|
if distro_version is None:
|
||
|
@@ -936,16 +946,23 @@ 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))
|
||
|
-
|
||
|
- # Matches Opensuse > 10.2 and sles 10
|
||
|
- self._xen_kernel_paths = [("boot/%s/vmlinuz-xen" % self.arch,
|
||
|
- "boot/%s/initrd-xen" % self.arch)]
|
||
|
+ 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 and ppc
|
||
|
+ 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)]
|
||
|
|
||
|
def _variantFromVersion(self):
|
||
|
distro_version = self.version_from_content[1].strip()
|
||
|
@@ -973,6 +990,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):
|