summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2017-09-06 13:17:26 -0400
committerDan Radez <dradez@redhat.com>2017-09-06 23:20:26 -0400
commit9fa20a64cab555031ddac4238e33ccb5369e676d (patch)
tree95492aea21f0bd6118c842a7ca2a3e15fe4faeb3
parent27018324387d4ef0efa908b315403a636f92de55 (diff)
Conditionalize VM console arg based on arch
Change-Id: Ide9159e5ba7d5388c7bf62bf865b0015422e9159 Signed-off-by: Dan Radez <dradez@redhat.com>
-rw-r--r--apex/undercloud/undercloud.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/apex/undercloud/undercloud.py b/apex/undercloud/undercloud.py
index da695f5b..1cdadbc7 100644
--- a/apex/undercloud/undercloud.py
+++ b/apex/undercloud/undercloud.py
@@ -10,6 +10,7 @@
import libvirt
import logging
import os
+import platform
import shutil
import subprocess
import time
@@ -57,11 +58,13 @@ class Undercloud:
networks = ['admin']
if self.external_net:
networks.append('external')
+ console = 'ttyAMA0' if platform.machine() == 'aarch64' else 'ttyS0'
+
self.vm = vm_lib.create_vm(name='undercloud',
image=self.volume,
baremetal_interfaces=networks,
direct_boot='overcloud-full',
- kernel_args=['console=ttyS0',
+ kernel_args=['console={}'.format(console),
'root=/dev/sda'],
default_network=True,
template_dir=self.template_path)