From fde6f527c3fb9e2ee90791149a8aa9906d884b74 Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Fri, 19 Feb 2016 16:02:31 -0700 Subject: [PATCH] On Liberty aarch64, enable vnc using vga driver disabling usb input. Liberty didn't seem to like the disable_vnc flag to Nova on aarch64 that we relied on so that images would boot. Fortuitously, qemu/libvirt have been upgraded enough so that you can actually attach a VGA adapter to an aarch64 KVM qemu instance. So we do that, and now we mark images with a specific flag that says to use the vga display driver instead of the 'cirrus' default, which qemu/libvirt aarch64 does *not* support. Probably I should just find a way to fix the vnc disablement :). --- setup-basic-aarch64.sh | 12 ++++++++++++ setup-compute.sh | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/setup-basic-aarch64.sh b/setup-basic-aarch64.sh index 4314975..565222b 100755 --- a/setup-basic-aarch64.sh +++ b/setup-basic-aarch64.sh @@ -321,6 +321,9 @@ glance image-update --property kernel_args="console=ttyAMA0 root=/dev/sda" $TRUS glance image-update --property kernel_id=${KERNEL_ID} $TRUSTY_SERVER_ARG glance image-update --property ramdisk_id=${RAMDISK_ID} $TRUSTY_SERVER_ARG glance image-update --property root_device_name=/dev/vda1 $TRUSTY_SERVER_ARG +if [ $OSVERSION -ge $OSLIBERTY ]; then + glance image-update --property hw_video_model=vga $TRUSTY_SERVER_ARG +fi echo "*** Creating image with cloud-guest-utils AND multi-nic support ..." @@ -398,6 +401,9 @@ glance image-update --property kernel_args="console=ttyAMA0 root=/dev/sda" $TRUS glance image-update --property kernel_id=${KERNEL_ID} $TRUSTY_SERVER_MN_ARG glance image-update --property ramdisk_id=${RAMDISK_ID} $TRUSTY_SERVER_MN_ARG glance image-update --property root_device_name=/dev/vda1 $TRUSTY_SERVER_MN_ARG +if [ $OSVERSION -ge $OSLIBERTY ]; then + glance image-update --property hw_video_model=vga $TRUSTY_SERVER_MN_ARG +fi if [ ${BUILD_AARCH64_FROM_CORE} = 1 ] ; then echo "*** Importing non-ssh image ..." @@ -414,6 +420,9 @@ if [ ${BUILD_AARCH64_FROM_CORE} = 1 ] ; then glance image-update --property kernel_id=${KERNEL_ID} $IMAGEARG glance image-update --property ramdisk_id=${RAMDISK_ID} $IMAGEARG glance image-update --property root_device_name=/dev/vda1 $IMAGEARG + if [ $OSVERSION -ge $OSLIBERTY ]; then + glance image-update --property hw_video_model=vga $IMAGEARG + fi echo "*** Importing image with sshd ..." @@ -429,6 +438,9 @@ if [ ${BUILD_AARCH64_FROM_CORE} = 1 ] ; then glance image-update --property kernel_id=${KERNEL_ID} $IMAGEARG glance image-update --property ramdisk_id=${RAMDISK_ID} $IMAGEARG glance image-update --property root_device_name=/dev/vda1 $IMAGEARG + if [ $OSVERSION -ge $OSLIBERTY ]; then + glance image-update --property hw_video_model=vga $IMAGEARG + fi fi umount mnt diff --git a/setup-compute.sh b/setup-compute.sh index b71e4d4..a8bae09 100755 --- a/setup-compute.sh +++ b/setup-compute.sh @@ -123,7 +123,12 @@ crudini --set /etc/nova/nova.conf $VNCSECTION \ # ARCH=`uname -m` if [ "$ARCH" = "aarch64" ] ; then - crudini --set /etc/nova/nova.conf $VNCSECTION vnc_enabled False + if [ $OSVERSION -le $OSKILO ]; then + crudini --set /etc/nova/nova.conf $VNCSECTION vnc_enabled False + else + # QEMU/Nova on Liberty gives aarch64 a vga adapter/bus. + crudini --set /etc/nova/nova.conf $VNCSECTION vnc_enabled True + fi else crudini --set /etc/nova/nova.conf $VNCSECTION vnc_enabled True fi @@ -142,6 +147,11 @@ crudini --set /etc/nova/nova-compute.conf libvirt virt_type kvm if [ "$ARCH" = "aarch64" ] ; then crudini --set /etc/nova/nova-compute.conf libvirt cpu_mode custom crudini --set /etc/nova/nova-compute.conf libvirt cpu_model host + + if [ $OSVERSION -ge $OSLIBERTY ]; then + crudini --set /etc/nova/nova-compute.conf libvirt video_type vga + crudini --set /etc/nova/nova-compute.conf libvirt use_usb_tablet False + fi fi if [ ${OSCODENAME} = "juno" ]; then -- GitLab