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.
71 Print the list of assigned CPU sets.
76 *pct create* `<vmid> <ostemplate>` `[OPTIONS]`
78 Create or restore a container.
80 `<vmid>`: `<integer> (1 - N)` ::
82 The (unique) ID of the VM.
84 `<ostemplate>`: `<string>` ::
86 The OS template or backup file.
88 `-arch` `<amd64 | i386>` ('default =' `amd64`)::
92 `-cmode` `<console | shell | tty>` ('default =' `tty`)::
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).
96 `-console` `<boolean>` ('default =' `1`)::
98 Attach a console device (/dev/console) to the container.
100 `-cores` `<integer> (1 - 128)` ::
102 The number of cores assigned to the container. A container can use all available cores by default.
104 `-cpulimit` `<number> (0 - 128)` ('default =' `0`)::
108 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
110 `-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
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.
114 NOTE: You can disable fair-scheduler configuration by setting this to 0.
116 `-description` `<string>` ::
118 Container description. Only used on the configuration web interface.
120 `-force` `<boolean>` ::
122 Allow to overwrite existing container.
124 `-hostname` `<string>` ::
126 Set a host name for the container.
128 `-ignore-unpack-errors` `<boolean>` ::
130 Ignore errors when extracting the template.
132 `-lock` `<backup | migrate | rollback | snapshot>` ::
136 `-memory` `<integer> (16 - N)` ('default =' `512`)::
138 Amount of RAM for the VM in MB.
140 `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
142 Use volume as container mount point.
144 `-nameserver` `<string>` ::
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.
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>]` ::
150 Specifies network interfaces for the container.
152 `-onboot` `<boolean>` ('default =' `0`)::
154 Specifies whether a VM will be started during system bootup.
156 `-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
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.
162 Sets root password inside container.
164 `-pool` `<string>` ::
166 Add the VM to the specified pool.
168 `-protection` `<boolean>` ('default =' `0`)::
170 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
172 `-restore` `<boolean>` ::
174 Mark this as restore task.
176 `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
178 Use volume as container root.
180 `-searchdomain` `<string>` ::
182 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
184 `-ssh-public-keys` `<string>` ::
186 Setup public SSH keys (one key per line, OpenSSH format).
188 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
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.
192 `-storage` `<string>` ('default =' `local`)::
196 `-swap` `<integer> (0 - N)` ('default =' `512`)::
198 Amount of SWAP for the VM in MB.
200 `-template` `<boolean>` ('default =' `0`)::
202 Enable/disable Template.
204 `-tty` `<integer> (0 - 6)` ('default =' `2`)::
206 Specify the number of tty available to the container
208 `-unprivileged` `<boolean>` ('default =' `0`)::
210 Makes the container run as unprivileged user. (Should not be modified manually.)
212 `-unused[n]` `<string>` ::
214 Reference to unused volumes. This is used internally, and should not be modified manually.
219 *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
221 Delete a LXC snapshot.
223 `<vmid>`: `<integer> (1 - N)` ::
225 The (unique) ID of the VM.
227 `<snapname>`: `<string>` ::
229 The name of the snapshot.
231 `-force` `<boolean>` ::
233 For removal from config file, even if removing disk snapshots fails.
238 *pct destroy* `<vmid>`
240 Destroy the container (also delete all uses files).
242 `<vmid>`: `<integer> (1 - N)` ::
244 The (unique) ID of the VM.
251 Get the container's current disk usage.
253 `<vmid>`: `<integer> (1 - N)` ::
255 The (unique) ID of the VM.
261 Launch a shell for the specified container.
263 `<vmid>`: `<integer> (1 - N)` ::
265 The (unique) ID of the VM.
269 *pct exec* `<vmid> [<extra-args>]`
271 Launch a command inside the specified container.
273 `<vmid>`: `<integer> (1 - N)` ::
275 The (unique) ID of the VM.
277 `<extra-args>`: `<array>` ::
279 Extra arguments as array
283 *pct fsck* `<vmid>` `[OPTIONS]`
285 Run a filesystem check (fsck) on a container volume.
287 `<vmid>`: `<integer> (1 - N)` ::
289 The (unique) ID of the VM.
291 `-device` `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` ::
293 A volume on which to run the filesystem check
295 `-force` `<boolean>` ('default =' `0`)::
297 Force checking, even if the filesystem seems clean
302 *pct help* `[<cmd>]` `[OPTIONS]`
304 Get help about specified command.
306 `<cmd>`: `<string>` ::
310 `-verbose` `<boolean>` ::
312 Verbose output format.
319 LXC container index (per node).
324 *pct listsnapshot* `<vmid>`
328 `<vmid>`: `<integer> (1 - N)` ::
330 The (unique) ID of the VM.
335 *pct migrate* `<vmid> <target>` `[OPTIONS]`
337 Migrate the container to another node. Creates a new migration task.
339 `<vmid>`: `<integer> (1 - N)` ::
341 The (unique) ID of the VM.
343 `<target>`: `<string>` ::
347 `-force` `<boolean>` ::
349 Force migration despite local bind / device mounts. NOTE: deprecated, use 'shared' property of mount point instead.
351 `-online` `<boolean>` ::
353 Use online/live migration.
360 Mount the container's filesystem on the host. This will hold a lock on the
361 container and is meant for emergency maintenance only as it will prevent
362 further operations on the container other than start and stop.
364 `<vmid>`: `<integer> (1 - N)` ::
366 The (unique) ID of the VM.
370 *pct pull* `<vmid> <path> <destination>` `[OPTIONS]`
372 Copy a file from the container to the local system.
374 `<vmid>`: `<integer> (1 - N)` ::
376 The (unique) ID of the VM.
378 `<path>`: `<string>` ::
380 Path to a file inside the container to pull.
382 `<destination>`: `<string>` ::
386 `-group` `<string>` ::
388 Owner group name or id.
390 `-perms` `<string>` ::
392 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
394 `-user` `<string>` ::
396 Owner user name or id.
400 *pct push* `<vmid> <file> <destination>` `[OPTIONS]`
402 Copy a local file to the container.
404 `<vmid>`: `<integer> (1 - N)` ::
406 The (unique) ID of the VM.
408 `<file>`: `<string>` ::
410 Path to a local file.
412 `<destination>`: `<string>` ::
414 Destination inside the container to write to.
416 `-group` `<string>` ::
418 Owner group name or id. When using a name it must exist inside the container.
420 `-perms` `<string>` ::
422 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
424 `-user` `<string>` ::
426 Owner user name or id. When using a name it must exist inside the container.
431 *pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
433 Resize a container mount point.
435 `<vmid>`: `<integer> (1 - N)` ::
437 The (unique) ID of the VM.
439 `<disk>`: `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` ::
441 The disk you want to resize.
443 `<size>`: `\+?\d+(\.\d+)?[KMGT]?` ::
445 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.
447 `-digest` `<string>` ::
449 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
453 *pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
455 Create or restore a container.
457 `<vmid>`: `<integer> (1 - N)` ::
459 The (unique) ID of the VM.
461 `<ostemplate>`: `<string>` ::
463 The OS template or backup file.
465 `-arch` `<amd64 | i386>` ('default =' `amd64`)::
467 OS architecture type.
469 `-cmode` `<console | shell | tty>` ('default =' `tty`)::
471 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).
473 `-console` `<boolean>` ('default =' `1`)::
475 Attach a console device (/dev/console) to the container.
477 `-cores` `<integer> (1 - 128)` ::
479 The number of cores assigned to the container. A container can use all available cores by default.
481 `-cpulimit` `<number> (0 - 128)` ('default =' `0`)::
485 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
487 `-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
489 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.
491 NOTE: You can disable fair-scheduler configuration by setting this to 0.
493 `-description` `<string>` ::
495 Container description. Only used on the configuration web interface.
497 `-force` `<boolean>` ::
499 Allow to overwrite existing container.
501 `-hostname` `<string>` ::
503 Set a host name for the container.
505 `-ignore-unpack-errors` `<boolean>` ::
507 Ignore errors when extracting the template.
509 `-lock` `<backup | migrate | rollback | snapshot>` ::
513 `-memory` `<integer> (16 - N)` ('default =' `512`)::
515 Amount of RAM for the VM in MB.
517 `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
519 Use volume as container mount point.
521 `-nameserver` `<string>` ::
523 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
525 `-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>]` ::
527 Specifies network interfaces for the container.
529 `-onboot` `<boolean>` ('default =' `0`)::
531 Specifies whether a VM will be started during system bootup.
533 `-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
535 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.
539 Sets root password inside container.
541 `-pool` `<string>` ::
543 Add the VM to the specified pool.
545 `-protection` `<boolean>` ('default =' `0`)::
547 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
549 `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
551 Use volume as container root.
553 `-searchdomain` `<string>` ::
555 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
557 `-ssh-public-keys` `<string>` ::
559 Setup public SSH keys (one key per line, OpenSSH format).
561 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
563 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.
565 `-storage` `<string>` ('default =' `local`)::
569 `-swap` `<integer> (0 - N)` ('default =' `512`)::
571 Amount of SWAP for the VM in MB.
573 `-template` `<boolean>` ('default =' `0`)::
575 Enable/disable Template.
577 `-tty` `<integer> (0 - 6)` ('default =' `2`)::
579 Specify the number of tty available to the container
581 `-unprivileged` `<boolean>` ('default =' `0`)::
583 Makes the container run as unprivileged user. (Should not be modified manually.)
585 `-unused[n]` `<string>` ::
587 Reference to unused volumes. This is used internally, and should not be modified manually.
592 *pct resume* `<vmid>`
594 Resume the container.
596 `<vmid>`: `<integer> (1 - N)` ::
598 The (unique) ID of the VM.
603 *pct rollback* `<vmid> <snapname>`
605 Rollback LXC state to specified snapshot.
607 `<vmid>`: `<integer> (1 - N)` ::
609 The (unique) ID of the VM.
611 `<snapname>`: `<string>` ::
613 The name of the snapshot.
618 *pct set* `<vmid>` `[OPTIONS]`
620 Set container options.
622 `<vmid>`: `<integer> (1 - N)` ::
624 The (unique) ID of the VM.
626 `-arch` `<amd64 | i386>` ('default =' `amd64`)::
628 OS architecture type.
630 `-cmode` `<console | shell | tty>` ('default =' `tty`)::
632 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).
634 `-console` `<boolean>` ('default =' `1`)::
636 Attach a console device (/dev/console) to the container.
638 `-cores` `<integer> (1 - 128)` ::
640 The number of cores assigned to the container. A container can use all available cores by default.
642 `-cpulimit` `<number> (0 - 128)` ('default =' `0`)::
646 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
648 `-cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
650 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.
652 NOTE: You can disable fair-scheduler configuration by setting this to 0.
654 `-delete` `<string>` ::
656 A list of settings you want to delete.
658 `-description` `<string>` ::
660 Container description. Only used on the configuration web interface.
662 `-digest` `<string>` ::
664 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
666 `-hostname` `<string>` ::
668 Set a host name for the container.
670 `-lock` `<backup | migrate | rollback | snapshot>` ::
674 `-memory` `<integer> (16 - N)` ('default =' `512`)::
676 Amount of RAM for the VM in MB.
678 `-mp[n]` `[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
680 Use volume as container mount point.
682 `-nameserver` `<string>` ::
684 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
686 `-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>]` ::
688 Specifies network interfaces for the container.
690 `-onboot` `<boolean>` ('default =' `0`)::
692 Specifies whether a VM will be started during system bootup.
694 `-ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
696 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.
698 `-protection` `<boolean>` ('default =' `0`)::
700 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
702 `-rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
704 Use volume as container root.
706 `-searchdomain` `<string>` ::
708 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
710 `-startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
712 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.
714 `-swap` `<integer> (0 - N)` ('default =' `512`)::
716 Amount of SWAP for the VM in MB.
718 `-template` `<boolean>` ('default =' `0`)::
720 Enable/disable Template.
722 `-tty` `<integer> (0 - 6)` ('default =' `2`)::
724 Specify the number of tty available to the container
726 `-unprivileged` `<boolean>` ('default =' `0`)::
728 Makes the container run as unprivileged user. (Should not be modified manually.)
730 `-unused[n]` `<string>` ::
732 Reference to unused volumes. This is used internally, and should not be modified manually.
737 *pct shutdown* `<vmid>` `[OPTIONS]`
739 Shutdown the container. This will trigger a clean shutdown of the
740 container, see lxc-stop(1) for details.
742 `<vmid>`: `<integer> (1 - N)` ::
744 The (unique) ID of the VM.
746 `-forceStop` `<boolean>` ('default =' `0`)::
748 Make sure the Container stops.
750 `-timeout` `<integer> (0 - N)` ('default =' `60`)::
752 Wait maximal timeout seconds.
757 *pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
759 Snapshot a container.
761 `<vmid>`: `<integer> (1 - N)` ::
763 The (unique) ID of the VM.
765 `<snapname>`: `<string>` ::
767 The name of the snapshot.
769 `-description` `<string>` ::
771 A textual description or comment.
776 *pct start* `<vmid>` `[OPTIONS]`
780 `<vmid>`: `<integer> (1 - N)` ::
782 The (unique) ID of the VM.
784 `-skiplock` `<boolean>` ::
786 Ignore locks - only root is allowed to use this option.
791 *pct status* `<vmid>` `[OPTIONS]`
795 `<vmid>`: `<integer> (1 - N)` ::
797 The (unique) ID of the VM.
799 `-verbose` `<boolean>` ::
801 Verbose output format
806 *pct stop* `<vmid>` `[OPTIONS]`
808 Stop the container. This will abruptly stop all processes running in the
811 `<vmid>`: `<integer> (1 - N)` ::
813 The (unique) ID of the VM.
815 `-skiplock` `<boolean>` ::
817 Ignore locks - only root is allowed to use this option.
821 *pct suspend* `<vmid>`
823 Suspend the container.
825 `<vmid>`: `<integer> (1 - N)` ::
827 The (unique) ID of the VM.
832 *pct template* `<vmid> -experimental <boolean>` `[OPTIONS]`
836 `<vmid>`: `<integer> (1 - N)` ::
838 The (unique) ID of the VM.
840 `-experimental` `<boolean>` ('default =' `0`)::
842 The template feature is experimental, set this flag if you know what you are doing.
847 *pct unlock* `<vmid>`
851 `<vmid>`: `<integer> (1 - N)` ::
853 The (unique) ID of the VM.
857 *pct unmount* `<vmid>`
859 Unmount the container's filesystem.
861 `<vmid>`: `<integer> (1 - N)` ::
863 The (unique) ID of the VM.