[Kimchi-devel] [PATCH] PPC: Templates have memory always set to 1280. Set minimal memory to 2048

Aline Manera alinefm at linux.vnet.ibm.com
Tue May 12 14:55:55 UTC 2015



On 12/05/2015 02:46, Rodrigo Trujillo wrote:
> 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 at 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')},

Why are you removing the setting for x86?

>                     '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')}}
>

You just need to update the values above to 2048 instead of removing them.

>   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
> +

It is not needed! The values come from the defaults dicts specified above.

>       if distro in modern_version_bases[arch]:
>           if LooseVersion(version) >= LooseVersion(
>                   modern_version_bases[arch][distro]):




More information about the Kimchi-devel mailing list