]> git.proxmox.com Git - pve-docs.git/blobdiff - pct.adoc
pct: improve configuration section
[pve-docs.git] / pct.adoc
index af2470b0ade9f9179ec6957094816039513b2039..f15378d85487a0f58bf50e2a480c247339da2a8a 100644 (file)
--- a/pct.adoc
+++ b/pct.adoc
@@ -97,6 +97,51 @@ will affect a random unprivileged user, and so would be a generic
 kernel security bug rather than a LXC issue. LXC people think
 unprivileged containers are safe by design.
 
+
+Configuration
+-------------
+
+The '/etc/pve/lxc/<CTID>.conf' files stores container configuration,
+where '<CTID>' is the numeric ID of the given container. Note that
+CTIDs < 100 are reserved for internal purposes. CTIDs need to be
+unique - cluster wide. Files are stored inside '/etc/pve/', so they get
+automatically replicated to all other cluster nodes.
+
+Those configuration files are simple text files, and you can edit them
+using a normal text editor ('vi', 'nano', ...). This is sometimes
+useful to do small corrections, but keep in mind that you need to
+restart the container to apply such changes.
+
+For that reason, it is usually better to use the 'pct' command to
+generate and modify those files, or do the whole thing using the GUI.
+Our toolkit is smart enough to instantaneously apply most changes to
+running containers (hot plug).
+
+
+File Format
+~~~~~~~~~~~
+
+Container configuration files use a simple colon separated key/value
+format. Each line has the following format:
+
+ # this is a comment
+ OPTION: value
+
+Blank lines in those files are ignored, and lines starting with a '#'
+character are treated as comments and are also ignored.
+
+It is possible to add low-level, LXC style configuration directly, for
+example:
+
+ lxc.init_cmd: /sbin/my_own_init
+
+or
+
+ lxc.init_cmd = /sbin/my_own_init
+
+Those settings are directly passed to the LXC low-level tools.
+
+
 Container Storage
 -----------------
 
@@ -131,11 +176,10 @@ also provides an easy way to share data between different containers.
 Managing Containers with 'pct'
 ------------------------------
 
-'pct' is a tool to manages Linux Containers (LXC). You can create and
-destroy containers, and control execution
-(start/stop/suspend/resume). Besides that, you can use pct to set
-parameters in the associated config file, like network configuration
-or memory.
+'pct' is the tool to manage Linux Containers on {pve}. You can create
+and destroy containers, and control execution (start, stop, migrate,
+...). You can use pct to set parameters in the associated config file,
+like network configuration or memory.
 
 CLI Usage Examples
 ------------------
@@ -173,9 +217,9 @@ Reduce the memory of the container to 512MB
 Files
 ------
 
-'/etc/pve/lxc/<vmid>.conf'::
+'/etc/pve/lxc/<CTID>.conf'::
 
-Configuration file for the container <vmid>
+Configuration file for the container '<CTID>'.
 
 
 Container Advantages