1 *pct* `<COMMAND> [ARGS] [OPTIONS]`
5 Get container configuration.
7 `<vmid>` `integer (1 - N)` ::
9 The (unique) ID of the VM.
14 *pct console* `<vmid>`
16 Launch a console for the specified container.
18 `<vmid>` `integer (1 - N)` ::
20 The (unique) ID of the VM.
25 *pct create* `<vmid> <ostemplate>` `[OPTIONS]`
27 Create or restore a container.
29 `<vmid>` `integer (1 - N)` ::
31 The (unique) ID of the VM.
33 `<ostemplate>` `string` ::
35 The OS template or backup file.
37 `-arch` `(amd64 | i386)` (default=`amd64`)::
41 `-cmode` `(console | shell | tty)` (default=`tty`)::
43 Console mode. By default, the console command tries to open a connection to
44 one of the available tty devices. By setting cmode to 'console' it tries to
45 attach to /dev/console instead. If you set cmode to 'shell', it simply
46 invokes a shell inside the container (no login).
48 `-console` `boolean` (default=`1`)::
50 Attach a console device (/dev/console) to the container.
52 `-cpulimit` `number (0 - 128)` (default=`0`)::
54 Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2'
55 CPU time. Value '0' indicates no CPU limit.
57 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
59 CPU weight for a VM. Argument is used in the kernel fair scheduler. The
60 larger the number is, the more CPU time this VM gets. Number is relative to
61 weights of all the other running VMs.
63 NOTE: You can disable fair-scheduler configuration by setting this to 0.
65 `-description` `string` ::
67 Container description. Only used on the configuration web interface.
71 Allow to overwrite existing container.
73 `-hostname` `string` ::
75 Set a host name for the container.
77 `-ignore-unpack-errors` `boolean` ::
79 Ignore errors when extracting the template.
81 `-lock` `(backup | migrate | rollback | snapshot)` ::
85 `-memory` `integer (16 - N)` (default=`512`)::
87 Amount of RAM for the VM in MB.
89 `-mp[n]` `[volume=]<volume> [,backup=<[1|0]>] [,mp=<Path>] [,size=<DiskSize>]` ::
91 Use volume as container mount point (experimental feature).
93 `-nameserver` `string` ::
95 Sets DNS server IP address for a container. Create will automatically use
96 the setting from the host if you neither set searchdomain or nameserver.
98 `-net[n]` `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,tag=<VlanNo>]` ::
100 Specifies network interfaces for the container.
102 `-onboot` `boolean` (default=`0`)::
104 Specifies whether a VM will be started during system bootup.
106 `-ostype` `(archlinux | centos | debian | fedora | opensuse | ubuntu)` ::
108 OS type. Corresponds to lxc setup scripts in
109 /usr/share/lxc/config/<ostype>.common.conf.
111 `-password` `string` ::
113 Sets root password inside container.
117 Add the VM to the specified pool.
119 `-protection` `boolean` (default=`0`)::
121 Sets the protection flag of the container. This will prevent the remove
122 operation. This will prevent the CT or CT's disk remove/update operation.
124 `-restore` `boolean` ::
126 Mark this as restore task.
128 `-rootfs` `[volume=]<volume> [,backup=<[1|0]>] [,size=<DiskSize>]` ::
130 Use volume as container root.
132 `-searchdomain` `string` ::
134 Sets DNS search domains for a container. Create will automatically use the
135 setting from the host if you neither set searchdomain or nameserver.
137 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
139 Startup and shutdown behavior. Order is a non-negative number defining the
140 general startup order. Shutdown in done with reverse ordering. Additionally
141 you can set the 'up' or 'down' delay in seconds, which specifies a delay to
142 wait before the next VM is started or stopped.
144 `-storage` `string` (default=`local`)::
148 `-swap` `integer (0 - N)` (default=`512`)::
150 Amount of SWAP for the VM in MB.
152 `-template` `boolean` (default=`0`)::
154 Enable/disable Template.
156 `-tty` `integer (0 - 6)` (default=`2`)::
158 Specify the number of tty available to the container
160 `-unprivileged` `boolean` (default=`0`)::
162 Makes the container run as unprivileged user. (Should not be modified
165 `-unused[n]` `string` ::
167 Reference to unused volumes.
172 *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
174 Delete a LXC snapshot.
176 `<vmid>` `integer (1 - N)` ::
178 The (unique) ID of the VM.
180 `<snapname>` `string` ::
182 The name of the snapshot.
184 `-force` `boolean` ::
186 For removal from config file, even if removing disk snapshots fails.
191 *pct destroy* `<vmid>`
193 Destroy the container (also delete all uses files).
195 `<vmid>` `integer (1 - N)` ::
197 The (unique) ID of the VM.
204 Launch a shell for the specified container.
206 `<vmid>` `integer (1 - N)` ::
208 The (unique) ID of the VM.
212 *pct exec* `<vmid> [<extra-args>]`
214 Launch a command inside the specified container.
216 `<vmid>` `integer (1 - N)` ::
218 The (unique) ID of the VM.
220 `<extra-args>` `array` ::
222 Extra arguments as array
226 *pct fsck* `<vmid>` `[OPTIONS]`
228 Run a filesystem check (fsck) on a container volume.
230 `<vmid>` `integer (1 - N)` ::
232 The (unique) ID of the VM.
234 `-device` `(mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs)` ::
236 A volume on which to run the filesystem check
238 `-force` `boolean` (default=`0`)::
240 Force checking, even if the filesystem seems clean
245 *pct help* `[<cmd>]` `[OPTIONS]`
247 Get help about specified command.
253 `-verbose` `boolean` ::
255 Verbose output format.
262 LXC container index (per node).
267 *pct listsnapshot* `<vmid>`
271 `<vmid>` `integer (1 - N)` ::
273 The (unique) ID of the VM.
278 *pct migrate* `<vmid> <target>` `[OPTIONS]`
280 Migrate the container to another node. Creates a new migration task.
282 `<vmid>` `integer (1 - N)` ::
284 The (unique) ID of the VM.
286 `<target>` `string` ::
290 `-online` `boolean` ::
292 Use online/live migration.
296 *pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
298 Resize a container mountpoint.
300 `<vmid>` `integer (1 - N)` ::
302 The (unique) ID of the VM.
304 `<disk>` `(mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs)` ::
306 The disk you want to resize.
308 `<size>` `\+?\d+(\.\d+)?[KMGT]?` ::
310 The new size. With the '+' sign the value is added to the actual size of
311 the volume and without it, the value is taken as an absolute one. Shrinking
312 disk size is not supported.
314 `-digest` `string` ::
316 Prevent changes if current configuration file has different SHA1 digest.
317 This can be used to prevent concurrent modifications.
321 *pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
323 Create or restore a container.
325 `<vmid>` `integer (1 - N)` ::
327 The (unique) ID of the VM.
329 `<ostemplate>` `string` ::
331 The OS template or backup file.
333 `-arch` `(amd64 | i386)` (default=`amd64`)::
335 OS architecture type.
337 `-cmode` `(console | shell | tty)` (default=`tty`)::
339 Console mode. By default, the console command tries to open a connection to
340 one of the available tty devices. By setting cmode to 'console' it tries to
341 attach to /dev/console instead. If you set cmode to 'shell', it simply
342 invokes a shell inside the container (no login).
344 `-console` `boolean` (default=`1`)::
346 Attach a console device (/dev/console) to the container.
348 `-cpulimit` `number (0 - 128)` (default=`0`)::
350 Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2'
351 CPU time. Value '0' indicates no CPU limit.
353 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
355 CPU weight for a VM. Argument is used in the kernel fair scheduler. The
356 larger the number is, the more CPU time this VM gets. Number is relative to
357 weights of all the other running VMs.
359 NOTE: You can disable fair-scheduler configuration by setting this to 0.
361 `-description` `string` ::
363 Container description. Only used on the configuration web interface.
365 `-force` `boolean` ::
367 Allow to overwrite existing container.
369 `-hostname` `string` ::
371 Set a host name for the container.
373 `-ignore-unpack-errors` `boolean` ::
375 Ignore errors when extracting the template.
377 `-lock` `(backup | migrate | rollback | snapshot)` ::
381 `-memory` `integer (16 - N)` (default=`512`)::
383 Amount of RAM for the VM in MB.
385 `-mp[n]` `[volume=]<volume> [,backup=<[1|0]>] [,mp=<Path>] [,size=<DiskSize>]` ::
387 Use volume as container mount point (experimental feature).
389 `-nameserver` `string` ::
391 Sets DNS server IP address for a container. Create will automatically use
392 the setting from the host if you neither set searchdomain or nameserver.
394 `-net[n]` `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,tag=<VlanNo>]` ::
396 Specifies network interfaces for the container.
398 `-onboot` `boolean` (default=`0`)::
400 Specifies whether a VM will be started during system bootup.
402 `-ostype` `(archlinux | centos | debian | fedora | opensuse | ubuntu)` ::
404 OS type. Corresponds to lxc setup scripts in
405 /usr/share/lxc/config/<ostype>.common.conf.
407 `-password` `string` ::
409 Sets root password inside container.
413 Add the VM to the specified pool.
415 `-protection` `boolean` (default=`0`)::
417 Sets the protection flag of the container. This will prevent the remove
418 operation. This will prevent the CT or CT's disk remove/update operation.
420 `-rootfs` `[volume=]<volume> [,backup=<[1|0]>] [,size=<DiskSize>]` ::
422 Use volume as container root.
424 `-searchdomain` `string` ::
426 Sets DNS search domains for a container. Create will automatically use the
427 setting from the host if you neither set searchdomain or nameserver.
429 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
431 Startup and shutdown behavior. Order is a non-negative number defining the
432 general startup order. Shutdown in done with reverse ordering. Additionally
433 you can set the 'up' or 'down' delay in seconds, which specifies a delay to
434 wait before the next VM is started or stopped.
436 `-storage` `string` (default=`local`)::
440 `-swap` `integer (0 - N)` (default=`512`)::
442 Amount of SWAP for the VM in MB.
444 `-template` `boolean` (default=`0`)::
446 Enable/disable Template.
448 `-tty` `integer (0 - 6)` (default=`2`)::
450 Specify the number of tty available to the container
452 `-unprivileged` `boolean` (default=`0`)::
454 Makes the container run as unprivileged user. (Should not be modified
457 `-unused[n]` `string` ::
459 Reference to unused volumes.
464 *pct resume* `<vmid>`
466 Resume the container.
468 `<vmid>` `integer (1 - N)` ::
470 The (unique) ID of the VM.
475 *pct rollback* `<vmid> <snapname>`
477 Rollback LXC state to specified snapshot.
479 `<vmid>` `integer (1 - N)` ::
481 The (unique) ID of the VM.
483 `<snapname>` `string` ::
485 The name of the snapshot.
490 *pct set* `<vmid>` `[OPTIONS]`
492 Set container options.
494 `<vmid>` `integer (1 - N)` ::
496 The (unique) ID of the VM.
498 `-arch` `(amd64 | i386)` (default=`amd64`)::
500 OS architecture type.
502 `-cmode` `(console | shell | tty)` (default=`tty`)::
504 Console mode. By default, the console command tries to open a connection to
505 one of the available tty devices. By setting cmode to 'console' it tries to
506 attach to /dev/console instead. If you set cmode to 'shell', it simply
507 invokes a shell inside the container (no login).
509 `-console` `boolean` (default=`1`)::
511 Attach a console device (/dev/console) to the container.
513 `-cpulimit` `number (0 - 128)` (default=`0`)::
515 Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2'
516 CPU time. Value '0' indicates no CPU limit.
518 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
520 CPU weight for a VM. Argument is used in the kernel fair scheduler. The
521 larger the number is, the more CPU time this VM gets. Number is relative to
522 weights of all the other running VMs.
524 NOTE: You can disable fair-scheduler configuration by setting this to 0.
526 `-delete` `string` ::
528 A list of settings you want to delete.
530 `-description` `string` ::
532 Container description. Only used on the configuration web interface.
534 `-digest` `string` ::
536 Prevent changes if current configuration file has different SHA1 digest.
537 This can be used to prevent concurrent modifications.
539 `-hostname` `string` ::
541 Set a host name for the container.
543 `-lock` `(backup | migrate | rollback | snapshot)` ::
547 `-memory` `integer (16 - N)` (default=`512`)::
549 Amount of RAM for the VM in MB.
551 `-mp[n]` `[volume=]<volume> [,backup=<[1|0]>] [,mp=<Path>] [,size=<DiskSize>]` ::
553 Use volume as container mount point (experimental feature).
555 `-nameserver` `string` ::
557 Sets DNS server IP address for a container. Create will automatically use
558 the setting from the host if you neither set searchdomain or nameserver.
560 `-net[n]` `name=<String> [,bridge=<vmbr<Number>>] [,firewall=<[1|0]>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<MAC>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<Number>] [,tag=<VlanNo>]` ::
562 Specifies network interfaces for the container.
564 `-onboot` `boolean` (default=`0`)::
566 Specifies whether a VM will be started during system bootup.
568 `-ostype` `(archlinux | centos | debian | fedora | opensuse | ubuntu)` ::
570 OS type. Corresponds to lxc setup scripts in
571 /usr/share/lxc/config/<ostype>.common.conf.
573 `-protection` `boolean` (default=`0`)::
575 Sets the protection flag of the container. This will prevent the remove
576 operation. This will prevent the CT or CT's disk remove/update operation.
578 `-rootfs` `[volume=]<volume> [,backup=<[1|0]>] [,size=<DiskSize>]` ::
580 Use volume as container root.
582 `-searchdomain` `string` ::
584 Sets DNS search domains for a container. Create will automatically use the
585 setting from the host if you neither set searchdomain or nameserver.
587 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
589 Startup and shutdown behavior. Order is a non-negative number defining the
590 general startup order. Shutdown in done with reverse ordering. Additionally
591 you can set the 'up' or 'down' delay in seconds, which specifies a delay to
592 wait before the next VM is started or stopped.
594 `-swap` `integer (0 - N)` (default=`512`)::
596 Amount of SWAP for the VM in MB.
598 `-template` `boolean` (default=`0`)::
600 Enable/disable Template.
602 `-tty` `integer (0 - 6)` (default=`2`)::
604 Specify the number of tty available to the container
606 `-unprivileged` `boolean` (default=`0`)::
608 Makes the container run as unprivileged user. (Should not be modified
611 `-unused[n]` `string` ::
613 Reference to unused volumes.
618 *pct shutdown* `<vmid>` `[OPTIONS]`
620 Shutdown the container.
622 `<vmid>` `integer (1 - N)` ::
624 The (unique) ID of the VM.
626 `-forceStop` `boolean` (default=`0`)::
628 Make sure the Container stops.
630 `-timeout` `integer (0 - N)` (default=`60`)::
632 Wait maximal timeout seconds.
637 *pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
639 Snapshot a container.
641 `<vmid>` `integer (1 - N)` ::
643 The (unique) ID of the VM.
645 `<snapname>` `string` ::
647 The name of the snapshot.
649 `-description` `string` ::
651 A textual description or comment.
660 `<vmid>` `integer (1 - N)` ::
662 The (unique) ID of the VM.
670 `<vmid>` `integer (1 - N)` ::
672 The (unique) ID of the VM.
676 *pct suspend* `<vmid>`
678 Suspend the container.
680 `<vmid>` `integer (1 - N)` ::
682 The (unique) ID of the VM.
687 *pct template* `<vmid>`
691 `<vmid>` `integer (1 - N)` ::
693 The (unique) ID of the VM.
698 *pct unlock* `<vmid>`
702 `<vmid>` `integer (1 - N)` ::
704 The (unique) ID of the VM.