From 0314617ded701a25537882e60a33d67f99db4691 Mon Sep 17 00:00:00 2001 From: Lewis Roy Date: Mon, 25 Aug 2025 13:50:50 +1000 Subject: [PATCH] feat: Add support for running qemu-guest-agent in machine Signed-off-by: Lewis Roy --- build.sh | 2 +- podman-image/Containerfile.COREOS | 13 +++++++++++++ podman-image/build_common.sh | 4 ++++ podman-image/qemu-guest-agent.service | 11 +++++++++++ podman-image/qemuga-vsock.te | 9 +++++++++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 podman-image/qemu-guest-agent.service create mode 100644 podman-image/qemuga-vsock.te diff --git a/build.sh b/build.sh index ed36789c..d245396b 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -exo pipefail diff --git a/podman-image/Containerfile.COREOS b/podman-image/Containerfile.COREOS index ead40cac..2d2f08f8 100644 --- a/podman-image/Containerfile.COREOS +++ b/podman-image/Containerfile.COREOS @@ -40,3 +40,16 @@ RUN --network=none rm -vf /etc/resolv.conf && rpm -e systemd-resolved # https://github.com/containers/podman/pull/21670#discussion_r1585790802 COPY rosetta-activation.service /etc/systemd/system/rosetta-activation.service COPY rosetta-activation.sh /usr/local/bin/rosetta-activation.sh + +# Configure qemu-guest-agent +# Copy in our service file override that communicates over vsock +COPY qemu-guest-agent.service /etc/systemd/system/qemu-guest-agent.service +# Bind mount non-base selinux policy module compile it and install it to allow +# qemu-guest-agent access to the vsock-socket +RUN --mount=type=bind,source=/qemuga-vsock.te,target=/run/qemuga-vsock.te,z <