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 @@ -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: @@ -940,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() @@ -977,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):