[Kimchi-devel] [PATCH] [Kimchi] fix for issue #1049

sureshab at linux.vnet.ibm.com sureshab at linux.vnet.ibm.com
Tue Oct 4 13:01:36 UTC 2016


From: Suresh Babu Angadi <sureshab at in.ibm.com>

when running on s390x, create template should add
default console - 'virtio'.

fix for the patch: 
  [Kimchi-devel] [PATCH v3] [Kimchi 1/2] added 'console' parameter to templates api for s390x

since 'console' is not read from template.conf file, it
should be added directly to defaults dictionary, which is
used for template creation


Signed-off-by: Suresh Babu Angadi <sureshab at in.ibm.com>
---
 osinfo.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/osinfo.py b/osinfo.py
index ff490b2..1527896 100644
--- a/osinfo.py
+++ b/osinfo.py
@@ -172,10 +172,6 @@ def _get_tmpl_defaults():
     tmpl_defaults['processor']['maxvcpus'] = 1
     tmpl_defaults['graphics'] = {'type': 'vnc', 'listen': '127.0.0.1'}
 
-    # for s390x architecture, set default console as sclp
-    if host_arch in ['s390x', 's390']:
-        tmpl_defaults['console'] = 'virtio'
-
     default_config = ConfigObj(tmpl_defaults)
 
     # Load template configuration file
@@ -201,6 +197,10 @@ def _get_tmpl_defaults():
     defaults['memory']['current'] = int(defaults['memory']['current'])
     defaults['memory']['maxmemory'] = int(defaults['memory']['maxmemory'])
 
+    # for s390x architecture, set default console as virtio
+    if is_on_s390x:
+        defaults['console'] = 'virtio'
+
     # Parse storage section to get disks values
     storage_section = default_config.pop('storage')
     defaults['disks'] = []
-- 
1.8.3.1




More information about the Kimchi-devel mailing list