Skip to content

Conversation

@bluca
Copy link
Contributor

@bluca bluca commented Nov 22, 2025

mkosi integrates with swtpm to automatically set up and build VMs with vTPM support. The working directory is in an ephemeral namespace that appears as /work/tmp/, and apparmor stops swtpm from creating the local state files (lockfile, etc). Add a policy entry to allow this to work.

mkosi integrates with swtpm to automatically set up and build
VMs with vTPM support. The working directory is in an ephemeral
namespace that appears as /work/tmp/, and apparmor stops swtpm
from creating the local state files (lockfile, etc).
Add a policy entry to allow this to work.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
/etc/swtpm/profiles/*.json r, # local profiles
/tmp/** rwk,
# For mkosi integration https://github.com/systemd/mkosi
/work/tmp/** rwk,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lvoytek , FYI.

@stefanberger stefanberger merged commit e9dfe88 into stefanberger:master Nov 30, 2025
5 checks passed
@bluca bluca deleted the apparmor_mkosi branch November 30, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants