NAME

pct - Tool to manage Linux Containers on Proxmox VE

SYNOPSIS

 pct <COMMAND> [ARGS] [OPTIONS]

 pct config <vmid>
 
   Get container configuration.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

 pct create <vmid> <ostemplate> [OPTIONS]
 
   Create or restore a container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   <ostemplate> string
 
             The OS template or backup file.
 
   -arch      (amd64 | i386)   (default=amd64)
 
             OS architecture type.
 
   -cpulimit  number (0 - 128)  (default=0)
 
             Limit of CPU usage. Note if the computer has 2 CPUs, it has
             total of '2' CPU time. Value '0' indicates no CPU limit.
 
   -cpuunits  integer (0 - 500000)   (default=1024)
 
             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 weights of all the other running
             VMs.
             
             NOTE: You can disable fair-scheduler configuration by setting
             this to 0.
 
   -description string
 
             Container description. Only used on the configuration web
             interface.
 
   -force     boolean
 
             Allow to overwrite existing container.
 
   -hostname  string
 
             Set a host name for the container.
 
   -lock      (backup | migrate | rollback | snapshot)
 
             Lock/unlock the VM.
 
   -memory    integer (16 - N)  (default=512)
 
             Amount of RAM for the VM in MB.
 
   -nameserver string
 
             Sets DNS server IP address for a container. Create will
             automatically use the setting from the host if you neither set
             searchdomain or nameserver.
 
   -net[n]    string
 
             Specifies network interfaces for the container.
             
             The string should have the follow format:
             
             -net<[0-9]> bridge=<vmbr<Nummber>>[,hwaddr=<MAC>]
             [,mtu=<Number>][,name=<String>][,ip=<IPv4Format/CIDR>]
             ,ip6=<IPv6Format/CIDR>][,gw=<GatwayIPv4>]
             ,gw6=<GatwayIPv6>][,firewall=<[1|0]>][,tag=<VlanNo>]
 
   -onboot    boolean   (default=0)
 
             Specifies whether a VM will be started during system bootup.
 
   -ostype    (centos | debian | ubuntu)
 
             OS type. Corresponds to lxc setup scripts in
             /usr/share/lxc/config/<ostype>.common.conf.
 
   -password  string
 
             Sets root password inside container.
 
   -pool      string
 
             Add the VM to the specified pool.
 
   -restore   boolean
 
             Mark this as restore task.
 
   -searchdomain string
 
             Sets DNS search domains for a container. Create will
             automatically use the setting from the host if you neither set
             searchdomain or nameserver.
 
   -size      number (0 - N)   (default=4)
 
             Amount of disk space for the VM in GB. A zero indicates no
             limits.
 
   -startup   [[order=]\d+] [,up=\d+] [,down=\d+] 
 
             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.
 
   -storage   string   (default=local)
 
             Target storage.
 
   -swap      integer (0 - N)   (default=512)
 
             Amount of SWAP for the VM in MB.
 
   -tty      integer (0 - 6)   (default=4)
 
             Specify the number of tty available to the container
 
 

 pct delsnapshot <vmid> <snapname> [OPTIONS]
 
   Delete a LXC snapshot.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   <snapname> string
 
             The name of the snapshot.
 
   -force     boolean
 
             For removal from config file, even if removing disk snapshots
             fails.
 
 

 pct destroy <vmid>
 
   Destroy the container (also delete all uses files).
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

 pct list 
 
   LXC container index (per node).
 
 

 pct migrate <vmid> <target> [OPTIONS]
 
   Migrate the container to another node. Creates a new migration task.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   <target>   string
 
             Target node.
 
   -online    boolean
 
             Use online/live migration.
 
 

 pct restore <vmid> <ostemplate> [OPTIONS]
 
   Create or restore a container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   <ostemplate> string
 
             The OS template or backup file.
 
   -arch      (amd64 | i386)   (default=amd64)
 
             OS architecture type.
 
   -cpulimit  number (0 - 128)  (default=0)
 
             Limit of CPU usage. Note if the computer has 2 CPUs, it has
             total of '2' CPU time. Value '0' indicates no CPU limit.
 
   -cpuunits  integer (0 - 500000)   (default=1024)
 
             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 weights of all the other running
             VMs.
             
             NOTE: You can disable fair-scheduler configuration by setting
             this to 0.
 
   -description string
 
             Container description. Only used on the configuration web
             interface.
 
   -force     boolean
 
             Allow to overwrite existing container.
 
   -hostname  string
 
             Set a host name for the container.
 
   -lock      (backup | migrate | rollback | snapshot)
 
             Lock/unlock the VM.
 
   -memory    integer (16 - N)  (default=512)
 
             Amount of RAM for the VM in MB.
 
   -nameserver string
 
             Sets DNS server IP address for a container. Create will
             automatically use the setting from the host if you neither set
             searchdomain or nameserver.
 
   -net[n]    string
 
             Specifies network interfaces for the container.
             
             The string should have the follow format:
             
             -net<[0-9]> bridge=<vmbr<Nummber>>[,hwaddr=<MAC>]
             [,mtu=<Number>][,name=<String>][,ip=<IPv4Format/CIDR>]
             ,ip6=<IPv6Format/CIDR>][,gw=<GatwayIPv4>]
             ,gw6=<GatwayIPv6>][,firewall=<[1|0]>][,tag=<VlanNo>]
 
   -onboot    boolean   (default=0)
 
             Specifies whether a VM will be started during system bootup.
 
   -ostype    (centos | debian | ubuntu)
 
             OS type. Corresponds to lxc setup scripts in
             /usr/share/lxc/config/<ostype>.common.conf.
 
   -password  string
 
             Sets root password inside container.
 
   -pool      string
 
             Add the VM to the specified pool.
 
   -searchdomain string
 
             Sets DNS search domains for a container. Create will
             automatically use the setting from the host if you neither set
             searchdomain or nameserver.
 
   -size      number (0 - N)   (default=4)
 
             Amount of disk space for the VM in GB. A zero indicates no
             limits.
 
   -startup   [[order=]\d+] [,up=\d+] [,down=\d+] 
 
             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.
 
   -storage   string   (default=local)
 
             Target storage.
 
   -swap      integer (0 - N)   (default=512)
 
             Amount of SWAP for the VM in MB.
 
   -tty      integer (0 - 6)   (default=4)
 
             Specify the number of tty available to the container
 
 

 pct resume <vmid>
 
   Resume the container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

 pct rollback <vmid> <snapname>
 
   Rollback LXC state to specified snapshot.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   <snapname> string
 
             The name of the snapshot.
 
 

 pct set <vmid> [OPTIONS]
 
   Set container options.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   -arch      (amd64 | i386)   (default=amd64)
 
             OS architecture type.
 
   -cpulimit  number (0 - 128)  (default=0)
 
             Limit of CPU usage. Note if the computer has 2 CPUs, it has
             total of '2' CPU time. Value '0' indicates no CPU limit.
 
   -cpuunits  integer (0 - 500000)   (default=1024)
 
             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 weights of all the other running
             VMs.
             
             NOTE: You can disable fair-scheduler configuration by setting
             this to 0.
 
   -delete    string
 
             A list of settings you want to delete.
 
   -description string
 
             Container description. Only used on the configuration web
             interface.
 
   -digest    string
 
             Prevent changes if current configuration file has different
             SHA1 digest. This can be used to prevent concurrent
             modifications.
 
   -hostname  string
 
             Set a host name for the container.
 
   -lock      (backup | migrate | rollback | snapshot)
 
             Lock/unlock the VM.
 
   -memory    integer (16 - N)  (default=512)
 
             Amount of RAM for the VM in MB.
 
   -nameserver string
 
             Sets DNS server IP address for a container. Create will
             automatically use the setting from the host if you neither set
             searchdomain or nameserver.
 
   -net[n]    string
 
             Specifies network interfaces for the container.
             
             The string should have the follow format:
             
             -net<[0-9]> bridge=<vmbr<Nummber>>[,hwaddr=<MAC>]
             [,mtu=<Number>][,name=<String>][,ip=<IPv4Format/CIDR>]
             ,ip6=<IPv6Format/CIDR>][,gw=<GatwayIPv4>]
             ,gw6=<GatwayIPv6>][,firewall=<[1|0]>][,tag=<VlanNo>]
 
   -onboot    boolean   (default=0)
 
             Specifies whether a VM will be started during system bootup.
 
   -ostype    (centos | debian | ubuntu)
 
             OS type. Corresponds to lxc setup scripts in
             /usr/share/lxc/config/<ostype>.common.conf.
 
   -rootfs    [volume=]volume,] [,backup=yes|no] [,size=\d+]
 
             Use volume as container root. You can use special
             '<storage>:<size>' syntax for create/restore, where size
             specifies the disk size in GB (for example 'local:5.5' to
             create 5.5GB image on storage 'local').
 
   -searchdomain string
 
             Sets DNS search domains for a container. Create will
             automatically use the setting from the host if you neither set
             searchdomain or nameserver.
 
   -startup   [[order=]\d+] [,up=\d+] [,down=\d+] 
 
             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.
 
   -swap      integer (0 - N)   (default=512)
 
             Amount of SWAP for the VM in MB.
 
   -tty      integer (0 - 6)   (default=4)
 
             Specify the number of tty available to the container
 
 

 pct shutdown <vmid> [OPTIONS]
 
   Shutdown the container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   -forceStop boolean   (default=0)
 
             Make sure the Container stops.
 
   -timeout   integer (0 - N)   (default=60)
 
             Wait maximal timeout seconds.
 
 

 pct snapshot <vmid> <snapname> [OPTIONS]
 
   Snapshot a container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
   <snapname> string
 
             The name of the snapshot.
 
   -description string
 
             A textual description or comment.
 
 

 pct start <vmid>
 
   Start the container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

 pct stop <vmid>
 
   Stop the container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

 pct suspend <vmid>
 
   Suspend the container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 


 pct help [<cmd>] [OPTIONS]
 
   Get help about specified command.
 
   <cmd>      string
 
             Command name
 
   -verbose   boolean
 
             Verbose output format.
 
 


 pct console <vmid>
 
   Launch a console for the specified container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

 pct enter <vmid>
 
   Launch a shell for the specified container.
 
   <vmid>     integer (1 - N)
 
             The (unique) ID of the VM.
 
 

DESCRIPTION

Tool to manage linux containers.

COPYRIGHT AND DISCLAIMER

Copyright (C) 2007-2015 Proxmox Server Solutions GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.