Customize Container Preparation

Editor

Well-Known Member
Apr 26, 2017
108
1
58
Turkey
Hi,

I want to create a custom container. I have installed some packages into the container and I made it ready for use but which files I need to change in my custom-container with original container files?

For example;

/etc/sysconfig/network
/etc/hostname
/etc/resolv.conf

another?
 
I assume you have a CentOS-based container. All these files are normally overwritten by PVE in order to startup the container. This is done at start time. For more information, please refer to the /usr/share/perl5/PVE/LXC/Setup/CentOS.pm

Easiest way to create a template from a already deployed container is just to tar the files and store it besides the other container templates.