There is a bug in the osinfo.py when Kimchi generates templates for ppc
guests. The amount of memory will always be 1280, in other other, it is
overwriting the value set in src/template.conf.
This patch fixes this problem and sets the minimal memory for ppc guests
as 2048, because there are issues reported by users that 1280 is not
sufficient and cause installation hangs.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/osinfo.py | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 67d85be..5c315ea 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -43,28 +43,26 @@ template_specs = {'x86': {'old':
dict(disk_bus='ide',
cdrom_bus='scsi',
kbd_type="kbd",
kbd_bus='usb', mouse_bus='usb',
- tablet_bus='usb', memory=1280),
+ tablet_bus='usb'),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="kbd",
- mouse_bus='usb',
tablet_bus='usb',
- memory=1280)},
+ mouse_bus='usb',
tablet_bus='usb')},
'ppc64le': {'old': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="keyboard",
- mouse_bus='usb',
tablet_bus='usb',
- memory=1280),
+ mouse_bus='usb',
tablet_bus='usb'),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
cdrom_bus='scsi',
kbd_bus='usb',
kbd_type="keyboard",
- mouse_bus='usb',
tablet_bus='usb',
- memory=1280)}}
+ mouse_bus='usb',
+ tablet_bus='usb')}}
modern_version_bases = {'x86': {'debian': '6.0',
'ubuntu': '7.10',
@@ -185,6 +183,10 @@ def lookup(distro, version):
if params["arch"] == "ppc64le":
params["arch"] = "ppc64"
+ # set up minimal default amount of memory for powerpc guests
+ if params["arch"] in ("ppc", "ppc64") and
params["memory"] < 2048:
+ params["memory"] = 2048
+
if distro in modern_version_bases[arch]:
if LooseVersion(version) >= LooseVersion(
modern_version_bases[arch][distro]):
--
2.1.0