]> git.proxmox.com Git - pve-docs.git/blame - pct.adoc
pve-intro.adoc: minor layout improvements
[pve-docs.git] / pct.adoc
CommitLineData
0c6b782f
DM
1ifdef::manvolnum[]
2PVE({manvolnum})
3================
38fd0958 4include::attributes.txt[]
0c6b782f
DM
5
6NAME
7----
8
9pct - Tool to manage Linux Containers (LXC) on Proxmox VE
10
11
12SYNOPSYS
13--------
14
15include::pct.1-synopsis.adoc[]
16
17DESCRIPTION
18-----------
19endif::manvolnum[]
20
21ifndef::manvolnum[]
22Proxmox Container Toolkit
23=========================
38fd0958 24include::attributes.txt[]
0c6b782f
DM
25endif::manvolnum[]
26
27'pct' is a tool to manages Linux Containers (LXC). You can create and
28destroy containers, and control execution
29(start/stop/suspend/resume). Besides that, you can use pct to set
30parameters in the associated config file, like network configuration
31or memory.
32
33CLI Usage Examples
34------------------
35
36Create a container based on a Debian template (provided you downloaded
37the 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
41Start container 100
42
43 pct start 100
44
45Start a login session via getty
46
47 pct console 100
48
49Enter the LXC namespace and run a shell as root user
50
51 pct enter 100
52
53Display the configuration
54
55 pct config 100
56
57Add a network interface called eth0, bridged to the host bridge vmbr0,
58set 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
62Reduce the memory of the container to 512MB
63
64 pct set -memory 512 100
65
66Files
67------
68
69'/etc/pve/lxc/<vmid>.conf'::
70
71Configuration file for the container <vmid>
72
73
74Container 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
97Technology 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
119ifdef::manvolnum[]
120include::pve-copyright.adoc[]
121endif::manvolnum[]
122
123
124
125
126
127
128