]> git.proxmox.com Git - pve-docs.git/blob - pct.adoc
use more portable browser to open generated files
[pve-docs.git] / pct.adoc
1 ifdef::manvolnum[]
2 PVE({manvolnum})
3 ================
4 include::attributes.txt[]
5
6 NAME
7 ----
8
9 pct - Tool to manage Linux Containers (LXC) on Proxmox VE
10
11
12 SYNOPSYS
13 --------
14
15 include::pct.1-synopsis.adoc[]
16
17 DESCRIPTION
18 -----------
19 endif::manvolnum[]
20
21 ifndef::manvolnum[]
22 Proxmox Container Toolkit
23 =========================
24 include::attributes.txt[]
25 endif::manvolnum[]
26
27 'pct' is a tool to manages Linux Containers (LXC). You can create and
28 destroy containers, and control execution
29 (start/stop/suspend/resume). Besides that, you can use pct to set
30 parameters in the associated config file, like network configuration
31 or memory.
32
33 CLI Usage Examples
34 ------------------
35
36 Create a container based on a Debian template (provided you downloaded
37 the template via the webgui before)
38
39 pct create 100 /var/lib/vz/template/cache/debian-8.0-standard_8.0-1_amd64.tar.gz
40
41 Start container 100
42
43 pct start 100
44
45 Start a login session via getty
46
47 pct console 100
48
49 Enter the LXC namespace and run a shell as root user
50
51 pct enter 100
52
53 Display the configuration
54
55 pct config 100
56
57 Add a network interface called eth0, bridged to the host bridge vmbr0,
58 set the address and gateway, while it's running
59
60 pct set 100 -net0 name=eth0,bridge=vmbr0,ip=192.168.15.147/24,gw=192.168.15.1
61
62 Reduce the memory of the container to 512MB
63
64 pct set -memory 512 100
65
66 Files
67 ------
68
69 '/etc/pve/lxc/<vmid>.conf'::
70
71 Configuration file for the container <vmid>
72
73
74 Container Advantages
75 --------------------
76
77 - Simple, and fully integrated into {pve}. Setup looks similar to a normal
78 VM setup.
79
80 * Storage (ZFS, LVM, NFS, Ceph, ...)
81
82 * Network
83
84 * Authentification
85
86 * Cluster
87
88 - Fast: minimal overhead, as fast as bare metal
89
90 - High density (perfect for idle workloads)
91
92 - REST API
93
94 - Direct hardware access
95
96
97 Technology Overview
98 -------------------
99
100 - Integrated into {pve} graphical user interface (GUI)
101
102 - LXC (https://linuxcontainers.org/)
103
104 - cgmanager for cgroup management
105
106 - lxcfs to provive containerized /proc file system
107
108 - apparmor
109
110 - CRIU: for live migration (planned)
111
112 - We use latest available kernels (4.2.X)
113
114 - image based deployment (templates)
115
116 - Container setup from host (Network, DNS, Storage, ...)
117
118
119 ifdef::manvolnum[]
120 include::pve-copyright.adoc[]
121 endif::manvolnum[]
122
123
124
125
126
127
128