Bug#873714: virt-install --location fails for s390x guests
Viktor Mihajlovski <[email protected]>
| Newsgroups | gmane.linux.debian.ports.s390 |
|---|---|
| Message-ID | <2029c1de-4970-e826-a9a2-1d37ea124f65__28778.1379571699$1504093532$gmane$org@linux.vnet.ibm.com> |
Package: virt-manager Version: 1:1.4.0-5 Tags: patch, stretch, d-i X-Debbugs-CC: [email protected] Dear Maintainer, when I try to install a s390x KVM guest using the following command virt-install --name testing --ram 1024 --disk /var/lib/libvirt/images/testing.qcow2,bus=virtio --location http://ftp.de.debian.org/debian/dists/testing/main/installer-s390x I get the following error message: ====================================== ERROR Error validating install location: Could not find an installable distribution at 'http://ftp.de.debian.org/debian/dists/testing/main/installer-s390x' The location must be the root directory of an install tree. See virt-install man page for various distro examples ======================================= even though the location URL is correct. This is because the install files location differs from i386/amd64. The attached patch - also available upstream - will fix this (for Debian and Ubuntu). -- Kind Regards Viktor Mihajlovski
virt-inst-media.patch
(text/x-patch, 1.6 KB)
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -1106,6 +1106,12 @@
kernel_basename = "linux"
if self._treeArch in ["ppc64el"]:
kernel_basename = "vmlinux"
+
+ if self._treeArch == "s390x":
+ hvmroot = "%s/generic/" % self._url_prefix
+ kernel_basename = "kernel.%s" % self.name.lower()
+ initrd_basename = "initrd.%s" % self.name.lower()
+
self._hvm_kernel_paths = [
(hvmroot + kernel_basename, hvmroot + initrd_basename)]
@@ -1124,7 +1130,11 @@
return False
filename = "%s/MANIFEST" % self._url_prefix
- regex = ".*%s.*" % self._installer_dirname
+ if self.arch == "s390x":
+ regex = ".*generic/kernel\.%s.*" % self.name.lower()
+ else:
+ regex = ".*%s.*" % self._installer_dirname
+
if not self._fetchAndMatchRegex(filename, regex):
logging.debug("Regex didn't match, not a %s distro", self.name)
return False
@@ -1173,7 +1183,10 @@
if self.fetcher.hasFile("%s/MANIFEST" % self._url_prefix):
# For regular trees
filename = "%s/MANIFEST" % self._url_prefix
- regex = ".*%s.*" % self._installer_dirname
+ if self.arch == "s390x":
+ regex = ".*generic/kernel\.%s.*" % self.name.lower()
+ else:
+ regex = ".*%s.*" % self._installer_dirname
elif self.fetcher.hasFile("install/netboot/version.info"):
# For trees based on ISO's
self._url_prefix = "install"