I was wondering if it is possible to associate a default profile to an image and use this profile for every container which is started with this image?
Additionaly is there a way to set a profile from a remot host to a container launched from a remote host?
The only thing i could think of was this:
On init/launch, the -p parameter (and same with -s and -n) is relative to the server the container is being created on. So “-p some-profile” will use “some-profile” on the server the container is created on.
As for associating profiles with images, I think it’s the first time we hear of this request. It shouldn’t be particularly hard to do and would effectively replace the “default” profile when an alternative is specified.
So it is not possible to use a profile from a remote on a local container (which is pulled from the same remote)?
Yeah i think this would be a nice feature
Right, you can’t use a remote profile as LXD itself (the server) doesn’t know what a remote is and so wouldn’t have a way to keep things up to date. Even if it did, it would be extremely costly as profile resolution happens every time the container object is open internally.
Your best bet is to keep your profile in sync through “lxc profile copy” and then use that.
Can you post the output of “lxc remote list” (and tell me what remote name you were using) and also the output of that same “lxc profile copy” but with --debug?
Right, that’s because your “instar” remote is marked as “public”. That limits API interactions to what’s publicly visible without authentication (effectively just public images).
Removing and re-adding the remote without the --public flag should fix that for you.