[Kimchi-devel] [PATCH v2] Set default VM template memory to 2048 in Power
dhbarboza82 at gmail.com
dhbarboza82 at gmail.com
Thu Aug 6 17:29:16 UTC 2015
From: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
There are no official Kimchi support for VMs running with under 2048Mb
of RAM in Power systems. This patch set the default memory of templates
created in Power hosts to 2048, instead of 1280.
This patch also adds the default memory for x86_64 arch to the
template_specs dict of osinfo.py instead of hardcoding the value in the
_get_tmpl_defaults() function.
Signed-off-by: Daniel Henrique Barboza <dhbarboza82 at gmail.com>
---
src/kimchi/osinfo.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 78eb828..f8ab7da 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -35,37 +35,39 @@ SUPPORTED_ARCHS = {'x86': ('i386', 'i686', 'x86_64'),
template_specs = {'x86': {'old': dict(disk_bus='ide',
- nic_model='e1000', sound_model='ich6'),
+ nic_model='e1000', sound_model='ich6',
+ memory=1024),
'modern': dict(disk_bus='virtio',
nic_model='virtio',
- sound_model='ich6')},
+ sound_model='ich6',
+ memory=1024)},
'power': {'old': dict(disk_bus='scsi',
nic_model='spapr-vlan',
cdrom_bus='scsi',
kbd_type="kbd",
kbd_bus='usb', mouse_bus='usb',
- tablet_bus='usb', memory=1280),
+ tablet_bus='usb', memory=2048),
'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)},
+ memory=2048)},
'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),
+ memory=2048),
'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)}}
+ memory=2048)}}
custom_specs = {'fedora': {'22': dict(video_model='qxl')}}
@@ -107,7 +109,6 @@ def _get_tmpl_defaults():
# Create dict with default values
tmpl_defaults = defaultdict(dict)
tmpl_defaults['main']['networks'] = ['default']
- tmpl_defaults['main']['memory'] = 1024
tmpl_defaults['storage']['pool'] = 'default'
tmpl_defaults['storage']['disk.0'] = {'size': 10, 'format': 'qcow2'}
tmpl_defaults['processor']['cpus'] = 1
--
2.4.3
More information about the Kimchi-devel
mailing list