Files
kolla/docker/nova/nova-libvirt/Dockerfile.j2
Michael Still e63296bdb4 Re-enable SPICE support on Debian.
The move to Debian Trixie for Kolla master accidentally broke SPICE
consoles for Nova (both Horizon and spice-direct). This is because Debian
and Ubuntu now package the SPICE support in a separate package. Without
this package, an attempt to start an instance in Nova requiring SPICE will
result in messages like this in the nova-libvirt logs:

    libvirt.libvirtError: unsupported configuration: spice graphics are
    not supported with this QEMU

And the instance will enter an error state.

The fix is to install the `qemu-system-modules-spice` package as well in
the nova-libvirt image. This re-arrangement of packages does not affect
Debian Bookworm unless backports are explicitly enabled later.

Closes-Bug: #2138186
Change-Id: Ib4ced4a04353b9c11c6f0abb7cfa91001b239e53
Signed-off-by: Michael Still <mikal@stillhq.com>
2026-01-15 09:28:13 +11:00

98 lines
2.6 KiB
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block nova_libvirt_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='nova', groups='qemu') }}
{% if base_package_type == 'rpm' %}
{{ macros.enable_extra_repos(['ceph', 'crb', 'epel', 'openvswitch']) }}
{% set nova_libvirt_packages = [
'ceph-common',
'cyrus-sasl-md5',
'cyrus-sasl-scram',
'libguestfs',
'libvirt-client',
'libvirt-daemon',
'libvirt-daemon-config-nwfilter',
'libvirt-daemon-driver-nwfilter',
'libvirt-daemon-driver-nodedev',
'openvswitch${KOLLA_RPM_OVS_VERSION}',
'qemu-img',
'qemu-kvm',
'swtpm',
] %}
{% if base_arch == 'x86_64' %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'edk2-ovmf'
] %}
{% elif base_arch == 'aarch64' %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'edk2-aarch64'
] %}
{% endif %}
{% elif base_package_type == 'deb' %}
{% set nova_libvirt_packages = [
'ceph-common',
'ebtables',
'libsasl2-modules-gssapi-mit',
'libvirt-clients',
'libvirt-daemon-system',
'mdevctl',
'openvswitch-switch',
'pm-utils',
'python3-cephfs',
'python3-rados',
'python3-rbd',
'qemu-block-extra',
'qemu-system',
'qemu-system-modules-spice',
'qemu-utils',
'sasl2-bin',
'swtpm',
'swtpm-tools',
'tpm2-tools',
'trousers'
] %}
{% if base_arch == "aarch64" %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'qemu-efi-aarch64'
] %}
{% elif base_arch == "x86_64" %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'ovmf',
] %}
{% endif %}
{% if base_distro in ['debian'] %}
{% set nova_libvirt_packages = nova_libvirt_packages + [
'usermode'
] %}
{% endif %}
{% endif %}
{{ macros.install_packages(nova_libvirt_packages | customizable("packages")) }}
{% if base_package_type == 'deb' %}
RUN rm -f /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/autostart/default.xml
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 644 /usr/local/bin/kolla_extend_start
{{ macros.kolla_patch_sources() }}
{% block nova_libvirt_footer %}{% endblock %}
{% block footer %}{% endblock %}