For this reason I need a LXC config file. Why do not you tell me?
i believe there is a misunderstanding
the 'lxc-config' files you refer to are part of creating lxc containers, but we do not use this
instead our templates are 'simply' a rootfs packed in a tar.gz
for debian based containers, there is our 'dab' (debian appliance builder),
for centos (for which the templates we take from the lxc project) you would have to do it yourself
make a container
save all your changes which should persist across containers
delete all things which are container specific (e.g. hostname, ip config, etc.)
and backup that container as a tar.gz
now you can use that template for new containers
Could you make changes in the container with the API? For example; can you install CentOS package with API? I know we can not do it.
you can not install packages via the api or set the password on an existing container
but you can set a hostname/ip/password/ssh-key on container creation and use that, for example with ssh
using the commandline tools you can execute arbitrary commands in an container:
Code:
pct exec <ID> -- apt install git