From 04c569f66d62b615840b27f791481b8bc3e5696e Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 7 May 2016 08:52:50 +0200 Subject: [PATCH] pct.adoc: improve document structure --- pct.adoc | 110 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 52 deletions(-) diff --git a/pct.adoc b/pct.adoc index 07f99a4..2d52ad2 100644 --- a/pct.adoc +++ b/pct.adoc @@ -324,56 +324,6 @@ mount local directories using bind mounts. That way you can access local storage inside containers with zero overhead. Such bind mounts also provide an easy way to share data between different containers. - -Managing Containers with 'pct' ------------------------------- - -'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 limits. - -CLI Usage Examples ------------------- - -Create a container based on a Debian template (provided you have -already downloaded the template via the webgui) - - pct create 100 /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz - -Start container 100 - - pct start 100 - -Start a login session via getty - - pct console 100 - -Enter the LXC namespace and run a shell as root user - - pct enter 100 - -Display the configuration - - pct config 100 - -Add a network interface called eth0, bridged to the host bridge vmbr0, -set the address and gateway, while it's running - - pct set 100 -net0 name=eth0,bridge=vmbr0,ip=192.168.15.147/24,gw=192.168.15.1 - -Reduce the memory of the container to 512MB - - pct set -memory 512 100 - -Files ------- - -'/etc/pve/lxc/.conf':: - -Configuration file for the container ''. - - Container Mountpoints --------------------- @@ -408,7 +358,7 @@ establish the FUSE mount on the Proxmox host and use a bind mountpoint to make it accessible inside the container. Using quotas inside containers ------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Quotas allow to set limits inside a container for the amount of disk space that each user can use. @@ -431,12 +381,68 @@ NOTE: You need to run the above commands for every mountpoint by passing the mountpoint's path instead of just `/`. Using ACLs inside containers ----------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The standard Posix Access Control Lists are also available inside containers. ACLs allow you to set more detailed file ownership than the traditional user/ group/others model. + +Container Network +----------------- + +TODO + + +Managing Containers with 'pct' +------------------------------ + +'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 limits. + +CLI Usage Examples +~~~~~~~~~~~~~~~~~~ + +Create a container based on a Debian template (provided you have +already downloaded the template via the webgui) + + pct create 100 /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz + +Start container 100 + + pct start 100 + +Start a login session via getty + + pct console 100 + +Enter the LXC namespace and run a shell as root user + + pct enter 100 + +Display the configuration + + pct config 100 + +Add a network interface called eth0, bridged to the host bridge vmbr0, +set the address and gateway, while it's running + + pct set 100 -net0 name=eth0,bridge=vmbr0,ip=192.168.15.147/24,gw=192.168.15.1 + +Reduce the memory of the container to 512MB + + pct set -memory 512 100 + +Files +------ + +'/etc/pve/lxc/.conf':: + +Configuration file for the container ''. + + Container Advantages -------------------- -- 2.39.2