feat: Add support for running qemu-guest-agent in machine#175
feat: Add support for running qemu-guest-agent in machine#175ninja-quokka wants to merge 1 commit intocontainers:mainfrom
Conversation
ninja-quokka
commented
Aug 25, 2025
Signed-off-by: Lewis Roy <lewis@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ninja-quokka The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| RUN --mount=type=bind,source=/qemuga-vsock.te,target=/run/qemuga-vsock.te,z <<EOF | ||
| /usr/bin/checkmodule -M -m -o /run/qemuga-vsock.mod /run/qemuga-vsock.te | ||
| /usr/bin/semodule_package -o /run/qemuga-vsock.pp -m /run/qemuga-vsock.mod |
There was a problem hiding this comment.
I'd rather do this in a build step so we don't need to install the checkpolicy package.
I could include the compiled qemuga-vsock.pp, it can be read with tools like sedismod but I think as a rule it's better to not include compiled files.
Luap99
left a comment
There was a problem hiding this comment.
What is the goal here? qemu is only used for linux so how will that help on other providers?
vyasgun
left a comment
There was a problem hiding this comment.
I don't have the access to push to this branch so I have made some suggestions.
| @@ -0,0 +1,11 @@ | |||
| Description=QEMU Guest Agent | |||
There was a problem hiding this comment.
| Description=QEMU Guest Agent | |
| [Unit] | |
| Description=QEMU Guest Agent | |
| ConditionVirtualization=apple |
|
|
||
| [Service] | ||
| UMask=0077 | ||
| ExecStart=/usr/bin/qemu-ga --method=vsock-listen --path=3:1025 # Todo: The 3 may need to be dynamic |
There was a problem hiding this comment.
| ExecStart=/usr/bin/qemu-ga --method=vsock-listen --path=3:1025 # Todo: The 3 may need to be dynamic | |
| ExecStart=/usr/bin/qemu-ga --method=vsock-listen --path=3:1234 |
|
Hi @ninja-quokka, can you please rebase and address comments? If you don't have time, I will take over next week. |
Install qemu-guest-agent and configure it to listen on vsock port 1234 (matching the constant in containers/podman). The service is gated by a DMI sys_vendor check (ExecCondition) so it only runs on Podman machine providers that expose the vsock channel: vfkit (Apple Inc.), libkrun (Libkrun), and qemu (QEMU). A custom SELinux module allows virt_qemu_ga_t to use vsock sockets. Related PR: containers/podman#28527 Replace: containers#175 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
Install qemu-guest-agent and configure it to listen on vsock port 1234 (matching the constant in containers/podman). The service is gated by a DMI sys_vendor check (ExecCondition) so it only runs on Podman machine providers that expose the vsock channel: vfkit (Apple Inc.), libkrun (Libkrun), and qemu (QEMU). A custom SELinux module allows virt_qemu_ga_t to use vsock sockets. Related PR: containers/podman#28527 Replace: containers#175 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
Install qemu-guest-agent and configure it to listen on vsock port 1234 (matching the constant in containers/podman). The service is gated by a DMI sys_vendor check (ExecCondition) so it only runs on Podman machine providers that expose the vsock channel: vfkit (Apple Inc.), libkrun (Libkrun), and qemu (QEMU). A custom SELinux module allows virt_qemu_ga_t to use vsock sockets. Related PR: containers/podman#28527 Replace: containers#175 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
Install qemu-guest-agent and configure it to listen on vsock port 1234 (matching the constant in containers/podman). The service is gated by a DMI sys_vendor check (ExecCondition) so it only runs on Podman machine providers that expose the vsock channel: vfkit (Apple Inc.), libkrun (Libkrun), and qemu (QEMU). A custom SELinux module allows virt_qemu_ga_t to use vsock sockets. Related PR: containers/podman#28527 Replace: containers#175 Signed-off-by: Jan Rodák <hony.com@seznam.cz>
Install qemu-guest-agent and configure it to listen on vsock port 1234 (matching the constant in containers/podman). The service is gated by a DMI sys_vendor check (ExecCondition) so it only runs on Podman machine providers that expose the vsock channel: vfkit (Apple Inc.), libkrun (Libkrun), and qemu (QEMU). A custom SELinux module allows virt_qemu_ga_t to use vsock sockets. Related PR: containers/podman#28527 Replace: containers#175 Signed-off-by: Jan Rodák <hony.com@seznam.cz>