Skip to content

nodes / lxc ​

62 operations.

GET /nodes/{node}/lxc ​

ts
proxmox.nodes.$(node).lxc.$get()

LXC container index (per node).

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node

POST /nodes/{node}/lxc ​

ts
proxmox.nodes.$(node).lxc.$post()

Create or restore a container.

Returns string.

ParameterTypeRequiredNotes
archamd64 | i386 | arm64 | armhf | riscv32 | riscv64OS architecture type. — default "amd64"
bwlimitnumberOverride I/O bandwidth limit (in KiB/s). — min 0, default "restore limit from datacenter or storage config"
cmodeshell | console | ttyConsole 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). — default "tty"
consolebooleanAttach a console device (/dev/console) to the container. — default 1
coresnumberThe number of cores assigned to the container. A container can use all available cores by default. — min 1, max 8192
cpulimitnumberLimit of CPU usage. NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit. — min 0, max 8192, default 0
cpuunitsnumberCPU weight for a container, will be clamped to [1, 10000] in cgroup v2. — min 0, max 500000, default "cgroup v1: 1024, cgroup v2: 100"
debugbooleanTry to be more verbose. For now this only enables debug log-level on start. — default 0
descriptionstringDescription for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file. — ≤ 8192 chars
dev0…dev255stringDevice to pass through to the container
entrypointstringCommand to run as init, optionally with arguments; may start with an absolute path, relative path, or a binary in $PATH. — default "/sbin/init"
envstringThe container runtime environment as NUL-separated list. Replaces any lxc.environment.runtime entries in the config.
featuresstringAllow containers access to advanced features.
forcebooleanAllow to overwrite existing container.
ha-managedbooleanAdd the CT as a HA resource after it was created. — default 0
hookscriptstringScript that will be executed during various steps in the containers lifetime. — format pve-volume-id
hostnamestringSet a host name for the container. — format dns-name, ≤ 255 chars
ignore-unpack-errorsbooleanIgnore errors when extracting the template.
lockbackup | create | destroyed | disk | fstrim | migrate | mounted | rollback | … (2 more)Lock/unlock the container.
memorynumberAmount of RAM for the container in MB. — min 16, default 512
mp0…mp255stringUse volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.
nameserverstringSets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. — format lxc-ip-with-ll-iface-list
net0…net31stringSpecifies network interfaces for the container.
nodestringyesThe cluster node name. — format pve-node
onbootbooleanSpecifies whether a container will be started during system bootup. — default 0
ostemplatestringyesThe OS template or backup file. — ≤ 255 chars
ostypedebian | devuan | ubuntu | centos | fedora | opensuse | archlinux | alpine | … (3 more)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.
passwordstringSets root password inside container.
poolstringAdd the VM to the specified pool. — format pve-poolid
protectionbooleanSets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation. — default 0
restorebooleanMark this as restore task.
rootfsstringUse volume as container root.
searchdomainstringSets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. — format dns-name-list
ssh-public-keysstringSetup public SSH keys (one key per line, OpenSSH format).
startbooleanStart the CT after its creation finished successfully. — default 0
startupstringStartup 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. — format pve-startup-order
storagestringDefault Storage. — format pve-storage-id, default "local"
swapnumberAmount of SWAP for the container in MB. — min 0, default 512
tagsstringTags of the Container. This is only meta information. — format pve-tag-list
templatebooleanEnable/disable Template. — default 0
timezonestringTime zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab — format pve-ct-timezone
ttynumberSpecify the number of tty available to the container — min 0, max 6, default 2
uniquebooleanAssign a unique random ethernet address.
unprivilegedbooleanMakes the container run as unprivileged user. For creation, the default is 1. For restore, the default is the value from the backup. (Should not be modified manually.) — default 0
unused0…unused255stringReference to unused volumes. This is used internally, and should not be modified manually.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).$get()

Directory index

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

DELETE /nodes/{node}/lxc/{vmid} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).$delete()

Destroy the container (also delete all uses files).

Returns string.

ParameterTypeRequiredNotes
destroy-unreferenced-disksbooleanIf set, destroy additionally all disks with the VMID from all enabled storages which are not referenced in the config.
forcebooleanForce destroy, even if running. — default 0
nodestringyesThe cluster node name. — format pve-node
purgebooleanRemove container from all related configurations. For example, backup jobs, replication jobs or HA. Related ACLs and Firewall entries will always be removed. — default 0
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/clone ​

