How do you change the global apparmor profile?

Using LXD the apparmor profiles for each container seem to be generated on the fly during start of the container so manually changing it does not make sense. How are those created? Can you change the global profile?

You can force a completely different profile, bypassing the one generated by LXD by setting raw.lxc to lxc.apparmor.profile=whatever-name-you-want and it’ll then use that other profile.

Alternatively the raw.apparmor config key lets you append whatever you want to the generator profile.