1 *pct* `<COMMAND> [ARGS] [OPTIONS]`
3 *pct clone* `<vmid> <newid> -experimental <boolean>` `[OPTIONS]`
5 Create a container clone/copy
7 `<vmid>` `integer (1 - N)` ::
9 The (unique) ID of the VM.
11 `<newid>` `integer (1 - N)` ::
15 `-description` `string` ::
17 Description for the new CT.
19 `-experimental` `boolean` (default=`0`)::
21 The clone feature is experimental, set this flag if you know what you are doing.
23 `-full` `boolean` (default=`0`)::
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.
27 `-hostname` `string` ::
29 Set a hostname for the new CT.
33 Add the new CT to the specified pool.
35 `-snapname` `string` ::
37 The name of the snapshot.
39 `-storage` `string` ::
41 Target storage for full clone.
43 NOTE: Requires option(s): `full`
50 Get container configuration.
52 `<vmid>` `integer (1 - N)` ::
54 The (unique) ID of the VM.
59 *pct console* `<vmid>`
61 Launch a console for the specified container.
63 `<vmid>` `integer (1 - N)` ::
65 The (unique) ID of the VM.
70 *pct create* `<vmid> <ostemplate>` `[OPTIONS]`
72 Create or restore a container.
74 `<vmid>` `integer (1 - N)` ::
76 The (unique) ID of the VM.
78 `<ostemplate>` `string` ::
80 The OS template or backup file.
82 `-arch` `(amd64 | i386)` (default=`amd64`)::
86 `-cmode` `(console | shell | tty)` (default=`tty`)::
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).
90 `-console` `boolean` (default=`1`)::
92 Attach a console device (/dev/console) to the container.
94 `-cpulimit` `number (0 - 128)` (default=`0`)::
98 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
100 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
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.
104 NOTE: You can disable fair-scheduler configuration by setting this to 0.
106 `-description` `string` ::
108 Container description. Only used on the configuration web interface.
110 `-force` `boolean` ::
112 Allow to overwrite existing container.
114 `-hostname` `string` ::
116 Set a host name for the container.
118 `-ignore-unpack-errors` `boolean` ::
120 Ignore errors when extracting the template.
122 `-lock` `(backup | migrate | rollback | snapshot)` ::
126 `-memory` `integer (16 - N)` (default=`512`)::
128 Amount of RAM for the VM in MB.
130 `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]` ::
132 Use volume as container mount point.
134 `-nameserver` `string` ::
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.
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>]` ::
140 Specifies network interfaces for the container.
142 `-onboot` `boolean` (default=`0`)::
144 Specifies whether a VM will be started during system bootup.
146 `-ostype` `(alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged)` ::
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.
152 Sets root password inside container.
156 Add the VM to the specified pool.
158 `-protection` `boolean` (default=`0`)::
160 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
162 `-restore` `boolean` ::
164 Mark this as restore task.
166 `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]` ::
168 Use volume as container root.
170 `-searchdomain` `string` ::
172 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
174 `-ssh-public-keys` `filepath` ::
176 Setup public SSH keys (one key per line, OpenSSH format).
178 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
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.
182 `-storage` `string` (default=`local`)::
186 `-swap` `integer (0 - N)` (default=`512`)::
188 Amount of SWAP for the VM in MB.
190 `-template` `boolean` (default=`0`)::
192 Enable/disable Template.
194 `-tty` `integer (0 - 6)` (default=`2`)::
196 Specify the number of tty available to the container
198 `-unprivileged` `boolean` (default=`0`)::
200 Makes the container run as unprivileged user. (Should not be modified manually.)
202 `-unused[n]` `string` ::
204 Reference to unused volumes. This is used internally, and should not be modified manually.
209 *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
211 Delete a LXC snapshot.
213 `<vmid>` `integer (1 - N)` ::
215 The (unique) ID of the VM.
217 `<snapname>` `string` ::
219 The name of the snapshot.
221 `-force` `boolean` ::
223 For removal from config file, even if removing disk snapshots fails.
228 *pct destroy* `<vmid>`
230 Destroy the container (also delete all uses files).
232 `<vmid>` `integer (1 - N)` ::
234 The (unique) ID of the VM.
241 Get the container's current disk usage.
243 `<vmid>` `integer (1 - N)` ::
245 The (unique) ID of the VM.
251 Launch a shell for the specified container.
253 `<vmid>` `integer (1 - N)` ::
255 The (unique) ID of the VM.
259 *pct exec* `<vmid> [<extra-args>]`
261 Launch a command inside the specified container.
263 `<vmid>` `integer (1 - N)` ::
265 The (unique) ID of the VM.
267 `<extra-args>` `array` ::
269 Extra arguments as array
273 *pct fsck* `<vmid>` `[OPTIONS]`
275 Run a filesystem check (fsck) on a container volume.
277 `<vmid>` `integer (1 - N)` ::
279 The (unique) ID of the VM.
281 `-device` `(mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs)` ::
283 A volume on which to run the filesystem check
285 `-force` `boolean` (default=`0`)::
287 Force checking, even if the filesystem seems clean
292 *pct help* `[<cmd>]` `[OPTIONS]`
294 Get help about specified command.
300 `-verbose` `boolean` ::
302 Verbose output format.
309 LXC container index (per node).
314 *pct listsnapshot* `<vmid>`
318 `<vmid>` `integer (1 - N)` ::
320 The (unique) ID of the VM.
325 *pct migrate* `<vmid> <target>` `[OPTIONS]`
327 Migrate the container to another node. Creates a new migration task.
329 `<vmid>` `integer (1 - N)` ::
331 The (unique) ID of the VM.
333 `<target>` `string` ::
337 `-force` `boolean` ::
339 Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.
341 `-online` `boolean` ::
343 Use online/live migration.
350 Mount the container's filesystem on the host. This will hold a lock on the
351 container and is meant for emergency maintenance only as it will prevent
352 further operations on the container other than start and stop.
354 `<vmid>` `integer (1 - N)` ::
356 The (unique) ID of the VM.
360 *pct pull* `<vmid> <path> <destination>` `[OPTIONS]`
362 Copy a file from the container to the local system.
364 `<vmid>` `integer (1 - N)` ::
366 The (unique) ID of the VM.
370 Path to a file inside the container to pull.
372 `<destination>` `string` ::
378 Owner group name or id.
382 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
386 Owner user name or id.
390 *pct push* `<vmid> <file> <destination>` `[OPTIONS]`
392 Copy a local file to the container.
394 `<vmid>` `integer (1 - N)` ::
396 The (unique) ID of the VM.
400 Path to a local file.
402 `<destination>` `string` ::
404 Destination inside the container to write to.
408 Owner group name or id. When using a name it must exist inside the container.
412 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
416 Owner user name or id. When using a name it must exist inside the container.
421 *pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
423 Resize a container mountpoint.
425 `<vmid>` `integer (1 - N)` ::
427 The (unique) ID of the VM.
429 `<disk>` `(mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs)` ::
431 The disk you want to resize.
433 `<size>` `\+?\d+(\.\d+)?[KMGT]?` ::
435 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.
437 `-digest` `string` ::
439 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
443 *pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
445 Create or restore a container.
447 `<vmid>` `integer (1 - N)` ::
449 The (unique) ID of the VM.
451 `<ostemplate>` `string` ::
453 The OS template or backup file.
455 `-arch` `(amd64 | i386)` (default=`amd64`)::
457 OS architecture type.
459 `-cmode` `(console | shell | tty)` (default=`tty`)::
461 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).
463 `-console` `boolean` (default=`1`)::
465 Attach a console device (/dev/console) to the container.
467 `-cpulimit` `number (0 - 128)` (default=`0`)::
471 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
473 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
475 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.
477 NOTE: You can disable fair-scheduler configuration by setting this to 0.
479 `-description` `string` ::
481 Container description. Only used on the configuration web interface.
483 `-force` `boolean` ::
485 Allow to overwrite existing container.
487 `-hostname` `string` ::
489 Set a host name for the container.
491 `-ignore-unpack-errors` `boolean` ::
493 Ignore errors when extracting the template.
495 `-lock` `(backup | migrate | rollback | snapshot)` ::
499 `-memory` `integer (16 - N)` (default=`512`)::
501 Amount of RAM for the VM in MB.
503 `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]` ::
505 Use volume as container mount point.
507 `-nameserver` `string` ::
509 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
511 `-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>]` ::
513 Specifies network interfaces for the container.
515 `-onboot` `boolean` (default=`0`)::
517 Specifies whether a VM will be started during system bootup.
519 `-ostype` `(alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged)` ::
521 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.
525 Sets root password inside container.
529 Add the VM to the specified pool.
531 `-protection` `boolean` (default=`0`)::
533 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
535 `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]` ::
537 Use volume as container root.
539 `-searchdomain` `string` ::
541 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
543 `-ssh-public-keys` `filepath` ::
545 Setup public SSH keys (one key per line, OpenSSH format).
547 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
549 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.
551 `-storage` `string` (default=`local`)::
555 `-swap` `integer (0 - N)` (default=`512`)::
557 Amount of SWAP for the VM in MB.
559 `-template` `boolean` (default=`0`)::
561 Enable/disable Template.
563 `-tty` `integer (0 - 6)` (default=`2`)::
565 Specify the number of tty available to the container
567 `-unprivileged` `boolean` (default=`0`)::
569 Makes the container run as unprivileged user. (Should not be modified manually.)
571 `-unused[n]` `string` ::
573 Reference to unused volumes. This is used internally, and should not be modified manually.
578 *pct resume* `<vmid>`
580 Resume the container.
582 `<vmid>` `integer (1 - N)` ::
584 The (unique) ID of the VM.
589 *pct rollback* `<vmid> <snapname>`
591 Rollback LXC state to specified snapshot.
593 `<vmid>` `integer (1 - N)` ::
595 The (unique) ID of the VM.
597 `<snapname>` `string` ::
599 The name of the snapshot.
604 *pct set* `<vmid>` `[OPTIONS]`
606 Set container options.
608 `<vmid>` `integer (1 - N)` ::
610 The (unique) ID of the VM.
612 `-arch` `(amd64 | i386)` (default=`amd64`)::
614 OS architecture type.
616 `-cmode` `(console | shell | tty)` (default=`tty`)::
618 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).
620 `-console` `boolean` (default=`1`)::
622 Attach a console device (/dev/console) to the container.
624 `-cpulimit` `number (0 - 128)` (default=`0`)::
628 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
630 `-cpuunits` `integer (0 - 500000)` (default=`1024`)::
632 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.
634 NOTE: You can disable fair-scheduler configuration by setting this to 0.
636 `-delete` `string` ::
638 A list of settings you want to delete.
640 `-description` `string` ::
642 Container description. Only used on the configuration web interface.
644 `-digest` `string` ::
646 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
648 `-hostname` `string` ::
650 Set a host name for the container.
652 `-lock` `(backup | migrate | rollback | snapshot)` ::
656 `-memory` `integer (16 - N)` (default=`512`)::
658 Amount of RAM for the VM in MB.
660 `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]` ::
662 Use volume as container mount point.
664 `-nameserver` `string` ::
666 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
668 `-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>]` ::
670 Specifies network interfaces for the container.
672 `-onboot` `boolean` (default=`0`)::
674 Specifies whether a VM will be started during system bootup.
676 `-ostype` `(alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged)` ::
678 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.
680 `-protection` `boolean` (default=`0`)::
682 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
684 `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]` ::
686 Use volume as container root.
688 `-searchdomain` `string` ::
690 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
692 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
694 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.
696 `-swap` `integer (0 - N)` (default=`512`)::
698 Amount of SWAP for the VM in MB.
700 `-template` `boolean` (default=`0`)::
702 Enable/disable Template.
704 `-tty` `integer (0 - 6)` (default=`2`)::
706 Specify the number of tty available to the container
708 `-unprivileged` `boolean` (default=`0`)::
710 Makes the container run as unprivileged user. (Should not be modified manually.)
712 `-unused[n]` `string` ::
714 Reference to unused volumes. This is used internally, and should not be modified manually.
719 *pct shutdown* `<vmid>` `[OPTIONS]`
721 Shutdown the container. This will trigger a clean shutdown of the
722 container, see lxc-stop(1) for details.
724 `<vmid>` `integer (1 - N)` ::
726 The (unique) ID of the VM.
728 `-forceStop` `boolean` (default=`0`)::
730 Make sure the Container stops.
732 `-timeout` `integer (0 - N)` (default=`60`)::
734 Wait maximal timeout seconds.
739 *pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
741 Snapshot a container.
743 `<vmid>` `integer (1 - N)` ::
745 The (unique) ID of the VM.
747 `<snapname>` `string` ::
749 The name of the snapshot.
751 `-description` `string` ::
753 A textual description or comment.
758 *pct start* `<vmid>` `[OPTIONS]`
762 `<vmid>` `integer (1 - N)` ::
764 The (unique) ID of the VM.
766 `-skiplock` `boolean` ::
768 Ignore locks - only root is allowed to use this option.
773 *pct status* `<vmid>` `[OPTIONS]`
777 `<vmid>` `integer (1 - N)` ::
779 The (unique) ID of the VM.
781 `-verbose` `boolean` ::
783 Verbose output format
788 *pct stop* `<vmid>` `[OPTIONS]`
790 Stop the container. This will abruptly stop all processes running in the
793 `<vmid>` `integer (1 - N)` ::
795 The (unique) ID of the VM.
797 `-skiplock` `boolean` ::
799 Ignore locks - only root is allowed to use this option.
803 *pct suspend* `<vmid>`
805 Suspend the container.
807 `<vmid>` `integer (1 - N)` ::
809 The (unique) ID of the VM.
814 *pct template* `<vmid> -experimental <boolean>` `[OPTIONS]`
818 `<vmid>` `integer (1 - N)` ::
820 The (unique) ID of the VM.
822 `-experimental` `boolean` (default=`0`)::
824 The template feature is experimental, set this flag if you know what you are doing.
829 *pct unlock* `<vmid>`
833 `<vmid>` `integer (1 - N)` ::
835 The (unique) ID of the VM.
839 *pct unmount* `<vmid>`
841 Unmount the container's filesystem.
843 `<vmid>` `integer (1 - N)` ::
845 The (unique) ID of the VM.