Libvirt
The libvirt image is built from ContainerFiles/libvirt. This image has no dedicated CVE script; security updates are included during the build.
This container packages the Libvirt service for use in the stack. The build installs the required packages, applies security updates and configuration, and prepares the service for integration.
The build accepts an OpenStack release selector so the image can be tagged and
audited against the stack release it is intended to serve. Supported values are
unmaintained/2025.1 for Epoxy and stable/2026.1 for Gazpacho.
Epoxy uses the standard Debian Bookworm virtualization packages. Gazpacho uses
Bookworm backports and verifies that libvirt is at least 10.0.0 and QEMU is at
least 8.2.2 during the build.
graph LR
A[Base image] --> B[Install packages]
B --> C[Apply CVE patches]
C --> D[Configure Libvirt]
D --> E[Container ready]
Ovs --> A
ContainerFile used for the build
# syntax = docker/dockerfile:1
# This Dockerfile uses multi-stage build to customize DEV and PROD images:
# https://docs.docker.com/develop/develop-images/multistage-build/
# Stage 1: libguestfs_base
ARG OS_VERSION=unmaintained/2025.1
ARG BUILT_TAG=v3.5.1-latest
ARG BUILT_TAG_2=v1.56.1-latest
FROM ghcr.io/rackerlabs/genestack-images/ovs:${BUILT_TAG} AS dependency_build
# Final Stage: dependency_build
FROM ghcr.io/rackerlabs/genestack-images/libguestfs:${BUILT_TAG_2}
ARG CACHEBUST=0
ARG OS_VERSION=unmaintained/2025.1
LABEL maintainer="Rackspace"
LABEL vendor="Rackspace OpenStack Team"
LABEL org.opencontainers.image.name="libvirt"
LABEL org.opencontainers.image.openstack.version="${OS_VERSION}"
RUN set -eux; \
case "${OS_VERSION}" in \
unmaintained/2025.1|2025.1|epoxy) OPENSTACK_RELEASE_CODENAME=epoxy ;; \
stable/2026.1|2026.1|gazpacho|gazapacho) OPENSTACK_RELEASE_CODENAME=gazpacho ;; \
*) echo "Unsupported OS_VERSION=${OS_VERSION}. Supported releases: unmaintained/2025.1, stable/2026.1" >&2; exit 1 ;; \
esac; \
mkdir -p /etc/genestack; \
printf '%s\n' "${OS_VERSION}" > /etc/genestack/openstack-version; \
printf '%s\n' "${OPENSTACK_RELEASE_CODENAME}" > /etc/genestack/openstack-release
COPY --from=dependency_build /usr/local /usr/local
COPY --from=dependency_build /etc/openvswitch /etc/openvswitch
COPY --from=dependency_build /var/lib/openvswitch /var/lib/openvswitch
COPY --from=dependency_build /var/lib/openstack /var/lib/openstack
COPY --from=dependency_build /lib/x86_64-linux-gnu/libbpf* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libcap-ng* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libcrypto* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libelf* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libnuma* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libssl* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libxdp* /lib/x86_64-linux-gnu/
COPY --from=dependency_build /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/
RUN export DEBIAN_FRONTEND=noninteractive \
&& case "${OS_VERSION}" in \
unmaintained/2025.1|2025.1|epoxy) \
DEBIAN_SUITE=bookworm; \
MIN_LIBVIRT_VERSION=8.0.0; \
MIN_QEMU_VERSION=6.2.0 \
;; \
stable/2026.1|2026.1|gazpacho|gazapacho) \
DEBIAN_SUITE=bookworm-backports; \
MIN_LIBVIRT_VERSION=10.0.0; \
MIN_QEMU_VERSION=8.2.2; \
echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/bookworm-backports.list \
;; \
esac \
&& apt-get update && apt-get upgrade -y \
&& apt-get install --no-install-recommends -y -t "${DEBIAN_SUITE}" iproute2 \
iptables \
cgroup-tools \
dmidecode \
ebtables \
ipxe-qemu \
kmod \
libvirt-clients \
libvirt-daemon-system \
openssh-client \
ovmf \
pm-utils \
qemu-block-extra \
qemu-efi \
qemu-efi-arm \
qemu-system \
qemu-utils \
&& LIBVIRT_VERSION="$(virsh --version)" \
&& QEMU_VERSION="$(qemu-system-x86_64 --version | awk 'NR == 1 {print $4}')" \
&& dpkg --compare-versions "${LIBVIRT_VERSION}" ge "${MIN_LIBVIRT_VERSION}" \
&& dpkg --compare-versions "${QEMU_VERSION}" ge "${MIN_QEMU_VERSION}" \
&& printf '%s\n' "${LIBVIRT_VERSION}" > /etc/genestack/libvirt-version \
&& printf '%s\n' "${QEMU_VERSION}" > /etc/genestack/qemu-version \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /etc/ssh/ssh_host_*_key \
&& find / -name '*.pyc' -delete \
&& find / -name '*.pyo' -delete \
&& find / -name '__pycache__' -delete \
&& mkdir -p /etc/udev/rules.d \
&& (getent group kvm > /dev/null || groupadd --system kvm) \
&& groupmod --gid 929292 kvm \
&& getent group kvm \
&& echo 'KERNEL=="kvm", GROUP="929292", MODE="0660"' > /etc/udev/rules.d/99-genestack-kvm.rules \
&& groupadd --system --gid 42424 nova \
&& useradd --system --gid 42424 --uid 42424 --shell /sbin/nologin --create-home --home /var/lib/nova nova \
&& mkdir -p /etc/nova /var/log/nova /var/cache/nova \
&& chown nova:nova /etc/nova /var/log/nova /var/lib/nova /var/cache/nova \
&& usermod -a -G kvm nova
Build Arguments
| Argument | Default |
|---|---|
| OS_VERSION | unmaintained/2025.1 |
| BUILT_TAG | v3.5.1-latest |
| BUILT_TAG_2 | v1.56.1-latest |
| CACHEBUST | 0 |
Build Command
Dependencies
- Builds From OVS
- Builds From Libguestfs
Container Image
The container image is available on Github Container Registry.