Add ppc64el support for 'virt-install --location' (Debian/Ubuntu)

The installation of Debian/Ubuntu for ppc64el (a.k.a. ppc64le on Fedora/RHEL)
fails with 'virt-install --location', as the arch dir and kernel filename
are not correct for this arch/distros.

This patch fixes it by adding checks for 'treeArch' and 'hvm_kernel_paths'.

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
This commit is contained in:
Mauricio Faria de Oliveira
2014-10-22 15:17:40 -02:00
committed by Cole Robinson
parent e7666390ff
commit 0dc334fa58

View File

@@ -888,6 +888,8 @@ class DebianDistro(Distro):
self._treeArch = "i386"
elif self.uri.count("amd64"):
self._treeArch = "amd64"
elif self.uri.count("ppc64el"):
self._treeArch = "ppc64el"
else:
self._treeArch = "i386"
@@ -905,7 +907,10 @@ class DebianDistro(Distro):
self._installer_name,
self._treeArch)
xenroot = "%s/netboot/xen/" % self._prefix
self._hvm_kernel_paths = [(hvmroot + "linux", hvmroot + "initrd.gz")]
if self._treeArch == "ppc64el":
self._hvm_kernel_paths = [(hvmroot + "vmlinux", hvmroot + "initrd.gz")]
else:
self._hvm_kernel_paths = [(hvmroot + "linux", hvmroot + "initrd.gz")]
self._xen_kernel_paths = [(xenroot + "vmlinuz",
xenroot + "initrd.gz")]