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