]>
Commit | Line | Data |
---|---|---|
1f554f76 DM |
1 | *pct* `<COMMAND> [ARGS] [OPTIONS]` |
2 | ||
9b3e4991 DM |
3 | *pct clone* `<vmid> <newid> -experimental <boolean>` `[OPTIONS]` |
4 | ||
5 | Create a container clone/copy | |
6 | ||
013dc89f | 7 | `<vmid>`: `<integer> (1 - N)` :: |
9b3e4991 DM |
8 | |
9 | The (unique) ID of the VM. | |
10 | ||
013dc89f | 11 | `<newid>`: `<integer> (1 - N)` :: |
9b3e4991 DM |
12 | |
13 | VMID for the clone. | |
14 | ||
013dc89f | 15 | `-description` `<string>` :: |
9b3e4991 DM |
16 | |
17 | Description for the new CT. | |
18 | ||
013dc89f | 19 | `-experimental` `<boolean>` ('default =' `0`):: |
9b3e4991 | 20 | |
c2993fe5 | 21 | The clone feature is experimental, set this flag if you know what you are doing. |
9b3e4991 | 22 | |
013dc89f | 23 | `-full` `<boolean>` ('default =' `0`):: |
9b3e4991 | 24 | |
c2993fe5 | 25 | Create a full copy of all disk. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default. |
9b3e4991 | 26 | |
013dc89f | 27 | `-hostname` `<string>` :: |
9b3e4991 DM |
28 | |
29 | Set a hostname for the new CT. | |
30 | ||
013dc89f | 31 | `-pool` `<string>` :: |
9b3e4991 DM |
32 | |
33 | Add the new CT to the specified pool. | |
34 | ||
013dc89f | 35 | `-snapname` `<string>` :: |
9b3e4991 DM |
36 | |
37 | The name of the snapshot. | |
38 | ||
013dc89f | 39 | `-storage` `<string>` :: |
9b3e4991 DM |
40 | |
41 | Target storage for full clone. | |
42 | + | |
43 | NOTE: Requires option(s): `full` | |
44 | ||
45 | ||
46 | ||
47 | ||
1f554f76 DM |
48 | *pct config* `<vmid>` |
49 | ||
50 | Get container configuration. | |
51 | ||
013dc89f | 52 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
53 | |
54 | The (unique) ID of the VM. | |
55 | ||
56 | ||
57 | ||
58 | ||
59 | *pct console* `<vmid>` | |
60 | ||
61 | Launch a console for the specified container. | |
62 | ||
013dc89f | 63 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
64 | |
65 | The (unique) ID of the VM. | |
66 | ||
67 | ||
68 | ||
de0983cb DM |
69 | *pct cpusets* |
70 | ||
71 | Print the list of assigned CPU sets. | |
72 | ||
73 | ||
74 | ||
1f554f76 DM |
75 | |
76 | *pct create* `<vmid> <ostemplate>` `[OPTIONS]` | |
77 | ||
78 | Create or restore a container. | |
79 | ||
013dc89f | 80 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
81 | |
82 | The (unique) ID of the VM. | |
83 | ||
013dc89f | 84 | `<ostemplate>`: `<string>` :: |
1f554f76 DM |
85 | |
86 | The OS template or backup file. | |
87 | ||
013dc89f | 88 | `-arch` `<amd64 | i386>` ('default =' `amd64`):: |
1f554f76 DM |
89 | |
90 | OS architecture type. | |
91 | ||
013dc89f | 92 | `-cmode` `<console | shell | tty>` ('default =' `tty`):: |
1f554f76 | 93 | |
c2993fe5 | 94 | Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login). |
1f554f76 | 95 | |
013dc89f | 96 | `-console` `<boolean>` ('default =' `1`):: |
1f554f76 DM |
97 | |
98 | Attach a console device (/dev/console) to the container. | |
99 | ||
013dc89f | 100 | `-cores` `<integer> (1 - 128)` :: |
de0983cb DM |
101 | |
102 | The number of cores assigned to the container. A container can use all available cores by default. | |
103 | ||
013dc89f | 104 | `-cpulimit` `<number> (0 - 128)` ('default =' `0`):: |
1f554f76 | 105 | |
9b3e4991 DM |
106 | Limit of CPU usage. |
107 | + | |
c2993fe5 | 108 | NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit. |
1f554f76 | 109 | |
013dc89f | 110 | `-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`):: |
1f554f76 | 111 | |
c2993fe5 | 112 | CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs. |
9b3e4991 | 113 | + |
1f554f76 DM |
114 | NOTE: You can disable fair-scheduler configuration by setting this to 0. |
115 | ||
013dc89f | 116 | `-description` `<string>` :: |
1f554f76 DM |
117 | |
118 | Container description. Only used on the configuration web interface. | |
119 | ||
013dc89f | 120 | `-force` `<boolean>` :: |
1f554f76 DM |
121 | |
122 | Allow to overwrite existing container. | |
123 | ||
013dc89f | 124 | `-hostname` `<string>` :: |
1f554f76 DM |
125 | |
126 | Set a host name for the container. | |
127 | ||
013dc89f | 128 | `-ignore-unpack-errors` `<boolean>` :: |
1f554f76 DM |
129 | |
130 | Ignore errors when extracting the template. | |
131 | ||
013dc89f | 132 | `-lock` `<backup | migrate | rollback | snapshot>` :: |
1f554f76 DM |
133 | |
134 | Lock/unlock the VM. | |
135 | ||
013dc89f | 136 | `-memory` `<integer> (16 - N)` ('default =' `512`):: |
1f554f76 DM |
137 | |
138 | Amount of RAM for the VM in MB. | |
139 | ||
5d9c884c | 140 | `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` :: |
1f554f76 | 141 | |
c2993fe5 | 142 | Use volume as container mount point. |
1f554f76 | 143 | |
013dc89f | 144 | `-nameserver` `<string>` :: |
1f554f76 | 145 | |
c2993fe5 | 146 | Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
1f554f76 | 147 | |
f004f5b9 | 148 | `-net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` :: |
1f554f76 DM |
149 | |
150 | Specifies network interfaces for the container. | |
151 | ||
013dc89f | 152 | `-onboot` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
153 | |
154 | Specifies whether a VM will be started during system bootup. | |
155 | ||
013dc89f | 156 | `-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` :: |
1f554f76 | 157 | |
c2993fe5 | 158 | OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup. |
1f554f76 | 159 | |
9b3e4991 | 160 | `-password` :: |
1f554f76 DM |
161 | |
162 | Sets root password inside container. | |
163 | ||
013dc89f | 164 | `-pool` `<string>` :: |
1f554f76 DM |
165 | |
166 | Add the VM to the specified pool. | |
167 | ||
013dc89f | 168 | `-protection` `<boolean>` ('default =' `0`):: |
1f554f76 | 169 | |
c2993fe5 | 170 | Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation. |
1f554f76 | 171 | |
013dc89f | 172 | `-restore` `<boolean>` :: |
1f554f76 DM |
173 | |
174 | Mark this as restore task. | |
175 | ||
5d9c884c | 176 | `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` :: |
1f554f76 DM |
177 | |
178 | Use volume as container root. | |
179 | ||
013dc89f | 180 | `-searchdomain` `<string>` :: |
1f554f76 | 181 | |
c2993fe5 | 182 | Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
9b3e4991 | 183 | |
013dc89f | 184 | `-ssh-public-keys` `<string>` :: |
9b3e4991 DM |
185 | |
186 | Setup public SSH keys (one key per line, OpenSSH format). | |
1f554f76 DM |
187 | |
188 | `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` :: | |
189 | ||
c2993fe5 | 190 | Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped. |
1f554f76 | 191 | |
013dc89f | 192 | `-storage` `<string>` ('default =' `local`):: |
1f554f76 DM |
193 | |
194 | Default Storage. | |
195 | ||
013dc89f | 196 | `-swap` `<integer> (0 - N)` ('default =' `512`):: |
1f554f76 DM |
197 | |
198 | Amount of SWAP for the VM in MB. | |
199 | ||
013dc89f | 200 | `-template` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
201 | |
202 | Enable/disable Template. | |
203 | ||
013dc89f | 204 | `-tty` `<integer> (0 - 6)` ('default =' `2`):: |
1f554f76 DM |
205 | |
206 | Specify the number of tty available to the container | |
207 | ||
013dc89f | 208 | `-unprivileged` `<boolean>` ('default =' `0`):: |
1f554f76 | 209 | |
c2993fe5 | 210 | Makes the container run as unprivileged user. (Should not be modified manually.) |
1f554f76 | 211 | |
013dc89f | 212 | `-unused[n]` `<string>` :: |
1f554f76 | 213 | |
c2993fe5 | 214 | Reference to unused volumes. This is used internally, and should not be modified manually. |
1f554f76 DM |
215 | |
216 | ||
217 | ||
218 | ||
219 | *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]` | |
220 | ||
221 | Delete a LXC snapshot. | |
222 | ||
013dc89f | 223 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
224 | |
225 | The (unique) ID of the VM. | |
226 | ||
013dc89f | 227 | `<snapname>`: `<string>` :: |
1f554f76 DM |
228 | |
229 | The name of the snapshot. | |
230 | ||
013dc89f | 231 | `-force` `<boolean>` :: |
1f554f76 DM |
232 | |
233 | For removal from config file, even if removing disk snapshots fails. | |
234 | ||
235 | ||
236 | ||
237 | ||
238 | *pct destroy* `<vmid>` | |
239 | ||
240 | Destroy the container (also delete all uses files). | |
241 | ||
013dc89f | 242 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
243 | |
244 | The (unique) ID of the VM. | |
245 | ||
246 | ||
247 | ||
248 | ||
2c0dde61 DM |
249 | *pct df* `<vmid>` |
250 | ||
251 | Get the container's current disk usage. | |
252 | ||
013dc89f | 253 | `<vmid>`: `<integer> (1 - N)` :: |
2c0dde61 DM |
254 | |
255 | The (unique) ID of the VM. | |
256 | ||
257 | ||
258 | ||
1f554f76 DM |
259 | *pct enter* `<vmid>` |
260 | ||
261 | Launch a shell for the specified container. | |
262 | ||
013dc89f | 263 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
264 | |
265 | The (unique) ID of the VM. | |
266 | ||
267 | ||
268 | ||
269 | *pct exec* `<vmid> [<extra-args>]` | |
270 | ||
271 | Launch a command inside the specified container. | |
272 | ||
013dc89f | 273 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
274 | |
275 | The (unique) ID of the VM. | |
276 | ||
013dc89f | 277 | `<extra-args>`: `<array>` :: |
1f554f76 DM |
278 | |
279 | Extra arguments as array | |
280 | ||
281 | ||
282 | ||
283 | *pct fsck* `<vmid>` `[OPTIONS]` | |
284 | ||
285 | Run a filesystem check (fsck) on a container volume. | |
286 | ||
013dc89f | 287 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
288 | |
289 | The (unique) ID of the VM. | |
290 | ||
013dc89f | 291 | `-device` `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` :: |
1f554f76 DM |
292 | |
293 | A volume on which to run the filesystem check | |
294 | ||
013dc89f | 295 | `-force` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
296 | |
297 | Force checking, even if the filesystem seems clean | |
298 | ||
299 | ||
300 | ||
301 | ||
302 | *pct help* `[<cmd>]` `[OPTIONS]` | |
303 | ||
304 | Get help about specified command. | |
305 | ||
013dc89f | 306 | `<cmd>`: `<string>` :: |
1f554f76 DM |
307 | |
308 | Command name | |
309 | ||
013dc89f | 310 | `-verbose` `<boolean>` :: |
1f554f76 DM |
311 | |
312 | Verbose output format. | |
313 | ||
314 | ||
315 | ||
316 | ||
317 | *pct list* | |
318 | ||
319 | LXC container index (per node). | |
320 | ||
321 | ||
322 | ||
323 | ||
324 | *pct listsnapshot* `<vmid>` | |
325 | ||
326 | List all snapshots. | |
327 | ||
013dc89f | 328 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
329 | |
330 | The (unique) ID of the VM. | |
331 | ||
332 | ||
333 | ||
334 | ||
335 | *pct migrate* `<vmid> <target>` `[OPTIONS]` | |
336 | ||
337 | Migrate the container to another node. Creates a new migration task. | |
338 | ||
013dc89f | 339 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
340 | |
341 | The (unique) ID of the VM. | |
342 | ||
013dc89f | 343 | `<target>`: `<string>` :: |
1f554f76 DM |
344 | |
345 | Target node. | |
346 | ||
013dc89f | 347 | `-force` `<boolean>` :: |
9b3e4991 | 348 | |
de0983cb | 349 | Force migration despite local bind / device mounts. NOTE: deprecated, use 'shared' property of mount point instead. |
9b3e4991 | 350 | |
013dc89f | 351 | `-online` `<boolean>` :: |
1f554f76 DM |
352 | |
353 | Use online/live migration. | |
354 | ||
6875b729 DM |
355 | `-restart` `<boolean>` :: |
356 | ||
357 | Use restart migration | |
358 | ||
359 | `-timeout` `<integer>` ('default =' `180`):: | |
360 | ||
361 | Timeout in seconds for shutdown for restart migration | |
362 | ||
1f554f76 DM |
363 | |
364 | ||
9b3e4991 DM |
365 | |
366 | *pct mount* `<vmid>` | |
367 | ||
368 | Mount the container's filesystem on the host. This will hold a lock on the | |
369 | container and is meant for emergency maintenance only as it will prevent | |
370 | further operations on the container other than start and stop. | |
371 | ||
013dc89f | 372 | `<vmid>`: `<integer> (1 - N)` :: |
9b3e4991 DM |
373 | |
374 | The (unique) ID of the VM. | |
375 | ||
376 | ||
377 | ||
378 | *pct pull* `<vmid> <path> <destination>` `[OPTIONS]` | |
379 | ||
380 | Copy a file from the container to the local system. | |
381 | ||
013dc89f | 382 | `<vmid>`: `<integer> (1 - N)` :: |
9b3e4991 DM |
383 | |
384 | The (unique) ID of the VM. | |
385 | ||
013dc89f | 386 | `<path>`: `<string>` :: |
9b3e4991 DM |
387 | |
388 | Path to a file inside the container to pull. | |
389 | ||
013dc89f | 390 | `<destination>`: `<string>` :: |
9b3e4991 DM |
391 | |
392 | Destination | |
393 | ||
013dc89f | 394 | `-group` `<string>` :: |
9b3e4991 DM |
395 | |
396 | Owner group name or id. | |
397 | ||
013dc89f | 398 | `-perms` `<string>` :: |
9b3e4991 | 399 | |
c2993fe5 | 400 | File permissions to use (octal by default, prefix with '0x' for hexadecimal). |
9b3e4991 | 401 | |
013dc89f | 402 | `-user` `<string>` :: |
9b3e4991 DM |
403 | |
404 | Owner user name or id. | |
405 | ||
406 | ||
407 | ||
408 | *pct push* `<vmid> <file> <destination>` `[OPTIONS]` | |
409 | ||
410 | Copy a local file to the container. | |
411 | ||
013dc89f | 412 | `<vmid>`: `<integer> (1 - N)` :: |
9b3e4991 DM |
413 | |
414 | The (unique) ID of the VM. | |
415 | ||
013dc89f | 416 | `<file>`: `<string>` :: |
9b3e4991 DM |
417 | |
418 | Path to a local file. | |
419 | ||
013dc89f | 420 | `<destination>`: `<string>` :: |
9b3e4991 DM |
421 | |
422 | Destination inside the container to write to. | |
423 | ||
013dc89f | 424 | `-group` `<string>` :: |
9b3e4991 | 425 | |
c2993fe5 | 426 | Owner group name or id. When using a name it must exist inside the container. |
9b3e4991 | 427 | |
013dc89f | 428 | `-perms` `<string>` :: |
9b3e4991 | 429 | |
c2993fe5 | 430 | File permissions to use (octal by default, prefix with '0x' for hexadecimal). |
9b3e4991 | 431 | |
013dc89f | 432 | `-user` `<string>` :: |
9b3e4991 | 433 | |
c2993fe5 | 434 | Owner user name or id. When using a name it must exist inside the container. |
9b3e4991 DM |
435 | |
436 | ||
437 | ||
438 | ||
1f554f76 DM |
439 | *pct resize* `<vmid> <disk> <size>` `[OPTIONS]` |
440 | ||
de0983cb | 441 | Resize a container mount point. |
1f554f76 | 442 | |
013dc89f | 443 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
444 | |
445 | The (unique) ID of the VM. | |
446 | ||
013dc89f | 447 | `<disk>`: `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` :: |
1f554f76 DM |
448 | |
449 | The disk you want to resize. | |
450 | ||
013dc89f | 451 | `<size>`: `\+?\d+(\.\d+)?[KMGT]?` :: |
1f554f76 | 452 | |
c2993fe5 | 453 | The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported. |
1f554f76 | 454 | |
013dc89f | 455 | `-digest` `<string>` :: |
1f554f76 | 456 | |
c2993fe5 | 457 | Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. |
1f554f76 DM |
458 | |
459 | ||
460 | ||
461 | *pct restore* `<vmid> <ostemplate>` `[OPTIONS]` | |
462 | ||
463 | Create or restore a container. | |
464 | ||
013dc89f | 465 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
466 | |
467 | The (unique) ID of the VM. | |
468 | ||
013dc89f | 469 | `<ostemplate>`: `<string>` :: |
1f554f76 DM |
470 | |
471 | The OS template or backup file. | |
472 | ||
013dc89f | 473 | `-arch` `<amd64 | i386>` ('default =' `amd64`):: |
1f554f76 DM |
474 | |
475 | OS architecture type. | |
476 | ||
013dc89f | 477 | `-cmode` `<console | shell | tty>` ('default =' `tty`):: |
1f554f76 | 478 | |
c2993fe5 | 479 | Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login). |
1f554f76 | 480 | |
013dc89f | 481 | `-console` `<boolean>` ('default =' `1`):: |
1f554f76 DM |
482 | |
483 | Attach a console device (/dev/console) to the container. | |
484 | ||
013dc89f | 485 | `-cores` `<integer> (1 - 128)` :: |
de0983cb DM |
486 | |
487 | The number of cores assigned to the container. A container can use all available cores by default. | |
488 | ||
013dc89f | 489 | `-cpulimit` `<number> (0 - 128)` ('default =' `0`):: |
1f554f76 | 490 | |
9b3e4991 DM |
491 | Limit of CPU usage. |
492 | + | |
c2993fe5 | 493 | NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit. |
1f554f76 | 494 | |
013dc89f | 495 | `-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`):: |
1f554f76 | 496 | |
c2993fe5 | 497 | CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs. |
9b3e4991 | 498 | + |
1f554f76 DM |
499 | NOTE: You can disable fair-scheduler configuration by setting this to 0. |
500 | ||
013dc89f | 501 | `-description` `<string>` :: |
1f554f76 DM |
502 | |
503 | Container description. Only used on the configuration web interface. | |
504 | ||
013dc89f | 505 | `-force` `<boolean>` :: |
1f554f76 DM |
506 | |
507 | Allow to overwrite existing container. | |
508 | ||
013dc89f | 509 | `-hostname` `<string>` :: |
1f554f76 DM |
510 | |
511 | Set a host name for the container. | |
512 | ||
013dc89f | 513 | `-ignore-unpack-errors` `<boolean>` :: |
1f554f76 DM |
514 | |
515 | Ignore errors when extracting the template. | |
516 | ||
013dc89f | 517 | `-lock` `<backup | migrate | rollback | snapshot>` :: |
1f554f76 DM |
518 | |
519 | Lock/unlock the VM. | |
520 | ||
013dc89f | 521 | `-memory` `<integer> (16 - N)` ('default =' `512`):: |
1f554f76 DM |
522 | |
523 | Amount of RAM for the VM in MB. | |
524 | ||
5d9c884c | 525 | `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` :: |
1f554f76 | 526 | |
c2993fe5 | 527 | Use volume as container mount point. |
1f554f76 | 528 | |
013dc89f | 529 | `-nameserver` `<string>` :: |
1f554f76 | 530 | |
c2993fe5 | 531 | Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
1f554f76 | 532 | |
f004f5b9 | 533 | `-net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` :: |
1f554f76 DM |
534 | |
535 | Specifies network interfaces for the container. | |
536 | ||
013dc89f | 537 | `-onboot` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
538 | |
539 | Specifies whether a VM will be started during system bootup. | |
540 | ||
013dc89f | 541 | `-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` :: |
1f554f76 | 542 | |
c2993fe5 | 543 | OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup. |
1f554f76 | 544 | |
9b3e4991 | 545 | `-password` :: |
1f554f76 DM |
546 | |
547 | Sets root password inside container. | |
548 | ||
013dc89f | 549 | `-pool` `<string>` :: |
1f554f76 DM |
550 | |
551 | Add the VM to the specified pool. | |
552 | ||
013dc89f | 553 | `-protection` `<boolean>` ('default =' `0`):: |
1f554f76 | 554 | |
c2993fe5 | 555 | Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation. |
1f554f76 | 556 | |
5d9c884c | 557 | `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` :: |
1f554f76 DM |
558 | |
559 | Use volume as container root. | |
560 | ||
013dc89f | 561 | `-searchdomain` `<string>` :: |
1f554f76 | 562 | |
c2993fe5 | 563 | Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
9b3e4991 | 564 | |
013dc89f | 565 | `-ssh-public-keys` `<string>` :: |
9b3e4991 DM |
566 | |
567 | Setup public SSH keys (one key per line, OpenSSH format). | |
1f554f76 DM |
568 | |
569 | `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` :: | |
570 | ||
c2993fe5 | 571 | Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped. |
1f554f76 | 572 | |
013dc89f | 573 | `-storage` `<string>` ('default =' `local`):: |
1f554f76 DM |
574 | |
575 | Default Storage. | |
576 | ||
013dc89f | 577 | `-swap` `<integer> (0 - N)` ('default =' `512`):: |
1f554f76 DM |
578 | |
579 | Amount of SWAP for the VM in MB. | |
580 | ||
013dc89f | 581 | `-template` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
582 | |
583 | Enable/disable Template. | |
584 | ||
013dc89f | 585 | `-tty` `<integer> (0 - 6)` ('default =' `2`):: |
1f554f76 DM |
586 | |
587 | Specify the number of tty available to the container | |
588 | ||
013dc89f | 589 | `-unprivileged` `<boolean>` ('default =' `0`):: |
1f554f76 | 590 | |
c2993fe5 | 591 | Makes the container run as unprivileged user. (Should not be modified manually.) |
1f554f76 | 592 | |
013dc89f | 593 | `-unused[n]` `<string>` :: |
1f554f76 | 594 | |
c2993fe5 | 595 | Reference to unused volumes. This is used internally, and should not be modified manually. |
1f554f76 DM |
596 | |
597 | ||
598 | ||
599 | ||
600 | *pct resume* `<vmid>` | |
601 | ||
602 | Resume the container. | |
603 | ||
013dc89f | 604 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
605 | |
606 | The (unique) ID of the VM. | |
607 | ||
608 | ||
609 | ||
610 | ||
611 | *pct rollback* `<vmid> <snapname>` | |
612 | ||
613 | Rollback LXC state to specified snapshot. | |
614 | ||
013dc89f | 615 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
616 | |
617 | The (unique) ID of the VM. | |
618 | ||
013dc89f | 619 | `<snapname>`: `<string>` :: |
1f554f76 DM |
620 | |
621 | The name of the snapshot. | |
622 | ||
623 | ||
624 | ||
625 | ||
626 | *pct set* `<vmid>` `[OPTIONS]` | |
627 | ||
628 | Set container options. | |
629 | ||
013dc89f | 630 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
631 | |
632 | The (unique) ID of the VM. | |
633 | ||
013dc89f | 634 | `-arch` `<amd64 | i386>` ('default =' `amd64`):: |
1f554f76 DM |
635 | |
636 | OS architecture type. | |
637 | ||
013dc89f | 638 | `-cmode` `<console | shell | tty>` ('default =' `tty`):: |
1f554f76 | 639 | |
c2993fe5 | 640 | Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login). |
1f554f76 | 641 | |
013dc89f | 642 | `-console` `<boolean>` ('default =' `1`):: |
1f554f76 DM |
643 | |
644 | Attach a console device (/dev/console) to the container. | |
645 | ||
013dc89f | 646 | `-cores` `<integer> (1 - 128)` :: |
de0983cb DM |
647 | |
648 | The number of cores assigned to the container. A container can use all available cores by default. | |
649 | ||
013dc89f | 650 | `-cpulimit` `<number> (0 - 128)` ('default =' `0`):: |
1f554f76 | 651 | |
9b3e4991 DM |
652 | Limit of CPU usage. |
653 | + | |
c2993fe5 | 654 | NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit. |
1f554f76 | 655 | |
013dc89f | 656 | `-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`):: |
1f554f76 | 657 | |
c2993fe5 | 658 | CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs. |
9b3e4991 | 659 | + |
1f554f76 DM |
660 | NOTE: You can disable fair-scheduler configuration by setting this to 0. |
661 | ||
013dc89f | 662 | `-delete` `<string>` :: |
1f554f76 DM |
663 | |
664 | A list of settings you want to delete. | |
665 | ||
013dc89f | 666 | `-description` `<string>` :: |
1f554f76 DM |
667 | |
668 | Container description. Only used on the configuration web interface. | |
669 | ||
013dc89f | 670 | `-digest` `<string>` :: |
1f554f76 | 671 | |
c2993fe5 | 672 | Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. |
1f554f76 | 673 | |
013dc89f | 674 | `-hostname` `<string>` :: |
1f554f76 DM |
675 | |
676 | Set a host name for the container. | |
677 | ||
013dc89f | 678 | `-lock` `<backup | migrate | rollback | snapshot>` :: |
1f554f76 DM |
679 | |
680 | Lock/unlock the VM. | |
681 | ||
013dc89f | 682 | `-memory` `<integer> (16 - N)` ('default =' `512`):: |
1f554f76 DM |
683 | |
684 | Amount of RAM for the VM in MB. | |
685 | ||
5d9c884c | 686 | `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` :: |
1f554f76 | 687 | |
c2993fe5 | 688 | Use volume as container mount point. |
1f554f76 | 689 | |
013dc89f | 690 | `-nameserver` `<string>` :: |
1f554f76 | 691 | |
c2993fe5 | 692 | Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
1f554f76 | 693 | |
f004f5b9 | 694 | `-net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` :: |
1f554f76 DM |
695 | |
696 | Specifies network interfaces for the container. | |
697 | ||
013dc89f | 698 | `-onboot` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
699 | |
700 | Specifies whether a VM will be started during system bootup. | |
701 | ||
013dc89f | 702 | `-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` :: |
1f554f76 | 703 | |
c2993fe5 | 704 | OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup. |
1f554f76 | 705 | |
013dc89f | 706 | `-protection` `<boolean>` ('default =' `0`):: |
1f554f76 | 707 | |
c2993fe5 | 708 | Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation. |
1f554f76 | 709 | |
5d9c884c | 710 | `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` :: |
1f554f76 DM |
711 | |
712 | Use volume as container root. | |
713 | ||
013dc89f | 714 | `-searchdomain` `<string>` :: |
1f554f76 | 715 | |
c2993fe5 | 716 | Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. |
1f554f76 DM |
717 | |
718 | `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` :: | |
719 | ||
c2993fe5 | 720 | Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped. |
1f554f76 | 721 | |
013dc89f | 722 | `-swap` `<integer> (0 - N)` ('default =' `512`):: |
1f554f76 DM |
723 | |
724 | Amount of SWAP for the VM in MB. | |
725 | ||
013dc89f | 726 | `-template` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
727 | |
728 | Enable/disable Template. | |
729 | ||
013dc89f | 730 | `-tty` `<integer> (0 - 6)` ('default =' `2`):: |
1f554f76 DM |
731 | |
732 | Specify the number of tty available to the container | |
733 | ||
013dc89f | 734 | `-unprivileged` `<boolean>` ('default =' `0`):: |
1f554f76 | 735 | |
c2993fe5 | 736 | Makes the container run as unprivileged user. (Should not be modified manually.) |
1f554f76 | 737 | |
013dc89f | 738 | `-unused[n]` `<string>` :: |
1f554f76 | 739 | |
c2993fe5 | 740 | Reference to unused volumes. This is used internally, and should not be modified manually. |
1f554f76 DM |
741 | |
742 | ||
743 | ||
744 | ||
745 | *pct shutdown* `<vmid>` `[OPTIONS]` | |
746 | ||
9b3e4991 DM |
747 | Shutdown the container. This will trigger a clean shutdown of the |
748 | container, see lxc-stop(1) for details. | |
1f554f76 | 749 | |
013dc89f | 750 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
751 | |
752 | The (unique) ID of the VM. | |
753 | ||
013dc89f | 754 | `-forceStop` `<boolean>` ('default =' `0`):: |
1f554f76 DM |
755 | |
756 | Make sure the Container stops. | |
757 | ||
013dc89f | 758 | `-timeout` `<integer> (0 - N)` ('default =' `60`):: |
1f554f76 DM |
759 | |
760 | Wait maximal timeout seconds. | |
761 | ||
762 | ||
763 | ||
764 | ||
765 | *pct snapshot* `<vmid> <snapname>` `[OPTIONS]` | |
766 | ||
767 | Snapshot a container. | |
768 | ||
013dc89f | 769 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
770 | |
771 | The (unique) ID of the VM. | |
772 | ||
013dc89f | 773 | `<snapname>`: `<string>` :: |
1f554f76 DM |
774 | |
775 | The name of the snapshot. | |
776 | ||
013dc89f | 777 | `-description` `<string>` :: |
1f554f76 DM |
778 | |
779 | A textual description or comment. | |
780 | ||
781 | ||
782 | ||
783 | ||
9b3e4991 | 784 | *pct start* `<vmid>` `[OPTIONS]` |
1f554f76 DM |
785 | |
786 | Start the container. | |
787 | ||
013dc89f | 788 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
789 | |
790 | The (unique) ID of the VM. | |
791 | ||
013dc89f | 792 | `-skiplock` `<boolean>` :: |
9b3e4991 DM |
793 | |
794 | Ignore locks - only root is allowed to use this option. | |
795 | ||
1f554f76 DM |
796 | |
797 | ||
2c0dde61 DM |
798 | |
799 | *pct status* `<vmid>` `[OPTIONS]` | |
800 | ||
801 | Show CT status. | |
802 | ||
013dc89f | 803 | `<vmid>`: `<integer> (1 - N)` :: |
2c0dde61 DM |
804 | |
805 | The (unique) ID of the VM. | |
806 | ||
013dc89f | 807 | `-verbose` `<boolean>` :: |
2c0dde61 DM |
808 | |
809 | Verbose output format | |
810 | ||
811 | ||
812 | ||
813 | ||
9b3e4991 | 814 | *pct stop* `<vmid>` `[OPTIONS]` |
1f554f76 | 815 | |
9b3e4991 DM |
816 | Stop the container. This will abruptly stop all processes running in the |
817 | container. | |
1f554f76 | 818 | |
013dc89f | 819 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
820 | |
821 | The (unique) ID of the VM. | |
822 | ||
013dc89f | 823 | `-skiplock` `<boolean>` :: |
9b3e4991 DM |
824 | |
825 | Ignore locks - only root is allowed to use this option. | |
826 | ||
1f554f76 DM |
827 | |
828 | ||
829 | *pct suspend* `<vmid>` | |
830 | ||
831 | Suspend the container. | |
832 | ||
013dc89f | 833 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
834 | |
835 | The (unique) ID of the VM. | |
836 | ||
837 | ||
838 | ||
839 | ||
9b3e4991 | 840 | *pct template* `<vmid> -experimental <boolean>` `[OPTIONS]` |
1f554f76 DM |
841 | |
842 | Create a Template. | |
843 | ||
013dc89f | 844 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
845 | |
846 | The (unique) ID of the VM. | |
847 | ||
013dc89f | 848 | `-experimental` `<boolean>` ('default =' `0`):: |
9b3e4991 | 849 | |
c2993fe5 | 850 | The template feature is experimental, set this flag if you know what you are doing. |
9b3e4991 | 851 | |
1f554f76 DM |
852 | |
853 | ||
854 | ||
855 | *pct unlock* `<vmid>` | |
856 | ||
857 | Unlock the VM. | |
858 | ||
013dc89f | 859 | `<vmid>`: `<integer> (1 - N)` :: |
1f554f76 DM |
860 | |
861 | The (unique) ID of the VM. | |
862 | ||
863 | ||
864 | ||
9b3e4991 DM |
865 | *pct unmount* `<vmid>` |
866 | ||
867 | Unmount the container's filesystem. | |
868 | ||
013dc89f | 869 | `<vmid>`: `<integer> (1 - N)` :: |
9b3e4991 DM |
870 | |
871 | The (unique) ID of the VM. | |
872 | ||
873 | ||
874 | ||
1f554f76 | 875 |