lib.sh: AArch64: Use VGA video mode for guests 79/39079/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Tue, 11 Jul 2017 16:35:40 +0000 (18:35 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 11 Aug 2017 11:27:07 +0000 (11:27 +0000)
On AArch64, there is no Cirrus video, so use VGA mode instead.

On Debian systems, also fix a missing link for vgabios-stdvga.bin.
Based on previous Armband work from [1].

[1] https://github.com/opnfv/armband/blob/danube.2.0/patches/fuel-library/
    arm64-bug-fixes/0002-Install-vgabios-and-link-for-aarch64.patch

Change-Id: Ia84ea5536b68e14993b719488375b0041183a767
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/deploy.sh
mcp/scripts/lib.sh

index 7b3bf54..a39d494 100755 (executable)
@@ -283,6 +283,12 @@ pushd "${DEPLOY_DIR}" > /dev/null
 [ -n "$(command -v yum)" ] && sudo yum install -y \
   git make rsync genisoimage curl virt-install qemu-kvm
 
+if [ "$(uname -i)" = "aarch64" ]; then
+  [ -n "$(command -v apt-get)" ] && sudo apt-get install -y vgabios && \
+  sudo ln -sf /usr/share/vgabios/vgabios.bin /usr/share/qemu/vgabios-stdvga.bin
+  [ -n "$(command -v yum)" ] && sudo yum install -y vgabios
+fi
+
 # Check scenario file existence
 if [[ ! -f  ../config/scenario/${DEPLOY_TYPE}/${DEPLOY_SCENARIO}.yaml ]]; then
     notify "[WARN] ${DEPLOY_SCENARIO}.yaml not found! \
index 33dba3c..8d45100 100644 (file)
@@ -78,6 +78,13 @@ create_vms() {
     net_args="${net_args} --network ${net_type}=${net},model=virtio"
   done
 
+  # AArch64: prepare arch specific arguments
+  local virt_extra_args=""
+  if [ "$(uname -i)" = "aarch64" ]; then
+    # No Cirrus VGA on AArch64, use vga std
+    virt_extra_args="$virt_extra_args --video=vga"
+  fi
+
   # create vms with specified options
   for node in "${vnodes[@]}"; do
     # shellcheck disable=SC2086
@@ -88,7 +95,8 @@ create_vms() {
     --os-type linux --os-variant none \
     --boot hd --vnc --console pty --autostart --noreboot \
     --disk path="$(pwd)/images/mcp_${node}.iso",device=cdrom \
-    --noautoconsole
+    --noautoconsole \
+    ${virt_extra_args}
   done
 }