From ffaf585d0f05ccd9123459bb0cdf345af5b09573 Mon Sep 17 00:00:00 2001 From: chenxing Date: Mon, 16 Sep 2019 14:46:41 +0800 Subject: nova-libvirt: add UEFI packages to support UEFI instances MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix inability to run UEFI-based images/instances by installing UEFI packages also in nova-libvirt image which is not based on nova-base. Includes support for C8. Backport below Train w/o C8. Closes-Bug: #1814552 Co-authored-by: Marcin Juszkiewicz Co-authored-by: Radosław Piliszek Change-Id: I1d5cd3d9af98444acac5bedd7daeaa6c6673dcd6 (cherry picked from commit 15b68c15c1dd0c2df1cc49b550f2fa03a4c65e8e) --- docker/nova/nova-libvirt/Dockerfile.j2 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'docker/nova') diff --git a/docker/nova/nova-libvirt/Dockerfile.j2 b/docker/nova/nova-libvirt/Dockerfile.j2 index 9fb812395..1e74ba645 100644 --- a/docker/nova/nova-libvirt/Dockerfile.j2 +++ b/docker/nova/nova-libvirt/Dockerfile.j2 @@ -31,6 +31,28 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% endif %} + {% if base_arch == 'x86_64' %} + {% if base_distro_tag.startswith('7') %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'OVMF' + ] %} + {% else %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'edk2-ovmf' + ] %} + {% endif %} + {% elif base_arch == 'aarch64' %} + {% if base_distro_tag.startswith('7') %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'AAVMF' + ] %} + {% else %} + {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'edk2-aarch64' + ] %} + {% endif %} + {% endif %} + {% elif base_package_type == 'deb' %} {% set nova_libvirt_packages = [ @@ -54,6 +76,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build ] %} {% elif base_arch == "x86_64" %} {% set nova_libvirt_packages = nova_libvirt_packages + [ + 'ovmf', 'qemu-kvm' ] %} {% endif %} @@ -78,6 +101,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml +{% elif base_package_type == 'rpm' %} + + {% if base_arch == 'x86_64' and base_distro_tag.startswith('7') %} +# NOTE(jeffrey4l): for x86_64, nova will validate the existence of /usr/share/OVMF/OVMF_CODE.fd +RUN ln -sf /usr/share/OVMF/OVMF_CODE.secboot.fd /usr/share/OVMF/OVMF_CODE.fd + {% endif %} + {% endif %} COPY extend_start.sh /usr/local/bin/kolla_extend_start -- cgit v1.2.3