I am setting up some LXC containers as a normal user. I have followed all the steps in the manual for user-owned unprivileged containers, and the instances I created are running fine.
I used a template config to create the containers:
### template.conf
lxc.include = default.conf
# Increment by 10000 for every new container created, to generate unique UIDs and GIDs.
lxc.idmap = u 0 240000 8192
lxc.idmap = g 0 240000 8192
lxc-create -n mycontainer -f ~/.config/lxc/template.conf -t download -- -d archlinux -r current -a amd64
Now, I'd like to customize each container, e.g. mounting volumes. But I can't see any configuration files created when the containers were created. For privileged containers that I created earlier while experimenting, I can see config files in /var/lib/lxc/config
.
From readding the LXC manual, I got the impression that the config used for creating a container is not also used at runtime. Where does LXC store config files for live containers? Or if it doesn't, can I create one that is automatically identified and used on start?
Asked by user3758232
(101 rep)
Aug 5, 2025, 08:07 PM
Last activity: Aug 5, 2025, 08:29 PM
Last activity: Aug 5, 2025, 08:29 PM