ts
proxmox.nodes.$(node).lxc.$(vmid).clone.$post()

Create a container clone/copy

Returns string.

ParameterTypeRequiredNotes
bwlimitnumberOverride I/O bandwidth limit (in KiB/s). — min 0, default "clone limit from datacenter or storage config"
descriptionstringDescription for the new CT.
fullbooleanCreate 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.
hostnamestringSet a hostname for the new CT. — format dns-name
newidnumberyesVMID for the clone. — format pve-vmid, min 100, max 999999999
nodestringyesThe cluster node name. — format pve-node
poolstringAdd the new CT to the specified pool. — format pve-poolid
snapnamestringThe name of the snapshot. — format pve-configid, ≤ 40 chars
storagestringTarget storage for full clone. — format pve-storage-id
targetstringTarget node. Only allowed if the original VM is on shared storage. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/config ​

ts
proxmox.nodes.$(node).lxc.$(vmid).config.$get()

Get container configuration.

Returns object.

ParameterTypeRequiredNotes
currentbooleanGet current values (instead of pending values). — default 0
nodestringyesThe cluster node name. — format pve-node
snapshotstringFetch config values from given snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/config ​

ts
proxmox.nodes.$(node).lxc.$(vmid).config.$put()

Set container options.

Returns nothing.

ParameterTypeRequiredNotes
archamd64 | i386 | arm64 | armhf | riscv32 | riscv64OS architecture type. — default "amd64"
cmodeshell | console | ttyConsole 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). — default "tty"
consolebooleanAttach a console device (/dev/console) to the container. — default 1
coresnumberThe number of cores assigned to the container. A container can use all available cores by default. — min 1, max 8192
cpulimitnumberLimit of CPU usage. NOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit. — min 0, max 8192, default 0
cpuunitsnumberCPU weight for a container, will be clamped to [1, 10000] in cgroup v2. — min 0, max 500000, default "cgroup v1: 1024, cgroup v2: 100"
debugbooleanTry to be more verbose. For now this only enables debug log-level on start. — default 0
deletestringA list of settings you want to delete. — format pve-configid-list
descriptionstringDescription for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file. — ≤ 8192 chars
dev0…dev255stringDevice to pass through to the container
digeststringPrevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. — ≤ 40 chars
entrypointstringCommand to run as init, optionally with arguments; may start with an absolute path, relative path, or a binary in $PATH. — default "/sbin/init"
envstringThe container runtime environment as NUL-separated list. Replaces any lxc.environment.runtime entries in the config.
featuresstringAllow containers access to advanced features.
hookscriptstringScript that will be executed during various steps in the containers lifetime. — format pve-volume-id
hostnamestringSet a host name for the container. — format dns-name, ≤ 255 chars
lockbackup | create | destroyed | disk | fstrim | migrate | mounted | rollback | … (2 more)Lock/unlock the container.
memorynumberAmount of RAM for the container in MB. — min 16, default 512
mp0…mp255stringUse volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.
nameserverstringSets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. — format lxc-ip-with-ll-iface-list
net0…net31stringSpecifies network interfaces for the container.
nodestringyesThe cluster node name. — format pve-node
onbootbooleanSpecifies whether a container will be started during system bootup. — default 0
ostypedebian | devuan | ubuntu | centos | fedora | opensuse | archlinux | alpine | … (3 more)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.
protectionbooleanSets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation. — default 0
revertstringRevert a pending change. — format pve-configid-list
rootfsstringUse volume as container root.
searchdomainstringSets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver. — format dns-name-list
startupstringStartup 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. — format pve-startup-order
swapnumberAmount of SWAP for the container in MB. — min 0, default 512
tagsstringTags of the Container. This is only meta information. — format pve-tag-list
templatebooleanEnable/disable Template. — default 0
timezonestringTime zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab — format pve-ct-timezone
ttynumberSpecify the number of tty available to the container — min 0, max 6, default 2
unprivilegedbooleanMakes the container run as unprivileged user. For creation, the default is 1. For restore, the default is the value from the backup. (Should not be modified manually.) — default 0
unused0…unused255stringReference to unused volumes. This is used internally, and should not be modified manually.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/feature ​

ts
proxmox.nodes.$(node).lxc.$(vmid).feature.$get()

Check if feature for virtual machine is available.

Returns object.

ParameterTypeRequiredNotes
featuresnapshot | clone | copyyesFeature to check.
nodestringyesThe cluster node name. — format pve-node
snapnamestringThe name of the snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.$get()

Directory index.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/aliases ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.aliases.$get()

List aliases

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/firewall/aliases ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.aliases.$post()

Create IP or Network Alias.

Returns nothing.

ParameterTypeRequiredNotes
cidrstringyesNetwork/IP specification in CIDR format. — format IPorCIDR
commentstringformat pve-fw-comment-spec
namestringyesAlias name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/aliases/{name} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.aliases.$(name).$get()

Read alias.

Returns object.

ParameterTypeRequiredNotes
namestringyesAlias name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/firewall/aliases/{name} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.aliases.$(name).$put()

Update IP or Network alias.

Returns nothing.

ParameterTypeRequiredNotes
cidrstringyesNetwork/IP specification in CIDR format. — format IPorCIDR
commentstringformat pve-fw-comment-spec
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
namestringyesAlias name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
renamestringRename an existing alias. — ≤ 64 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

DELETE /nodes/{node}/lxc/{vmid}/firewall/aliases/{name} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.aliases.$(name).$delete()

Remove IP or Network alias.

Returns nothing.

ParameterTypeRequiredNotes
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
namestringyesAlias name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/ipset ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$get()

List IPSets

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/firewall/ipset ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$post()

Create new IPSet

Returns nothing.

ParameterTypeRequiredNotes
commentstringformat pve-fw-comment-spec
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
renamestringRename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet. — ≤ 64 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/ipset/{name} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$(name).$get()

List IPSet content

Returns an array of object.

ParameterTypeRequiredNotes
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/firewall/ipset/{name} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$(name).$post()

Add IP or Network to IPSet.

Returns nothing.

ParameterTypeRequiredNotes
cidrstringyesNetwork/IP specification in CIDR format. — format IPorCIDRorAlias
commentstringformat pve-fw-comment-spec
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
nomatchboolean
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

DELETE /nodes/{node}/lxc/{vmid}/firewall/ipset/{name} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$(name).$delete()

Delete IPSet

Returns nothing.

ParameterTypeRequiredNotes
forcebooleanDelete all members of the IPSet, if there are any.
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$(name).$(cidr).$get()

Read IP or Network settings from IPSet.

Returns object.

ParameterTypeRequiredNotes
cidrstringyesNetwork/IP specification in CIDR format. — format IPorCIDRorAlias
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$(name).$(cidr).$put()

Update IP or Network settings

Returns nothing.

ParameterTypeRequiredNotes
cidrstringyesNetwork/IP specification in CIDR format. — format IPorCIDRorAlias
commentstringformat pve-fw-comment-spec
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
nomatchboolean
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

DELETE /nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.ipset.$(name).$(cidr).$delete()

Remove IP or Network from IPSet.

Returns nothing.

ParameterTypeRequiredNotes
cidrstringyesNetwork/IP specification in CIDR format. — format IPorCIDRorAlias
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
namestringyesIP set name. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/log ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.log.$get()

Read firewall log

Returns an array of object.

ParameterTypeRequiredNotes
limitnumbermin 0
nodestringyesThe cluster node name. — format pve-node
sincenumberDisplay log since this UNIX epoch. — min 0
startnumbermin 0
untilnumberDisplay log until this UNIX epoch. — min 0
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/options ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.options.$get()

Get VM firewall options.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/firewall/options ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.options.$put()

Set Firewall options.

Returns nothing.

ParameterTypeRequiredNotes
deletestringA list of settings you want to delete. — format pve-configid-list
dhcpbooleanEnable DHCP. — default 0
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
enablebooleanEnable/disable firewall rules. — default 0
ipfilterbooleanEnable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.
log_level_inemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for incoming traffic.
log_level_outemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for outgoing traffic.
macfilterbooleanEnable/disable MAC address filter. — default 1
ndpbooleanEnable NDP (Neighbor Discovery Protocol). — default 1
nodestringyesThe cluster node name. — format pve-node
policy_inACCEPT | REJECT | DROPInput policy.
policy_outACCEPT | REJECT | DROPOutput policy.
radvbooleanAllow sending Router Advertisement.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/refs ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.refs.$get()

Lists possible IPSet/Alias reference which are allowed in source/dest properties.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
typealias | ipsetOnly list references of specified type.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/rules ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.rules.$get()

List rules.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/firewall/rules ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.rules.$post()

Create new rule.

Returns nothing.

ParameterTypeRequiredNotes
actionstringyesRule action ('ACCEPT', 'DROP', 'REJECT') or security group name. — ≤ 20 chars
commentstringDescriptive comment. — format pve-fw-comment-spec
deststringRestrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
dportstringRestrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-dport-spec
enablenumberFlag to enable/disable a rule. — min 0
icmp-typestringSpecify icmp-type. Only valid if proto equals 'icmp' or 'icmpv6'/'ipv6-icmp'. — format pve-fw-icmp-type-spec
ifacestringNetwork interface name. You have to use network configuration key names for VMs and containers ('net\d+'). Host related rules can use arbitrary strings. — format pve-iface, ≤ 20 chars
logemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for firewall rule.
macrostringUse predefined standard macro. — ≤ 128 chars
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0
protostringIP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'. — format pve-fw-protocol-spec
sourcestringRestrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
sportstringRestrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-sport-spec
typein | out | forward | groupyesRule type.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/firewall/rules/{pos} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.rules.$(pos).$get()

Get single rule data.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/firewall/rules/{pos} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.rules.$(pos).$put()

Modify rule data.

Returns nothing.

ParameterTypeRequiredNotes
actionstringRule action ('ACCEPT', 'DROP', 'REJECT') or security group name. — ≤ 20 chars
commentstringDescriptive comment. — format pve-fw-comment-spec
deletestringA list of settings you want to delete. — format pve-configid-list
deststringRestrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
dportstringRestrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-dport-spec
enablenumberFlag to enable/disable a rule. — min 0
icmp-typestringSpecify icmp-type. Only valid if proto equals 'icmp' or 'icmpv6'/'ipv6-icmp'. — format pve-fw-icmp-type-spec
ifacestringNetwork interface name. You have to use network configuration key names for VMs and containers ('net\d+'). Host related rules can use arbitrary strings. — format pve-iface, ≤ 20 chars
logemerg | alert | crit | err | warning | notice | info | debug | … (1 more)Log level for firewall rule.
macrostringUse predefined standard macro. — ≤ 128 chars
movetonumberMove rule to new position <moveto>. Other arguments are ignored. — min 0
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0
protostringIP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'. — format pve-fw-protocol-spec
sourcestringRestrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists. — format pve-fw-addr-spec, ≤ 512 chars
sportstringRestrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\d+:\d+', for example '80:85', and you can use comma separated list to match several ports or ranges. — format pve-fw-sport-spec
typein | out | forward | groupRule type.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

DELETE /nodes/{node}/lxc/{vmid}/firewall/rules/{pos} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).firewall.rules.$(pos).$delete()

Delete rule.

Returns nothing.

ParameterTypeRequiredNotes
digeststringPrevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications. — ≤ 64 chars
nodestringyesThe cluster node name. — format pve-node
posnumberUpdate rule at position <pos>. — min 0
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/interfaces ​

ts
proxmox.nodes.$(node).lxc.$(vmid).interfaces.$get()

Get IP addresses of the specified container interface.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/migrate ​

ts
proxmox.nodes.$(node).lxc.$(vmid).migrate.$get()

Get preconditions for migration.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
targetstringTarget node. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/migrate ​

ts
proxmox.nodes.$(node).lxc.$(vmid).migrate.$post()

Migrate the container to another node. Creates a new migration task.

Returns string.

ParameterTypeRequiredNotes
bwlimitnumberOverride I/O bandwidth limit (in KiB/s). — min 0, default "migrate limit from datacenter or storage config"
nodestringyesThe cluster node name. — format pve-node
onlinebooleanUse online/live migration.
restartbooleanUse restart migration
targetstringyesTarget node. — format pve-node
target-storagestringMapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself. — format storage-pair-list
timeoutnumberTimeout in seconds for shutdown for restart migration — default 180
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/move_volume ​

ts
proxmox.nodes.$(node).lxc.$(vmid).move_volume.$post()

Move a rootfs-/mp-volume to a different storage or to a different container.

Returns string.

ParameterTypeRequiredNotes
bwlimitnumberOverride I/O bandwidth limit (in KiB/s). — min 0, default "clone limit from datacenter or storage config"
deletebooleanDelete the original volume after successful copy. By default the original is kept as an unused volume entry. — default 0
digeststringPrevent changes if current configuration file has different SHA1 " . "digest. This can be used to prevent concurrent modifications. — ≤ 40 chars
nodestringyesThe cluster node name. — format pve-node
storagestringTarget Storage. — format pve-storage-id
target-digeststringPrevent changes if current configuration file of the target " . "container has a different SHA1 digest. This can be used to prevent " . "concurrent modifications. — ≤ 40 chars
target-vmidnumberThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999
target-volumerootfs | mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | … (505 more)The config key the volume will be moved to. Default is the source volume key.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999
volumerootfs | mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | … (505 more)yesVolume which will be moved.

POST /nodes/{node}/lxc/{vmid}/mtunnel ​

ts
proxmox.nodes.$(node).lxc.$(vmid).mtunnel.$post()

Migration tunnel endpoint - only for internal use by CT migration.

Returns any.

ParameterTypeRequiredNotes
bridgesstringList of network bridges to check availability. Will be checked again for actually used bridges during migration. — format pve-bridge-id-list
nodestringyesThe cluster node name. — format pve-node
storagesstringList of storages to check permission and availability. Will be checked again for all actually used storages during migration. — format pve-storage-id-list
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/mtunnelwebsocket ​

ts
proxmox.nodes.$(node).lxc.$(vmid).mtunnelwebsocket.$get()

Migration tunnel endpoint for websocket upgrade - only for internal use by VM migration.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
socketstringyesunix socket to forward to
ticketstringyesticket return by initial 'mtunnel' API call, or retrieved via 'ticket' tunnel command
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/pending ​

ts
proxmox.nodes.$(node).lxc.$(vmid).pending.$get()

Get container configuration, including pending changes.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/remote_migrate ​

ts
proxmox.nodes.$(node).lxc.$(vmid).remote_migrate.$post()

Migrate the container to another cluster. Creates a new migration task. EXPERIMENTAL feature!

Returns string.

ParameterTypeRequiredNotes
bwlimitnumberOverride I/O bandwidth limit (in KiB/s). — min 0, default "migrate limit from datacenter or storage config"
deletebooleanDelete the original CT and related data after successful migration. By default the original CT is kept on the source cluster in a stopped state. — default 0
nodestringyesThe cluster node name. — format pve-node
onlinebooleanUse online/live migration.
restartbooleanUse restart migration
target-bridgestringyesMapping from source to target bridges. Providing only a single bridge ID maps all source bridges to that bridge. Providing the special value '1' will map each source bridge to itself. — format bridge-pair-list
target-endpointstringyesRemote target endpoint — format proxmox-remote
target-storagestringyesMapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself. — format storage-pair-list
target-vmidnumberThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999
timeoutnumberTimeout in seconds for shutdown for restart migration — default 180
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/resize ​

ts
proxmox.nodes.$(node).lxc.$(vmid).resize.$put()

Resize a container mount point.

Returns string.

ParameterTypeRequiredNotes
digeststringPrevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications. — ≤ 40 chars
diskrootfs | mp0 | mp1 | mp2 | mp3 | mp4 | mp5 | mp6 | … (249 more)yesThe disk you want to resize.
nodestringyesThe cluster node name. — format pve-node
sizestringyesThe 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.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/rrd ​

ts
proxmox.nodes.$(node).lxc.$(vmid).rrd.$get()

Read VM RRD statistics (returns PNG)

Returns object.

ParameterTypeRequiredNotes
cfAVERAGE | MAXThe RRD consolidation function
dsstringyesThe list of datasources you want to display. — format pve-configid-list
nodestringyesThe cluster node name. — format pve-node
timeframehour | day | week | month | yearyesSpecify the time frame you are interested in.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/rrddata ​

ts
proxmox.nodes.$(node).lxc.$(vmid).rrddata.$get()

Read VM RRD statistics

Returns an array of object.

ParameterTypeRequiredNotes
cfAVERAGE | MAXThe RRD consolidation function
nodestringyesThe cluster node name. — format pve-node
timeframehour | day | week | month | yearyesSpecify the time frame you are interested in.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/snapshot ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$get()

List all snapshots.

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/snapshot ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$post()

Snapshot a container.

Returns string.

ParameterTypeRequiredNotes
descriptionstringA textual description or comment.
nodestringyesThe cluster node name. — format pve-node
snapnamestringyesThe name of the snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/snapshot/{snapname} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$(snapname).$get()

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
snapnamestringyesThe name of the snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

DELETE /nodes/{node}/lxc/{vmid}/snapshot/{snapname} ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$(snapname).$delete()

Delete a LXC snapshot.

Returns string.

ParameterTypeRequiredNotes
forcebooleanFor removal from config file, even if removing disk snapshots fails.
nodestringyesThe cluster node name. — format pve-node
snapnamestringyesThe name of the snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$(snapname).config.$get()

Get snapshot configuration

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
snapnamestringyesThe name of the snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

PUT /nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$(snapname).config.$put()

Update snapshot metadata.

Returns nothing.

ParameterTypeRequiredNotes
descriptionstringA textual description or comment.
nodestringyesThe cluster node name. — format pve-node
snapnamestringyesThe name of the snapshot. — format pve-configid, ≤ 40 chars
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback ​

ts
proxmox.nodes.$(node).lxc.$(vmid).snapshot.$(snapname).rollback.$post()

Rollback LXC state to specified snapshot.

Returns string.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
snapnamestringyesThe name of the snapshot. — format pve-configid, ≤ 40 chars
startbooleanWhether the container should get started after rolling back successfully — default 0
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/spiceproxy ​

ts
proxmox.nodes.$(node).lxc.$(vmid).spiceproxy.$post()

Returns a SPICE configuration to connect to the CT.

Returns any.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
proxystringSPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As reasonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI). — format address
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/status ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.$get()

Directory index

Returns an array of object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

GET /nodes/{node}/lxc/{vmid}/status/current ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.current.$get()

Get virtual machine status.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/status/reboot ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.reboot.$post()

Reboot the container by shutting it down, and starting it again. Applies pending changes.

Returns string.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
timeoutnumberWait maximal timeout seconds for the shutdown. — min 0
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/status/resume ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.resume.$post()

Resume the container.

Returns string.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/status/shutdown ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.shutdown.$post()

Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.

Returns string.

ParameterTypeRequiredNotes
forceStopbooleanMake sure the Container stops. — default 0
nodestringyesThe cluster node name. — format pve-node
timeoutnumberWait maximal timeout seconds. — min 0, default 60
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/status/start ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.start.$post()

Start the container.

Returns string.

ParameterTypeRequiredNotes
debugbooleanIf set, enables very verbose debug log-level on start. — default 0
nodestringyesThe cluster node name. — format pve-node
skiplockbooleanIgnore locks - only root is allowed to use this option.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/status/stop ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.stop.$post()

Stop the container. This will abruptly stop all processes running in the container.

Returns string.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
overrule-shutdownbooleanTry to abort active 'vzshutdown' tasks before stopping. — default 0
skiplockbooleanIgnore locks - only root is allowed to use this option.
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/status/suspend ​

ts
proxmox.nodes.$(node).lxc.$(vmid).status.suspend.$post()

Suspend the container. This is experimental.

Returns string.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/template ​

ts
proxmox.nodes.$(node).lxc.$(vmid).template.$post()

Create a Template.

Returns nothing.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/termproxy ​

ts
proxmox.nodes.$(node).lxc.$(vmid).termproxy.$post()

Creates a TCP proxy connection.

Returns any.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999

POST /nodes/{node}/lxc/{vmid}/vncproxy ​

ts
proxmox.nodes.$(node).lxc.$(vmid).vncproxy.$post()

Creates a TCP VNC proxy connections.

Returns any.

ParameterTypeRequiredNotes
heightnumbersets the height of the console in pixels. — min 16, max 2160
nodestringyesThe cluster node name. — format pve-node
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999
websocketbooleanuse websocket instead of standard VNC.
widthnumbersets the width of the console in pixels. — min 16, max 4096

GET /nodes/{node}/lxc/{vmid}/vncwebsocket ​

ts
proxmox.nodes.$(node).lxc.$(vmid).vncwebsocket.$get()

Opens a websocket for VNC traffic.

Returns object.

ParameterTypeRequiredNotes
nodestringyesThe cluster node name. — format pve-node
portnumberyesPort number returned by previous vncproxy call. — min 5900, max 5999
vmidnumberyesThe (unique) ID of the VM. — format pve-vmid, min 100, max 999999999
vncticketstringyesTicket from previous call to vncproxy. — ≤ 512 chars