From fcc3f6ee986c1166c001774052c05b5d974593ea Mon Sep 17 00:00:00 2001 From: Clark Laughlin Date: Tue, 7 Apr 2015 16:31:47 +0000 Subject: [PATCH] Add support for arm64 images This patch enables proper support for arm64 images by disabling VNC support and adding several properties to the image in glance that are necessary to boot correctly: hw_cdrom_bus=virtio hw_machine_type=virt os_command_line='console=ttyAMA0' Change-Id: I68c9a5e0e083af2f92875c3bdf70df750f6e4d8f --- functions | 4 ++++ lib/nova_plugins/hypervisor-libvirt | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/functions b/functions index 4dc20e7f23..2078db1e7c 100644 --- a/functions +++ b/functions @@ -287,6 +287,10 @@ function upload_image { img_property="--property hw_cdrom_bus=scsi" fi + if is_arch "aarch64"; then + img_property="--property hw_machine_type=virt --property hw_cdrom_bus=virtio --property os_command_line='console=ttyAMA0'" + fi + if [ "$container_format" = "bare" ]; then if [ "$unpack" = "zcat" ]; then openstack --os-token $token --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image create "$image_name" $img_property --public --container-format=$container_format --disk-format $disk_format < <(zcat --force "${image}") diff --git a/lib/nova_plugins/hypervisor-libvirt b/lib/nova_plugins/hypervisor-libvirt index 4d1eb6cdcb..a6a87f9164 100644 --- a/lib/nova_plugins/hypervisor-libvirt +++ b/lib/nova_plugins/hypervisor-libvirt @@ -54,6 +54,12 @@ function configure_nova_hypervisor { iniset $NOVA_CONF DEFAULT vnc_enabled "false" fi + # arm64-specific configuration + if is_arch "aarch64"; then + # arm64 architecture currently does not support graphical consoles. + iniset $NOVA_CONF DEFAULT vnc_enabled "false" + fi + ENABLE_FILE_INJECTION=$(trueorfalse False ENABLE_FILE_INJECTION) if [[ "$ENABLE_FILE_INJECTION" = "True" ]] ; then # When libguestfs is available for file injection, enable using