Commit | Line | Data |
---|---|---|
0c6b782f DM |
1 | include::attributes.txt[] |
2 | ifdef::manvolnum[] | |
3 | PVE({manvolnum}) | |
4 | ================ | |
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 | endif::manvolnum[] | |
25 | ||
26 | 'pct' is a tool to manages Linux Containers (LXC). You can create and | |
27 | destroy containers, and control execution | |
28 | (start/stop/suspend/resume). Besides that, you can use pct to set | |
29 | parameters in the associated config file, like network configuration | |
30 | or memory. | |
31 | ||
32 | CLI Usage Examples | |
33 | ------------------ | |
34 | ||
35 | Create a container based on a Debian template (provided you downloaded | |
36 | the 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 | ||
40 | Start container 100 | |
41 | ||
42 | pct start 100 | |
43 | ||
44 | Start a login session via getty | |
45 | ||
46 | pct console 100 | |
47 | ||
48 | Enter the LXC namespace and run a shell as root user | |
49 | ||
50 | pct enter 100 | |
51 | ||
52 | Display the configuration | |
53 | ||
54 | pct config 100 | |
55 | ||
56 | Add a network interface called eth0, bridged to the host bridge vmbr0, | |
57 | set 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 | ||
61 | Reduce the memory of the container to 512MB | |
62 | ||
63 | pct set -memory 512 100 | |
64 | ||
65 | Files | |
66 | ------ | |
67 | ||
68 | '/etc/pve/lxc/<vmid>.conf':: | |
69 | ||
70 | Configuration file for the container <vmid> | |
71 | ||
72 | ||
73 | Container 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 | ||
96 | Technology 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 | ||
118 | ifdef::manvolnum[] | |
119 | include::pve-copyright.adoc[] | |
120 | endif::manvolnum[] | |
121 | ||
122 | ||
123 | ||
124 | ||
125 | ||
126 | ||
127 |