Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provisioning-libvirt: add tip about AppArmor #412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nrvnrvn
Copy link

@nrvnrvn nrvnrvn commented Jun 7, 2022

Supersedes #64

@@ -10,6 +10,8 @@ You also need to have access to a host machine with `libvirt`. The examples belo

TIP: If running on a host with SELinux enabled (use the `sestatus` command to check SELinux status), make sure your OS image and Ignition file are labeled as `svirt_home_t`. You can do this by placing them under `~/.local/share/libvirt/images/` or running `chcon -t svirt_home_t /path/to/file`.

TIP: If running on a host with AppArmor enabled, you may need to change the AppArmor profile for libvirt. Add `/absolute/path/to/ignition/file.ign rk,` to the `LIBVIRT_TEMPLATE` profile that can be found in `/etc/apparmor.d/libvirt/TEMPLATE.qemu`.
Copy link
Member

Choose a reason for hiding this comment

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

According to @travier in #64 (comment), who pointed to https://ubuntu.com/server/docs/security-apparmor, it seems like this should be adding a dropin in /etc/apparmor.d/local/ instead?

Copy link
Author

Choose a reason for hiding this comment

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

I am a bit unsure about that because libvirt relies on dynamic profiles created from the /etc/apparmor.d/libvirt/TEMPLATE.qemu template and removed upon VM removal. Local overrides are supposed to override specific profiles from what I understood.

In either case, I'll try to test it and revert with the results.

Copy link
Member

Choose a reason for hiding this comment

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

libvirt itself does not uses those profiles directly, it's AppArmor configuration logic. Local overrides are there to add to distribution provided profiles, which in the case of AppArmor are still stored in /etc unfortunately.

Copy link
Member

Choose a reason for hiding this comment

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

@nrvnrvn Any updates on this?

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.

None yet

3 participants