
On 10/30/2014 02:44 PM, Rodrigo Trujillo wrote:
When creating a VM from template, add PPC console configuration to xml.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo@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) +
When params['arch'] will be set? Just this code does not change the Template for a PPC host.
return xml
def validate(self):