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