]> git.proxmox.com Git - pve-docs.git/blobdiff - pct.adoc
add section about container images/templates
[pve-docs.git] / pct.adoc
index 8c8db744f2c96e68e74db6d841f4123115b4af09..77c33e1d42c89a6d4915c636492a084922fc48cd 100644 (file)
--- a/pct.adoc
+++ b/pct.adoc
@@ -103,10 +103,21 @@ 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
+CTIDs < 100 are reserved for internal purposes, and CTIDs need to be
+cluster wide unique. Files are stored inside '/etc/pve/', so they get
 automatically replicated to all other cluster nodes.
 
+.Example Container Configuration
+----
+ostype: debian
+arch: amd64
+hostname: www
+memory: 512
+swap: 512
+net0: bridge=vmbr0,hwaddr=66:64:66:64:64:36,ip=dhcp,name=eth0,type=veth
+rootfs: local:107/vm-107-disk-1.raw,size=7G
+----
+
 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
@@ -115,8 +126,8 @@ 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).
-
+running containers. This feature is called "hot plug", and there is no
+need to restart the container in that case.
 
 File Format
 ~~~~~~~~~~~
@@ -141,6 +152,32 @@ or
 
 Those settings are directly passed to the LXC low-level tools.
 
+Snapshots
+~~~~~~~~~
+
+When you create a snapshot, 'pct' stores the configuration at snapshot
+time into a separate snapshot section within the same configuration
+file. For example, after creating a snapshot called 'testsnapshot',
+your configuration file will look like this:
+
+.Container Configuration with Snapshot
+----
+memory: 512
+swap: 512
+parent: testsnaphot
+...
+
+[testsnaphot]
+memory: 512
+swap: 512
+snaptime: 1457170803
+...
+----
+
+There are a view snapshot related properties like 'parent' and
+'snaptime'. They 'parent' property is used to store the parent/child
+relationship between snapshots. 'snaptime' is the snapshot creation
+time stamp (unix epoch).
 
 Guest Operating System Configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -188,6 +225,25 @@ Alpine:: test /etc/alpine-release
 NOTE: Container start fails is configured 'ostype' differs from auto
 detected type.
 
+
+Container Images
+----------------
+
+Container Images, somtimes also referred as "templates" or
+"appliances", are 'tar' archives which contains everything to run a
+container. You can think of it as a tidy container backup. Like most
+modern container toolkits, 'pct' uses those images when you create a
+new container, for example:
+
+ pct create 999 local:vztmpl/debian-8.0-standard_8.0-1_amd64.tar.gz
+
+Proxmox itself ships a set of basic templates for most common
+operating systems, and you can download them using the 'pveam' (short
+for {pve} Appliance Manager) command line utility. You can also
+download https://www.turnkeylinux.org/[TurnKey Linux] containers using
+that tool (or the graphical user interface).
+
+
 Container Storage
 -----------------