1 *pct* `<COMMAND> [ARGS] [OPTIONS]`
3 *pct clone* `<vmid> <newid>` `[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 `--full` `<boolean>` ::
21 Create a full copy of all disks. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default.
23 `--hostname` `<string>` ::
25 Set a hostname for the new CT.
27 `--pool` `<string>` ::
29 Add the new CT to the specified pool.
31 `--snapname` `<string>` ::
33 The name of the snapshot.
35 `--storage` `<string>` ::
37 Target storage for full clone.
39 `--target` `<string>` ::
41 Target node. Only allowed if the original VM is on shared storage.
45 Get container configuration.
47 `<vmid>`: `<integer> (1 - N)` ::
49 The (unique) ID of the VM.
51 *pct console* `<vmid>`
53 Launch a console for the specified container.
55 `<vmid>`: `<integer> (1 - N)` ::
57 The (unique) ID of the VM.
61 Print the list of assigned CPU sets.
63 *pct create* `<vmid> <ostemplate>` `[OPTIONS]`
65 Create or restore a container.
67 `<vmid>`: `<integer> (1 - N)` ::
69 The (unique) ID of the VM.
71 `<ostemplate>`: `<string>` ::
73 The OS template or backup file.
75 `--arch` `<amd64 | i386>` ('default =' `amd64`)::
79 `--bwlimit` `<number> (0 - N)` ::
81 Override i/o bandwidth limit (in KiB/s).
83 `--cmode` `<console | shell | tty>` ('default =' `tty`)::
85 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).
87 `--console` `<boolean>` ('default =' `1`)::
89 Attach a console device (/dev/console) to the container.
91 `--cores` `<integer> (1 - 128)` ::
93 The number of cores assigned to the container. A container can use all available cores by default.
95 `--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
99 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
101 `--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
103 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.
105 NOTE: You can disable fair-scheduler configuration by setting this to 0.
107 `--description` `<string>` ::
109 Container description. Only used on the configuration web interface.
111 `--force` `<boolean>` ::
113 Allow to overwrite existing container.
115 `--hostname` `<string>` ::
117 Set a host name for the container.
119 `--ignore-unpack-errors` `<boolean>` ::
121 Ignore errors when extracting the template.
123 `--lock` `<backup | migrate | rollback | snapshot>` ::
127 `--memory` `<integer> (16 - N)` ('default =' `512`)::
129 Amount of RAM for the VM in MB.
131 `--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>]` ::
133 Use volume as container mount point.
135 `--nameserver` `<string>` ::
137 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
139 `--net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` ::
141 Specifies network interfaces for the container.
143 `--onboot` `<boolean>` ('default =' `0`)::
145 Specifies whether a VM will be started during system bootup.
147 `--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
149 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.
153 Sets root password inside container.
155 `--pool` `<string>` ::
157 Add the VM to the specified pool.
159 `--protection` `<boolean>` ('default =' `0`)::
161 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
163 `--restore` `<boolean>` ::
165 Mark this as restore task.
167 `--rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
169 Use volume as container root.
171 `--searchdomain` `<string>` ::
173 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
175 `--ssh-public-keys` `<filepath>` ::
177 Setup public SSH keys (one key per line, OpenSSH format).
179 `--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
181 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.
183 `--storage` `<string>` ('default =' `local`)::
187 `--swap` `<integer> (0 - N)` ('default =' `512`)::
189 Amount of SWAP for the VM in MB.
191 `--template` `<boolean>` ('default =' `0`)::
193 Enable/disable Template.
195 `--tty` `<integer> (0 - 6)` ('default =' `2`)::
197 Specify the number of tty available to the container
199 `--unprivileged` `<boolean>` ('default =' `0`)::
201 Makes the container run as unprivileged user. (Should not be modified manually.)
203 `--unused[n]` `<string>` ::
205 Reference to unused volumes. This is used internally, and should not be modified manually.
207 *pct delsnapshot* `<vmid> <snapname>` `[OPTIONS]`
209 Delete a LXC snapshot.
211 `<vmid>`: `<integer> (1 - N)` ::
213 The (unique) ID of the VM.
215 `<snapname>`: `<string>` ::
217 The name of the snapshot.
219 `--force` `<boolean>` ::
221 For removal from config file, even if removing disk snapshots fails.
223 *pct destroy* `<vmid>`
225 Destroy the container (also delete all uses files).
227 `<vmid>`: `<integer> (1 - N)` ::
229 The (unique) ID of the VM.
233 Get the container's current disk usage.
235 `<vmid>`: `<integer> (1 - N)` ::
237 The (unique) ID of the VM.
241 Launch a shell for the specified container.
243 `<vmid>`: `<integer> (1 - N)` ::
245 The (unique) ID of the VM.
247 *pct exec* `<vmid> [<extra-args>]`
249 Launch a command inside the specified container.
251 `<vmid>`: `<integer> (1 - N)` ::
253 The (unique) ID of the VM.
255 `<extra-args>`: `<array>` ::
257 Extra arguments as array
259 *pct fsck* `<vmid>` `[OPTIONS]`
261 Run a filesystem check (fsck) on a container volume.
263 `<vmid>`: `<integer> (1 - N)` ::
265 The (unique) ID of the VM.
267 `--device` `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` ::
269 A volume on which to run the filesystem check
271 `--force` `<boolean>` ('default =' `0`)::
273 Force checking, even if the filesystem seems clean
275 *pct help* `[OPTIONS]`
277 Get help about specified command.
279 `--extra-args` `<array>` ::
281 Shows help for a specific command
283 `--verbose` `<boolean>` ::
285 Verbose output format.
289 LXC container index (per node).
291 *pct listsnapshot* `<vmid>`
295 `<vmid>`: `<integer> (1 - N)` ::
297 The (unique) ID of the VM.
299 *pct migrate* `<vmid> <target>` `[OPTIONS]`
301 Migrate the container to another node. Creates a new migration task.
303 `<vmid>`: `<integer> (1 - N)` ::
305 The (unique) ID of the VM.
307 `<target>`: `<string>` ::
311 `--force` `<boolean>` ::
313 Force migration despite local bind / device mounts. NOTE: deprecated, use 'shared' property of mount point instead.
315 `--online` `<boolean>` ::
317 Use online/live migration.
319 `--restart` `<boolean>` ::
321 Use restart migration
323 `--timeout` `<integer>` ('default =' `180`)::
325 Timeout in seconds for shutdown for restart migration
329 Mount the container's filesystem on the host. This will hold a lock on the
330 container and is meant for emergency maintenance only as it will prevent
331 further operations on the container other than start and stop.
333 `<vmid>`: `<integer> (1 - N)` ::
335 The (unique) ID of the VM.
337 *pct move_volume* `<vmid> <volume> <storage>` `[OPTIONS]`
339 Move a rootfs-/mp-volume to a different storage
341 `<vmid>`: `<integer> (1 - N)` ::
343 The (unique) ID of the VM.
345 `<volume>`: `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` ::
347 Volume which will be moved.
349 `<storage>`: `<string>` ::
353 `--delete` `<boolean>` ('default =' `0`)::
355 Delete the original volume after successful copy. By default the original is kept as an unused volume entry.
357 `--digest` `<string>` ::
359 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
361 *pct pull* `<vmid> <path> <destination>` `[OPTIONS]`
363 Copy a file from the container to the local system.
365 `<vmid>`: `<integer> (1 - N)` ::
367 The (unique) ID of the VM.
369 `<path>`: `<string>` ::
371 Path to a file inside the container to pull.
373 `<destination>`: `<string>` ::
377 `--group` `<string>` ::
379 Owner group name or id.
381 `--perms` `<string>` ::
383 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
385 `--user` `<string>` ::
387 Owner user name or id.
389 *pct push* `<vmid> <file> <destination>` `[OPTIONS]`
391 Copy a local file to the container.
393 `<vmid>`: `<integer> (1 - N)` ::
395 The (unique) ID of the VM.
397 `<file>`: `<string>` ::
399 Path to a local file.
401 `<destination>`: `<string>` ::
403 Destination inside the container to write to.
405 `--group` `<string>` ::
407 Owner group name or id. When using a name it must exist inside the container.
409 `--perms` `<string>` ::
411 File permissions to use (octal by default, prefix with '0x' for hexadecimal).
413 `--user` `<string>` ::
415 Owner user name or id. When using a name it must exist inside the container.
417 *pct resize* `<vmid> <disk> <size>` `[OPTIONS]`
419 Resize a container mount point.
421 `<vmid>`: `<integer> (1 - N)` ::
423 The (unique) ID of the VM.
425 `<disk>`: `<mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | mp7 | mp8 | mp9 | rootfs>` ::
427 The disk you want to resize.
429 `<size>`: `\+?\d+(\.\d+)?[KMGT]?` ::
431 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.
433 `--digest` `<string>` ::
435 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
437 *pct restore* `<vmid> <ostemplate>` `[OPTIONS]`
439 Create or restore a container.
441 `<vmid>`: `<integer> (1 - N)` ::
443 The (unique) ID of the VM.
445 `<ostemplate>`: `<string>` ::
447 The OS template or backup file.
449 `--arch` `<amd64 | i386>` ('default =' `amd64`)::
451 OS architecture type.
453 `--bwlimit` `<number> (0 - N)` ::
455 Override i/o bandwidth limit (in KiB/s).
457 `--cmode` `<console | shell | tty>` ('default =' `tty`)::
459 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).
461 `--console` `<boolean>` ('default =' `1`)::
463 Attach a console device (/dev/console) to the container.
465 `--cores` `<integer> (1 - 128)` ::
467 The number of cores assigned to the container. A container can use all available cores by default.
469 `--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
473 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
475 `--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
477 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.
479 NOTE: You can disable fair-scheduler configuration by setting this to 0.
481 `--description` `<string>` ::
483 Container description. Only used on the configuration web interface.
485 `--force` `<boolean>` ::
487 Allow to overwrite existing container.
489 `--hostname` `<string>` ::
491 Set a host name for the container.
493 `--ignore-unpack-errors` `<boolean>` ::
495 Ignore errors when extracting the template.
497 `--lock` `<backup | migrate | rollback | snapshot>` ::
501 `--memory` `<integer> (16 - N)` ('default =' `512`)::
503 Amount of RAM for the VM in MB.
505 `--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>]` ::
507 Use volume as container mount point.
509 `--nameserver` `<string>` ::
511 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
513 `--net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` ::
515 Specifies network interfaces for the container.
517 `--onboot` `<boolean>` ('default =' `0`)::
519 Specifies whether a VM will be started during system bootup.
521 `--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
523 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.
527 Sets root password inside container.
529 `--pool` `<string>` ::
531 Add the VM to the specified pool.
533 `--protection` `<boolean>` ('default =' `0`)::
535 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
537 `--rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
539 Use volume as container root.
541 `--searchdomain` `<string>` ::
543 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
545 `--ssh-public-keys` `<filepath>` ::
547 Setup public SSH keys (one key per line, OpenSSH format).
549 `--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
551 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.
553 `--storage` `<string>` ('default =' `local`)::
557 `--swap` `<integer> (0 - N)` ('default =' `512`)::
559 Amount of SWAP for the VM in MB.
561 `--template` `<boolean>` ('default =' `0`)::
563 Enable/disable Template.
565 `--tty` `<integer> (0 - 6)` ('default =' `2`)::
567 Specify the number of tty available to the container
569 `--unprivileged` `<boolean>` ('default =' `0`)::
571 Makes the container run as unprivileged user. (Should not be modified manually.)
573 `--unused[n]` `<string>` ::
575 Reference to unused volumes. This is used internally, and should not be modified manually.
577 *pct resume* `<vmid>`
579 Resume the container.
581 `<vmid>`: `<integer> (1 - N)` ::
583 The (unique) ID of the VM.
585 *pct rollback* `<vmid> <snapname>`
587 Rollback LXC state to specified snapshot.
589 `<vmid>`: `<integer> (1 - N)` ::
591 The (unique) ID of the VM.
593 `<snapname>`: `<string>` ::
595 The name of the snapshot.
597 *pct set* `<vmid>` `[OPTIONS]`
599 Set container options.
601 `<vmid>`: `<integer> (1 - N)` ::
603 The (unique) ID of the VM.
605 `--arch` `<amd64 | i386>` ('default =' `amd64`)::
607 OS architecture type.
609 `--cmode` `<console | shell | tty>` ('default =' `tty`)::
611 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).
613 `--console` `<boolean>` ('default =' `1`)::
615 Attach a console device (/dev/console) to the container.
617 `--cores` `<integer> (1 - 128)` ::
619 The number of cores assigned to the container. A container can use all available cores by default.
621 `--cpulimit` `<number> (0 - 128)` ('default =' `0`)::
625 NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.
627 `--cpuunits` `<integer> (0 - 500000)` ('default =' `1024`)::
629 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.
631 NOTE: You can disable fair-scheduler configuration by setting this to 0.
633 `--delete` `<string>` ::
635 A list of settings you want to delete.
637 `--description` `<string>` ::
639 Container description. Only used on the configuration web interface.
641 `--digest` `<string>` ::
643 Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.
645 `--hostname` `<string>` ::
647 Set a host name for the container.
649 `--lock` `<backup | migrate | rollback | snapshot>` ::
653 `--memory` `<integer> (16 - N)` ('default =' `512`)::
655 Amount of RAM for the VM in MB.
657 `--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>]` ::
659 Use volume as container mount point.
661 `--nameserver` `<string>` ::
663 Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
665 `--net[n]` `name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]` ::
667 Specifies network interfaces for the container.
669 `--onboot` `<boolean>` ('default =' `0`)::
671 Specifies whether a VM will be started during system bootup.
673 `--ostype` `<alpine | archlinux | centos | debian | fedora | gentoo | opensuse | ubuntu | unmanaged>` ::
675 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.
677 `--protection` `<boolean>` ('default =' `0`)::
679 Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.
681 `--rootfs` `[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>]` ::
683 Use volume as container root.
685 `--searchdomain` `<string>` ::
687 Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
689 `--startup` `[[order=]\d+] [,up=\d+] [,down=\d+] ` ::
691 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.
693 `--swap` `<integer> (0 - N)` ('default =' `512`)::
695 Amount of SWAP for the VM in MB.
697 `--template` `<boolean>` ('default =' `0`)::
699 Enable/disable Template.
701 `--tty` `<integer> (0 - 6)` ('default =' `2`)::
703 Specify the number of tty available to the container
705 `--unprivileged` `<boolean>` ('default =' `0`)::
707 Makes the container run as unprivileged user. (Should not be modified manually.)
709 `--unused[n]` `<string>` ::
711 Reference to unused volumes. This is used internally, and should not be modified manually.
713 *pct shutdown* `<vmid>` `[OPTIONS]`
715 Shutdown the container. This will trigger a clean shutdown of the
716 container, see lxc-stop(1) for details.
718 `<vmid>`: `<integer> (1 - N)` ::
720 The (unique) ID of the VM.
722 `--forceStop` `<boolean>` ('default =' `0`)::
724 Make sure the Container stops.
726 `--timeout` `<integer> (0 - N)` ('default =' `60`)::
728 Wait maximal timeout seconds.
730 *pct snapshot* `<vmid> <snapname>` `[OPTIONS]`
732 Snapshot a container.
734 `<vmid>`: `<integer> (1 - N)` ::
736 The (unique) ID of the VM.
738 `<snapname>`: `<string>` ::
740 The name of the snapshot.
742 `--description` `<string>` ::
744 A textual description or comment.
746 *pct start* `<vmid>` `[OPTIONS]`
750 `<vmid>`: `<integer> (1 - N)` ::
752 The (unique) ID of the VM.
754 `--skiplock` `<boolean>` ::
756 Ignore locks - only root is allowed to use this option.
758 *pct status* `<vmid>` `[OPTIONS]`
762 `<vmid>`: `<integer> (1 - N)` ::
764 The (unique) ID of the VM.
766 `--verbose` `<boolean>` ::
768 Verbose output format
770 *pct stop* `<vmid>` `[OPTIONS]`
772 Stop the container. This will abruptly stop all processes running in the
775 `<vmid>`: `<integer> (1 - N)` ::
777 The (unique) ID of the VM.
779 `--skiplock` `<boolean>` ::
781 Ignore locks - only root is allowed to use this option.
783 *pct suspend* `<vmid>`
785 Suspend the container.
787 `<vmid>`: `<integer> (1 - N)` ::
789 The (unique) ID of the VM.
791 *pct template* `<vmid>`
795 `<vmid>`: `<integer> (1 - N)` ::
797 The (unique) ID of the VM.
799 *pct unlock* `<vmid>`
803 `<vmid>`: `<integer> (1 - N)` ::
805 The (unique) ID of the VM.
807 *pct unmount* `<vmid>`
809 Unmount the container's filesystem.
811 `<vmid>`: `<integer> (1 - N)` ::
813 The (unique) ID of the VM.