[Kimchi-devel] [PATCH 1/2] Fix VM's network model template for Power systems.
Paulo Vital
pvital at linux.vnet.ibm.com
Fri Feb 28 19:52:45 UTC 2014
Setup the network model to 'spapr-vlan' by default in those old distro
vesions for new Power guests.
Also, setup the modern distro version for Power guests: RHEL7.0 and Fedora 19.
Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
---
src/kimchi/osinfo.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 8ce4110..a50daae 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -41,7 +41,7 @@ template_specs = {'x86': {'old': dict(common_spec, disk_bus='ide',
nic_model='virtio',
sound_model= 'ich6')},
'power': {'old': dict(common_spec, disk_bus='scsi',
- nic_model='rtl8139', cdrom_bus='scsi',
+ nic_model='spapr-vlan', cdrom_bus='scsi',
kbd_bus='usb', mouse_bus='usb'),
'modern': dict(common_spec, disk_bus='virtio',
nic_model='virtio',
@@ -49,9 +49,10 @@ template_specs = {'x86': {'old': dict(common_spec, disk_bus='ide',
mouse_bus='usb')}}
-modern_version_bases = {'debian': '6.0', 'ubuntu': '7.10', 'opensuse': '10.3',
- 'centos': '5.3', 'rhel': '6.0', 'fedora': '16',
- 'gentoo': '0'}
+modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
+ 'opensuse': '10.3', 'centos': '5.3',
+ 'rhel': '6.0', 'fedora': '16', 'gentoo': '0'},
+ 'power': {'rhel': '7.0', 'fedora': '19'}}
isolinks = {
@@ -97,9 +98,10 @@ def lookup(distro, version):
params['cdrom'] = isolinks.get(distro, {}).get(version, '')
arch = _get_arch()
- if distro in modern_version_bases:
+ if distro in modern_version_bases[arch]:
params['icon'] = 'images/icon-%s.png' % distro
- if LooseVersion(version) >= LooseVersion(modern_version_bases[distro]):
+ if LooseVersion(version) >= LooseVersion(
+ modern_version_bases[arch][distro]):
params.update(template_specs[arch]['modern'])
else:
params.update(template_specs[arch]['old'])
--
1.8.3.1
More information about the Kimchi-devel
mailing list