Commit 55ec6048 authored by David Johnson's avatar David Johnson

Fixup aarch64 Pike video consoles to use virtio.

(This support seems not to have hit packages yet, but hopefully will
before next release.)
parent 33b1df5e
--- /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py~ 2017-12-01 11:45:09.000000000 -0700
+++ /usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py 2018-01-02 15:58:12.296030000 -0700
@@ -4326,6 +4326,7 @@
if (virt_type not in ("lxc", "uml", "parallels", "xen") or
(virt_type == "xen" and guest.os_type == fields.VMMode.HVM)):
+ if caps.host.cpu.arch not in ('aarch64'):
guest.features.append(vconfig.LibvirtConfigGuestFeatureACPI())
guest.features.append(vconfig.LibvirtConfigGuestFeatureAPIC())
@@ -4354,7 +4355,7 @@
allowed=ALLOWED_QEMU_SERIAL_PORTS, virt_type=virt_type)
def _add_video_driver(self, guest, image_meta, flavor):
- VALID_VIDEO_DEVICES = ("vga", "cirrus", "vmvga", "xen", "qxl")
+ VALID_VIDEO_DEVICES = ("vga", "cirrus", "vmvga", "xen", "qxl",'virtio')
video = vconfig.LibvirtConfigGuestVideo()
# NOTE(ldbragst): The following logic sets the video.type
# depending on supported defaults given the architecture,
@@ -4367,6 +4367,10 @@
video.type = 'xen'
elif CONF.libvirt.virt_type == 'parallels':
video.type = 'vga'
+ elif guestarch in (fields.Architecture.AARCH64):
+ # NOTE(kevinz): Only virtio device type is supported by AARCH64
+ # so use 'virtio' instead when running on AArch64 hardware.
+ video.type = 'virtio'
elif guestarch in (fields.Architecture.PPC,
fields.Architecture.PPC64,
fields.Architecture.PPC64LE):
--- /usr/lib/python2.7/dist-packages/nova/objects/fields.py~ 2017-11-14 18:12:29.000000000 -0700
+++ /usr/lib/python2.7/dist-packages/nova/objects/fields.py 2018-01-02 16:07:10.124030000 -0700
@@ -546,7 +546,7 @@
VMVGA = "vmvga"
XEN = "xen"
- ALL = (CIRRUS, QXL, VGA, VMVGA, XEN)
+ ALL = (CIRRUS, QXL, VGA, VMVGA, XEN,'virtio')
class VIFModel(BaseNovaEnum):
--- /usr/lib/python2.7/dist-packages/nova/conf/compute.py~ 2017-11-14 18:12:29.000000000 -0700
+++ /usr/lib/python2.7/dist-packages/nova/conf/compute.py 2018-01-02 15:40:02.228030000 -0700
@@ -301,7 +301,7 @@
Unused unresized base images younger than this will not be removed.
"""),
cfg.StrOpt('pointer_model',
- default='usbtablet',
+ default=None,
choices=[None, 'ps2mouse', 'usbtablet'],
help="""
Generic property to specify the pointer type.
......@@ -242,8 +242,13 @@ if [ "$ARCH" = "aarch64" ] ; then
if [ $OSVERSION -ge $OSLIBERTY -a $OSVERSION -le $OSMITAKA ]; then
crudini --set /etc/nova/nova-compute.conf libvirt video_type vga
crudini --set /etc/nova/nova-compute.conf libvirt use_usb_tablet False
elif [ $OSVERSIONN -gt $OSMITAKA ]; then
elif [ $OSVERSION -gt $OSMITAKA -a $OSVERSION -lt $OSPIKE ]; then
crudini --set /etc/nova/nova-compute.conf libvirt video_type vga
crudini --set /etc/nova/nova-compute.conf libvirt use_usb_tablet False
crudini --set /etc/nova/nova-compute.conf DEFAULT pointer_model ps2mouse
elif [ $OSVERSION -eq $OSPIKE ]; then
patch -d / -p0 < $DIRNAME/etc/nova-pike-aarch64-virtio-video.patch
crudini --set /etc/nova/nova-compute.conf libvirt video_type virtio
crudini --set /etc/nova/nova-compute.conf DEFAULT pointer_model ps2mouse
fi
fi
......
......@@ -1154,6 +1154,12 @@ EOF
fi
su -s /bin/sh -c "nova-manage db sync" nova
# For aarch64 on Pike, we start using the virtio driver, but we
# still have to patch it.
if [ $OSVERSION -eq $OSPIKE ]; then
patch -d / -p0 < $DIRNAME/etc/nova-pike-aarch64-virtio-video.patch
fi
service_restart memcached
service_restart nova-api
service_enable nova-api
......
......@@ -100,7 +100,6 @@ if [ ! $? -eq 0 ]; then
fi
IMAGEID=`glance image-list | awk "/ ${_imgname} / { print \\$2 }"`
glance image-update --property kernel_args=console=ttyAMA0 $IMAGEID
glance image-update --property hw_video_model=vga $IMAGEID
glance image-update --property root_device_name=/dev/vda1 $IMAGEID
glance image-create --name ${_imgname}-vmlinuz --progress --file ${_imgfile}-vmlinuz --disk-format aki --container-format aki
KERNELID=`glance image-list | awk "/ ${_imgname}-vmlinuz / { print \\$2 }"`
......@@ -109,6 +108,11 @@ glance image-create --name ${_imgname}-initrd --progress --file ${_imgfile}-init
RAMDISKID=`glance image-list | awk "/ ${_imgname}-initrd / { print \\$2 }"`
glance image-update --property ramdisk_id=$RAMDISKID $IMAGEID
EOF
if [ $OSVERSION -lt $OSPIKE ]; then
cat <<'EOF' >> $IMAGEUPLOADCMDFILE
glance image-update --property hw_video_model=vga $IMAGEID
EOF
fi
}
upload_image() {
......@@ -132,7 +136,9 @@ upload_image() {
fi
IMAGEID=`glance image-list | awk "/ ${_imgname} / { print \\$2 }"`
glance image-update --property kernel_args=console=ttyAMA0 $IMAGEID
glance image-update --property hw_video_model=vga $IMAGEID
if [ $OSVERSION -lt $OSPIKE ]; then
glance image-update --property hw_video_model=vga $IMAGEID
fi
glance image-update --property root_device_name=/dev/vda1 $IMAGEID
glance image-create --name ${_imgname}-vmlinuz --progress --file ${_imgfile}-vmlinuz --disk-format aki --container-format aki
KERNELID=`glance image-list | awk "/ ${_imgname}-vmlinuz / { print \\$2 }"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment