When creating a VM from template, add PPC console configuration to xml.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/vmtemplate.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/kimchi/vmtemplate.py b/src/kimchi/vmtemplate.py
index 4e5806f..20df6c2 100644
--- a/src/kimchi/vmtemplate.py
+++ b/src/kimchi/vmtemplate.py
@@ -370,6 +370,16 @@ class VMTemplate(object):
</devices>
</domain>
""" % params
+
+ # Adding PPC console configuration
+ if params['arch'] in ['ppc', 'ppc64']:
+ ppc_console = """<memballoon model='virtio' />
+ <console type='pty'>
+ <target type='serial' port='1'/>
+ <address type='spapr-vio' reg='0x30001000'/>
+ </console>"""
+ xml = xml.replace("<memballoon model='virtio' />",
ppc_console)
+
return xml
def validate(self):
--
1.9.3