[Kimchi-devel] [PATCH] Add PPC console configuration to guest XML

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Thu Oct 30 16:44:40 UTC 2014


When creating a VM from template, add PPC console configuration to xml.

Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo at 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 cfc46f6..d18fc59 100644
--- a/src/kimchi/vmtemplate.py
+++ b/src/kimchi/vmtemplate.py
@@ -409,6 +409,16 @@ drive=drive-%(bus)s0-1-0,id=%(bus)s0-1-0'/>
           </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




More information about the Kimchi-devel mailing list