From 7aacca6f1d325ac2014e98852a40d3e967ccb216 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 30 Apr 2016 11:35:45 +0200 Subject: [PATCH] improve update target, update all auto-generated files --- Makefile | 3 +- README.adoc | 10 +- api-viewer/apidata.js | 29500 ++++++++++++++++++++-------------------- pct.1-synopsis.adoc | 6 +- pvesm.1-synopsis.adoc | 4 +- qm.1-synopsis.adoc | 4 +- qm.conf.5-opts.adoc | 2 +- 7 files changed, 14769 insertions(+), 14760 deletions(-) diff --git a/Makefile b/Makefile index 93c0b53..48c364d 100644 --- a/Makefile +++ b/Makefile @@ -260,8 +260,9 @@ upload: ${GEN_DEB} ${DOC_DEB} .PHONY: update update: clean - rm -f *.5-opts.adoc .1-synopsis.adoc .8-synopsis.adoc + rm -f *.5-opts.adoc *.1-synopsis.adoc *.8-synopsis.adoc rm -f api-viewer/apidata.js + rm -f pve-firewall-macros.adoc make all clean: diff --git a/README.adoc b/README.adoc index 173a544..ed03114 100644 --- a/README.adoc +++ b/README.adoc @@ -16,11 +16,17 @@ When possible, we provide scripts to extract API definitions, configuration or command line options from the source code. To simplify the documentation task, we keep all Documentation within -this repository. It is possible to generate the docs (without installing -any additional Proxmox packages) with: +this repository. It is possible to generate the docs without installing +any additional Proxmox packages with: make index +To update the auto-generate API definitions use: + + make update + +NOTE: you need a fully installed development environment for that. + Debian Packages --------------- diff --git a/api-viewer/apidata.js b/api-viewer/apidata.js index 59754f0..26307a5 100644 --- a/api-viewer/apidata.js +++ b/api-viewer/apidata.js @@ -1,326 +1,220 @@ var pveapi = [ { "leaf" : 0, - "text" : "cluster", + "path" : "/cluster", + "info" : { + "GET" : { + "method" : "GET", + "returns" : { + "links" : [ + { + "rel" : "child", + "href" : "{name}" + } + ], + "items" : { + "type" : "object", + "properties" : {} + }, + "type" : "array" + }, + "permissions" : { + "user" : "all" + }, + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "index", + "description" : "Cluster index." + } + }, "children" : [ { - "leaf" : 0, - "text" : "firewall", "info" : { "GET" : { - "name" : "index", "method" : "GET", - "parameters" : { - "additionalProperties" : 0 - }, "returns" : { + "type" : "array", "items" : { "type" : "object", "properties" : {} }, - "type" : "array", "links" : [ { - "href" : "{name}", - "rel" : "child" + "rel" : "child", + "href" : "{name}" } ] }, "description" : "Directory index.", "permissions" : { "user" : "all" - } + }, + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "index" } }, + "text" : "firewall", "children" : [ { - "leaf" : 0, + "info" : { + "GET" : { + "method" : "GET", + "returns" : { + "type" : "array", + "links" : [ + { + "href" : "{group}", + "rel" : "child" + } + ], + "items" : { + "properties" : { + "group" : { + "maxLength" : 20, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Security Group name.", + "type" : "string" + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 0, + "type" : "string", + "maxLength" : 40 + }, + "comment" : { + "type" : "string", + "optional" : 1 + } + }, + "type" : "object" + } + }, + "description" : "List security groups.", + "permissions" : { + "user" : "all" + }, + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "list_security_groups" + }, + "POST" : { + "returns" : { + "type" : "null" + }, + "method" : "POST", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "group" : { + "maxLength" : 20, + "description" : "Security Group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "type" : "string" + }, + "digest" : { + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "rename" : { + "maxLength" : 20, + "optional" : 1, + "type" : "string", + "minLength" : 2, + "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" + }, + "comment" : { + "type" : "string", + "optional" : 1 + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "name" : "create_security_group", + "description" : "Create new security group.", + "protected" : 1 + } + }, "text" : "groups", - "path" : "/cluster/firewall/groups", "children" : [ { - "children" : [ - { - "leaf" : 1, - "text" : "{pos}", - "info" : { - "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "leaf" : 0, + "path" : "/cluster/firewall/groups/{group}", + "info" : { + "GET" : { + "proxyto" : null, + "description" : "List rules.", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "parameters" : { + "properties" : { + "group" : { + "minLength" : 2, + "description" : "Security Group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string", + "maxLength" : 20 + } + }, + "additionalProperties" : 0 + }, + "name" : "get_rules", + "method" : "GET", + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } }, - "protected" : 1, - "parameters" : { - "properties" : { - "iface" : { - "maxLength" : 20, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "optional" : 1, - "minLength" : 2, - "format" : "pve-iface", - "type" : "string" - }, - "digest" : { - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "source" : { - "optional" : 1, - "description" : "Restrict 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", - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "action" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 20, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "optional" : 1 - }, - "pos" : { - "description" : "Update rule at position .", - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "dest" : { - "format" : "pve-fw-addr-spec", - "type" : "string", - "description" : "Restrict 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.", - "optional" : 1 - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 1, - "type" : "string" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "optional" : 1, - "format" : "pve-fw-protocol-spec", - "type" : "string" - }, - "enable" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1 - }, - "moveto" : { - "optional" : 1, - "description" : "Move rule to new position . Other arguments are ignored.", - "minimum" : 0, - "type" : "integer" - }, - "dport" : { - "format" : "pve-fw-dport-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict 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." - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "optional" : 1, - "format" : "pve-configid-list", - "type" : "string" - }, - "sport" : { - "format" : "pve-fw-sport-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict 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." - }, - "group" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 20, - "description" : "Security Group name.", - "type" : "string" - }, - "macro" : { - "optional" : 1, - "maxLength" : 128, - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "proxyto" : null, - "description" : "Modify rule data.", - "returns" : { - "type" : "null" - }, - "name" : "update_rule", - "method" : "PUT" - }, - "DELETE" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "proxyto" : null, - "parameters" : { - "properties" : { - "group" : { - "maxLength" : 20, - "description" : "Security Group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, - "pos" : { - "description" : "Update rule at position .", - "optional" : 1, - "minimum" : 0, - "type" : "integer" - }, - "digest" : { - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "optional" : 1 - } - }, - "additionalProperties" : 0 - }, - "description" : "Delete rule.", - "method" : "DELETE", - "name" : "delete_rule", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "method" : "GET", - "name" : "get_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "pos" : { - "minimum" : 0, - "type" : "integer", - "description" : "Update rule at position .", - "optional" : 1 - }, - "group" : { - "maxLength" : 20, - "description" : "Security Group name.", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - }, - "proxyto" : null, - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "description" : "Get single rule data.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - } - } - }, - "path" : "/cluster/firewall/groups/{group}/{pos}" - } - ], - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "description" : "List rules.", - "method" : "GET", - "name" : "get_rules", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "pos" : { - "type" : "integer" - } - } + "type" : "object" }, "links" : [ { "href" : "{pos}", "rel" : "child" } - ] - }, - "proxyto" : null, - "parameters" : { - "properties" : { - "group" : { - "maxLength" : 20, - "description" : "Security Group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - } - }, - "additionalProperties" : 0 + ], + "type" : "array" } }, "DELETE" : { - "method" : "DELETE", "name" : "delete_security_group", - "returns" : { - "type" : "null" - }, "parameters" : { "additionalProperties" : 0, "properties" : { "group" : { - "description" : "Security Group name.", "maxLength" : 20, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "minLength" : 2, + "description" : "Security Group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "type" : "string" } } }, - "protected" : 1, - "description" : "Delete security group.", "permissions" : { "check" : [ "perm", @@ -329,47 +223,73 @@ var pveapi = [ "Sys.Modify" ] ] - } + }, + "protected" : 1, + "description" : "Delete security group.", + "returns" : { + "type" : "null" + }, + "method" : "DELETE" }, "POST" : { + "method" : "POST", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "type" : "string", + "iface" : { "maxLength" : 20, - "description" : "Security Group name.", + "format" : "pve-iface", + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" + "optional" : 1, + "type" : "string" }, "comment" : { "type" : "string", "optional" : 1 }, - "action" : { + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, + "type" : "string" + }, + "source" : { + "description" : "Restrict 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.", + "optional" : 1, "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "optional" : 0, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20 + "format" : "pve-fw-addr-spec" }, - "pos" : { - "description" : "Update rule at position .", + "sport" : { + "format" : "pve-fw-sport-spec", + "description" : "Restrict 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.", "optional" : 1, - "type" : "integer", - "minimum" : 0 + "type" : "string" }, "dest" : { - "format" : "pve-fw-addr-spec", - "type" : "string", "optional" : 1, - "description" : "Restrict 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." + "type" : "string", + "description" : "Restrict 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" }, - "macro" : { + "action" : { + "maxLength" : 20, "type" : "string", - "optional" : 1, - "maxLength" : 128 + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "minLength" : 2 + }, + "enable" : { + "minimum" : 0, + "type" : "integer", + "optional" : 1 + }, + "dport" : { + "format" : "pve-fw-dport-spec", + "description" : "Restrict 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.", + "type" : "string", + "optional" : 1 }, "type" : { "enum" : [ @@ -380,53 +300,37 @@ var pveapi = [ "optional" : 0, "type" : "string" }, - "proto" : { + "macro" : { "type" : "string", - "format" : "pve-fw-protocol-spec", "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." + "maxLength" : 128 }, - "iface" : { - "minLength" : 2, - "maxLength" : 20, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "optional" : 1, + "group" : { "type" : "string", - "format" : "pve-iface" + "description" : "Security Group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "maxLength" : 20 }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "proto" : { "optional" : 1, - "maxLength" : 40, - "type" : "string" + "type" : "string", + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec" }, - "enable" : { - "optional" : 1, + "pos" : { "minimum" : 0, - "type" : "integer" - }, - "dport" : { - "format" : "pve-fw-dport-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict 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." - }, - "source" : { - "type" : "string", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "description" : "Restrict 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." - }, - "sport" : { - "description" : "Restrict 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.", - "optional" : 1, - "type" : "string", - "format" : "pve-fw-sport-spec" + "description" : "Update rule at position .", + "type" : "integer", + "optional" : 1 } } }, - "proxyto" : null, + "name" : "create_rule", "protected" : 1, + "returns" : { + "type" : "null" + }, "permissions" : { "check" : [ "perm", @@ -436,362 +340,518 @@ var pveapi = [ ] ] }, - "returns" : { - "type" : "null" - }, - "method" : "POST", - "name" : "create_rule", - "description" : "Create new rule." + "description" : "Create new rule.", + "proxyto" : null } }, - "path" : "/cluster/firewall/groups/{group}", - "leaf" : 0, + "children" : [ + { + "text" : "{pos}", + "info" : { + "PUT" : { + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "sport" : { + "format" : "pve-fw-sport-spec", + "description" : "Restrict 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.", + "type" : "string", + "optional" : 1 + }, + "iface" : { + "minLength" : 2, + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "type" : "string", + "optional" : 1, + "maxLength" : 20, + "format" : "pve-iface" + }, + "macro" : { + "maxLength" : 128, + "optional" : 1, + "type" : "string" + }, + "proto" : { + "format" : "pve-fw-protocol-spec", + "type" : "string", + "optional" : 1, + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." + }, + "pos" : { + "description" : "Update rule at position .", + "type" : "integer", + "optional" : 1, + "minimum" : 0 + }, + "action" : { + "optional" : 1, + "type" : "string", + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20 + }, + "enable" : { + "optional" : 1, + "type" : "integer", + "minimum" : 0 + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, + "type" : "string", + "maxLength" : 40 + }, + "source" : { + "optional" : 1, + "type" : "string", + "description" : "Restrict 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" + }, + "dest" : { + "format" : "pve-fw-addr-spec", + "optional" : 1, + "type" : "string", + "description" : "Restrict 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." + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "type" : "string", + "optional" : 1, + "format" : "pve-configid-list" + }, + "comment" : { + "type" : "string", + "optional" : 1 + }, + "moveto" : { + "description" : "Move rule to new position . Other arguments are ignored.", + "type" : "integer", + "optional" : 1, + "minimum" : 0 + }, + "group" : { + "maxLength" : 20, + "type" : "string", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Security Group name.", + "minLength" : 2 + }, + "dport" : { + "type" : "string", + "optional" : 1, + "description" : "Restrict 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" + }, + "type" : { + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "name" : "update_rule", + "protected" : 1, + "method" : "PUT", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "description" : "Modify rule data.", + "proxyto" : null, + "returns" : { + "type" : "null" + } + }, + "DELETE" : { + "returns" : { + "type" : "null" + }, + "description" : "Delete rule.", + "proxyto" : null, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "method" : "DELETE", + "protected" : 1, + "name" : "delete_rule", + "parameters" : { + "properties" : { + "pos" : { + "type" : "integer", + "optional" : 1, + "description" : "Update rule at position .", + "minimum" : 0 + }, + "group" : { + "maxLength" : 20, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Security Group name.", + "minLength" : 2, + "type" : "string" + }, + "digest" : { + "type" : "string", + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + } + }, + "additionalProperties" : 0 + } + }, + "GET" : { + "name" : "get_rule", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "parameters" : { + "properties" : { + "pos" : { + "description" : "Update rule at position .", + "type" : "integer", + "optional" : 1, + "minimum" : 0 + }, + "group" : { + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Security Group name.", + "minLength" : 2, + "type" : "string", + "maxLength" : 20 + } + }, + "additionalProperties" : 0 + }, + "proxyto" : null, + "description" : "Get single rule data.", + "returns" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "method" : "GET" + } + }, + "path" : "/cluster/firewall/groups/{group}/{pos}", + "leaf" : 1 + } + ], "text" : "{group}" } ], - "info" : { - "POST" : { - "protected" : 1, - "description" : "Create new security group.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "returns" : { - "type" : "null" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "rename" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 20, - "optional" : 1, - "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.", - "type" : "string" - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "maxLength" : 40, - "type" : "string" - }, - "group" : { - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 20, - "description" : "Security Group name." - }, - "comment" : { - "optional" : 1, - "type" : "string" - } - } - }, - "name" : "create_security_group", - "method" : "POST" - }, - "GET" : { - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "digest" : { - "type" : "string", - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0 - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "group" : { - "type" : "string", - "maxLength" : 20, - "description" : "Security Group name.", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" - } - } - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{group}" - } - ] - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "list_security_groups", - "method" : "GET", - "description" : "List security groups.", - "permissions" : { - "user" : "all" - } - } - } - }, - { + "leaf" : 0, + "path" : "/cluster/firewall/groups" + }, + { "info" : { "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "description" : "List rules.", "method" : "GET", - "name" : "get_rules", "returns" : { + "type" : "array", "links" : [ { "rel" : "child", "href" : "{pos}" } ], - "type" : "array", "items" : { - "type" : "object", "properties" : { "pos" : { "type" : "integer" } - } + }, + "type" : "object" } }, - "proxyto" : null, + "name" : "get_rules", "parameters" : { "additionalProperties" : 0 - } - }, - "POST" : { - "protected" : 1, + }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] }, - "proxyto" : null, + "description" : "List rules.", + "proxyto" : null + }, + "POST" : { + "method" : "POST", + "protected" : 1, + "name" : "create_rule", "parameters" : { - "additionalProperties" : 0, "properties" : { - "macro" : { + "dport" : { + "description" : "Restrict 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.", "optional" : 1, - "maxLength" : 128, - "type" : "string" + "type" : "string", + "format" : "pve-fw-dport-spec" }, "type" : { + "type" : "string", "optional" : 0, "enum" : [ "in", "out", "group" - ], - "type" : "string" + ] }, - "pos" : { + "enable" : { "type" : "integer", - "minimum" : 0, - "description" : "Update rule at position .", - "optional" : 1 - }, - "comment" : { "optional" : 1, - "type" : "string" + "minimum" : 0 }, "action" : { "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "optional" : 0, + "minLength" : 2, "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "maxLength" : 20 }, - "dest" : { + "macro" : { "optional" : 1, - "description" : "Restrict 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", - "type" : "string" - }, - "source" : { - "format" : "pve-fw-addr-spec", "type" : "string", - "description" : "Restrict 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.", - "optional" : 1 + "maxLength" : 128 }, - "sport" : { - "description" : "Restrict 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.", + "pos" : { + "description" : "Update rule at position .", + "type" : "integer", "optional" : 1, - "type" : "string", - "format" : "pve-fw-sport-spec" + "minimum" : 0 }, - "digest" : { + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", "type" : "string", "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + "format" : "pve-fw-protocol-spec" }, "iface" : { - "type" : "string", - "format" : "pve-iface", + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", "minLength" : 2, + "type" : "string", + "optional" : 1, "maxLength" : 20, - "description" : "Network 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" + }, + "comment" : { + "type" : "string", "optional" : 1 }, - "proto" : { + "source" : { + "description" : "Restrict 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.", "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", "type" : "string", - "format" : "pve-fw-protocol-spec" + "format" : "pve-fw-addr-spec" }, - "dport" : { - "format" : "pve-fw-dport-spec", + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "type" : "string", - "description" : "Restrict 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.", - "optional" : 1 + "optional" : 1, + "maxLength" : 40 }, - "enable" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1 + "dest" : { + "format" : "pve-fw-addr-spec", + "description" : "Restrict 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.", + "optional" : 1, + "type" : "string" + }, + "sport" : { + "format" : "pve-fw-sport-spec", + "description" : "Restrict 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.", + "optional" : 1, + "type" : "string" } - } + }, + "additionalProperties" : 0 }, - "description" : "Create new rule.", "returns" : { "type" : "null" }, - "name" : "create_rule", - "method" : "POST" + "proxyto" : null, + "description" : "Create new rule.", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + } } }, - "path" : "/cluster/firewall/rules", "children" : [ { - "leaf" : 1, "text" : "{pos}", "info" : { + "GET" : { + "method" : "GET", + "returns" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pos" : { + "description" : "Update rule at position .", + "optional" : 1, + "type" : "integer", + "minimum" : 0 + } + } + }, + "name" : "get_rule", + "description" : "Get single rule data.", + "proxyto" : null + }, "PUT" : { + "protected" : 1, + "name" : "update_rule", "parameters" : { "properties" : { - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "delete" : { + "description" : "A list of settings you want to delete.", "optional" : 1, - "type" : "string" + "type" : "string", + "format" : "pve-configid-list" }, "iface" : { - "optional" : 1, - "maxLength" : 20, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", "minLength" : 2, - "format" : "pve-iface", - "type" : "string" - }, - "proto" : { - "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", "type" : "string", - "format" : "pve-fw-protocol-spec" - }, - "dport" : { "optional" : 1, - "description" : "Restrict 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", - "type" : "string" + "format" : "pve-iface", + "maxLength" : 20 }, "moveto" : { - "type" : "integer", "minimum" : 0, "description" : "Move rule to new position . Other arguments are ignored.", + "type" : "integer", "optional" : 1 }, - "enable" : { + "comment" : { "optional" : 1, - "type" : "integer", - "minimum" : 0 + "type" : "string" }, - "delete" : { - "description" : "A list of settings you want to delete.", + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "optional" : 1, - "type" : "string", - "format" : "pve-configid-list" + "type" : "string" }, "source" : { - "type" : "string", "format" : "pve-fw-addr-spec", + "type" : "string", "optional" : 1, "description" : "Restrict 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." }, "sport" : { - "format" : "pve-fw-sport-spec", + "optional" : 1, "type" : "string", "description" : "Restrict 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.", - "optional" : 1 + "format" : "pve-fw-sport-spec" }, - "pos" : { - "description" : "Update rule at position .", + "dest" : { + "type" : "string", "optional" : 1, - "minimum" : 0, - "type" : "integer" + "description" : "Restrict 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" }, - "action" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 20, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "optional" : 1 + "enable" : { + "optional" : 1, + "type" : "integer", + "minimum" : 0 }, - "comment" : { + "dport" : { "optional" : 1, - "type" : "string" + "type" : "string", + "description" : "Restrict 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" }, - "dest" : { - "format" : "pve-fw-addr-spec", + "type" : { + "enum" : [ + "in", + "out", + "group" + ], "type" : "string", - "description" : "Restrict 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.", "optional" : 1 }, - "macro" : { + "action" : { "type" : "string", "optional" : 1, - "maxLength" : 128 + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "minLength" : 2, + "maxLength" : 20 }, - "type" : { + "macro" : { + "optional" : 1, "type" : "string", + "maxLength" : 128 + }, + "pos" : { + "description" : "Update rule at position .", "optional" : 1, - "enum" : [ - "in", - "out", - "group" - ] + "type" : "integer", + "minimum" : 0 + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "optional" : 1, + "type" : "string", + "format" : "pve-fw-protocol-spec" } }, "additionalProperties" : 0 }, + "method" : "PUT", "proxyto" : null, - "protected" : 1, + "description" : "Modify rule data.", "permissions" : { "check" : [ "perm", @@ -803,64 +863,64 @@ var pveapi = [ }, "returns" : { "type" : "null" - }, - "method" : "PUT", - "name" : "update_rule", - "description" : "Modify rule data." + } }, - "GET" : { + "DELETE" : { "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "description" : "Get single rule data.", - "parameters" : { - "properties" : { - "pos" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1, - "description" : "Update rule at position ." - } - }, - "additionalProperties" : 0 - }, "proxyto" : null, + "description" : "Delete rule.", "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" + "type" : "null" }, - "method" : "GET", - "name" : "get_rule" - }, - "DELETE" : { "parameters" : { "additionalProperties" : 0, "properties" : { "pos" : { - "description" : "Update rule at position .", "optional" : 1, "type" : "integer", + "description" : "Update rule at position .", "minimum" : 0 }, "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "maxLength" : 40, "optional" : 1, - "type" : "string" + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." } } }, - "proxyto" : null, + "name" : "delete_rule", + "protected" : 1, + "method" : "DELETE" + } + }, + "path" : "/cluster/firewall/rules/{pos}", + "leaf" : 1 + } + ], + "text" : "rules", + "leaf" : 0, + "path" : "/cluster/firewall/rules" + }, + { + "path" : "/cluster/firewall/ipset", + "leaf" : 0, + "children" : [ + { + "leaf" : 0, + "path" : "/cluster/firewall/ipset/{name}", + "info" : { + "DELETE" : { + "protected" : 1, + "description" : "Delete IPSet", "permissions" : { "check" : [ "perm", @@ -870,130 +930,136 @@ var pveapi = [ ] ] }, - "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "type" : "string", + "maxLength" : 64 + } + } + }, + "name" : "delete_ipset", "returns" : { "type" : "null" }, - "name" : "delete_rule", - "method" : "DELETE", - "description" : "Delete rule." - } - }, - "path" : "/cluster/firewall/rules/{pos}" - } - ], - "leaf" : 0, - "text" : "rules" - }, - { - "leaf" : 0, - "text" : "ipset", - "info" : { - "POST" : { - "parameters" : { - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" + "method" : "DELETE" + }, + "GET" : { + "returns" : { + "items" : { + "type" : "object", + "properties" : { + "comment" : { + "type" : "string", + "optional" : 1 + }, + "nomatch" : { + "type" : "boolean", + "optional" : 1 + }, + "cidr" : { + "type" : "string" + }, + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", + "optional" : 0 + } + } + }, + "links" : [ + { + "href" : "{cidr}", + "rel" : "child" + } + ], + "type" : "array" }, - "rename" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "optional" : 1, - "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", - "maxLength" : 64 + "method" : "GET", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] }, - "comment" : { - "optional" : 1, - "type" : "string" + "name" : "get_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "type" : "string", + "maxLength" : 64 + } + } }, - "digest" : { - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "type" : "string" - } + "description" : "List IPSet content" }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "null" - }, - "name" : "create_ipset", - "method" : "POST", - "description" : "Create new IPSet", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1 - }, - "GET" : { - "description" : "List IPSets", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "digest" : { - "optional" : 0, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" - }, - "name" : { - "type" : "string", - "maxLength" : 64, - "description" : "IP set name.", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" + "POST" : { + "returns" : { + "type" : "null" + }, + "method" : "POST", + "name" : "create_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "format" : "IPorCIDRorAlias", + "type" : "string", + "description" : "Network/IP specification in CIDR format." + }, + "nomatch" : { + "type" : "boolean", + "optional" : 1 + }, + "name" : { + "type" : "string", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "minLength" : 2, + "maxLength" : 64 + }, + "comment" : { + "type" : "string", + "optional" : 1 + } } }, - "type" : "object" - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] - }, - "parameters" : { - "additionalProperties" : 0 + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "description" : "Add IP or Network to IPSet.", + "protected" : 1 + } }, - "name" : "ipset_index", - "method" : "GET" - } - }, - "children" : [ - { - "leaf" : 0, "text" : "{name}", "children" : [ { + "text" : "{cidr}", "info" : { "GET" : { + "returns" : { + "type" : "object" + }, + "method" : "GET", + "description" : "Read IP or Network settings from IPSet.", "protected" : 1, "permissions" : { "check" : [ @@ -1004,61 +1070,62 @@ var pveapi = [ ] ] }, - "description" : "Read IP or Network settings from IPSet.", - "method" : "GET", - "name" : "read_ip", - "returns" : { - "type" : "object" - }, "parameters" : { "additionalProperties" : 0, "properties" : { "cidr" : { - "format" : "IPorCIDRorAlias", + "description" : "Network/IP specification in CIDR format.", "type" : "string", - "description" : "Network/IP specification in CIDR format." + "format" : "IPorCIDRorAlias" }, "name" : { - "type" : "string", - "description" : "IP set name.", "maxLength" : 64, + "type" : "string", + "minLength" : 2, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 + "description" : "IP set name." } } - } + }, + "name" : "read_ip" }, - "DELETE" : { + "PUT" : { + "method" : "PUT", "returns" : { "type" : "null" }, "parameters" : { + "additionalProperties" : 0, "properties" : { - "cidr" : { - "format" : "IPorCIDRorAlias", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "digest" : { + "nomatch" : { "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "type" : "string" + "type" : "boolean" }, "name" : { - "description" : "IP set name.", "maxLength" : 64, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", "minLength" : 2, "type" : "string" + }, + "comment" : { + "type" : "string", + "optional" : 1 + }, + "cidr" : { + "format" : "IPorCIDRorAlias", + "description" : "Network/IP specification in CIDR format.", + "type" : "string" + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, + "type" : "string", + "maxLength" : 40 } - }, - "additionalProperties" : 0 + } }, - "method" : "DELETE", - "name" : "remove_ip", - "protected" : 1, - "description" : "Remove IP or Network from IPSet.", + "name" : "update_ip", "permissions" : { "check" : [ "perm", @@ -1067,10 +1134,17 @@ var pveapi = [ "Sys.Modify" ] ] - } - }, - "PUT" : { + }, "description" : "Update IP or Network settings", + "protected" : 1 + }, + "DELETE" : { + "method" : "DELETE", + "returns" : { + "type" : "null" + }, + "description" : "Remove IP or Network from IPSet.", + "protected" : 1, "permissions" : { "check" : [ "perm", @@ -1080,140 +1154,251 @@ var pveapi = [ ] ] }, - "protected" : 1, "parameters" : { "properties" : { - "name" : { - "type" : "string", - "maxLength" : 64, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "cidr" : { - "type" : "string", - "format" : "IPorCIDRorAlias", - "description" : "Network/IP specification in CIDR format." - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, "digest" : { + "maxLength" : 40, "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "optional" : 1, - "maxLength" : 40, "type" : "string" + }, + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "type" : "string", + "format" : "IPorCIDRorAlias" + }, + "name" : { + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "type" : "string", + "maxLength" : 64 } }, "additionalProperties" : 0 }, - "returns" : { - "type" : "null" - }, - "method" : "PUT", - "name" : "update_ip" + "name" : "remove_ip" } }, "path" : "/cluster/firewall/ipset/{name}/{cidr}", - "leaf" : 1, - "text" : "{cidr}" + "leaf" : 1 } - ], - "path" : "/cluster/firewall/ipset/{name}", - "info" : { - "DELETE" : { - "method" : "DELETE", - "name" : "delete_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - } - } + ] + } + ], + "text" : "ipset", + "info" : { + "POST" : { + "returns" : { + "type" : "null" + }, + "method" : "POST", + "protected" : 1, + "description" : "Create new IPSet", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "type" : "string", + "optional" : 1 }, - "returns" : { - "type" : "null" + "name" : { + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "type" : "string", + "maxLength" : 64 }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "rename" : { + "type" : "string", + "optional" : 1, + "minLength" : 2, + "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "maxLength" : 64 }, - "description" : "Delete IPSet", - "protected" : 1 + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", + "optional" : 1 + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "name" : "create_ipset" + }, + "GET" : { + "returns" : { + "type" : "array", + "items" : { + "properties" : { + "comment" : { + "type" : "string", + "optional" : 1 + }, + "name" : { + "maxLength" : 64, + "type" : "string", + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name." + }, + "digest" : { + "maxLength" : 40, + "type" : "string", + "optional" : 0, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + } + }, + "type" : "object" }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ] + }, + "method" : "GET", + "description" : "List IPSets", + "name" : "ipset_index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + } + } + } + }, + { + "info" : { + "POST" : { + "method" : "POST", + "returns" : { + "type" : "null" + }, + "protected" : 1, + "description" : "Create IP or Network Alias.", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "type" : "string", + "format" : "IPorCIDR" }, - "description" : "List IPSet content", - "method" : "GET", - "name" : "get_ipset", + "name" : { + "maxLength" : 64, + "type" : "string", + "minLength" : 2, + "description" : "Alias name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" + }, + "comment" : { + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "name" : "create_alias" + }, + "GET" : { + "method" : "GET", + "returns" : { + "type" : "array", + "links" : [ + { + "rel" : "child", + "href" : "{name}" + } + ], + "items" : { + "properties" : { + "digest" : { + "optional" : 0, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "description" : "List aliases", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "name" : "get_aliases" + } + }, + "text" : "aliases", + "children" : [ + { + "info" : { + "DELETE" : { "parameters" : { - "additionalProperties" : 0, "properties" : { + "digest" : { + "type" : "string", + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, "name" : { "maxLength" : 64, - "description" : "IP set name.", - "minLength" : 2, + "type" : "string", + "description" : "Alias name.", "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - }, - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{cidr}" + "minLength" : 2 } - ], - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "digest" : { - "type" : "string", - "maxLength" : 40, - "optional" : 0, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 - } - }, - "type" : "object" }, - "type" : "array" - } - }, - "POST" : { + "additionalProperties" : 0 + }, + "name" : "remove_alias", "permissions" : { "check" : [ "perm", @@ -1223,294 +1408,143 @@ var pveapi = [ ] ] }, - "description" : "Add IP or Network to IPSet.", + "description" : "Remove IP or Network alias.", + "protected" : 1, + "returns" : { + "type" : "null" + }, + "method" : "DELETE" + }, + "PUT" : { + "method" : "PUT", + "returns" : { + "type" : "null" + }, + "description" : "Update IP or Network alias.", "protected" : 1, - "method" : "POST", - "name" : "create_ip", "parameters" : { "additionalProperties" : 0, "properties" : { - "name" : { - "type" : "string", + "rename" : { + "maxLength" : 64, "minLength" : 2, + "description" : "Rename an existing alias.", "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "maxLength" : 64 - }, - "comment" : { "optional" : 1, "type" : "string" }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", + "name" : { + "maxLength" : 64, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Alias name.", + "minLength" : 2, "type" : "string" - } - } - }, - "returns" : { - "type" : "null" - } - } - } - } - ], - "path" : "/cluster/firewall/ipset" - }, - { - "text" : "aliases", - "leaf" : 0, - "children" : [ - { - "text" : "{name}", - "leaf" : 1, - "info" : { - "DELETE" : { - "protected" : 1, - "description" : "Remove IP or Network alias.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "returns" : { - "type" : "null" - }, - "parameters" : { - "properties" : { - "name" : { + }, + "comment" : { "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name.", - "maxLength" : 64 + "optional" : 1 + }, + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "type" : "string", + "format" : "IPorCIDR" }, "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "maxLength" : 40, + "type" : "string", "optional" : 1, - "type" : "string" + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." } - }, - "additionalProperties" : 0 + } }, - "method" : "DELETE", - "name" : "remove_alias" - }, - "GET" : { + "name" : "update_alias", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] - }, - "description" : "Read alias.", + } + }, + "GET" : { "parameters" : { "additionalProperties" : 0, "properties" : { "name" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "maxLength" : 64, + "type" : "string", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "description" : "Alias name.", - "type" : "string" + "minLength" : 2 } } }, - "returns" : { - "type" : "object" - }, - "name" : "read_alias", - "method" : "GET" - }, - "PUT" : { "permissions" : { "check" : [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] }, - "description" : "Update IP or Network alias.", - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "maxLength" : 64, - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, - "cidr" : { - "format" : "IPorCIDR", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "rename" : { - "type" : "string", - "optional" : 1, - "maxLength" : 64, - "description" : "Rename an existing alias.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - } - } - }, + "name" : "read_alias", + "description" : "Read alias.", "returns" : { - "type" : "null" + "type" : "object" }, - "name" : "update_alias", - "method" : "PUT" + "method" : "GET" } }, + "text" : "{name}", + "leaf" : 1, "path" : "/cluster/firewall/aliases/{name}" } ], - "path" : "/cluster/firewall/aliases", - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "description" : "List aliases", - "method" : "GET", - "name" : "get_aliases", - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "name" : { - "type" : "string" - }, - "cidr" : { - "type" : "string" - }, - "digest" : { - "optional" : 0, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - }, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] - }, - "parameters" : { - "additionalProperties" : 0 - } - }, - "POST" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "description" : "Create IP or Network Alias.", - "name" : "create_alias", - "method" : "POST", - "returns" : { - "type" : "null" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "cidr" : { - "format" : "IPorCIDR", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - } - } - } + "leaf" : 0, + "path" : "/cluster/firewall/aliases" }, { "info" : { - "GET" : { - "method" : "GET", - "name" : "get_options", + "PUT" : { + "description" : "Set Firewall options.", + "protected" : 1, "parameters" : { - "additionalProperties" : 0 - }, - "returns" : { "properties" : { - "policy_in" : { + "policy_out" : { + "type" : "string", + "optional" : 1, + "description" : "Output policy.", "enum" : [ "ACCEPT", "REJECT", "DROP" - ], + ] + }, + "delete" : { "optional" : 1, - "description" : "Input policy.", - "type" : "string" + "type" : "string", + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list" }, "enable" : { - "description" : "Enable or disable the firewall cluster wide.", + "type" : "integer", "optional" : 1, - "minimum" : 0, - "type" : "integer" + "description" : "Enable or disable the firewall cluster wide.", + "minimum" : 0 }, - "policy_out" : { + "digest" : { + "maxLength" : 40, + "optional" : 1, "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "policy_in" : { "optional" : 1, - "description" : "Output policy.", + "type" : "string", + "description" : "Input policy.", "enum" : [ "ACCEPT", "REJECT", @@ -1518,125 +1552,129 @@ var pveapi = [ ] } }, - "type" : "object" + "additionalProperties" : 0 }, - "description" : "Get Firewall options.", + "name" : "set_options", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] - } - }, - "PUT" : { - "description" : "Set Firewall options.", + }, + "method" : "PUT", + "returns" : { + "type" : "null" + } + }, + "GET" : { "permissions" : { "check" : [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] }, - "protected" : 1, - "name" : "set_options", - "method" : "PUT", "parameters" : { - "additionalProperties" : 0, + "additionalProperties" : 0 + }, + "name" : "get_options", + "description" : "Get Firewall options.", + "method" : "GET", + "returns" : { + "type" : "object", "properties" : { - "delete" : { - "description" : "A list of settings you want to delete.", - "optional" : 1, - "format" : "pve-configid-list", - "type" : "string" - }, "policy_in" : { - "description" : "Input policy.", "optional" : 1, + "type" : "string", + "description" : "Input policy.", "enum" : [ "ACCEPT", "REJECT", "DROP" - ], - "type" : "string" + ] }, - "digest" : { - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "optional" : 1 + "enable" : { + "description" : "Enable or disable the firewall cluster wide.", + "optional" : 1, + "type" : "integer", + "minimum" : 0 }, "policy_out" : { + "optional" : 1, "type" : "string", + "description" : "Output policy.", "enum" : [ "ACCEPT", "REJECT", "DROP" - ], - "description" : "Output policy.", - "optional" : 1 - }, - "enable" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Enable or disable the firewall cluster wide." + ] } } - }, - "returns" : { - "type" : "null" } } }, - "path" : "/cluster/firewall/options", + "text" : "options", "leaf" : 1, - "text" : "options" + "path" : "/cluster/firewall/options" }, { - "leaf" : 1, - "text" : "macros", - "path" : "/cluster/firewall/macros", "info" : { "GET" : { + "description" : "List available macros", + "name" : "get_macros", "permissions" : { "user" : "all" }, - "description" : "List available macros", + "parameters" : { + "additionalProperties" : 0 + }, "method" : "GET", - "name" : "get_macros", "returns" : { + "type" : "array", "items" : { "properties" : { "descr" : { - "description" : "More verbose description (if available).", - "type" : "string" + "type" : "string", + "description" : "More verbose description (if available)." }, "macro" : { - "type" : "string", - "description" : "Macro name." + "description" : "Macro name.", + "type" : "string" } }, "type" : "object" - }, - "type" : "array" - }, - "parameters" : { - "additionalProperties" : 0 + } } } - } + }, + "text" : "macros", + "leaf" : 1, + "path" : "/cluster/firewall/macros" }, { "leaf" : 1, - "text" : "refs", "path" : "/cluster/firewall/refs", "info" : { "GET" : { + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "description" : "Only list references of specified type.", + "enum" : [ + "alias", + "ipset" + ], + "type" : "string", + "optional" : 1 + } + } + }, "permissions" : { "check" : [ "perm", @@ -1646,19 +1684,14 @@ var pveapi = [ ] ] }, - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "method" : "GET", "name" : "refs", + "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", "returns" : { "items" : { - "type" : "object", "properties" : { "name" : { "type" : "string" }, - "ref" : { - "type" : "string" - }, "type" : { "type" : "string", "enum" : [ @@ -1666,71 +1699,45 @@ var pveapi = [ "ipset" ] }, - "comment" : { - "optional" : 1, + "ref" : { "type" : "string" + }, + "comment" : { + "type" : "string", + "optional" : 1 } - } + }, + "type" : "object" }, "type" : "array" }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "type" : "string", - "enum" : [ - "alias", - "ipset" - ], - "optional" : 1, - "description" : "Only list references of specified type." - } - } - } + "method" : "GET" } - } + }, + "text" : "refs" } ], + "leaf" : 0, "path" : "/cluster/firewall" }, { - "leaf" : 0, - "text" : "backup", "children" : [ { - "text" : "{id}", - "leaf" : 1, "info" : { - "GET" : { + "DELETE" : { + "protected" : 1, + "description" : "Delete vzdump backup job definition.", + "name" : "delete_job", "parameters" : { "additionalProperties" : 0, "properties" : { "id" : { + "type" : "string", "description" : "The job ID.", - "maxLength" : 50, - "type" : "string" + "maxLength" : 50 } } }, - "returns" : { - "type" : "object" - }, - "name" : "read_job", - "method" : "GET", - "description" : "Read vzdump backup job definition.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - } - }, - "DELETE" : { - "description" : "Delete vzdump backup job definition.", "permissions" : { "check" : [ "perm", @@ -1740,26 +1747,17 @@ var pveapi = [ ] ] }, - "protected" : 1, "method" : "DELETE", - "name" : "delete_job", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "type" : "string", - "maxLength" : 50, - "description" : "The job ID." - } - } - }, "returns" : { "type" : "null" } }, "PUT" : { - "protected" : 1, - "description" : "Update vzdump backup job definition.", + "method" : "PUT", + "returns" : { + "type" : "null" + }, + "name" : "update_job", "permissions" : { "check" : [ "perm", @@ -1769,190 +1767,161 @@ var pveapi = [ ] ] }, - "name" : "update_job", - "method" : "PUT", - "returns" : { - "type" : "null" - }, "parameters" : { "properties" : { - "stopwait" : { - "type" : "integer", - "default" : 10, - "minimum" : 0, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "optional" : 1 - }, - "exclude-path" : { + "size" : { + "minimum" : 500, + "description" : "Unused, will be removed in a future release.", + "default" : 1024, "optional" : 1, - "description" : "Exclude certain files/directories (shell globs).", - "format" : "string-alist", - "type" : "string" + "type" : "integer" }, - "starttime" : { + "node" : { "type" : "string", - "pattern" : "\\d{1,2}:\\d{1,2}", - "description" : "Job Start time.", - "typetext" : "HH:MM" + "optional" : 1, + "description" : "Only run if executed on this node.", + "format" : "pve-node" }, - "all" : { + "exclude" : { "optional" : 1, - "description" : "Backup all known guest systems on this host.", - "type" : "boolean", - "default" : 0 + "type" : "string", + "description" : "Exclude specified guest systems (assumes --all)", + "format" : "pve-vmid-list" }, - "remove" : { + "delete" : { + "format" : "pve-configid-list", "optional" : 1, - "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", + "type" : "string", + "description" : "A list of settings you want to delete." + }, + "stdexcludes" : { + "description" : "Exclude temporary files and logs.", "default" : 1, + "optional" : 1, "type" : "boolean" }, - "storage" : { + "exclude-path" : { + "format" : "string-alist", "type" : "string", - "format" : "pve-storage-id", - "description" : "Store resulting file to this storage.", - "optional" : 1 + "optional" : 1, + "description" : "Exclude certain files/directories (shell globs)." }, "enabled" : { - "optional" : 1, "description" : "Enable or disable the job.", "type" : "boolean", + "optional" : 1, "default" : "1" }, - "compress" : { - "description" : "Compress dump file.", + "storage" : { + "format" : "pve-storage-id", "optional" : 1, - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "default" : "0", - "type" : "string" + "type" : "string", + "description" : "Store resulting file to this storage." }, - "size" : { + "pigz" : { + "default" : 0, "optional" : 1, - "description" : "Unused, will be removed in a future release.", - "minimum" : 500, "type" : "integer", - "default" : 1024 + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." }, - "bwlimit" : { - "optional" : 1, - "description" : "Limit I/O bandwidth (KBytes per second).", + "stopwait" : { + "minimum" : 0, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", "type" : "integer", - "default" : 0, - "minimum" : 0 + "optional" : 1, + "default" : 10 }, - "tmpdir" : { - "type" : "string", - "description" : "Store temporary files to specified directory.", - "optional" : 1 - }, - "stop" : { + "quiet" : { + "description" : "Be quiet.", + "default" : 0, "optional" : 1, - "description" : "Stop runnig backup jobs on this host.", - "type" : "boolean", - "default" : 0 - }, - "script" : { - "type" : "string", - "description" : "Use specified hook script.", - "optional" : 1 + "type" : "boolean" }, "mailnotification" : { - "type" : "string", - "default" : "always", "enum" : [ "always", "failure" ], "description" : "Specify when to send an email", - "optional" : 1 - }, - "stdexcludes" : { + "type" : "string", "optional" : 1, - "description" : "Exclude temporary files and logs.", - "type" : "boolean", - "default" : 1 + "default" : "always" }, - "delete" : { - "description" : "A list of settings you want to delete.", + "all" : { + "type" : "boolean", "optional" : 1, - "format" : "pve-configid-list", - "type" : "string" + "default" : 0, + "description" : "Backup all known guest systems on this host." }, - "pigz" : { + "id" : { + "description" : "The job ID.", + "type" : "string", + "maxLength" : 50 + }, + "remove" : { + "default" : 1, "optional" : 1, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", - "type" : "integer", - "default" : 0 + "type" : "boolean", + "description" : "Remove old backup files if there are more than 'maxfiles' backup files." }, - "maxfiles" : { + "script" : { "optional" : 1, - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1, - "default" : 1, - "type" : "integer" + "type" : "string", + "description" : "Use specified hook script." }, "lockwait" : { - "description" : "Maximal time to wait for the global lock (minutes).", - "optional" : 1, "minimum" : 0, "default" : 180, - "type" : "integer" - }, - "vmid" : { - "description" : "The ID of the guest system you want to backup.", "optional" : 1, + "type" : "integer", + "description" : "Maximal time to wait for the global lock (minutes)." + }, + "mailto" : { "type" : "string", - "format" : "pve-vmid-list" + "optional" : 1, + "description" : "Comma-separated list of email addresses that should receive email notifications.", + "format" : "string-list" }, "dumpdir" : { - "type" : "string", "description" : "Store resulting files to specified directory.", + "type" : "string", "optional" : 1 }, - "node" : { - "format" : "pve-node", + "starttime" : { + "pattern" : "\\d{1,2}:\\d{1,2}", + "description" : "Job Start time.", "type" : "string", - "optional" : 1, - "description" : "Only run if executed on this node." + "typetext" : "HH:MM" }, - "dow" : { - "format" : "pve-day-of-week-list", - "type" : "string", + "bwlimit" : { + "minimum" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "default" : 0, "optional" : 1, - "description" : "Day of week selection." - }, - "id" : { - "type" : "string", - "maxLength" : 50, - "description" : "The job ID." + "type" : "integer" }, "ionice" : { "minimum" : 0, - "maximum" : 8, - "default" : 7, - "type" : "integer", + "description" : "Set CFQ ionice priority.", "optional" : 1, - "description" : "Set CFQ ionice priority." + "type" : "integer", + "default" : 7, + "maximum" : 8 }, - "quiet" : { + "stop" : { + "default" : 0, "optional" : 1, - "description" : "Be quiet.", "type" : "boolean", - "default" : 0 + "description" : "Stop runnig backup jobs on this host." }, - "mailto" : { - "description" : "Comma-separated list of email addresses that should receive email notifications.", + "maxfiles" : { + "description" : "Maximal number of backup files per guest system.", + "default" : 1, "optional" : 1, - "format" : "string-list", - "type" : "string" + "type" : "integer", + "minimum" : 1 }, "mode" : { - "optional" : 1, "description" : "Backup mode.", "enum" : [ "snapshot", @@ -1960,252 +1929,303 @@ var pveapi = [ "stop" ], "default" : "snapshot", - "type" : "string" + "type" : "string", + "optional" : 1 }, - "exclude" : { - "description" : "Exclude specified guest systems (assumes --all)", + "compress" : { + "default" : "0", + "optional" : 1, + "type" : "string", + "description" : "Compress dump file.", + "enum" : [ + "0", + "1", + "gzip", + "lzo" + ] + }, + "tmpdir" : { "optional" : 1, + "type" : "string", + "description" : "Store temporary files to specified directory." + }, + "vmid" : { "format" : "pve-vmid-list", - "type" : "string" + "type" : "string", + "optional" : 1, + "description" : "The ID of the guest system you want to backup." + }, + "dow" : { + "description" : "Day of week selection.", + "optional" : 1, + "type" : "string", + "format" : "pve-day-of-week-list" } }, "additionalProperties" : 0 - } + }, + "protected" : 1, + "description" : "Update vzdump backup job definition." + }, + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object" + }, + "parameters" : { + "properties" : { + "id" : { + "description" : "The job ID.", + "type" : "string", + "maxLength" : 50 + } + }, + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "name" : "read_job", + "description" : "Read vzdump backup job definition." } }, + "text" : "{id}", + "leaf" : 1, "path" : "/cluster/backup/{id}" } ], - "path" : "/cluster/backup", + "text" : "backup", "info" : { "POST" : { + "description" : "Create new vzdump backup job.", + "protected" : 1, + "name" : "create_job", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, "parameters" : { "properties" : { - "starttime" : { - "type" : "string", - "pattern" : "\\d{1,2}:\\d{1,2}", - "typetext" : "HH:MM", - "description" : "Job Start time." + "stopwait" : { + "default" : 10, + "optional" : 1, + "type" : "integer", + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0 }, - "exclude-path" : { - "type" : "string", - "format" : "string-alist", - "description" : "Exclude certain files/directories (shell globs).", + "quiet" : { + "description" : "Be quiet.", + "default" : 0, + "type" : "boolean", "optional" : 1 }, "remove" : { - "type" : "boolean", "default" : 1, + "type" : "boolean", "optional" : 1, "description" : "Remove old backup files if there are more than 'maxfiles' backup files." }, + "mailnotification" : { + "description" : "Specify when to send an email", + "enum" : [ + "always", + "failure" + ], + "default" : "always", + "type" : "string", + "optional" : 1 + }, "all" : { - "default" : 0, - "type" : "boolean", + "description" : "Backup all known guest systems on this host.", "optional" : 1, - "description" : "Backup all known guest systems on this host." + "type" : "boolean", + "default" : 0 }, - "stopwait" : { - "minimum" : 0, - "type" : "integer", - "default" : 10, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "optional" : 1 + "exclude" : { + "description" : "Exclude specified guest systems (assumes --all)", + "type" : "string", + "optional" : 1, + "format" : "pve-vmid-list" }, - "bwlimit" : { - "default" : 0, + "size" : { + "description" : "Unused, will be removed in a future release.", + "default" : 1024, "type" : "integer", - "minimum" : 0, "optional" : 1, - "description" : "Limit I/O bandwidth (KBytes per second)." + "minimum" : 500 }, - "tmpdir" : { + "node" : { + "optional" : 1, "type" : "string", - "description" : "Store temporary files to specified directory.", - "optional" : 1 + "description" : "Only run if executed on this node.", + "format" : "pve-node" }, - "stop" : { + "pigz" : { "default" : 0, - "type" : "boolean", + "type" : "integer", "optional" : 1, - "description" : "Stop runnig backup jobs on this host." + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." }, - "script" : { - "type" : "string", - "description" : "Use specified hook script.", + "stdexcludes" : { + "description" : "Exclude temporary files and logs.", + "default" : 1, + "type" : "boolean", "optional" : 1 }, - "compress" : { + "exclude-path" : { "type" : "string", - "default" : "0", - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "description" : "Compress dump file.", - "optional" : 1 + "optional" : 1, + "description" : "Exclude certain files/directories (shell globs).", + "format" : "string-alist" }, "storage" : { "optional" : 1, + "type" : "string", "description" : "Store resulting file to this storage.", - "format" : "pve-storage-id", - "type" : "string" + "format" : "pve-storage-id" }, "enabled" : { "description" : "Enable or disable the job.", + "default" : "1", "optional" : 1, - "type" : "boolean", - "default" : "1" - }, - "size" : { - "default" : 1024, - "type" : "integer", - "minimum" : 500, - "description" : "Unused, will be removed in a future release.", - "optional" : 1 + "type" : "boolean" }, - "pigz" : { + "maxfiles" : { + "minimum" : 1, + "default" : 1, "optional" : 1, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", "type" : "integer", - "default" : 0 + "description" : "Maximal number of backup files per guest system." }, - "lockwait" : { + "stop" : { + "type" : "boolean", "optional" : 1, - "description" : "Maximal time to wait for the global lock (minutes).", - "default" : 180, - "type" : "integer", - "minimum" : 0 + "default" : 0, + "description" : "Stop runnig backup jobs on this host." }, - "maxfiles" : { + "tmpdir" : { "optional" : 1, - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1, - "type" : "integer", - "default" : 1 + "type" : "string", + "description" : "Store temporary files to specified directory." }, - "stdexcludes" : { - "type" : "boolean", - "default" : 1, - "description" : "Exclude temporary files and logs.", - "optional" : 1 + "compress" : { + "optional" : 1, + "type" : "string", + "default" : "0", + "enum" : [ + "0", + "1", + "gzip", + "lzo" + ], + "description" : "Compress dump file." }, - "mailnotification" : { + "mode" : { "type" : "string", - "default" : "always", - "description" : "Specify when to send an email", "optional" : 1, + "default" : "snapshot", "enum" : [ - "always", - "failure" - ] + "snapshot", + "suspend", + "stop" + ], + "description" : "Backup mode." }, - "node" : { - "description" : "Only run if executed on this node.", + "bwlimit" : { + "description" : "Limit I/O bandwidth (KBytes per second).", + "default" : 0, "optional" : 1, - "type" : "string", - "format" : "pve-node" + "type" : "integer", + "minimum" : 0 }, "ionice" : { - "description" : "Set CFQ ionice priority.", - "optional" : 1, "minimum" : 0, - "type" : "integer", "default" : 7, - "maximum" : 8 - }, - "quiet" : { - "description" : "Be quiet.", + "maximum" : 8, + "type" : "integer", "optional" : 1, - "type" : "boolean", - "default" : 0 + "description" : "Set CFQ ionice priority." }, "dow" : { - "description" : "Day of week selection.", - "optional" : 1, "format" : "pve-day-of-week-list", "default" : "mon,tue,wed,thu,fri,sat,sun", - "type" : "string" + "optional" : 1, + "type" : "string", + "description" : "Day of week selection." }, - "dumpdir" : { + "vmid" : { + "description" : "The ID of the guest system you want to backup.", "type" : "string", - "description" : "Store resulting files to specified directory.", - "optional" : 1 + "optional" : 1, + "format" : "pve-vmid-list" }, - "exclude" : { + "lockwait" : { + "minimum" : 0, + "description" : "Maximal time to wait for the global lock (minutes).", + "type" : "integer", "optional" : 1, - "description" : "Exclude specified guest systems (assumes --all)", + "default" : 180 + }, + "script" : { "type" : "string", - "format" : "pve-vmid-list" + "optional" : 1, + "description" : "Use specified hook script." }, "mailto" : { - "type" : "string", - "format" : "string-list", "description" : "Comma-separated list of email addresses that should receive email notifications.", - "optional" : 1 - }, - "mode" : { "optional" : 1, - "description" : "Backup mode.", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "default" : "snapshot", - "type" : "string" + "type" : "string", + "format" : "string-list" }, - "vmid" : { - "optional" : 1, - "description" : "The ID of the guest system you want to backup.", - "format" : "pve-vmid-list", + "dumpdir" : { + "description" : "Store resulting files to specified directory.", + "type" : "string", + "optional" : 1 + }, + "starttime" : { + "typetext" : "HH:MM", + "description" : "Job Start time.", + "pattern" : "\\d{1,2}:\\d{1,2}", "type" : "string" } }, "additionalProperties" : 0 }, + "method" : "POST", "returns" : { "type" : "null" - }, - "name" : "create_job", - "method" : "POST", - "description" : "Create new vzdump backup job.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1 + } }, "GET" : { + "method" : "GET", "returns" : { - "type" : "array", + "links" : [ + { + "rel" : "child", + "href" : "{id}" + } + ], "items" : { + "type" : "object", "properties" : { "id" : { "type" : "string" } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" } - ] - }, - "parameters" : { - "additionalProperties" : 0 + }, + "type" : "array" }, - "name" : "index", - "method" : "GET", "description" : "List vzdump backup schedule.", "permissions" : { "check" : [ @@ -2215,146 +2235,100 @@ var pveapi = [ "Sys.Audit" ] ] - } - } - } - }, - { - "info" : { - "GET" : { - "description" : "Directory index.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{id}" - } - ], - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - } - } - } }, + "name" : "index", "parameters" : { "additionalProperties" : 0 - }, - "method" : "GET", - "name" : "index" + } } }, + "path" : "/cluster/backup", + "leaf" : 0 + }, + { "path" : "/cluster/ha", + "leaf" : 0, + "text" : "ha", "children" : [ { - "path" : "/cluster/ha/resources", "info" : { "POST" : { - "name" : "create", "method" : "POST", "returns" : { "type" : "null" }, + "name" : "create", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, "parameters" : { - "additionalProperties" : 0, "properties" : { - "sid" : { - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "typetext" : ":", + "max_restart" : { + "description" : "Maximal number of tries to restart the service on a node after its start failed.", + "default" : 1, + "type" : "integer", + "optional" : 1, + "minimum" : 0 + }, + "state" : { "type" : "string", - "format" : "pve-ha-resource-or-vm-id" + "optional" : 1, + "default" : "enabled", + "enum" : [ + "enabled", + "disabled" + ], + "description" : "Resource state." + }, + "max_relocate" : { + "default" : 1, + "optional" : 1, + "type" : "integer", + "description" : "Maximal number of service relocate tries when a service failes to start.", + "minimum" : 0 }, "group" : { "type" : "string", - "format" : "pve-configid", + "optional" : 1, "description" : "The HA group identifier.", - "optional" : 1 + "format" : "pve-configid" }, "comment" : { "optional" : 1, - "maxLength" : 4096, + "type" : "string", "description" : "Description.", - "type" : "string" - }, - "max_relocate" : { - "optional" : 1, - "description" : "Maximal number of service relocate tries when a service failes to start.", - "minimum" : 0, - "type" : "integer", - "default" : 1 + "maxLength" : 4096 }, "type" : { - "optional" : 1, - "description" : "Resource type.", "enum" : [ "vm", "ct" ], - "type" : "string" - }, - "state" : { - "default" : "enabled", + "description" : "Resource type.", "type" : "string", - "optional" : 1, - "description" : "Resource state.", - "enum" : [ - "enabled", - "disabled" - ] - }, - "max_restart" : { - "minimum" : 0, - "type" : "integer", - "default" : 1, - "description" : "Maximal number of tries to restart the service on a node after its start failed.", "optional" : 1 + }, + "sid" : { + "format" : "pve-ha-resource-or-vm-id", + "typetext" : ":", + "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", + "type" : "string" } }, + "additionalProperties" : 0, "type" : "object" }, "protected" : 1, - "description" : "Create a new HA resource.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Console" - ] - ] - } + "description" : "Create a new HA resource." }, "GET" : { - "name" : "index", - "method" : "GET", - "parameters" : { - "properties" : { - "type" : { - "type" : "string", - "enum" : [ - "vm", - "ct" - ], - "optional" : 1, - "description" : "Only list resources of specific type" - } - }, - "additionalProperties" : 0 - }, "returns" : { - "type" : "array", "items" : { "properties" : { "sid" : { @@ -2365,11 +2339,15 @@ var pveapi = [ }, "links" : [ { - "rel" : "child", - "href" : "{sid}" + "href" : "{sid}", + "rel" : "child" } - ] + ], + "type" : "array" }, + "method" : "GET", + "description" : "List HA resources.", + "name" : "index", "permissions" : { "check" : [ "perm", @@ -2379,19 +2357,50 @@ var pveapi = [ ] ] }, - "description" : "List HA resources." + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "type" : "string", + "optional" : 1, + "enum" : [ + "vm", + "ct" + ], + "description" : "Only list resources of specific type" + } + } + } } }, + "text" : "resources", "children" : [ { "text" : "{sid}", - "leaf" : 0, "children" : [ { "path" : "/cluster/ha/resources/{sid}/migrate", + "leaf" : 1, + "text" : "migrate", "info" : { "POST" : { - "protected" : 1, + "name" : "migrate", + "parameters" : { + "properties" : { + "sid" : { + "typetext" : ":", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)." + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + }, + "additionalProperties" : 0 + }, "permissions" : { "check" : [ "perm", @@ -2401,60 +2410,38 @@ var pveapi = [ ] ] }, + "protected" : 1, "description" : "Request resource migration (online) to another node.", "returns" : { "type" : "null" }, - "parameters" : { - "properties" : { - "sid" : { - "typetext" : ":", - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - }, - "method" : "POST", - "name" : "migrate" + "method" : "POST" } - }, - "leaf" : 1, - "text" : "migrate" + } }, { + "path" : "/cluster/ha/resources/{sid}/relocate", "leaf" : 1, "text" : "relocate", "info" : { "POST" : { "name" : "relocate", - "method" : "POST", - "returns" : { - "type" : "null" - }, "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" }, "sid" : { - "type" : "string", + "typetext" : ":", "format" : "pve-ha-resource-or-vm-id", - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "typetext" : ":" + "type" : "string", + "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)." } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, "permissions" : { "check" : [ "perm", @@ -2464,81 +2451,110 @@ var pveapi = [ ] ] }, - "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node." + "protected" : 1, + "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.", + "returns" : { + "type" : "null" + }, + "method" : "POST" } - }, - "path" : "/cluster/ha/resources/{sid}/relocate" + } } ], "info" : { + "GET" : { + "returns" : {}, + "method" : "GET", + "parameters" : { + "properties" : { + "sid" : { + "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", + "type" : "string", + "format" : "pve-ha-resource-or-vm-id", + "typetext" : ":" + } + }, + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "name" : "read", + "description" : "Read resource configuration." + }, "PUT" : { "returns" : { "type" : "null" }, + "method" : "PUT", "parameters" : { "additionalProperties" : 0, + "type" : "object", "properties" : { - "delete" : { - "format" : "pve-configid-list", - "type" : "string", - "description" : "A list of settings you want to delete.", - "optional" : 1, - "maxLength" : 4096 - }, - "digest" : { - "type" : "string", - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1 - }, - "state" : { - "enum" : [ - "enabled", - "disabled" - ], - "description" : "Resource state.", + "group" : { + "format" : "pve-configid", "optional" : 1, "type" : "string", - "default" : "enabled" + "description" : "The HA group identifier." }, "max_restart" : { + "minimum" : 0, "optional" : 1, - "description" : "Maximal number of tries to restart the service on a node after its start failed.", "type" : "integer", "default" : 1, - "minimum" : 0 + "description" : "Maximal number of tries to restart the service on a node after its start failed." }, - "comment" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "optional" : 1, "type" : "string", - "description" : "Description.", - "maxLength" : 4096, - "optional" : 1 + "format" : "pve-configid-list", + "maxLength" : 4096 }, "sid" : { "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "typetext" : ":", + "type" : "string", "format" : "pve-ha-resource-or-vm-id", - "type" : "string" + "typetext" : ":" }, - "group" : { - "format" : "pve-configid", + "comment" : { + "description" : "Description.", + "optional" : 1, "type" : "string", - "description" : "The HA group identifier.", - "optional" : 1 + "maxLength" : 4096 }, "max_relocate" : { - "default" : 1, + "optional" : 1, "type" : "integer", - "minimum" : 0, + "default" : 1, "description" : "Maximal number of service relocate tries when a service failes to start.", - "optional" : 1 + "minimum" : 0 + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", + "optional" : 1, + "maxLength" : 40 + }, + "state" : { + "enum" : [ + "enabled", + "disabled" + ], + "description" : "Resource state.", + "type" : "string", + "optional" : 1, + "default" : "enabled" } - }, - "type" : "object" + } }, "name" : "update", - "method" : "PUT", - "protected" : 1, "permissions" : { "check" : [ "perm", @@ -2548,35 +2564,13 @@ var pveapi = [ ] ] }, - "description" : "Update resource configuration." - }, - "GET" : { - "description" : "Read resource configuration.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "sid" : { - "typetext" : ":", - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string" - } - } - }, - "returns" : {}, - "method" : "GET", - "name" : "read" + "description" : "Update resource configuration.", + "protected" : 1 }, "DELETE" : { + "protected" : 1, + "description" : "Delete resource configuration.", + "name" : "delete", "permissions" : { "check" : [ "perm", @@ -2586,145 +2580,218 @@ var pveapi = [ ] ] }, - "description" : "Delete resource configuration.", - "protected" : 1, - "method" : "DELETE", - "name" : "delete", "parameters" : { "properties" : { "sid" : { - "typetext" : ":", "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", + "type" : "string", "format" : "pve-ha-resource-or-vm-id", - "type" : "string" + "typetext" : ":" } }, "additionalProperties" : 0 }, + "method" : "DELETE", "returns" : { "type" : "null" } } }, - "path" : "/cluster/ha/resources/{sid}" + "path" : "/cluster/ha/resources/{sid}", + "leaf" : 0 } ], "leaf" : 0, - "text" : "resources" + "path" : "/cluster/ha/resources" }, { + "leaf" : 0, + "path" : "/cluster/ha/groups", + "info" : { + "GET" : { + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "index", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "description" : "Get HA groups.", + "method" : "GET", + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "group" : { + "type" : "string" + } + } + }, + "links" : [ + { + "href" : "{group}", + "rel" : "child" + } + ] + } + }, + "POST" : { + "method" : "POST", + "returns" : { + "type" : "null" + }, + "description" : "Create a new HA group.", + "protected" : 1, + "parameters" : { + "properties" : { + "comment" : { + "maxLength" : 4096, + "description" : "Description.", + "optional" : 1, + "type" : "string" + }, + "restricted" : { + "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", + "optional" : 1, + "type" : "boolean", + "default" : 0 + }, + "nofailback" : { + "type" : "boolean", + "optional" : 1, + "default" : 0, + "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." + }, + "type" : { + "enum" : [ + "group" + ], + "description" : "Group type.", + "optional" : 1, + "type" : "string" + }, + "nodes" : { + "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", + "type" : "string", + "optional" : 0, + "format" : "pve-ha-group-node-list", + "typetext" : "[:]{,[:]}*" + }, + "group" : { + "format" : "pve-configid", + "type" : "string", + "description" : "The HA group identifier." + } + }, + "type" : "object", + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "name" : "create" + } + }, + "text" : "groups", "children" : [ { - "path" : "/cluster/ha/groups/{group}", "info" : { "PUT" : { "protected" : 1, "description" : "Update ha group configuration.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Console" - ] - ] - }, - "returns" : { - "type" : "null" - }, "parameters" : { + "type" : "object", + "additionalProperties" : 0, "properties" : { - "restricted" : { - "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", - "optional" : 1, - "default" : 0, - "type" : "boolean" - }, "nodes" : { + "format" : "pve-ha-group-node-list", + "typetext" : "[:]{,[:]}*", "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", "optional" : 1, - "typetext" : "[:]{,[:]}*", - "format" : "pve-ha-group-node-list", "type" : "string" }, - "nofailback" : { - "type" : "boolean", - "default" : 0, - "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior.", - "optional" : 1 - }, - "delete" : { + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", "optional" : 1, - "description" : "A list of settings you want to delete.", - "maxLength" : 4096, + "maxLength" : 40 + }, + "group" : { + "description" : "The HA group identifier.", "type" : "string", - "format" : "pve-configid-list" + "format" : "pve-configid" }, "comment" : { "maxLength" : 4096, - "description" : "Description.", + "type" : "string", "optional" : 1, - "type" : "string" + "description" : "Description." }, - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", - "type" : "string" + "nofailback" : { + "default" : 0, + "optional" : 1, + "type" : "boolean", + "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "restricted" : { + "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", + "default" : 0, + "type" : "boolean", + "optional" : 1 + }, + "delete" : { + "format" : "pve-configid-list", + "maxLength" : 4096, "optional" : 1, - "maxLength" : 40, - "type" : "string" + "type" : "string", + "description" : "A list of settings you want to delete." } - }, - "additionalProperties" : 0, - "type" : "object" + } }, - "method" : "PUT", - "name" : "update" - }, - "GET" : { + "name" : "update", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Console" ] ] }, - "description" : "Read ha group configuration.", - "method" : "GET", - "name" : "read", - "returns" : {}, - "parameters" : { - "properties" : { - "group" : { - "type" : "string", - "format" : "pve-configid", - "description" : "The HA group identifier." - } - }, - "additionalProperties" : 0 + "method" : "PUT", + "returns" : { + "type" : "null" } }, "DELETE" : { "method" : "DELETE", + "returns" : { + "type" : "null" + }, "name" : "delete", "parameters" : { "properties" : { "group" : { "description" : "The HA group identifier.", - "format" : "pve-configid", - "type" : "string" + "type" : "string", + "format" : "pve-configid" } }, "additionalProperties" : 0 }, - "returns" : { - "type" : "null" - }, "permissions" : { "check" : [ "perm", @@ -2736,133 +2803,51 @@ var pveapi = [ }, "description" : "Delete ha group configuration.", "protected" : 1 + }, + "GET" : { + "parameters" : { + "properties" : { + "group" : { + "description" : "The HA group identifier.", + "type" : "string", + "format" : "pve-configid" + } + }, + "additionalProperties" : 0 + }, + "name" : "read", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "description" : "Read ha group configuration.", + "returns" : {}, + "method" : "GET" } }, + "text" : "{group}", "leaf" : 1, - "text" : "{group}" + "path" : "/cluster/ha/groups/{group}" } - ], - "info" : { - "GET" : { - "parameters" : { - "additionalProperties" : 0 - }, - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{group}" - } - ], - "type" : "array", - "items" : { - "properties" : { - "group" : { - "type" : "string" - } - }, - "type" : "object" - } - }, - "name" : "index", - "method" : "GET", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "description" : "Get HA groups." - }, - "POST" : { - "returns" : { - "type" : "null" - }, - "parameters" : { - "type" : "object", - "properties" : { - "nofailback" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." - }, - "type" : { - "description" : "Group type.", - "optional" : 1, - "enum" : [ - "group" - ], - "type" : "string" - }, - "restricted" : { - "default" : 0, - "type" : "boolean", - "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", - "optional" : 1 - }, - "nodes" : { - "format" : "pve-ha-group-node-list", - "type" : "string", - "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", - "typetext" : "[:]{,[:]}*", - "optional" : 0 - }, - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", - "type" : "string" - }, - "comment" : { - "maxLength" : 4096, - "description" : "Description.", - "optional" : 1, - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "method" : "POST", - "name" : "create", - "protected" : 1, - "description" : "Create a new HA group.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Console" - ] - ] - } - } - }, - "path" : "/cluster/ha/groups", - "text" : "groups", - "leaf" : 0 - }, - { - "text" : "status", - "leaf" : 0, - "children" : [ - { - "text" : "current", - "leaf" : 1, - "path" : "/cluster/ha/status/current", - "info" : { - "GET" : { - "returns" : { - "type" : "array" - }, - "parameters" : { - "additionalProperties" : 0 + ] + }, + { + "text" : "status", + "children" : [ + { + "info" : { + "GET" : { + "returns" : { + "type" : "array" }, "method" : "GET", - "name" : "status", "description" : "Get HA manger status.", + "name" : "status", "permissions" : { "check" : [ "perm", @@ -2871,21 +2856,28 @@ var pveapi = [ "Sys.Audit" ] ] + }, + "parameters" : { + "additionalProperties" : 0 } } - } + }, + "text" : "current", + "leaf" : 1, + "path" : "/cluster/ha/status/current" }, { "info" : { "GET" : { "method" : "GET", - "name" : "manager_status", - "parameters" : { - "additionalProperties" : 0 - }, "returns" : { "type" : "object" }, + "description" : "Get full HA manger status, including LRM status.", + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "manager_status", "permissions" : { "check" : [ "perm", @@ -2894,27 +2886,18 @@ var pveapi = [ "Sys.Audit" ] ] - }, - "description" : "Get full HA manger status, including LRM status." + } } }, - "path" : "/cluster/ha/status/manager_status", + "text" : "manager_status", "leaf" : 1, - "text" : "manager_status" + "path" : "/cluster/ha/status/manager_status" } ], - "path" : "/cluster/ha/status", "info" : { "GET" : { - "description" : "Directory index.", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0 - }, + "method" : "GET", "returns" : { - "type" : "array", "items" : { "properties" : {}, "type" : "object" @@ -2924,58 +2907,97 @@ var pveapi = [ "rel" : "child", "href" : "{name}" } - ] + ], + "type" : "array" }, - "name" : "index", - "method" : "GET" + "description" : "Directory index.", + "permissions" : { + "user" : "all" + }, + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "index" } - } + }, + "path" : "/cluster/ha/status", + "leaf" : 0 } ], - "leaf" : 0, - "text" : "ha" - }, - { - "text" : "log", - "leaf" : 1, - "path" : "/cluster/log", "info" : { "GET" : { - "name" : "log", + "description" : "Directory index.", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, "method" : "GET", "returns" : { "type" : "array", "items" : { - "properties" : {}, - "type" : "object" - } + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + } + } + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ] + } + } + } + }, + { + "path" : "/cluster/log", + "leaf" : 1, + "text" : "log", + "info" : { + "GET" : { + "description" : "Read cluster log", + "permissions" : { + "user" : "all" }, "parameters" : { + "additionalProperties" : 0, "properties" : { "max" : { - "description" : "Maximum number of entries.", + "type" : "integer", "optional" : 1, - "minimum" : 1, - "type" : "integer" + "description" : "Maximum number of entries.", + "minimum" : 1 } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" + } }, - "description" : "Read cluster log" + "name" : "log", + "method" : "GET", + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : {} + } + } } } }, { - "path" : "/cluster/resources", "info" : { "GET" : { - "permissions" : { - "user" : "all" - }, - "description" : "Resources index (cluster wide).", + "method" : "GET", "returns" : { "items" : { "properties" : {}, @@ -2983,185 +3005,210 @@ var pveapi = [ }, "type" : "array" }, + "name" : "resources", + "permissions" : { + "user" : "all" + }, "parameters" : { "additionalProperties" : 0, "properties" : { "type" : { + "optional" : 1, + "type" : "string", "enum" : [ "vm", "storage", "node" - ], - "optional" : 1, - "type" : "string" + ] } } }, - "name" : "resources", - "method" : "GET" + "description" : "Resources index (cluster wide)." } }, "text" : "resources", - "leaf" : 1 + "leaf" : 1, + "path" : "/cluster/resources" }, { - "text" : "tasks", - "leaf" : 1, "info" : { "GET" : { + "description" : "List recent tasks (cluster wide).", + "permissions" : { + "user" : "all" + }, + "name" : "tasks", "parameters" : { "additionalProperties" : 0 }, + "method" : "GET", "returns" : { + "type" : "array", "items" : { + "type" : "object", "properties" : { "upid" : { "type" : "string" } - }, - "type" : "object" - }, - "type" : "array" - }, - "method" : "GET", - "name" : "tasks", - "permissions" : { - "user" : "all" - }, - "description" : "List recent tasks (cluster wide)." + } + } + } } }, + "text" : "tasks", + "leaf" : 1, "path" : "/cluster/tasks" }, { "leaf" : 1, - "text" : "options", "path" : "/cluster/options", "info" : { - "PUT" : { - "returns" : { - "type" : "null" - }, + "GET" : { "parameters" : { - "additionalProperties" : 0, - "properties" : { - "email_from" : { - "type" : "string", - "format" : "email-opt", - "description" : "Specify email address to send notification from (default is root@$hostname)", - "optional" : 1 + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "name" : "get_options", + "description" : "Get datacenter options.", + "method" : "GET", + "returns" : { + "type" : "object", + "properties" : {} + } + }, + "PUT" : { + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "fencing" : { + "default" : "watchdog", + "type" : "string", + "optional" : 1, + "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP", + "enum" : [ + "watchdog", + "hardware", + "both" + ] }, "console" : { + "optional" : 1, "type" : "string", "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).", - "optional" : 1, "enum" : [ "applet", "vv", "html5" ] }, + "delete" : { + "format" : "pve-configid-list", + "description" : "A list of settings you want to delete.", + "optional" : 1, + "type" : "string" + }, + "max_workers" : { + "minimum" : 1, + "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.", + "type" : "integer", + "optional" : 1 + }, + "language" : { + "type" : "string", + "optional" : 1, + "enum" : [ + "en", + "de" + ], + "description" : "Default GUI language." + }, "keyboard" : { "enum" : [ + "da", + "sv", "en-gb", - "de-ch", - "en-us", + "lt", + "is", "mk", + "pl", + "hu", "fr-be", - "de", "pt-br", - "sv", - "fr-ch", + "de-ch", + "nl", "no", - "pt", - "hu", + "tr", "sl", - "lt", - "fi", - "it", - "nl", - "is", - "da", + "de", "fr-ca", - "pl", - "fr", - "es", "ja", - "tr" + "es", + "it", + "pt", + "fr", + "en-us", + "fi", + "fr-ch" ], "description" : "Default keybord layout for vnc server.", "optional" : 1, "type" : "string" }, - "migration_unsecure" : { - "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.", - "optional" : 1, - "type" : "boolean" - }, - "max_workers" : { - "minimum" : 1, - "type" : "integer", - "optional" : 1, - "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager." - }, "http_proxy" : { - "pattern" : "http://.*", - "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')", "optional" : 1, - "type" : "string" - }, - "fencing" : { "type" : "string", - "default" : "watchdog", - "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP", - "optional" : 1, - "enum" : [ - "watchdog", - "hardware", - "both" - ] + "pattern" : "http://.*", + "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')" }, - "language" : { + "email_from" : { + "format" : "email-opt", "optional" : 1, - "description" : "Default GUI language.", - "enum" : [ - "en", - "de" - ], - "type" : "string" + "type" : "string", + "description" : "Specify email address to send notification from (default is root@$hostname)" }, - "delete" : { - "description" : "A list of settings you want to delete.", + "migration_unsecure" : { + "type" : "boolean", "optional" : 1, - "type" : "string", - "format" : "pve-configid-list" + "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration." } } }, - "method" : "PUT", - "name" : "set_options", "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "description" : "Set datacenter options.", + "returns" : { + "type" : "null" }, - "description" : "Set datacenter options." - }, + "method" : "PUT" + } + }, + "text" : "options" + }, + { + "text" : "status", + "info" : { "GET" : { - "method" : "GET", - "name" : "get_options", "parameters" : { "additionalProperties" : 0 }, - "returns" : { - "type" : "object", - "properties" : {} - }, + "name" : "get_status", "permissions" : { "check" : [ "perm", @@ -3171,17 +3218,10 @@ var pveapi = [ ] ] }, - "description" : "Get datacenter options." - } - } - }, - { - "leaf" : 1, - "text" : "status", - "info" : { - "GET" : { + "description" : "Get cluster status informations.", + "protected" : 1, + "method" : "GET", "returns" : { - "type" : "array", "items" : { "type" : "object", "properties" : { @@ -3189,231 +3229,141 @@ var pveapi = [ "type" : "string" } } - } - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "get_status", - "method" : "GET", - "protected" : 1, - "description" : "Get cluster status informations.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + }, + "type" : "array" } } }, - "path" : "/cluster/status" + "path" : "/cluster/status", + "leaf" : 1 }, { - "path" : "/cluster/nextid", "info" : { "GET" : { - "permissions" : { - "user" : "all" + "method" : "GET", + "returns" : { + "type" : "integer", + "description" : "The next free VMID." }, "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.", "parameters" : { - "additionalProperties" : 0, "properties" : { "vmid" : { - "minimum" : 1, "format" : "pve-vmid", - "type" : "integer", + "minimum" : 1, "description" : "The (unique) ID of the VM.", - "optional" : 1 + "optional" : 1, + "type" : "integer" } - } - }, - "returns" : { - "type" : "integer", - "description" : "The next free VMID." + }, + "additionalProperties" : 0 }, "name" : "nextid", - "method" : "GET" + "permissions" : { + "user" : "all" + } } }, "text" : "nextid", - "leaf" : 1 + "leaf" : 1, + "path" : "/cluster/nextid" } ], - "path" : "/cluster", - "info" : { - "GET" : { - "parameters" : { - "additionalProperties" : 0 - }, - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ] - }, - "method" : "GET", - "name" : "index", - "description" : "Cluster index.", - "permissions" : { - "user" : "all" - } - } - } + "text" : "cluster" }, { + "path" : "/nodes", "leaf" : 0, "text" : "nodes", - "path" : "/nodes", "children" : [ { - "leaf" : 0, - "text" : "{node}", - "path" : "/nodes/{node}", - "children" : [ - { - "text" : "qemu", - "leaf" : 0, - "path" : "/nodes/{node}/qemu", - "children" : [ - { - "path" : "/nodes/{node}/qemu/{vmid}", - "info" : { - "DELETE" : { - "description" : "Destroy the vm (also delete all used/owned volumes).", - "returns" : { - "type" : "string" - }, - "method" : "DELETE", - "name" : "destroy_vm", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "skiplock" : { - "type" : "boolean", - "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - } - }, - "GET" : { - "method" : "GET", - "name" : "vmdiridx", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - } - }, - "proxyto" : "node", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "subdir" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ] - }, - "permissions" : { - "user" : "all" - }, - "description" : "Directory index" - } - }, + "info" : { + "GET" : { + "returns" : { + "links" : [ + { + "rel" : "child", + "href" : "{name}" + } + ], + "items" : { + "type" : "object", + "properties" : {} + }, + "type" : "array" + }, + "method" : "GET", + "description" : "Node index.", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + } + }, + "permissions" : { + "user" : "all" + }, + "name" : "index" + } + }, + "children" : [ + { + "children" : [ + { + "path" : "/nodes/{node}/qemu/{vmid}", + "leaf" : 0, + "text" : "{vmid}", "children" : [ { - "text" : "firewall", + "path" : "/nodes/{node}/qemu/{vmid}/firewall", "leaf" : 0, + "text" : "firewall", "children" : [ { + "text" : "rules", "children" : [ { "text" : "{pos}", - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}", "info" : { "DELETE" : { - "proxyto" : null, + "method" : "DELETE", "parameters" : { "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, "pos" : { - "description" : "Update rule at position .", + "type" : "integer", "optional" : 1, - "minimum" : 0, - "type" : "integer" + "description" : "Update rule at position .", + "minimum" : 0 }, "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, "optional" : 1, - "type" : "string" + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 } }, "additionalProperties" : 0 }, + "name" : "delete_rule", + "protected" : 1, + "returns" : { + "type" : "null" + }, "permissions" : { "check" : [ "perm", @@ -3423,414 +3373,393 @@ var pveapi = [ ] ] }, - "protected" : 1, + "description" : "Delete rule.", + "proxyto" : null + }, + "PUT" : { "returns" : { "type" : "null" }, - "name" : "delete_rule", - "method" : "DELETE", - "description" : "Delete rule." - }, - "GET" : { - "description" : "Get single rule data.", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Config.Network" ] ] }, - "method" : "GET", - "name" : "get_rule", - "returns" : { - "type" : "object", - "properties" : { - "pos" : { - "type" : "integer" - } - } - }, "proxyto" : null, + "description" : "Modify rule data.", + "method" : "PUT", "parameters" : { "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "pos" : { - "type" : "integer", - "minimum" : 0, + "dport" : { + "format" : "pve-fw-dport-spec", + "description" : "Restrict 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.", "optional" : 1, - "description" : "Update rule at position ." + "type" : "string" + }, + "type" : { + "enum" : [ + "in", + "out", + "group" + ], + "type" : "string", + "optional" : 1 }, "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - } - }, - "PUT" : { - "returns" : { - "type" : "null" - }, - "method" : "PUT", - "name" : "update_rule", - "description" : "Modify rule data.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "digest" : { - "type" : "string", + }, + "moveto" : { + "minimum" : 0, + "type" : "integer", "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 + "description" : "Move rule to new position . Other arguments are ignored." }, - "iface" : { - "minLength" : 2, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "comment" : { + "optional" : 1, + "type" : "string" + }, + "delete" : { + "format" : "pve-configid-list", + "description" : "A list of settings you want to delete.", + "type" : "string", + "optional" : 1 + }, + "dest" : { + "format" : "pve-fw-addr-spec", "optional" : 1, - "maxLength" : 20, "type" : "string", - "format" : "pve-iface" + "description" : "Restrict 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." }, "source" : { "description" : "Restrict 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.", - "optional" : 1, "type" : "string", + "optional" : 1, "format" : "pve-fw-addr-spec" }, - "pos" : { - "minimum" : 0, - "type" : "integer", + "digest" : { + "maxLength" : 40, + "type" : "string", "optional" : 1, - "description" : "Update rule at position ." + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." }, - "action" : { - "type" : "string", + "enable" : { "optional" : 1, + "type" : "integer", + "minimum" : 0 + }, + "action" : { "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "dest" : { - "description" : "Restrict 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.", + "minLength" : 2, "optional" : 1, - "format" : "pve-fw-addr-spec", - "type" : "string" + "type" : "string", + "maxLength" : 20 }, - "type" : { + "pos" : { + "type" : "integer", "optional" : 1, - "enum" : [ - "in", - "out", - "group" - ], - "type" : "string" + "description" : "Update rule at position .", + "minimum" : 0 }, "proto" : { - "optional" : 1, "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "type" : "string" - }, - "dport" : { - "description" : "Restrict 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.", + "type" : "string", "optional" : 1, - "format" : "pve-fw-dport-spec", - "type" : "string" - }, - "enable" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1 + "format" : "pve-fw-protocol-spec" }, - "moveto" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Move rule to new position . Other arguments are ignored." + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, - "delete" : { - "format" : "pve-configid-list", + "macro" : { + "maxLength" : 128, "type" : "string", + "optional" : 1 + }, + "iface" : { + "format" : "pve-iface", + "maxLength" : 20, + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "minLength" : 2, "optional" : 1, - "description" : "A list of settings you want to delete." + "type" : "string" }, "sport" : { + "format" : "pve-fw-sport-spec", "description" : "Restrict 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.", "optional" : 1, - "type" : "string", - "format" : "pve-fw-sport-spec" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", "type" : "string" - }, - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - }, - "macro" : { - "type" : "string", - "maxLength" : 128, - "optional" : 1 } - } + }, + "additionalProperties" : 0 }, - "proxyto" : null, - "protected" : 1, + "name" : "update_rule", + "protected" : 1 + }, + "GET" : { "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Config.Network" + "VM.Audit" ] ] - } + }, + "name" : "get_rule", + "parameters" : { + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "pos" : { + "minimum" : 0, + "type" : "integer", + "optional" : 1, + "description" : "Update rule at position ." + }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." + } + }, + "additionalProperties" : 0 + }, + "proxyto" : null, + "description" : "Get single rule data.", + "returns" : { + "type" : "object", + "properties" : { + "pos" : { + "type" : "integer" + } + } + }, + "method" : "GET" } - } + }, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}", + "leaf" : 1 } ], - "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules", "info" : { - "GET" : { - "method" : "GET", - "name" : "get_rules", - "proxyto" : null, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, + "POST" : { "returns" : { - "items" : { - "type" : "object", - "properties" : { - "pos" : { - "type" : "integer" - } - } - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{pos}" - } - ] + "type" : "null" }, - "description" : "List rules.", + "description" : "Create new rule.", + "proxyto" : null, "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Config.Network" ] ] - } - }, - "POST" : { + }, + "method" : "POST", + "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "action" : { - "maxLength" : 20, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, "pos" : { - "type" : "integer", - "minimum" : 0, "optional" : 1, - "description" : "Update rule at position ." - }, - "dest" : { - "format" : "pve-fw-addr-spec", - "type" : "string", - "description" : "Restrict 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.", - "optional" : 1 - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" + "type" : "integer", + "description" : "Update rule at position .", + "minimum" : 0 }, - "macro" : { + "proto" : { + "format" : "pve-fw-protocol-spec", + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", "optional" : 1, - "maxLength" : 128, "type" : "string" }, "vmid" : { - "minimum" : 1, + "description" : "The (unique) ID of the VM.", "type" : "integer", "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." + "minimum" : 1 }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "macro" : { "optional" : 1, "type" : "string", - "format" : "pve-fw-protocol-spec" + "maxLength" : 128 }, - "iface" : { - "minLength" : 2, - "maxLength" : 20, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "optional" : 1, + "dport" : { + "description" : "Restrict 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.", "type" : "string", - "format" : "pve-iface" + "optional" : 1, + "format" : "pve-fw-dport-spec" }, - "digest" : { + "type" : { + "optional" : 0, "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "optional" : 1 + "enum" : [ + "in", + "out", + "group" + ] }, "enable" : { "minimum" : 0, "type" : "integer", "optional" : 1 }, - "dport" : { - "description" : "Restrict 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.", - "optional" : 1, - "format" : "pve-fw-dport-spec", - "type" : "string" - }, - "source" : { + "action" : { + "optional" : 0, "type" : "string", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "description" : "Restrict 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." + "minLength" : 2, + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "maxLength" : 20 }, "sport" : { + "type" : "string", "optional" : 1, "description" : "Restrict 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", + "format" : "pve-fw-sport-spec" + }, + "dest" : { + "format" : "pve-fw-addr-spec", + "description" : "Restrict 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.", + "optional" : 1, "type" : "string" + }, + "source" : { + "description" : "Restrict 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.", + "optional" : 1, + "type" : "string", + "format" : "pve-fw-addr-spec" + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, + "type" : "string", + "maxLength" : 40 + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "comment" : { + "type" : "string", + "optional" : 1 + }, + "iface" : { + "optional" : 1, + "type" : "string", + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "minLength" : 2, + "format" : "pve-iface", + "maxLength" : 20 } - } + }, + "additionalProperties" : 0 }, + "name" : "create_rule" + }, + "GET" : { + "description" : "List rules.", "proxyto" : null, - "protected" : 1, + "name" : "get_rules", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + } + }, "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Config.Network" + "VM.Audit" ] ] }, - "name" : "create_rule", - "method" : "POST", "returns" : { - "type" : "null" + "type" : "array", + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + } }, - "description" : "Create new rule." + "method" : "GET" } }, - "leaf" : 0, - "text" : "rules" + "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules", + "leaf" : 0 }, { + "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases", + "leaf" : 0, "children" : [ { - "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}", + "text" : "{name}", "info" : { - "DELETE" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object" }, - "description" : "Remove IP or Network alias.", - "protected" : 1, + "description" : "Read alias.", "parameters" : { - "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" }, "name" : { - "minLength" : 2, + "maxLength" : 64, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "description" : "Alias name.", - "maxLength" : 64, + "minLength" : 2, "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." } - } - }, - "returns" : { - "type" : "null" + }, + "additionalProperties" : 0 }, - "method" : "DELETE", - "name" : "remove_alias" - }, - "GET" : { - "description" : "Read alias.", + "name" : "read_alias", "permissions" : { "check" : [ "perm", @@ -3839,145 +3768,162 @@ var pveapi = [ "VM.Audit" ] ] + } + }, + "PUT" : { + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] }, "parameters" : { "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, "vmid" : { "description" : "The (unique) ID of the VM.", - "minimum" : 1, "type" : "integer", - "format" : "pve-vmid" + "format" : "pve-vmid", + "minimum" : 1 + }, + "digest" : { + "maxLength" : 40, + "type" : "string", + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "type" : "string", + "format" : "IPorCIDR" + }, + "comment" : { + "type" : "string", + "optional" : 1 + }, + "rename" : { + "maxLength" : 64, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rename an existing alias.", + "minLength" : 2, + "type" : "string", + "optional" : 1 }, "name" : { "maxLength" : 64, - "description" : "Alias name.", "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Alias name.", "minLength" : 2, "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" } }, "additionalProperties" : 0 }, - "returns" : { - "type" : "object" - }, - "name" : "read_alias", - "method" : "GET" - }, - "PUT" : { + "name" : "update_alias", "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, "description" : "Update IP or Network alias.", "returns" : { "type" : "null" }, + "method" : "PUT" + }, + "DELETE" : { + "name" : "remove_alias", "parameters" : { "additionalProperties" : 0, "properties" : { "vmid" : { - "minimum" : 1, "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "name" : { - "type" : "string", - "maxLength" : 64, - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "maxLength" : 40, "optional" : 1, - "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", "type" : "string", - "format" : "IPorCIDR" + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." }, - "rename" : { - "description" : "Rename an existing alias.", - "optional" : 1, + "name" : { "maxLength" : 64, + "type" : "string", "minLength" : 2, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "description" : "Alias name." + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" } } }, - "name" : "update_alias", - "method" : "PUT" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "description" : "Remove IP or Network alias.", + "returns" : { + "type" : "null" + }, + "method" : "DELETE" } }, - "leaf" : 1, - "text" : "{name}" + "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}", + "leaf" : 1 } ], + "text" : "aliases", "info" : { "POST" : { - "returns" : { - "type" : "null" - }, + "description" : "Create IP or Network Alias.", + "protected" : 1, "parameters" : { "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "comment" : { - "optional" : 1, - "type" : "string" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 }, "cidr" : { - "type" : "string", "format" : "IPorCIDR", - "description" : "Network/IP specification in CIDR format." + "description" : "Network/IP specification in CIDR format.", + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" }, "name" : { "maxLength" : 64, - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string", "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Alias name." + }, + "comment" : { + "optional" : 1, "type" : "string" } }, "additionalProperties" : 0 }, "name" : "create_alias", - "method" : "POST", - "protected" : 1, "permissions" : { "check" : [ "perm", @@ -3987,20 +3933,24 @@ var pveapi = [ ] ] }, - "description" : "Create IP or Network Alias." + "method" : "POST", + "returns" : { + "type" : "null" + } }, "GET" : { - "name" : "get_aliases", "method" : "GET", "returns" : { + "type" : "array", "items" : { + "type" : "object", "properties" : { - "name" : { + "comment" : { + "optional" : 1, "type" : "string" }, - "comment" : { - "type" : "string", - "optional" : 1 + "name" : { + "type" : "string" }, "digest" : { "maxLength" : 40, @@ -4011,10 +3961,8 @@ var pveapi = [ "cidr" : { "type" : "string" } - }, - "type" : "object" + } }, - "type" : "array", "links" : [ { "href" : "{name}", @@ -4022,214 +3970,86 @@ var pveapi = [ } ] }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "name" : "get_aliases", "parameters" : { + "additionalProperties" : 0, "properties" : { "vmid" : { + "type" : "integer", "description" : "The (unique) ID of the VM.", - "minimum" : 1, "format" : "pve-vmid", - "type" : "integer" + "minimum" : 1 }, "node" : { - "description" : "The cluster node name.", "format" : "pve-node", + "description" : "The cluster node name.", "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "description" : "List aliases", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - } + "description" : "List aliases" } - }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases", - "leaf" : 0, - "text" : "aliases" + } }, { "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset", + "leaf" : 0, "children" : [ { "leaf" : 0, - "text" : "{name}", "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}", - "children" : [ - { - "text" : "{cidr}", - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}", - "info" : { - "PUT" : { - "name" : "update_ip", - "method" : "PUT", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "maxLength" : 64, - "description" : "IP set name.", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "cidr" : { - "format" : "IPorCIDRorAlias", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "digest" : { - "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" - } - } + "info" : { + "POST" : { + "returns" : { + "type" : "null" + }, + "method" : "POST", + "name" : "create_ip", + "parameters" : { + "properties" : { + "nomatch" : { + "type" : "boolean", + "optional" : 1 }, - "returns" : { - "type" : "null" + "comment" : { + "type" : "string", + "optional" : 1 }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "name" : { + "maxLength" : 64, + "type" : "string", + "minLength" : 2, + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" }, - "description" : "Update IP or Network settings", - "protected" : 1 - }, - "GET" : { - "name" : "read_ip", - "method" : "GET", - "returns" : { - "type" : "object" + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" }, - "parameters" : { - "properties" : { - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - }, - "name" : { - "maxLength" : 64, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string" - } - }, - "additionalProperties" : 0 + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "type" : "string", + "format" : "IPorCIDRorAlias" }, - "protected" : 1, - "description" : "Read IP or Network settings from IPSet.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" } }, - "DELETE" : { - "returns" : { - "type" : "null" - }, - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "name" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64, - "description" : "IP set name.", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "digest" : { - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "type" : "string" - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "method" : "DELETE", - "name" : "remove_ip", - "protected" : 1, - "description" : "Remove IP or Network from IPSet.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - } - } - } - } - ], - "info" : { - "POST" : { + "additionalProperties" : 0 + }, "permissions" : { "check" : [ "perm", @@ -4240,51 +4060,16 @@ var pveapi = [ ] }, "description" : "Add IP or Network to IPSet.", - "protected" : 1, - "name" : "create_ip", - "method" : "POST", - "parameters" : { - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDRorAlias" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64, - "description" : "IP set name." - }, - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "null" - } + "protected" : 1 }, "DELETE" : { + "method" : "DELETE", + "returns" : { + "type" : "null" + }, + "description" : "Delete IPSet", "protected" : 1, + "name" : "delete_ipset", "permissions" : { "check" : [ "perm", @@ -4294,93 +4079,64 @@ var pveapi = [ ] ] }, - "description" : "Delete IPSet", - "method" : "DELETE", - "name" : "delete_ipset", - "returns" : { - "type" : "null" - }, "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "name" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "maxLength" : 64, - "type" : "string" - }, "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." + }, + "name" : { + "type" : "string", + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "maxLength" : 64 + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 } - }, - "additionalProperties" : 0 + } } }, "GET" : { + "method" : "GET", "returns" : { "links" : [ { - "href" : "{cidr}", - "rel" : "child" + "rel" : "child", + "href" : "{cidr}" } ], "items" : { "properties" : { - "comment" : { - "optional" : 1, + "cidr" : { "type" : "string" }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 - }, "digest" : { - "maxLength" : 40, "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "optional" : 0, - "type" : "string" + "type" : "string", + "maxLength" : 40 }, - "cidr" : { - "type" : "string" + "nomatch" : { + "type" : "boolean", + "optional" : 1 + }, + "comment" : { + "type" : "string", + "optional" : 1 } }, "type" : "object" }, "type" : "array" }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "name" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "maxLength" : 64, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 - } - } - }, - "method" : "GET", - "name" : "get_ipset", + "description" : "List IPSet content", "permissions" : { "check" : [ "perm", @@ -4390,191 +4146,382 @@ var pveapi = [ ] ] }, - "description" : "List IPSet content" - } - } - } - ], - "info" : { - "POST" : { - "name" : "create_ipset", - "method" : "POST", - "returns" : { - "type" : "null" - }, - "parameters" : { - "properties" : { - "name" : { - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "maxLength" : 64 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - }, - "rename" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64, - "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", - "optional" : 1, - "type" : "string" - }, - "digest" : { - "type" : "string", - "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "parameters" : { + "properties" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "name" : { + "type" : "string", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "minLength" : 2, + "maxLength" : 64 + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 }, - "comment" : { - "type" : "string", - "optional" : 1 - } - }, - "additionalProperties" : 0 + "name" : "get_ipset" + } }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "description" : "Create new IPSet" - }, - "GET" : { - "method" : "GET", - "name" : "ipset_index", - "returns" : { - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "items" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "description" : "IP set name.", - "maxLength" : 64 + "text" : "{name}", + "children" : [ + { + "info" : { + "DELETE" : { + "method" : "DELETE", + "returns" : { + "type" : "null" + }, + "parameters" : { + "properties" : { + "name" : { + "maxLength" : 64, + "type" : "string", + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2 + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + }, + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", + "optional" : 1 + }, + "cidr" : { + "format" : "IPorCIDRorAlias", + "type" : "string", + "description" : "Network/IP specification in CIDR format." + } + }, + "additionalProperties" : 0 + }, + "name" : "remove_ip", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "description" : "Remove IP or Network from IPSet." }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0, - "type" : "string" + "PUT" : { + "description" : "Update IP or Network settings", + "protected" : 1, + "name" : "update_ip", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "parameters" : { + "properties" : { + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 + }, + "cidr" : { + "format" : "IPorCIDRorAlias", + "type" : "string", + "description" : "Network/IP specification in CIDR format." + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", + "optional" : 1, + "maxLength" : 40 + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "name" : { + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "minLength" : 2, + "type" : "string", + "maxLength" : 64 + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean" + } + }, + "additionalProperties" : 0 + }, + "method" : "PUT", + "returns" : { + "type" : "null" + } }, - "comment" : { - "type" : "string", - "optional" : 1 + "GET" : { + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "type" : "string", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "minLength" : 2, + "maxLength" : 64 + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "type" : "string", + "format" : "IPorCIDRorAlias" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "name" : "read_ip", + "description" : "Read IP or Network settings from IPSet.", + "protected" : 1, + "method" : "GET", + "returns" : { + "type" : "object" + } } - } - }, - "type" : "array" - }, + }, + "text" : "{cidr}", + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}" + } + ] + } + ], + "text" : "ipset", + "info" : { + "POST" : { + "protected" : 1, + "description" : "Create new IPSet", "parameters" : { "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, + "type" : "string", + "maxLength" : 40 }, "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", "type" : "integer" + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "name" : { + "minLength" : 2, + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string", + "maxLength" : 64 + }, + "rename" : { + "optional" : 1, + "type" : "string", + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", + "maxLength" : 64 + }, + "comment" : { + "type" : "string", + "optional" : 1 } }, "additionalProperties" : 0 }, + "name" : "create_ipset", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Config.Network" ] ] }, - "description" : "List IPSets" - } - }, - "leaf" : 0, - "text" : "ipset" - }, - { - "path" : "/nodes/{node}/qemu/{vmid}/firewall/options", - "info" : { + "returns" : { + "type" : "null" + }, + "method" : "POST" + }, "GET" : { - "description" : "Get VM firewall options.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ + "returns" : { + "type" : "array", + "items" : { + "properties" : { + "name" : { + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "minLength" : 2, + "type" : "string", + "maxLength" : 64 + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "digest" : { + "optional" : 0, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + } + }, + "type" : "object" + }, + "links" : [ + { + "rel" : "child", + "href" : "{name}" + } + ] + }, + "method" : "GET", + "description" : "List IPSets", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ "VM.Audit" ] ] }, - "proxyto" : "node", "parameters" : { "additionalProperties" : 0, "properties" : { "vmid" : { + "type" : "integer", "description" : "The (unique) ID of the VM.", - "minimum" : 1, "format" : "pve-vmid", - "type" : "integer" + "minimum" : 1 }, "node" : { "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "format" : "pve-node" } } }, + "name" : "ipset_index" + } + } + }, + { + "text" : "options", + "info" : { + "PUT" : { + "description" : "Set Firewall options.", + "proxyto" : "node", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, "returns" : { + "type" : "null" + }, + "protected" : 1, + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, "properties" : { + "ipfilter" : { + "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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.", + "type" : "boolean", + "optional" : 1 + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, "radv" : { - "description" : "Allow sending Router Advertisement.", "optional" : 1, - "type" : "boolean" + "type" : "boolean", + "description" : "Allow sending Router Advertisement." }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "optional" : 1, + "policy_out" : { "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "ACCEPT", + "REJECT", + "DROP" ], + "description" : "Output policy.", + "optional" : 1, "type" : "string" }, + "delete" : { + "type" : "string", + "optional" : 1, + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list" + }, "log_level_in" : { + "description" : "Log level for incoming traffic.", "enum" : [ "emerg", "alert", @@ -4586,34 +4533,18 @@ var pveapi = [ "debug", "nolog" ], - "description" : "Log level for incoming traffic.", "optional" : 1, "type" : "string" }, - "enable" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable firewall rules." - }, "dhcp" : { - "type" : "boolean", + "description" : "Enable DHCP.", "optional" : 1, - "description" : "Enable DHCP." + "type" : "boolean" }, "ndp" : { - "type" : "boolean", "optional" : 1, - "description" : "Enable NDP." - }, - "ipfilter" : { "type" : "boolean", - "optional" : 1, - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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." - }, - "macfilter" : { - "optional" : 1, - "description" : "Enable/disable MAC address filter.", - "type" : "boolean" + "description" : "Enable NDP." }, "policy_in" : { "type" : "string", @@ -4625,37 +4556,24 @@ var pveapi = [ "DROP" ] }, - "policy_out" : { + "macfilter" : { + "optional" : 1, + "type" : "boolean", + "description" : "Enable/disable MAC address filter." + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, "type" : "string", - "description" : "Output policy.", + "maxLength" : 40 + }, + "enable" : { + "description" : "Enable/disable firewall rules.", "optional" : 1, - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ] - } - }, - "type" : "object" - }, - "method" : "GET", - "name" : "get_options" - }, - "PUT" : { - "method" : "PUT", - "name" : "set_options", - "returns" : { - "type" : "null" - }, - "description" : "Set Firewall options.", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { + "type" : "boolean" + }, "log_level_out" : { - "type" : "string", "description" : "Log level for outgoing traffic.", - "optional" : 1, "enum" : [ "emerg", "alert", @@ -4666,21 +4584,36 @@ var pveapi = [ "info", "debug", "nolog" - ] - }, - "delete" : { - "format" : "pve-configid-list", + ], "type" : "string", - "optional" : 1, - "description" : "A list of settings you want to delete." - }, - "radv" : { - "type" : "boolean", - "description" : "Allow sending Router Advertisement.", "optional" : 1 }, - "log_level_in" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." + } + } + }, + "method" : "PUT" + }, + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object", + "properties" : { + "policy_out" : { + "optional" : 1, "type" : "string", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "description" : "Output policy." + }, + "log_level_in" : { "enum" : [ "emerg", "alert", @@ -4693,226 +4626,237 @@ var pveapi = [ "nolog" ], "description" : "Log level for incoming traffic.", + "type" : "string", "optional" : 1 }, - "enable" : { + "ipfilter" : { "type" : "boolean", "optional" : 1, - "description" : "Enable/disable firewall rules." + "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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." }, - "digest" : { - "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" + "radv" : { + "description" : "Allow sending Router Advertisement.", + "type" : "boolean", + "optional" : 1 }, "macfilter" : { - "type" : "boolean", "description" : "Enable/disable MAC address filter.", - "optional" : 1 + "optional" : 1, + "type" : "boolean" }, "policy_in" : { - "type" : "string", - "description" : "Input policy.", - "optional" : 1, "enum" : [ "ACCEPT", "REJECT", "DROP" - ] - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 - }, - "dhcp" : { - "type" : "boolean", + ], + "description" : "Input policy.", "optional" : 1, - "description" : "Enable DHCP." + "type" : "string" }, "ndp" : { - "optional" : 1, "description" : "Enable NDP.", - "type" : "boolean" + "type" : "boolean", + "optional" : 1 }, - "ipfilter" : { + "dhcp" : { "optional" : 1, - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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.", - "type" : "boolean" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "type" : "boolean", + "description" : "Enable DHCP." }, - "policy_out" : { + "enable" : { "optional" : 1, - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" + "type" : "boolean", + "description" : "Enable/disable firewall rules." + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" ], - "type" : "string" + "type" : "string", + "optional" : 1 + } + } + }, + "name" : "get_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" } } }, - "protected" : 1, "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Config.Network" + "VM.Audit" ] ] - } + }, + "proxyto" : "node", + "description" : "Get VM firewall options." } }, - "text" : "options", + "path" : "/nodes/{node}/qemu/{vmid}/firewall/options", "leaf" : 1 }, { - "leaf" : 1, "text" : "log", "info" : { "GET" : { "returns" : { - "type" : "array", "items" : { "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, "t" : { - "type" : "string", - "description" : "Line text" + "description" : "Line text", + "type" : "string" + }, + "n" : { + "type" : "integer", + "description" : "Line number" } }, "type" : "object" - } + }, + "type" : "array" + }, + "proxyto" : "node", + "description" : "Read firewall log", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] }, "method" : "GET", + "protected" : 1, "name" : "log", - "description" : "Read firewall log", - "proxyto" : "node", "parameters" : { - "additionalProperties" : 0, "properties" : { "vmid" : { - "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "start" : { "optional" : 1, - "minimum" : 0, - "type" : "integer" + "type" : "integer", + "minimum" : 0 }, "node" : { + "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" }, "limit" : { + "optional" : 1, "type" : "integer", - "minimum" : 0, - "optional" : 1 + "minimum" : 0 } - } - }, + }, + "additionalProperties" : 0 + } + } + }, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/log", + "leaf" : 1 + }, + { + "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs", + "leaf" : 1, + "text" : "refs", + "info" : { + "GET" : { + "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Audit" ] ] }, - "protected" : 1 - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/log" - }, - { - "info" : { - "GET" : { "parameters" : { "properties" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." + }, "node" : { "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" }, "type" : { - "type" : "string", - "optional" : 1, "description" : "Only list references of specified type.", "enum" : [ "alias", "ipset" - ] - }, - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." + ], + "type" : "string", + "optional" : 1 } }, "additionalProperties" : 0 }, + "name" : "refs", + "method" : "GET", "returns" : { - "type" : "array", "items" : { "properties" : { - "comment" : { - "optional" : 1, + "type" : { + "enum" : [ + "alias", + "ipset" + ], "type" : "string" }, "name" : { "type" : "string" }, - "type" : { - "type" : "string", - "enum" : [ - "alias", - "ipset" - ] + "comment" : { + "optional" : 1, + "type" : "string" } }, "type" : "object" - } - }, - "name" : "refs", - "method" : "GET", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties." + }, + "type" : "array" + } } - }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs", - "leaf" : 1, - "text" : "refs" + } } ], - "path" : "/nodes/{node}/qemu/{vmid}/firewall", "info" : { "GET" : { "method" : "GET", - "name" : "index", "returns" : { "links" : [ { @@ -4927,41 +4871,53 @@ var pveapi = [ "type" : "array" }, "parameters" : { - "additionalProperties" : 0, "properties" : { "node" : { + "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" }, "vmid" : { - "type" : "integer", "format" : "pve-vmid", "minimum" : 1, + "type" : "integer", "description" : "The (unique) ID of the VM." } - } + }, + "additionalProperties" : 0 }, - "description" : "Directory index.", "permissions" : { "user" : "all" - } + }, + "name" : "index", + "description" : "Directory index." } } }, { - "text" : "rrd", - "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/rrd", + "leaf" : 1, + "text" : "rrd", "info" : { "GET" : { + "name" : "rrd", "parameters" : { "additionalProperties" : 0, "properties" : { - "ds" : { - "format" : "pve-configid-list", - "type" : "string", - "description" : "The list of datasources you want to display." + "cf" : { + "enum" : [ + "AVERAGE", + "MAX" + ], + "description" : "The RRD consolidation function", + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 }, "node" : { "format" : "pve-node", @@ -4969,7 +4925,6 @@ var pveapi = [ "description" : "The cluster node name." }, "timeframe" : { - "type" : "string", "enum" : [ "hour", "day", @@ -4977,36 +4932,16 @@ var pveapi = [ "month", "year" ], - "description" : "Specify the time frame you are interested in." - }, - "cf" : { - "enum" : [ - "AVERAGE", - "MAX" - ], - "description" : "The RRD consolidation function", - "optional" : 1, + "description" : "Specify the time frame you are interested in.", "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - } - } - }, - "returns" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" + "ds" : { + "description" : "The list of datasources you want to display.", + "type" : "string", + "format" : "pve-configid-list" } } }, - "method" : "GET", - "name" : "rrd", - "description" : "Read VM RRD statistics (returns PNG)", "permissions" : { "check" : [ "perm", @@ -5016,22 +4951,28 @@ var pveapi = [ ] ] }, - "protected" : 1 + "description" : "Read VM RRD statistics (returns PNG)", + "protected" : 1, + "returns" : { + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" + }, + "method" : "GET" } } }, { - "info" : { + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/rrddata", + "info" : { "GET" : { + "protected" : 1, + "description" : "Read VM RRD statistics", "name" : "rrddata", - "method" : "GET", - "returns" : { - "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array" - }, "parameters" : { "properties" : { "node" : { @@ -5041,34 +4982,33 @@ var pveapi = [ }, "timeframe" : { "type" : "string", - "description" : "Specify the time frame you are interested in.", "enum" : [ "hour", "day", "week", "month", "year" - ] + ], + "description" : "Specify the time frame you are interested in." + }, + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 }, "cf" : { - "type" : "string", + "description" : "The RRD consolidation function", "enum" : [ "AVERAGE", "MAX" ], - "optional" : 1, - "description" : "The RRD consolidation function" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "type" : "string", + "optional" : 1 } }, "additionalProperties" : 0 }, - "protected" : 1, "permissions" : { "check" : [ "perm", @@ -5078,17 +5018,27 @@ var pveapi = [ ] ] }, - "description" : "Read VM RRD statistics" + "method" : "GET", + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : {} + } + } } }, - "path" : "/nodes/{node}/qemu/{vmid}/rrddata", - "leaf" : 1, "text" : "rrddata" }, { + "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/config", "info" : { - "PUT" : { + "POST" : { + "returns" : { + "type" : "string", + "optional" : 1 + }, "permissions" : { "check" : [ "perm", @@ -5106,212 +5056,256 @@ var pveapi = [ 1 ] }, - "protected" : 1, "proxyto" : "node", + "description" : "Set virtual machine options (asynchrounous API).", + "method" : "POST", "parameters" : { "properties" : { - "lock" : { + "cpulimit" : { + "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", + "default" : 0, + "maximum" : 128, + "optional" : 1, + "type" : "number", + "minimum" : 0 + }, + "node" : { + "description" : "The cluster node name.", "type" : "string", - "description" : "Lock/unlock the VM.", + "format" : "pve-node" + }, + "force" : { "optional" : 1, - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ] + "type" : "boolean", + "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", + "requires" : "delete" }, - "numa" : { - "default" : 0, + "kvm" : { + "default" : 1, + "optional" : 1, "type" : "boolean", - "description" : "Enable/disable NUMA.", - "optional" : 1 + "description" : "Enable/disable KVM hardware virtualization." }, - "virtio[n]" : { - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "localtime" : { + "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "optional" : 1, + "type" : "boolean" + }, + "migrate_speed" : { + "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", + "default" : 0, "optional" : 1, + "type" : "integer", + "minimum" : 0 + }, + "startdate" : { + "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", + "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", + "type" : "string", + "optional" : 1, + "default" : "now", + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + }, + "sata[n]" : { "format" : { - "mbps_wr" : { + "mbps" : { + "format_description" : "mbps", + "description" : "Maximum r/w speed speed in megabytes per second.", "type" : "number", - "description" : "Maximum write speed speed in megabytes per second.", - "optional" : 1, - "format_description" : "mbps" + "optional" : 1 }, "cyls" : { - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", "format_description" : "count", - "optional" : 1 + "optional" : 1, + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific cylinder count." }, - "secs" : { - "format_description" : "count", + "bps_rd" : { + "description" : "Maximum read speed speed in bytes per second.", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count.", - "type" : "integer" + "type" : "integer", + "format_description" : "bps" }, - "heads" : { + "trans" : { + "format_description" : "none|lba|auto", + "type" : "string", + "optional" : 1, + "enum" : [ + "none", + "lba", + "auto" + ], + "description" : "Force disk geometry bios translation mode." + }, + "volume" : { + "alias" : "file" + }, + "iops" : { + "format_description" : "iops", + "description" : "Maximum r/w I/O speed in operations per second.", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count", "type" : "integer" }, - "mbps_rd" : { - "type" : "number", + "file" : { + "default_key" : 1, + "format_description" : "volume", + "format" : "pve-volume-id-or-qm-path", + "type" : "string", + "description" : "The drive's backing volume." + }, + "mbps_wr" : { "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", + "type" : "number", + "description" : "Maximum write speed speed in megabytes per second.", "format_description" : "mbps" }, + "mbps_rd" : { + "format_description" : "mbps", + "description" : "Maximum read speed speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, "backup" : { - "optional" : 1, - "description" : "Whether the drive should be included when making backups.", "format_description" : "on|off", - "type" : "boolean" + "type" : "boolean", + "optional" : 1, + "description" : "Whether the drive should be included when making backups." }, - "bps_rd" : { + "iops_wr_max" : { "type" : "integer", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" + "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "format_description" : "iops" }, - "format" : { + "aio" : { + "format_description" : "native|threads", + "description" : "AIO type to use.", "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "native", + "threads" ], "optional" : 1, - "description" : "The drive's backing file's data format.", - "format_description" : "drive format", "type" : "string" }, - "media" : { + "werror" : { + "format_description" : "enospc|ignore|report|stop", + "optional" : 1, + "type" : "string", "enum" : [ - "cdrom", - "disk" + "enospc", + "ignore", + "report", + "stop" ], - "format_description" : "cdrom|disk", - "optional" : 1, - "description" : "The drive's media type.", - "default" : "disk", - "type" : "string" + "description" : "Write error action." }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "size" : { + "format" : "disk-size", + "type" : "string", "optional" : 1, - "type" : "boolean" + "description" : "Disk size. This is purely informational and has no effect." }, - "iops_wr" : { - "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", + "iops_rd" : { "format_description" : "iops", - "type" : "integer" + "type" : "integer", + "optional" : 1, + "description" : "Maximum read I/O speed in operations per second." }, "mbps_max" : { - "type" : "number", + "format_description" : "mbps", "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "optional" : 1, - "format_description" : "mbps" + "type" : "number" }, - "serial" : { - "type" : "string", - "format" : "urlencoded", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", + "bps_wr" : { + "format_description" : "bps", + "type" : "integer", "optional" : 1, - "maxLength" : 60 + "description" : "Maximum write speed speed in bytes per second." }, - "discard" : { - "format_description" : "ignore|on", + "mbps_rd_max" : { + "format_description" : "mbps", "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "type" : "number", + "description" : "Maximum unthrottled read pool speed in megabytes per second." + }, + "discard" : { "enum" : [ "ignore", "on" ], - "type" : "string" - }, - "file" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "type" : "string", - "format" : "pve-volume-id-or-qm-path", - "default_key" : 1, - "format_description" : "volume", - "description" : "The drive's backing volume." - }, - "mbps" : { - "description" : "Maximum r/w speed speed in megabytes per second.", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "format_description" : "ignore|on" }, - "bps_wr" : { - "type" : "integer", - "optional" : 1, - "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second." + "serial" : { + "maxLength" : 60, + "format" : "urlencoded", + "format_description" : "serial", + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "type" : "string", + "optional" : 1 }, - "iops" : { + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "type" : "integer", "optional" : 1, - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops" + "format_description" : "count" }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", + "bps" : { + "description" : "Maximum r/w speed speed in bytes per second.", + "type" : "integer", "optional" : 1, - "format" : "disk-size", - "type" : "string" + "format_description" : "bps" }, - "iothread" : { - "format_description" : "off|on", - "description" : "Whether to use iothreads for this drive", + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool speed in operations per second.", "optional" : 1, - "type" : "boolean" - }, - "iops_wr_max" : { "type" : "integer", - "optional" : 1, - "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second." - }, - "mbps_rd_max" : { - "type" : "number", - "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "optional" : 1 + "format_description" : "iops" }, - "aio" : { + "format" : { + "format_description" : "drive format", + "description" : "The drive's backing file's data format.", "enum" : [ - "native", - "threads" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], "optional" : 1, - "format_description" : "native|threads", - "description" : "AIO type to use.", "type" : "string" }, - "iops_max" : { - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops", + "mbps_wr_max" : { + "format_description" : "mbps", + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", "optional" : 1, - "type" : "integer" + "type" : "boolean" }, - "bps" : { - "format_description" : "bps", + "secs" : { + "format_description" : "count", "optional" : 1, - "description" : "Maximum r/w speed speed in bytes per second.", - "type" : "integer" + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific sector count." }, - "mbps_wr_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "iops_wr" : { + "format_description" : "iops", + "description" : "Maximum write I/O speed in operations per second.", "optional" : 1, - "type" : "number" + "type" : "integer" }, "cache" : { + "optional" : 1, + "type" : "string", "enum" : [ "none", "writethrough", @@ -5319,171 +5313,306 @@ var pveapi = [ "unsafe", "directsync" ], - "optional" : 1, - "format_description" : "none|writethrough|writeback|unsafe|directsync", "description" : "The drive's cache mode", - "type" : "string" - }, - "snapshot" : { - "type" : "boolean", - "optional" : 1, - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots." + "format_description" : "none|writethrough|writeback|unsafe|directsync" }, "rerror" : { - "type" : "string", - "optional" : 1, - "description" : "Read error action.", - "format_description" : "ignore|report|stop", "enum" : [ "ignore", "report", "stop" - ] - }, - "trans" : { - "enum" : [ - "none", - "lba", - "auto" ], - "format_description" : "none|lba|auto", + "description" : "Read error action.", + "type" : "string", "optional" : 1, - "description" : "Force disk geometry bios translation mode.", - "type" : "string" + "format_description" : "ignore|report|stop" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "media" : { + "format_description" : "cdrom|disk", + "default" : "disk", + "type" : "string", "optional" : 1, - "format_description" : "iops", - "type" : "integer" - }, - "volume" : { - "alias" : "file" + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ] }, - "werror" : { + "snapshot" : { + "description" : "Whether the drive should be included when making snapshots.", + "type" : "boolean", "optional" : 1, - "format_description" : "enospc|ignore|report|stop", - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "type" : "string" + "format_description" : "on|off" }, - "iops_rd" : { - "type" : "integer", - "description" : "Maximum read I/O speed in operations per second.", + "iops_max" : { "optional" : 1, + "type" : "integer", + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", "format_description" : "iops" } }, - "type" : "string" - }, - "bios" : { + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", "type" : "string", - "default" : "seabios", - "optional" : 1, - "description" : "Select BIOS implementation.", - "enum" : [ - "seabios", - "ovmf" - ] - }, - "agent" : { - "optional" : 1, - "description" : "Enable/disable Qemu GuestAgent.", - "default" : 0, - "type" : "boolean" - }, - "parallel[n]" : { - "optional" : 1, - "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "type" : "string" + "optional" : 1 }, "tablet" : { "optional" : 1, - "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", "type" : "boolean", - "default" : 1 + "default" : 1, + "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)." }, - "smp" : { + "boot" : { + "pattern" : "[acdn]{1,4}", + "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", "optional" : 1, - "description" : "The number of CPUs. Please use option -sockets instead.", - "minimum" : 1, - "type" : "integer", - "default" : 1 + "type" : "string", + "default" : "cdn" }, - "usb[n]" : { + "numa[n]" : { + "optional" : 1, + "type" : "string", + "description" : "numa topology", "format" : { - "usb3" : { - "type" : "boolean", + "memory" : { + "format_description" : "mb", + "description" : "Amount of memory this numa node provides.", "optional" : 1, - "description" : "Specifies whether if given host option is a USB3 device or port", - "format_description" : "yes|no" + "type" : "number" }, - "host" : { - "description" : "The Host USB device or port or the value spice", - "format_description" : "HOSTUSBDEVICE|spice", - "default_key" : 1, - "format" : "pve-qm-usb-device", - "type" : "string" + "cpus" : { + "type" : "string", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "description" : "CPUs accessing this numa node.", + "format_description" : "id[-id];..." + }, + "hostnodes" : { + "optional" : 1, + "type" : "string", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "description" : "host numa nodes to use", + "format_description" : "id[-id];..." + }, + "policy" : { + "optional" : 1, + "type" : "string", + "description" : "numa allocation policy.", + "enum" : [ + "preferred", + "bind", + "interleave" + ], + "format_description" : "preferred|bind|interleave" } - }, - "type" : "string", - "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", - "optional" : 1 + } }, "tdf" : { - "optional" : 1, "description" : "Enable/disable time drift fix.", - "default" : 0, - "type" : "boolean" - }, - "cdrom" : { - "format" : "pve-qm-drive", - "type" : "string", - "optional" : 1, - "description" : "This is an alias for option -ide2", - "typetext" : "volume" - }, - "sockets" : { - "type" : "integer", - "default" : 1, - "minimum" : 1, + "type" : "boolean", "optional" : 1, - "description" : "The number of CPU sockets." + "default" : 0 }, - "serial[n]" : { - "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "optional" : 1, - "pattern" : "(/dev/.+|socket)", + "autostart" : { + "description" : "Automatic restart after crash (currently ignored).", + "default" : 0, + "type" : "boolean", + "optional" : 1 + }, + "ostype" : { + "enum" : [ + "other", + "wxp", + "w2k", + "w2k3", + "w2k8", + "wvista", + "win7", + "win8", + "l24", + "l26", + "solaris" + ], + "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", + "optional" : 1, "type" : "string" }, - "ide[n]" : { + "unused[n]" : { + "format" : "pve-volume-id", + "type" : "string", + "optional" : 1, + "description" : "Reference to unused volumes." + }, + "template" : { + "description" : "Enable/disable Template.", + "default" : 0, + "type" : "boolean", + "optional" : 1 + }, + "shares" : { + "default" : 1000, + "maximum" : 50000, + "type" : "integer", + "optional" : 1, + "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", + "minimum" : 0 + }, + "bios" : { + "enum" : [ + "seabios", + "ovmf" + ], + "description" : "Select BIOS implementation.", + "optional" : 1, + "type" : "string", + "default" : "seabios" + }, + "protection" : { + "default" : 0, + "type" : "boolean", + "optional" : 1, + "description" : "Sets the protection flag of the VM. This will prevent the remove operation." + }, + "memory" : { + "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", + "default" : 512, + "type" : "integer", + "optional" : 1, + "minimum" : 16 + }, + "args" : { + "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", + "type" : "string", + "optional" : 1 + }, + "background_delay" : { + "minimum" : 1, + "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.", + "maximum" : 30, + "type" : "integer", + "optional" : 1 + }, + "cpu" : { + "description" : "Emulated CPU type.", + "type" : "string", + "optional" : 1, "format" : { - "mbps_wr_max" : { - "type" : "number", + "cputype" : { + "description" : "Emulated CPU type.", + "enum" : [ + "486", + "athlon", + "pentium", + "pentium2", + "pentium3", + "coreduo", + "core2duo", + "kvm32", + "kvm64", + "qemu32", + "qemu64", + "phenom", + "Conroe", + "Penryn", + "Nehalem", + "Westmere", + "SandyBridge", + "IvyBridge", + "Haswell", + "Haswell-noTSX", + "Broadwell", + "Broadwell-noTSX", + "Opteron_G1", + "Opteron_G2", + "Opteron_G3", + "Opteron_G4", + "Opteron_G5", + "host" + ], + "default" : "kvm64", + "type" : "string", + "format_description" : "cputype", + "default_key" : 1 + }, + "hidden" : { + "description" : "Do not identify as a KVM virtual machine.", + "default" : 0, "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "boolean" + } + } + }, + "scsihw" : { + "type" : "string", + "optional" : 1, + "default" : "lsi", + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], + "description" : "scsi controller model" + }, + "usb[n]" : { + "format" : { + "usb3" : { + "format_description" : "yes|no", + "description" : "Specifies whether if given host option is a USB3 device or port", + "optional" : 1, + "type" : "boolean" }, - "bps" : { - "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", + "host" : { + "description" : "The Host USB device or port or the value spice", + "type" : "string", + "format_description" : "HOSTUSBDEVICE|spice", + "format" : "pve-qm-usb-device", + "default_key" : 1 + } + }, + "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", + "optional" : 1, + "type" : "string" + }, + "cdrom" : { + "description" : "This is an alias for option -ide2", + "type" : "string", + "optional" : 1, + "format" : "pve-qm-drive", + "typetext" : "volume" + }, + "skiplock" : { + "type" : "boolean", + "optional" : 1, + "description" : "Ignore locks - only root is allowed to use this option." + }, + "net[n]" : { + "format" : "pve-qm-net", + "type" : "string", + "optional" : 1, + "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n" + }, + "scsi[n]" : { + "format" : { + "media" : { + "format_description" : "cdrom|disk", + "enum" : [ + "cdrom", + "disk" + ], + "description" : "The drive's media type.", + "type" : "string", "optional" : 1, - "type" : "integer" + "default" : "disk" }, - "snapshot" : { - "type" : "boolean", + "iothread" : { + "format_description" : "off|on", "optional" : 1, - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots." + "type" : "boolean", + "description" : "Whether to use iothreads for this drive" }, "cache" : { + "optional" : 1, "type" : "string", "enum" : [ "none", @@ -5492,451 +5621,377 @@ var pveapi = [ "unsafe", "directsync" ], - "optional" : 1, "description" : "The drive's cache mode", "format_description" : "none|writethrough|writeback|unsafe|directsync" }, - "werror" : { - "type" : "string", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action.", + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "type" : "integer", "optional" : 1, - "format_description" : "enospc|ignore|report|stop" + "format_description" : "count" }, - "iops_rd" : { + "iops_wr" : { + "description" : "Maximum write I/O speed in operations per second.", "type" : "integer", + "optional" : 1, + "format_description" : "iops" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "type" : "boolean", + "optional" : 1 + }, + "iops_max" : { "format_description" : "iops", + "type" : "integer", "optional" : 1, - "description" : "Maximum read I/O speed in operations per second." + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." }, - "rerror" : { - "type" : "string", + "snapshot" : { "optional" : 1, - "description" : "Read error action.", - "format_description" : "ignore|report|stop", - "enum" : [ - "ignore", - "report", - "stop" - ] + "type" : "boolean", + "description" : "Whether the drive should be included when making snapshots.", + "format_description" : "on|off" }, - "trans" : { - "type" : "string", + "bps_wr" : { "optional" : 1, - "format_description" : "none|lba|auto", - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ] + "type" : "integer", + "description" : "Maximum write speed speed in bytes per second.", + "format_description" : "bps" }, - "volume" : { - "alias" : "file" + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "type" : "number", + "optional" : 1, + "format_description" : "mbps" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "iops_rd" : { + "format_description" : "iops", + "type" : "integer", "optional" : 1, + "description" : "Maximum read I/O speed in operations per second." + }, + "size" : { + "format" : "disk-size", + "description" : "Disk size. This is purely informational and has no effect.", + "type" : "string", + "optional" : 1 + }, + "iops_rd_max" : { "format_description" : "iops", - "type" : "integer" + "optional" : 1, + "type" : "integer", + "description" : "Maximum unthrottled read I/O pool speed in operations per second." }, - "mbps" : { + "format" : { + "type" : "string", + "optional" : 1, + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "description" : "The drive's backing file's data format.", + "format_description" : "drive format" + }, + "mbps_wr_max" : { "format_description" : "mbps", + "type" : "number", "optional" : 1, - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number" + "description" : "Maximum unthrottled write pool speed in megabytes per second." }, - "bps_wr" : { + "bps" : { + "description" : "Maximum r/w speed speed in bytes per second.", + "optional" : 1, "type" : "integer", - "description" : "Maximum write speed speed in bytes per second.", - "format_description" : "bps", - "optional" : 1 + "format_description" : "bps" }, - "iops" : { - "type" : "integer", - "description" : "Maximum r/w I/O speed in operations per second.", + "heads" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "format_description" : "iops" + "type" : "integer" }, - "discard" : { + "serial" : { "type" : "string", + "optional" : 1, + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format_description" : "serial", + "maxLength" : 60, + "format" : "urlencoded" + }, + "discard" : { "enum" : [ "ignore", "on" ], + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "optional" : 1, - "format_description" : "ignore|on", - "description" : "Controls whether to pass discard/trim requests to the underlying storage." + "type" : "string", + "format_description" : "ignore|on" }, - "serial" : { - "maxLength" : 60, + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "type" : "number", "optional" : 1, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", - "format" : "urlencoded", - "type" : "string" + "format_description" : "mbps" }, - "mbps_max" : { + "mbps_rd" : { "type" : "number", - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "optional" : 1, + "description" : "Maximum read speed speed in megabytes per second.", "format_description" : "mbps" }, + "mbps_wr" : { + "format_description" : "mbps", + "optional" : 1, + "type" : "number", + "description" : "Maximum write speed speed in megabytes per second." + }, "file" : { + "format" : "pve-volume-id-or-qm-path", "format_description" : "volume", - "description" : "The drive's backing volume.", "default_key" : 1, - "format" : "pve-volume-id-or-qm-path", + "description" : "The drive's backing volume.", "type" : "string" }, - "mbps_rd_max" : { + "iops" : { + "type" : "integer", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number" + "description" : "Maximum r/w I/O speed in operations per second.", + "format_description" : "iops" }, - "aio" : { + "werror" : { + "format_description" : "enospc|ignore|report|stop", + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], "type" : "string", + "optional" : 1 + }, + "aio" : { + "format_description" : "native|threads", "enum" : [ "native", "threads" ], "description" : "AIO type to use.", - "format_description" : "native|threads", - "optional" : 1 - }, - "iops_max" : { - "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops", - "type" : "integer" - }, - "size" : { - "format" : "disk-size", - "type" : "string", "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect." + "type" : "string" }, "iops_wr_max" : { "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "optional" : 1, - "format_description" : "iops", - "type" : "integer" - }, - "bps_rd" : { "type" : "integer", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" + "format_description" : "iops" }, "backup" : { - "optional" : 1, - "description" : "Whether the drive should be included when making backups.", "format_description" : "on|off", - "type" : "boolean" - }, - "model" : { - "type" : "string", - "format" : "urlencoded", - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", - "optional" : 1, - "maxLength" : 120, - "format_description" : "model" - }, - "media" : { - "format_description" : "cdrom|disk", - "optional" : 1, - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], - "type" : "string", - "default" : "disk" - }, - "detect_zeroes" : { "type" : "boolean", "optional" : 1, - "description" : "Controls whether to detect and try to optimize writes of zeroes." + "description" : "Whether the drive should be included when making backups." }, - "iops_wr" : { + "bps_rd" : { "type" : "integer", "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" + "description" : "Maximum read speed speed in bytes per second.", + "format_description" : "bps" }, - "format" : { - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], + "queues" : { + "minimum" : 2, + "format_description" : "nbqueues", + "type" : "integer", "optional" : 1, - "description" : "The drive's backing file's data format.", - "format_description" : "drive format", - "type" : "string" + "description" : "Number of queues." }, "cyls" : { "format_description" : "count", - "optional" : 1, "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "type" : "integer" - }, - "mbps_wr" : { - "type" : "number", - "format_description" : "mbps", - "optional" : 1, - "description" : "Maximum write speed speed in megabytes per second." - }, - "heads" : { "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count", "type" : "integer" }, - "mbps_rd" : { - "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", + "mbps" : { "format_description" : "mbps", - "type" : "number" + "description" : "Maximum r/w speed speed in megabytes per second.", + "type" : "number", + "optional" : 1 }, - "secs" : { - "type" : "integer", + "volume" : { + "alias" : "file" + }, + "trans" : { + "format_description" : "none|lba|auto", "optional" : 1, - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count." + "type" : "string", + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ] } }, "type" : "string", - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", - "optional" : 1 - }, - "cpuunits" : { - "default" : 1000, - "maximum" : 500000, - "type" : "integer", - "minimum" : 0, - "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "optional" : 1 - }, - "cpulimit" : { - "minimum" : 0, - "maximum" : 128, - "type" : "number", - "default" : 0, - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", - "optional" : 1 - }, - "args" : { - "type" : "string", - "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", - "optional" : 1 - }, - "protection" : { - "default" : 0, - "type" : "boolean", - "description" : "Sets the protection flag of the VM. This will prevent the remove operation.", - "optional" : 1 + "optional" : 1, + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." }, - "machine" : { + "virtio[n]" : { "type" : "string", "optional" : 1, - "maxLength" : 40, - "description" : "Specific the Qemu machine type.", - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)" - }, - "reboot" : { - "default" : 1, - "type" : "boolean", - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "optional" : 1 - }, - "hotplug" : { - "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", - "optional" : 1, - "format" : "pve-hotplug-features", - "default" : "network,disk,usb", - "type" : "string" - }, - "migrate_speed" : { - "optional" : 1, - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", - "type" : "integer", - "default" : 0, - "minimum" : 0 - }, - "sata[n]" : { + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", "format" : { - "secs" : { + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, "type" : "integer", - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", - "optional" : 1 + "format_description" : "count" }, - "mbps_rd" : { + "mbps" : { + "description" : "Maximum r/w speed speed in megabytes per second.", "type" : "number", - "description" : "Maximum read speed speed in megabytes per second.", "optional" : 1, "format_description" : "mbps" }, - "heads" : { - "format_description" : "count", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", - "type" : "integer" - }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "bps_rd" : { + "description" : "Maximum read speed speed in bytes per second.", "optional" : 1, - "format_description" : "count", - "type" : "integer" + "type" : "integer", + "format_description" : "bps" }, - "format" : { - "format_description" : "drive format", - "description" : "The drive's backing file's data format.", + "trans" : { + "format_description" : "none|lba|auto", "optional" : 1, + "type" : "string", "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "none", + "lba", + "auto" ], - "type" : "string" + "description" : "Force disk geometry bios translation mode." }, - "detect_zeroes" : { - "optional" : 1, - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "type" : "boolean" + "volume" : { + "alias" : "file" }, - "iops_wr" : { - "type" : "integer", + "file" : { + "default_key" : 1, + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string", + "description" : "The drive's backing volume." + }, + "iops" : { "format_description" : "iops", - "optional" : 1, - "description" : "Maximum write I/O speed in operations per second." + "description" : "Maximum r/w I/O speed in operations per second.", + "type" : "integer", + "optional" : 1 }, - "media" : { - "enum" : [ - "cdrom", - "disk" - ], - "description" : "The drive's media type.", + "mbps_rd" : { + "type" : "number", "optional" : 1, - "format_description" : "cdrom|disk", - "default" : "disk", - "type" : "string" - }, - "backup" : { - "type" : "boolean", - "format_description" : "on|off", - "description" : "Whether the drive should be included when making backups.", - "optional" : 1 + "description" : "Maximum read speed speed in megabytes per second.", + "format_description" : "mbps" }, - "bps_rd" : { - "type" : "integer", + "mbps_wr" : { + "type" : "number", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" + "description" : "Maximum write speed speed in megabytes per second.", + "format_description" : "mbps" }, "iops_wr_max" : { - "type" : "integer", + "format_description" : "iops", "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "optional" : 1, - "format_description" : "iops" - }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "optional" : 1, - "format" : "disk-size", - "type" : "string" - }, - "iops_max" : { "type" : "integer", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops", "optional" : 1 }, + "backup" : { + "optional" : 1, + "type" : "boolean", + "description" : "Whether the drive should be included when making backups.", + "format_description" : "on|off" + }, "aio" : { + "type" : "string", "optional" : 1, - "format_description" : "native|threads", "description" : "AIO type to use.", "enum" : [ "native", "threads" ], - "type" : "string" - }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "format_description" : "native|threads" }, - "file" : { - "default_key" : 1, - "description" : "The drive's backing volume.", - "format_description" : "volume", + "werror" : { "type" : "string", - "format" : "pve-volume-id-or-qm-path" + "optional" : 1, + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "description" : "Write error action.", + "format_description" : "enospc|ignore|report|stop" }, - "serial" : { - "type" : "string", - "format" : "urlencoded", - "format_description" : "serial", + "iops_rd" : { + "description" : "Maximum read I/O speed in operations per second.", "optional" : 1, - "maxLength" : 60, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long." + "type" : "integer", + "format_description" : "iops" }, - "discard" : { + "size" : { "type" : "string", "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "format_description" : "ignore|on", - "enum" : [ - "ignore", - "on" - ] + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size" }, "mbps_max" : { "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "type" : "number", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "format_description" : "mbps" }, - "iops" : { - "description" : "Maximum r/w I/O speed in operations per second.", + "bps_wr" : { + "format_description" : "bps", + "type" : "integer", "optional" : 1, - "format_description" : "iops", - "type" : "integer" + "description" : "Maximum write speed speed in bytes per second." }, - "mbps" : { + "discard" : { + "enum" : [ + "ignore", + "on" + ], + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "optional" : 1, + "type" : "string", + "format_description" : "ignore|on" + }, + "mbps_rd_max" : { "type" : "number", "optional" : 1, - "description" : "Maximum r/w speed speed in megabytes per second.", + "description" : "Maximum unthrottled read pool speed in megabytes per second.", "format_description" : "mbps" }, - "bps_wr" : { + "heads" : { + "format_description" : "count", "type" : "integer", "optional" : 1, - "description" : "Maximum write speed speed in bytes per second.", - "format_description" : "bps" + "description" : "Force the drive's physical geometry to have a specific head count." + }, + "serial" : { + "format_description" : "serial", + "format" : "urlencoded", + "maxLength" : 60, + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "optional" : 1, + "type" : "string" }, "iops_rd_max" : { "type" : "integer", @@ -5944,50 +5999,63 @@ var pveapi = [ "description" : "Maximum unthrottled read I/O pool speed in operations per second.", "format_description" : "iops" }, - "volume" : { - "alias" : "file" + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "type" : "number", + "optional" : 1, + "format_description" : "mbps" }, - "trans" : { - "format_description" : "none|lba|auto", + "bps" : { + "format_description" : "bps", + "type" : "integer", "optional" : 1, - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ], - "type" : "string" + "description" : "Maximum r/w speed speed in bytes per second." }, - "rerror" : { + "format" : { + "format_description" : "drive format", + "type" : "string", "optional" : 1, - "description" : "Read error action.", - "format_description" : "ignore|report|stop", "enum" : [ - "ignore", - "report", - "stop" - ], - "type" : "string" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "description" : "The drive's backing file's data format." }, - "iops_rd" : { - "type" : "integer", + "secs" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "description" : "Maximum read I/O speed in operations per second.", - "format_description" : "iops" + "type" : "integer" }, - "werror" : { - "type" : "string", - "format_description" : "enospc|ignore|report|stop", + "iops_wr" : { + "format_description" : "iops", + "description" : "Maximum write I/O speed in operations per second.", + "type" : "integer", + "optional" : 1 + }, + "detect_zeroes" : { "optional" : 1, - "description" : "Write error action.", + "type" : "boolean", + "description" : "Controls whether to detect and try to optimize writes of zeroes." + }, + "rerror" : { + "description" : "Read error action.", "enum" : [ - "enospc", "ignore", "report", "stop" - ] + ], + "optional" : 1, + "type" : "string", + "format_description" : "ignore|report|stop" }, "cache" : { + "description" : "The drive's cache mode", "enum" : [ "none", "writethrough", @@ -5995,867 +6063,1141 @@ var pveapi = [ "unsafe", "directsync" ], + "type" : "string", "optional" : 1, - "description" : "The drive's cache mode", - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "type" : "string" + "format_description" : "none|writethrough|writeback|unsafe|directsync" }, - "snapshot" : { + "iothread" : { + "format_description" : "off|on", + "description" : "Whether to use iothreads for this drive", "optional" : 1, - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots.", "type" : "boolean" }, - "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "media" : { + "enum" : [ + "cdrom", + "disk" + ], + "description" : "The drive's media type.", + "type" : "string", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "default" : "disk", + "format_description" : "cdrom|disk" }, - "bps" : { + "snapshot" : { + "description" : "Whether the drive should be included when making snapshots.", + "optional" : 1, + "type" : "boolean", + "format_description" : "on|off" + }, + "iops_max" : { + "format_description" : "iops", "type" : "integer", "optional" : 1, - "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second." + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." } - }, - "type" : "string", - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", - "optional" : 1 + } }, - "bootdisk" : { + "vga" : { + "optional" : 1, "type" : "string", - "format" : "pve-qm-bootdisk", - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "description" : "Enable booting from specified disk.", - "optional" : 1 + "enum" : [ + "std", + "cirrus", + "vmware", + "qxl", + "serial0", + "serial1", + "serial2", + "serial3", + "qxl2", + "qxl3", + "qxl4" + ], + "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal." }, - "kvm" : { + "balloon" : { + "optional" : 1, + "type" : "integer", + "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", + "minimum" : 0 + }, + "smp" : { + "description" : "The number of CPUs. Please use option -sockets instead.", "default" : 1, - "type" : "boolean", "optional" : 1, - "description" : "Enable/disable KVM hardware virtualization." + "type" : "integer", + "minimum" : 1 }, - "hostpci[n]" : { - "format" : "pve-qm-hostpci", + "machine" : { + "description" : "Specific the Qemu machine type.", + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", + "optional" : 1, "type" : "string", - "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "optional" : 1 + "maxLength" : 40 }, - "ostype" : { + "delete" : { + "format" : "pve-configid-list", "optional" : 1, - "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "l24", - "l26", - "solaris" - ], - "type" : "string" - }, - "node" : { "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "A list of settings you want to delete." }, - "unused[n]" : { - "format" : "pve-volume-id", + "cores" : { + "minimum" : 1, + "description" : "The number of cores per socket.", + "type" : "integer", + "optional" : 1, + "default" : 1 + }, + "name" : { + "description" : "Set a name for the VM. Only used on the configuration web interface.", "type" : "string", - "description" : "Reference to unused volumes.", - "optional" : 1 + "optional" : 1, + "format" : "dns-name" }, - "template" : { + "agent" : { "default" : 0, + "optional" : 1, "type" : "boolean", - "description" : "Enable/disable Template.", + "description" : "Enable/disable Qemu GuestAgent." + }, + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", "optional" : 1 }, - "watchdog" : { + "startup" : { + "optional" : 1, "type" : "string", - "format" : "pve-qm-watchdog", + "description" : "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.", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", + "format" : "pve-startup-order" + }, + "onboot" : { + "type" : "boolean", "optional" : 1, - "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)" + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup." }, - "digest" : { - "type" : "string", - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "freeze" : { + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "type" : "boolean", "optional" : 1 }, - "vcpus" : { + "sockets" : { + "type" : "integer", "optional" : 1, + "default" : 1, + "description" : "The number of CPU sockets.", + "minimum" : 1 + }, + "vcpus" : { "description" : "Number of hotplugged vcpus.", - "type" : "integer", "default" : 0, + "optional" : 1, + "type" : "integer", "minimum" : 1 }, + "serial[n]" : { + "type" : "string", + "optional" : 1, + "pattern" : "(/dev/.+|socket)", + "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" + }, + "description" : { + "type" : "string", + "optional" : 1, + "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file." + }, + "acpi" : { + "description" : "Enable/disable ACPI.", + "optional" : 1, + "type" : "boolean", + "default" : 1 + }, "migrate_downtime" : { "description" : "Set maximum tolerated downtime (in seconds) for migrations.", - "optional" : 1, "type" : "number", + "optional" : 1, "default" : 0.1, "minimum" : 0 }, - "cores" : { - "type" : "integer", - "default" : 1, - "minimum" : 1, - "optional" : 1, - "description" : "The number of cores per socket." + "parallel[n]" : { + "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", + "type" : "string", + "optional" : 1 }, - "net[n]" : { - "format" : "pve-qm-net", + "hotplug" : { + "format" : "pve-hotplug-features", + "default" : "network,disk,usb", "type" : "string", "optional" : 1, - "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n" + "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'." }, - "keyboard" : { - "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", + "watchdog" : { "optional" : 1, - "enum" : [ - "en-gb", - "de-ch", - "en-us", - "mk", - "fr-be", - "de", - "pt-br", - "sv", - "fr-ch", - "no", - "pt", - "hu", - "sl", - "lt", - "fi", - "it", - "nl", - "is", - "da", - "fr-ca", - "pl", - "fr", - "es", - "ja", - "tr" - ], - "default" : "en-us", - "type" : "string" - }, - "freeze" : { - "type" : "boolean", - "optional" : 1, - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution)." - }, - "numa[n]" : { - "optional" : 1, - "description" : "numa topology", - "format" : { - "hostnodes" : { - "format_description" : "id[-id];...", - "description" : "host numa nodes to use", - "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "type" : "string" - }, - "policy" : { - "description" : "numa allocation policy.", - "format_description" : "preferred|bind|interleave", - "optional" : 1, - "enum" : [ - "preferred", - "bind", - "interleave" - ], - "type" : "string" - }, - "memory" : { - "type" : "number", - "description" : "Amount of memory this numa node provides.", - "format_description" : "mb", - "optional" : 1 - }, - "cpus" : { - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "description" : "CPUs accessing this numa node.", - "format_description" : "id[-id];...", - "type" : "string" - } - }, - "type" : "string" - }, - "force" : { - "requires" : "delete", - "type" : "boolean", - "optional" : 1, - "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal." - }, - "cpu" : { - "optional" : 1, - "description" : "Emulated CPU type.", - "format" : { - "cputype" : { - "enum" : [ - "486", - "athlon", - "pentium", - "pentium2", - "pentium3", - "coreduo", - "core2duo", - "kvm32", - "kvm64", - "qemu32", - "qemu64", - "phenom", - "Conroe", - "Penryn", - "Nehalem", - "Westmere", - "SandyBridge", - "IvyBridge", - "Haswell", - "Haswell-noTSX", - "Broadwell", - "Broadwell-noTSX", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "host" - ], - "default_key" : 1, - "format_description" : "cputype", - "description" : "Emulated CPU type.", - "default" : "kvm64", - "type" : "string" - }, - "hidden" : { - "optional" : 1, - "description" : "Do not identify as a KVM virtual machine.", - "type" : "boolean", - "default" : 0 - } - }, - "type" : "string" - }, - "autostart" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "Automatic restart after crash (currently ignored)." - }, - "vga" : { "type" : "string", - "optional" : 1, - "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ] + "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", + "format" : "pve-qm-watchdog" }, - "startdate" : { - "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", + "ide[n]" : { "optional" : 1, - "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)", - "default" : "now", - "type" : "string" - }, - "acpi" : { - "type" : "boolean", - "default" : 1, - "description" : "Enable/disable ACPI.", - "optional" : 1 - }, - "scsi[n]" : { + "type" : "string", + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", "format" : { - "cache" : { + "volume" : { + "alias" : "file" + }, + "trans" : { + "format_description" : "none|lba|auto", "enum" : [ "none", - "writethrough", - "writeback", - "unsafe", - "directsync" + "lba", + "auto" ], - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "description" : "The drive's cache mode", + "description" : "Force disk geometry bios translation mode.", "optional" : 1, "type" : "string" }, - "snapshot" : { - "optional" : 1, - "description" : "Whether the drive should be included when making snapshots.", - "format_description" : "on|off", - "type" : "boolean" - }, - "bps" : { - "optional" : 1, + "bps_rd" : { "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", - "type" : "integer" - }, - "mbps_wr_max" : { - "format_description" : "mbps", - "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "type" : "number" + "description" : "Maximum read speed speed in bytes per second.", + "type" : "integer", + "optional" : 1 }, - "iops_rd" : { + "cyls" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "type" : "integer", - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second.", + "optional" : 1 + }, + "mbps" : { + "format_description" : "mbps", + "description" : "Maximum r/w speed speed in megabytes per second.", + "type" : "number", "optional" : 1 }, "werror" : { - "description" : "Write error action.", "format_description" : "enospc|ignore|report|stop", "optional" : 1, + "type" : "string", "enum" : [ "enospc", "ignore", "report", "stop" ], - "type" : "string" - }, - "iops_rd_max" : { - "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "format_description" : "iops", - "type" : "integer" - }, - "volume" : { - "alias" : "file" + "description" : "Write error action." }, - "trans" : { + "aio" : { "optional" : 1, - "format_description" : "none|lba|auto", - "description" : "Force disk geometry bios translation mode.", + "type" : "string", + "description" : "AIO type to use.", "enum" : [ - "none", - "lba", - "auto" + "native", + "threads" ], - "type" : "string" + "format_description" : "native|threads" }, - "iops" : { + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool speed in operations per second.", "optional" : 1, - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops", - "type" : "integer" + "type" : "integer", + "format_description" : "iops" }, - "mbps" : { - "type" : "number", - "description" : "Maximum r/w speed speed in megabytes per second.", + "backup" : { + "format_description" : "on|off", + "type" : "boolean", "optional" : 1, - "format_description" : "mbps" + "description" : "Whether the drive should be included when making backups." }, - "bps_wr" : { - "type" : "integer", - "format_description" : "bps", + "mbps_rd" : { + "format_description" : "mbps", + "description" : "Maximum read speed speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "mbps_wr" : { + "format_description" : "mbps", + "description" : "Maximum write speed speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "model" : { + "type" : "string", "optional" : 1, - "description" : "Maximum write speed speed in bytes per second." + "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", + "format_description" : "model", + "format" : "urlencoded", + "maxLength" : 120 }, "file" : { - "format" : "pve-volume-id-or-qm-path", "type" : "string", - "format_description" : "volume", "description" : "The drive's backing volume.", - "default_key" : 1 + "default_key" : 1, + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume" }, - "discard" : { - "enum" : [ - "ignore", - "on" + "iops" : { + "description" : "Maximum r/w I/O speed in operations per second.", + "optional" : 1, + "type" : "integer", + "format_description" : "iops" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "optional" : 1, + "type" : "number", + "format_description" : "mbps" + }, + "format" : { + "format_description" : "drive format", + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], "optional" : 1, - "format_description" : "ignore|on", - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "type" : "string" }, - "serial" : { - "format_description" : "serial", + "bps" : { + "type" : "integer", "optional" : 1, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "maxLength" : 60, - "type" : "string", - "format" : "urlencoded" + "description" : "Maximum r/w speed speed in bytes per second.", + "format_description" : "bps" }, - "mbps_max" : { - "type" : "number", - "format_description" : "mbps", + "iops_rd_max" : { + "format_description" : "iops", + "type" : "integer", "optional" : 1, - "description" : "Maximum unthrottled r/w pool speed in megabytes per second." + "description" : "Maximum unthrottled read I/O pool speed in operations per second." }, - "iops_max" : { + "heads" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops", "type" : "integer" }, - "aio" : { + "serial" : { + "format_description" : "serial", + "format" : "urlencoded", + "maxLength" : 60, "type" : "string", "optional" : 1, - "format_description" : "native|threads", - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ] + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long." }, - "queues" : { - "type" : "integer", - "minimum" : 2, - "format_description" : "nbqueues", - "description" : "Number of queues.", - "optional" : 1 + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string", + "format_description" : "ignore|on" }, "mbps_rd_max" : { - "type" : "number", - "optional" : 1, "format_description" : "mbps", + "optional" : 1, + "type" : "number", "description" : "Maximum unthrottled read pool speed in megabytes per second." }, - "iops_wr_max" : { - "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "bps_wr" : { + "format_description" : "bps", + "description" : "Maximum write speed speed in bytes per second.", "optional" : 1, "type" : "integer" }, - "iothread" : { - "type" : "boolean", - "description" : "Whether to use iothreads for this drive", + "mbps_max" : { + "format_description" : "mbps", + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "iops_rd" : { + "description" : "Maximum read I/O speed in operations per second.", "optional" : 1, - "format_description" : "off|on" + "type" : "integer", + "format_description" : "iops" }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", - "optional" : 1, "type" : "string", + "optional" : 1, "format" : "disk-size" }, - "bps_rd" : { + "iops_max" : { "type" : "integer", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" - }, - "backup" : { - "description" : "Whether the drive should be included when making backups.", - "optional" : 1, - "format_description" : "on|off", - "type" : "boolean" - }, - "detect_zeroes" : { - "optional" : 1, - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "type" : "boolean" + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", + "format_description" : "iops" }, - "iops_wr" : { - "type" : "integer", + "snapshot" : { + "description" : "Whether the drive should be included when making snapshots.", + "type" : "boolean", "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" + "format_description" : "on|off" }, "media" : { - "optional" : 1, - "description" : "The drive's media type.", "format_description" : "cdrom|disk", + "type" : "string", + "optional" : 1, + "default" : "disk", "enum" : [ "cdrom", "disk" ], - "type" : "string", - "default" : "disk" + "description" : "The drive's media type." }, - "format" : { + "rerror" : { "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "ignore", + "report", + "stop" ], - "description" : "The drive's backing file's data format.", + "description" : "Read error action.", + "type" : "string", "optional" : 1, - "format_description" : "drive format", - "type" : "string" + "format_description" : "ignore|report|stop" }, - "cyls" : { - "format_description" : "count", + "cache" : { + "format_description" : "none|writethrough|writeback|unsafe|directsync", + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "type" : "integer" + "type" : "string" }, - "mbps_wr" : { - "type" : "number", + "iops_wr" : { + "type" : "integer", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum write speed speed in megabytes per second." + "description" : "Maximum write I/O speed in operations per second.", + "format_description" : "iops" }, - "mbps_rd" : { - "type" : "number", + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", - "format_description" : "mbps" - }, - "heads" : { "type" : "integer", - "format_description" : "count", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count." + "format_description" : "count" }, - "secs" : { + "detect_zeroes" : { "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count.", - "format_description" : "count", - "type" : "integer" + "type" : "boolean", + "description" : "Controls whether to detect and try to optimize writes of zeroes." } - }, + } + }, + "lock" : { "type" : "string", "optional" : 1, - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." - }, - "shares" : { - "type" : "integer", - "default" : 1000, - "maximum" : 50000, - "minimum" : 0, - "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", - "optional" : 1 + "enum" : [ + "migrate", + "backup", + "snapshot", + "rollback" + ], + "description" : "Lock/unlock the VM." }, - "smbios1" : { - "optional" : 1, - "maxLength" : 256, - "description" : "Specify SMBIOS type 1 fields.", + "hostpci[n]" : { + "format" : "pve-qm-hostpci", "type" : "string", - "format" : "pve-qm-smbios1" - }, - "delete" : { - "description" : "A list of settings you want to delete.", "optional" : 1, + "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" + }, + "keyboard" : { + "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", + "enum" : [ + "da", + "sv", + "en-gb", + "lt", + "is", + "mk", + "pl", + "hu", + "fr-be", + "pt-br", + "de-ch", + "nl", + "no", + "tr", + "sl", + "de", + "fr-ca", + "ja", + "es", + "it", + "pt", + "fr", + "en-us", + "fi", + "fr-ch" + ], + "default" : "en-us", "type" : "string", - "format" : "pve-configid-list" + "optional" : 1 }, - "memory" : { + "bootdisk" : { + "type" : "string", "optional" : 1, - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", - "minimum" : 16, - "default" : 512, - "type" : "integer" - }, - "description" : { - "type" : "string", - "optional" : 1, - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file." + "pattern" : "(ide|sata|scsi|virtio)\\d+", + "description" : "Enable booting from specified disk.", + "format" : "pve-qm-bootdisk" }, - "onboot" : { + "revert" : { + "description" : "Revert a pending change.", "optional" : 1, - "description" : "Specifies whether a VM will be started during system bootup.", - "type" : "boolean", - "default" : 0 + "type" : "string", + "format" : "pve-configid-list" }, - "localtime" : { + "reboot" : { + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "default" : 1, "type" : "boolean", - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", "optional" : 1 }, - "boot" : { - "default" : "cdn", - "type" : "string", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", + "cpuunits" : { + "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", + "maximum" : 500000, + "default" : 1000, "optional" : 1, - "pattern" : "[acdn]{1,4}" + "type" : "integer", + "minimum" : 0 }, - "startup" : { + "numa" : { + "description" : "Enable/disable NUMA.", + "default" : 0, "optional" : 1, - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "description" : "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.", - "format" : "pve-startup-order", - "type" : "string" - }, - "skiplock" : { - "type" : "boolean", - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1 + "type" : "boolean" }, - "scsihw" : { - "default" : "lsi", - "type" : "string", - "description" : "scsi controller model", + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", "optional" : 1, - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ] + "type" : "string", + "format" : "pve-qm-smbios1", + "maxLength" : 256 }, - "name" : { - "optional" : 1, - "description" : "Set a name for the VM. Only used on the configuration web interface.", - "format" : "dns-name", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 + } + }, + "additionalProperties" : 0 + }, + "name" : "update_vm_async", + "protected" : 1 + }, + "GET" : { + "returns" : { + "type" : "object", + "properties" : { + "digest" : { + "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", "type" : "string" + } + } + }, + "method" : "GET", + "name" : "vm_config", + "parameters" : { + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" }, - "balloon" : { - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", + "current" : { + "description" : "Get current values (instead of pending values).", "optional" : 1, - "type" : "integer", - "minimum" : 0 + "type" : "boolean", + "default" : 0 }, "vmid" : { - "type" : "integer", "format" : "pve-vmid", "minimum" : 1, + "type" : "integer", "description" : "The (unique) ID of the VM." - }, - "revert" : { - "description" : "Revert a pending change.", - "optional" : 1, - "type" : "string", - "format" : "pve-configid-list" } }, "additionalProperties" : 0 }, - "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.", - "returns" : { - "type" : "null" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "method" : "PUT", - "name" : "update_vm" + "proxyto" : "node", + "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API)." }, - "POST" : { + "PUT" : { "parameters" : { + "additionalProperties" : 0, "properties" : { - "tdf" : { - "default" : 0, + "numa" : { + "description" : "Enable/disable NUMA.", "type" : "boolean", - "description" : "Enable/disable time drift fix.", + "optional" : 1, + "default" : 0 + }, + "cpuunits" : { + "type" : "integer", + "optional" : 1, + "maximum" : 500000, + "default" : 1000, + "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", + "minimum" : 0 + }, + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 + }, + "smbios1" : { + "format" : "pve-qm-smbios1", + "maxLength" : 256, + "type" : "string", + "optional" : 1, + "description" : "Specify SMBIOS type 1 fields." + }, + "bootdisk" : { + "format" : "pve-qm-bootdisk", + "description" : "Enable booting from specified disk.", + "pattern" : "(ide|sata|scsi|virtio)\\d+", + "type" : "string", "optional" : 1 }, - "cdrom" : { - "description" : "This is an alias for option -ide2", - "typetext" : "volume", + "revert" : { + "format" : "pve-configid-list", + "description" : "Revert a pending change.", + "optional" : 1, + "type" : "string" + }, + "reboot" : { + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "default" : 1, + "optional" : 1, + "type" : "boolean" + }, + "lock" : { + "enum" : [ + "migrate", + "backup", + "snapshot", + "rollback" + ], + "description" : "Lock/unlock the VM.", "optional" : 1, + "type" : "string" + }, + "hostpci[n]" : { + "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", "type" : "string", - "format" : "pve-qm-drive" + "optional" : 1, + "format" : "pve-qm-hostpci" }, - "sockets" : { - "description" : "The number of CPU sockets.", + "keyboard" : { + "enum" : [ + "da", + "sv", + "en-gb", + "lt", + "is", + "mk", + "pl", + "hu", + "fr-be", + "pt-br", + "de-ch", + "nl", + "no", + "tr", + "sl", + "de", + "fr-ca", + "ja", + "es", + "it", + "pt", + "fr", + "en-us", + "fi", + "fr-ch" + ], + "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", "optional" : 1, - "minimum" : 1, - "type" : "integer", - "default" : 1 + "type" : "string", + "default" : "en-us" }, - "serial[n]" : { - "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "hotplug" : { + "format" : "pve-hotplug-features", + "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", + "default" : "network,disk,usb", "optional" : 1, - "pattern" : "(/dev/.+|socket)", "type" : "string" }, "ide[n]" : { "type" : "string", + "optional" : 1, + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", "format" : { - "cache" : { - "type" : "string", + "mbps_max" : { + "format_description" : "mbps", + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "optional" : 1, - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ] + "type" : "number" }, - "snapshot" : { - "type" : "boolean", + "size" : { + "format" : "disk-size", "optional" : 1, - "description" : "Whether the drive should be included when making snapshots.", - "format_description" : "on|off" + "type" : "string", + "description" : "Disk size. This is purely informational and has no effect." }, - "mbps_wr_max" : { - "type" : "number", - "format_description" : "mbps", + "iops_rd" : { + "format_description" : "iops", + "type" : "integer", "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "description" : "Maximum read I/O speed in operations per second." }, - "bps" : { + "bps_wr" : { "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", + "description" : "Maximum write speed speed in bytes per second.", + "type" : "integer", + "optional" : 1 + }, + "mbps_rd_max" : { "optional" : 1, - "type" : "integer" + "type" : "number", + "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "format_description" : "mbps" }, - "trans" : { - "type" : "string", + "discard" : { + "format_description" : "ignore|on", + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ - "none", - "lba", - "auto" + "ignore", + "on" ], + "type" : "string", + "optional" : 1 + }, + "bps" : { + "type" : "integer", "optional" : 1, - "format_description" : "none|lba|auto", - "description" : "Force disk geometry bios translation mode." + "description" : "Maximum r/w speed speed in bytes per second.", + "format_description" : "bps" + }, + "mbps_wr_max" : { + "format_description" : "mbps", + "type" : "number", + "optional" : 1, + "description" : "Maximum unthrottled write pool speed in megabytes per second." + }, + "format" : { + "format_description" : "drive format", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "description" : "The drive's backing file's data format.", + "type" : "string", + "optional" : 1 }, "iops_rd_max" : { "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "type" : "integer", "optional" : 1, - "format_description" : "iops", - "type" : "integer" + "format_description" : "iops" }, - "volume" : { - "alias" : "file" + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "optional" : 1, + "type" : "string", + "format" : "urlencoded", + "maxLength" : 60, + "format_description" : "serial" }, - "rerror" : { + "heads" : { + "format_description" : "count", "optional" : 1, - "description" : "Read error action.", + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific head count." + }, + "cache" : { + "format_description" : "none|writethrough|writeback|unsafe|directsync", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "description" : "The drive's cache mode", + "type" : "string", + "optional" : 1 + }, + "rerror" : { "format_description" : "ignore|report|stop", + "description" : "Read error action.", "enum" : [ "ignore", "report", "stop" ], + "optional" : 1, "type" : "string" }, - "iops_rd" : { - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second.", + "detect_zeroes" : { "optional" : 1, - "type" : "integer" + "type" : "boolean", + "description" : "Controls whether to detect and try to optimize writes of zeroes." }, - "werror" : { - "description" : "Write error action.", + "iops_wr" : { "optional" : 1, - "format_description" : "enospc|ignore|report|stop", + "type" : "integer", + "description" : "Maximum write I/O speed in operations per second.", + "format_description" : "iops" + }, + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "type" : "integer", + "optional" : 1, + "format_description" : "count" + }, + "media" : { + "format_description" : "cdrom|disk", "enum" : [ - "enospc", - "ignore", - "report", - "stop" + "cdrom", + "disk" ], - "type" : "string" + "description" : "The drive's media type.", + "optional" : 1, + "type" : "string", + "default" : "disk" }, - "discard" : { + "iops_max" : { + "type" : "integer", + "optional" : 1, + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", + "format_description" : "iops" + }, + "snapshot" : { + "format_description" : "on|off", + "description" : "Whether the drive should be included when making snapshots.", + "type" : "boolean", + "optional" : 1 + }, + "mbps" : { + "format_description" : "mbps", + "type" : "number", + "optional" : 1, + "description" : "Maximum r/w speed speed in megabytes per second." + }, + "cyls" : { + "optional" : 1, + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "format_description" : "count" + }, + "bps_rd" : { + "type" : "integer", + "optional" : 1, + "description" : "Maximum read speed speed in bytes per second.", + "format_description" : "bps" + }, + "volume" : { + "alias" : "file" + }, + "trans" : { + "optional" : 1, + "type" : "string", + "description" : "Force disk geometry bios translation mode.", "enum" : [ - "ignore", - "on" + "none", + "lba", + "auto" ], - "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "format_description" : "ignore|on", - "type" : "string" + "format_description" : "none|lba|auto" }, - "serial" : { + "model" : { "format" : "urlencoded", + "maxLength" : 120, + "format_description" : "model", "type" : "string", "optional" : 1, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", - "maxLength" : 60 + "description" : "The drive's reported model name, url-encoded, up to 40 bytes long." }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "format_description" : "mbps", + "iops" : { + "format_description" : "iops", "optional" : 1, - "type" : "number" + "type" : "integer", + "description" : "Maximum r/w I/O speed in operations per second." }, "file" : { + "description" : "The drive's backing volume.", "type" : "string", "format" : "pve-volume-id-or-qm-path", - "default_key" : 1, "format_description" : "volume", - "description" : "The drive's backing volume." + "default_key" : 1 }, - "bps_wr" : { - "description" : "Maximum write speed speed in bytes per second.", + "mbps_wr" : { + "format_description" : "mbps", "optional" : 1, - "format_description" : "bps", - "type" : "integer" + "type" : "number", + "description" : "Maximum write speed speed in megabytes per second." }, - "mbps" : { + "mbps_rd" : { + "description" : "Maximum read speed speed in megabytes per second.", "type" : "number", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second." + "format_description" : "mbps" }, - "iops" : { - "format_description" : "iops", + "backup" : { + "format_description" : "on|off", "optional" : 1, - "description" : "Maximum r/w I/O speed in operations per second.", - "type" : "integer" + "type" : "boolean", + "description" : "Whether the drive should be included when making backups." }, "iops_wr_max" : { "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "type" : "integer", "optional" : 1, - "type" : "integer" + "description" : "Maximum unthrottled write I/O pool speed in operations per second." }, - "size" : { + "werror" : { + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "description" : "Write error action.", "type" : "string", - "format" : "disk-size", - "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect." - }, - "iops_max" : { - "type" : "integer", - "format_description" : "iops", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "optional" : 1 - }, - "mbps_rd_max" : { - "type" : "number", - "format_description" : "mbps", "optional" : 1, - "description" : "Maximum unthrottled read pool speed in megabytes per second." + "format_description" : "enospc|ignore|report|stop" }, "aio" : { - "type" : "string", + "format_description" : "native|threads", "enum" : [ "native", "threads" ], - "optional" : 1, "description" : "AIO type to use.", - "format_description" : "native|threads" - }, - "backup" : { - "type" : "boolean", - "description" : "Whether the drive should be included when making backups.", - "optional" : 1, - "format_description" : "on|off" - }, - "bps_rd" : { - "type" : "integer", - "format_description" : "bps", - "description" : "Maximum read speed speed in bytes per second.", + "type" : "string", "optional" : 1 + } + } + }, + "watchdog" : { + "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", + "optional" : 1, + "type" : "string", + "format" : "pve-qm-watchdog" + }, + "acpi" : { + "default" : 1, + "optional" : 1, + "type" : "boolean", + "description" : "Enable/disable ACPI." + }, + "migrate_downtime" : { + "minimum" : 0, + "type" : "number", + "optional" : 1, + "default" : 0.1, + "description" : "Set maximum tolerated downtime (in seconds) for migrations." + }, + "parallel[n]" : { + "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", + "type" : "string", + "optional" : 1 + }, + "description" : { + "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", + "type" : "string", + "optional" : 1 + }, + "vcpus" : { + "default" : 0, + "optional" : 1, + "type" : "integer", + "description" : "Number of hotplugged vcpus.", + "minimum" : 1 + }, + "serial[n]" : { + "optional" : 1, + "type" : "string", + "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "pattern" : "(/dev/.+|socket)" + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "type" : "string", + "optional" : 1, + "maxLength" : 40 + }, + "startup" : { + "type" : "string", + "optional" : 1, + "description" : "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.", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", + "format" : "pve-startup-order" + }, + "agent" : { + "type" : "boolean", + "optional" : 1, + "default" : 0, + "description" : "Enable/disable Qemu GuestAgent." + }, + "sockets" : { + "minimum" : 1, + "default" : 1, + "optional" : 1, + "type" : "integer", + "description" : "The number of CPU sockets." + }, + "onboot" : { + "description" : "Specifies whether a VM will be started during system bootup.", + "type" : "boolean", + "optional" : 1, + "default" : 0 + }, + "freeze" : { + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "optional" : 1, + "type" : "boolean" + }, + "cores" : { + "default" : 1, + "type" : "integer", + "optional" : 1, + "description" : "The number of cores per socket.", + "minimum" : 1 + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "optional" : 1, + "type" : "string", + "format" : "pve-configid-list" + }, + "name" : { + "format" : "dns-name", + "description" : "Set a name for the VM. Only used on the configuration web interface.", + "optional" : 1, + "type" : "string" + }, + "smp" : { + "description" : "The number of CPUs. Please use option -sockets instead.", + "default" : 1, + "optional" : 1, + "type" : "integer", + "minimum" : 1 + }, + "machine" : { + "maxLength" : 40, + "type" : "string", + "optional" : 1, + "description" : "Specific the Qemu machine type.", + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)" + }, + "net[n]" : { + "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", + "optional" : 1, + "type" : "string", + "format" : "pve-qm-net" + }, + "vga" : { + "type" : "string", + "optional" : 1, + "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", + "enum" : [ + "std", + "cirrus", + "vmware", + "qxl", + "serial0", + "serial1", + "serial2", + "serial3", + "qxl2", + "qxl3", + "qxl4" + ] + }, + "virtio[n]" : { + "type" : "string", + "optional" : 1, + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "format" : { + "bps_wr" : { + "format_description" : "bps", + "description" : "Maximum write speed speed in bytes per second.", + "optional" : 1, + "type" : "integer" }, - "format" : { + "mbps_max" : { + "type" : "number", + "optional" : 1, + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "format_description" : "mbps" + }, + "iops_rd" : { + "format_description" : "iops", + "optional" : 1, + "type" : "integer", + "description" : "Maximum read I/O speed in operations per second." + }, + "size" : { + "optional" : 1, "type" : "string", + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size" + }, + "mbps_wr_max" : { + "optional" : 1, + "type" : "number", + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "format_description" : "mbps" + }, + "bps" : { + "format_description" : "bps", + "description" : "Maximum r/w speed speed in bytes per second.", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "type" : "integer", + "optional" : 1, + "format_description" : "iops" + }, + "format" : { + "format_description" : "drive format", + "description" : "The drive's backing file's data format.", "enum" : [ "raw", "cow", @@ -6866,890 +7208,486 @@ var pveapi = [ "cloop" ], "optional" : 1, - "format_description" : "drive format", - "description" : "The drive's backing file's data format." + "type" : "string" }, - "iops_wr" : { - "description" : "Maximum write I/O speed in operations per second.", + "heads" : { "optional" : 1, - "format_description" : "iops", - "type" : "integer" + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific head count.", + "format_description" : "count" }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "serial" : { "optional" : 1, - "type" : "boolean" - }, - "model" : { + "type" : "string", + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format_description" : "serial", "format" : "urlencoded", + "maxLength" : 60 + }, + "discard" : { "type" : "string", - "format_description" : "model", - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", - "maxLength" : 120, - "optional" : 1 + "optional" : 1, + "enum" : [ + "ignore", + "on" + ], + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "format_description" : "ignore|on" }, - "media" : { + "mbps_rd_max" : { + "type" : "number", "optional" : 1, + "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "format_description" : "mbps" + }, + "media" : { "format_description" : "cdrom|disk", "description" : "The drive's media type.", "enum" : [ "cdrom", "disk" ], - "type" : "string", - "default" : "disk" - }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "cyls" : { - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1, - "format_description" : "count" - }, - "secs" : { - "type" : "integer", + "default" : "disk", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count.", - "format_description" : "count" + "type" : "string" }, - "heads" : { - "type" : "integer", - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific head count.", + "iothread" : { + "format_description" : "off|on", + "description" : "Whether to use iothreads for this drive", + "type" : "boolean", "optional" : 1 }, - "mbps_rd" : { + "rerror" : { + "format_description" : "ignore|report|stop", "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", - "format_description" : "mbps", - "type" : "number" - } - }, - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", - "optional" : 1 - }, - "cpuunits" : { - "optional" : 1, - "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "default" : 1000, - "maximum" : 500000, - "type" : "integer", - "minimum" : 0 - }, - "cpulimit" : { - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", - "optional" : 1, - "default" : 0, - "type" : "number", - "maximum" : 128, - "minimum" : 0 - }, - "lock" : { - "type" : "string", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "optional" : 1, - "description" : "Lock/unlock the VM." - }, - "numa" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "Enable/disable NUMA." - }, - "virtio[n]" : { - "format" : { - "bps_rd" : { - "type" : "integer", - "format_description" : "bps", - "optional" : 1, - "description" : "Maximum read speed speed in bytes per second." - }, - "backup" : { - "description" : "Whether the drive should be included when making backups.", - "optional" : 1, - "format_description" : "on|off", - "type" : "boolean" - }, - "detect_zeroes" : { - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "optional" : 1 + "type" : "string", + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ] }, - "iops_wr" : { - "format_description" : "iops", + "cache" : { + "format_description" : "none|writethrough|writeback|unsafe|directsync", "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", - "type" : "integer" - }, - "media" : { - "default" : "disk", "type" : "string", - "optional" : 1, - "format_description" : "cdrom|disk", - "description" : "The drive's media type.", + "description" : "The drive's cache mode", "enum" : [ - "cdrom", - "disk" + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" ] }, - "format" : { - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "description" : "The drive's backing file's data format.", + "secs" : { + "format_description" : "count", + "type" : "integer", "optional" : 1, - "format_description" : "drive format", - "type" : "string" + "description" : "Force the drive's physical geometry to have a specific sector count." }, - "cyls" : { + "iops_wr" : { + "format_description" : "iops", "type" : "integer", - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1 - }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "description" : "Maximum write I/O speed in operations per second." }, - "mbps_rd" : { - "type" : "number", - "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum read speed speed in megabytes per second." + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "type" : "boolean", + "optional" : 1 }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count", + "iops_max" : { "optional" : 1, - "type" : "integer" - }, - "secs" : { "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific sector count.", - "optional" : 1, - "format_description" : "count" + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", + "format_description" : "iops" }, "snapshot" : { - "type" : "boolean", - "optional" : 1, "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots." - }, - "cache" : { - "type" : "string", - "optional" : 1, - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ] - }, - "mbps_wr_max" : { - "type" : "number", - "format_description" : "mbps", - "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "description" : "Whether the drive should be included when making snapshots.", + "type" : "boolean", + "optional" : 1 }, - "bps" : { + "bps_rd" : { "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", "optional" : 1, - "type" : "integer" + "type" : "integer", + "description" : "Maximum read speed speed in bytes per second." }, - "iops_rd" : { + "cyls" : { "type" : "integer", "optional" : 1, - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second." + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "format_description" : "count" }, - "werror" : { - "type" : "string", + "mbps" : { + "format_description" : "mbps", "optional" : 1, - "format_description" : "enospc|ignore|report|stop", - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ] + "type" : "number", + "description" : "Maximum r/w speed speed in megabytes per second." }, "volume" : { "alias" : "file" }, - "iops_rd_max" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "format_description" : "iops" - }, "trans" : { + "description" : "Force disk geometry bios translation mode.", "enum" : [ "none", "lba", "auto" ], "optional" : 1, - "description" : "Force disk geometry bios translation mode.", - "format_description" : "none|lba|auto", - "type" : "string" - }, - "rerror" : { - "optional" : 1, - "description" : "Read error action.", - "format_description" : "ignore|report|stop", - "enum" : [ - "ignore", - "report", - "stop" - ], - "type" : "string" + "type" : "string", + "format_description" : "none|lba|auto" }, - "iops" : { - "type" : "integer", + "mbps_rd" : { + "type" : "number", "optional" : 1, - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops" + "description" : "Maximum read speed speed in megabytes per second.", + "format_description" : "mbps" }, - "mbps" : { - "description" : "Maximum r/w speed speed in megabytes per second.", + "mbps_wr" : { + "type" : "number", "optional" : 1, - "format_description" : "mbps", - "type" : "number" - }, - "bps_wr" : { - "type" : "integer", - "description" : "Maximum write speed speed in bytes per second.", - "format_description" : "bps", - "optional" : 1 + "description" : "Maximum write speed speed in megabytes per second.", + "format_description" : "mbps" }, "file" : { "description" : "The drive's backing volume.", - "format_description" : "volume", - "default_key" : 1, + "type" : "string", "format" : "pve-volume-id-or-qm-path", - "type" : "string" + "format_description" : "volume", + "default_key" : 1 }, - "serial" : { - "format" : "urlencoded", - "type" : "string", + "iops" : { + "format_description" : "iops", + "type" : "integer", "optional" : 1, - "maxLength" : 60, - "format_description" : "serial", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long." + "description" : "Maximum r/w I/O speed in operations per second." }, - "mbps_max" : { + "werror" : { "optional" : 1, - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "format_description" : "mbps", - "type" : "number" - }, - "discard" : { "type" : "string", - "format_description" : "ignore|on", - "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ + "enospc", "ignore", - "on" - ] - }, - "iops_max" : { - "optional" : 1, - "format_description" : "iops", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "type" : "integer" + "report", + "stop" + ], + "description" : "Write error action.", + "format_description" : "enospc|ignore|report|stop" }, "aio" : { - "description" : "AIO type to use.", - "optional" : 1, "format_description" : "native|threads", + "optional" : 1, + "type" : "string", + "description" : "AIO type to use.", "enum" : [ "native", "threads" - ], - "type" : "string" - }, - "mbps_rd_max" : { - "format_description" : "mbps", - "optional" : 1, - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number" + ] }, "iops_wr_max" : { + "type" : "integer", "optional" : 1, "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "format_description" : "iops", - "type" : "integer" - }, - "iothread" : { - "format_description" : "off|on", - "description" : "Whether to use iothreads for this drive", - "optional" : 1, - "type" : "boolean" - }, - "size" : { - "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect.", - "type" : "string", - "format" : "disk-size" - } - }, - "type" : "string", - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", - "optional" : 1 - }, - "bios" : { - "type" : "string", - "default" : "seabios", - "enum" : [ - "seabios", - "ovmf" - ], - "optional" : 1, - "description" : "Select BIOS implementation." - }, - "agent" : { - "default" : 0, - "type" : "boolean", - "description" : "Enable/disable Qemu GuestAgent.", - "optional" : 1 - }, - "parallel[n]" : { - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "optional" : 1, - "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "type" : "string" - }, - "tablet" : { - "type" : "boolean", - "default" : 1, - "optional" : 1, - "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)." - }, - "usb[n]" : { - "format" : { - "host" : { - "format" : "pve-qm-usb-device", - "type" : "string", - "format_description" : "HOSTUSBDEVICE|spice", - "description" : "The Host USB device or port or the value spice", - "default_key" : 1 + "format_description" : "iops" }, - "usb3" : { + "backup" : { + "type" : "boolean", "optional" : 1, - "description" : "Specifies whether if given host option is a USB3 device or port", - "format_description" : "yes|no", - "type" : "boolean" + "description" : "Whether the drive should be included when making backups.", + "format_description" : "on|off" } - }, - "type" : "string", - "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", - "optional" : 1 - }, - "smp" : { - "type" : "integer", - "default" : 1, - "minimum" : 1, - "description" : "The number of CPUs. Please use option -sockets instead.", - "optional" : 1 - }, - "hostpci[n]" : { - "format" : "pve-qm-hostpci", - "type" : "string", - "optional" : 1, - "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" - }, - "kvm" : { - "type" : "boolean", - "default" : 1, - "optional" : 1, - "description" : "Enable/disable KVM hardware virtualization." - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "ostype" : { - "type" : "string", - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "l24", - "l26", - "solaris" - ], - "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", - "optional" : 1 - }, - "unused[n]" : { - "format" : "pve-volume-id", - "type" : "string", - "optional" : 1, - "description" : "Reference to unused volumes." - }, - "template" : { - "type" : "boolean", - "default" : 0, - "description" : "Enable/disable Template.", - "optional" : 1 - }, - "watchdog" : { - "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", - "optional" : 1, - "type" : "string", - "format" : "pve-qm-watchdog" - }, - "args" : { - "type" : "string", - "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", - "optional" : 1 - }, - "protection" : { - "description" : "Sets the protection flag of the VM. This will prevent the remove operation.", - "optional" : 1, - "type" : "boolean", - "default" : 0 - }, - "reboot" : { - "optional" : 1, - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "type" : "boolean", - "default" : 1 - }, - "hotplug" : { - "optional" : 1, - "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", - "type" : "string", - "default" : "network,disk,usb", - "format" : "pve-hotplug-features" - }, - "machine" : { - "description" : "Specific the Qemu machine type.", - "optional" : 1, - "maxLength" : 40, - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "type" : "string" + } }, - "migrate_speed" : { + "balloon" : { + "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", "type" : "integer", - "default" : 0, - "minimum" : 0, "optional" : 1, - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit." + "minimum" : 0 }, - "background_delay" : { - "type" : "integer", - "maximum" : 30, - "minimum" : 1, + "scsi[n]" : { "optional" : 1, - "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time." - }, - "sata[n]" : { "type" : "string", + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", "format" : { - "snapshot" : { - "type" : "boolean", - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1 + "heads" : { + "optional" : 1, + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific head count.", + "format_description" : "count" }, - "cache" : { + "serial" : { + "optional" : 1, "type" : "string", - "format_description" : "none|writethrough|writeback|unsafe|directsync", + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format_description" : "serial", + "maxLength" : 60, + "format" : "urlencoded" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool speed in operations per second.", "optional" : 1, - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ] + "type" : "integer", + "format_description" : "iops" }, "bps" : { - "description" : "Maximum r/w speed speed in bytes per second.", - "format_description" : "bps", "optional" : 1, - "type" : "integer" + "type" : "integer", + "description" : "Maximum r/w speed speed in bytes per second.", + "format_description" : "bps" }, "mbps_wr_max" : { "type" : "number", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "format_description" : "mbps" }, - "iops_rd" : { - "type" : "integer", + "format" : { + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "description" : "The drive's backing file's data format.", + "type" : "string", "optional" : 1, - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second." + "format_description" : "drive format" }, - "werror" : { - "description" : "Write error action.", - "optional" : 1, - "format_description" : "enospc|ignore|report|stop", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "type" : "string" - }, - "volume" : { - "alias" : "file" - }, - "iops_rd_max" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "format_description" : "iops" - }, - "trans" : { - "type" : "string", - "enum" : [ - "none", - "lba", - "auto" - ], - "format_description" : "none|lba|auto", - "description" : "Force disk geometry bios translation mode.", - "optional" : 1 - }, - "rerror" : { + "discard" : { + "format_description" : "ignore|on", "type" : "string", - "description" : "Read error action.", "optional" : 1, - "format_description" : "ignore|report|stop", + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ "ignore", - "report", - "stop" + "on" ] }, - "iops" : { - "type" : "integer", - "format_description" : "iops", - "description" : "Maximum r/w I/O speed in operations per second.", - "optional" : 1 + "mbps_rd_max" : { + "format_description" : "mbps", + "optional" : 1, + "type" : "number", + "description" : "Maximum unthrottled read pool speed in megabytes per second." }, "bps_wr" : { - "type" : "integer", - "description" : "Maximum write speed speed in bytes per second.", "format_description" : "bps", + "description" : "Maximum write speed speed in bytes per second.", + "type" : "integer", "optional" : 1 }, - "mbps" : { - "type" : "number", - "description" : "Maximum r/w speed speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1 - }, - "file" : { - "default_key" : 1, - "description" : "The drive's backing volume.", - "format_description" : "volume", - "type" : "string", - "format" : "pve-volume-id-or-qm-path" + "iops_rd" : { + "format_description" : "iops", + "type" : "integer", + "optional" : 1, + "description" : "Maximum read I/O speed in operations per second." }, - "serial" : { - "maxLength" : 60, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", "optional" : 1, - "format_description" : "serial", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "type" : "string" + "type" : "string", + "format" : "disk-size" }, "mbps_max" : { "format_description" : "mbps", - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "type" : "number", "optional" : 1, - "type" : "number" + "description" : "Maximum unthrottled r/w pool speed in megabytes per second." }, - "discard" : { - "enum" : [ - "ignore", - "on" - ], + "snapshot" : { "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "format_description" : "ignore|on", - "type" : "string" + "type" : "boolean", + "description" : "Whether the drive should be included when making snapshots.", + "format_description" : "on|off" }, "iops_max" : { + "format_description" : "iops", + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", "type" : "integer", + "optional" : 1 + }, + "iothread" : { + "format_description" : "off|on", + "type" : "boolean", "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" + "description" : "Whether to use iothreads for this drive" }, - "aio" : { - "type" : "string", + "media" : { + "format_description" : "cdrom|disk", "enum" : [ - "native", - "threads" + "cdrom", + "disk" ], + "description" : "The drive's media type.", + "type" : "string", "optional" : 1, - "format_description" : "native|threads", - "description" : "AIO type to use." + "default" : "disk" }, - "mbps_rd_max" : { + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "type" : "integer", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number" + "format_description" : "count" }, - "iops_wr_max" : { - "optional" : 1, + "iops_wr" : { "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "description" : "Maximum write I/O speed in operations per second.", + "optional" : 1, "type" : "integer" }, - "size" : { + "detect_zeroes" : { + "optional" : 1, + "type" : "boolean", + "description" : "Controls whether to detect and try to optimize writes of zeroes." + }, + "cache" : { "type" : "string", - "format" : "disk-size", "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect." + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "format_description" : "none|writethrough|writeback|unsafe|directsync" }, - "bps_rd" : { - "description" : "Maximum read speed speed in bytes per second.", + "trans" : { "optional" : 1, - "format_description" : "bps", - "type" : "integer" + "type" : "string", + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ], + "format_description" : "none|lba|auto" }, - "backup" : { - "type" : "boolean", - "description" : "Whether the drive should be included when making backups.", + "volume" : { + "alias" : "file" + }, + "bps_rd" : { + "format_description" : "bps", "optional" : 1, - "format_description" : "on|off" + "type" : "integer", + "description" : "Maximum read speed speed in bytes per second." }, - "detect_zeroes" : { - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "optional" : 1 + "queues" : { + "format_description" : "nbqueues", + "minimum" : 2, + "description" : "Number of queues.", + "optional" : 1, + "type" : "integer" }, - "iops_wr" : { + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "type" : "integer", "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" + "format_description" : "count" }, - "media" : { - "format_description" : "cdrom|disk", + "mbps" : { + "description" : "Maximum r/w speed speed in megabytes per second.", + "type" : "number", "optional" : 1, - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], - "default" : "disk", - "type" : "string" + "format_description" : "mbps" }, - "format" : { - "description" : "The drive's backing file's data format.", - "format_description" : "drive format", + "aio" : { "optional" : 1, + "type" : "string", "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "native", + "threads" ], - "type" : "string" + "description" : "AIO type to use.", + "format_description" : "native|threads" }, - "cyls" : { - "format_description" : "count", + "werror" : { + "format_description" : "enospc|ignore|report|stop", + "type" : "string", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "type" : "integer" + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ] }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", - "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "iops_wr_max" : { + "format_description" : "iops", + "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "type" : "integer", + "optional" : 1 + }, + "backup" : { + "format_description" : "on|off", + "description" : "Whether the drive should be included when making backups.", + "type" : "boolean", + "optional" : 1 }, "mbps_rd" : { - "type" : "number", - "optional" : 1, "format_description" : "mbps", + "optional" : 1, + "type" : "number", "description" : "Maximum read speed speed in megabytes per second." }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", + "mbps_wr" : { + "format_description" : "mbps", + "type" : "number", "optional" : 1, - "format_description" : "count", - "type" : "integer" + "description" : "Maximum write speed speed in megabytes per second." }, - "secs" : { - "type" : "integer", + "file" : { + "format_description" : "volume", + "format" : "pve-volume-id-or-qm-path", + "default_key" : 1, + "description" : "The drive's backing volume.", + "type" : "string" + }, + "iops" : { "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count.", - "format_description" : "count" + "type" : "integer", + "description" : "Maximum r/w I/O speed in operations per second.", + "format_description" : "iops" } - }, - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", - "optional" : 1 - }, - "bootdisk" : { - "type" : "string", - "format" : "pve-qm-bootdisk", - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "optional" : 1, - "description" : "Enable booting from specified disk." - }, - "migrate_downtime" : { - "minimum" : 0, - "type" : "number", - "default" : 0.1, - "description" : "Set maximum tolerated downtime (in seconds) for migrations.", - "optional" : 1 - }, - "cores" : { - "minimum" : 1, - "type" : "integer", - "default" : 1, - "optional" : 1, - "description" : "The number of cores per socket." - }, - "net[n]" : { - "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", - "optional" : 1, - "type" : "string", - "format" : "pve-qm-net" - }, - "freeze" : { - "type" : "boolean", - "optional" : 1, - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution)." - }, - "keyboard" : { - "optional" : 1, - "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", - "enum" : [ - "en-gb", - "de-ch", - "en-us", - "mk", - "fr-be", - "de", - "pt-br", - "sv", - "fr-ch", - "no", - "pt", - "hu", - "sl", - "lt", - "fi", - "it", - "nl", - "is", - "da", - "fr-ca", - "pl", - "fr", - "es", - "ja", - "tr" - ], - "default" : "en-us", - "type" : "string" - }, - "digest" : { - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "type" : "string" + } }, - "vcpus" : { - "description" : "Number of hotplugged vcpus.", - "optional" : 1, + "protection" : { "default" : 0, - "type" : "integer", - "minimum" : 1 - }, - "memory" : { - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", "optional" : 1, - "minimum" : 16, - "type" : "integer", - "default" : 512 - }, - "localtime" : { - "type" : "boolean", - "optional" : 1, - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS." - }, - "onboot" : { - "default" : 0, "type" : "boolean", - "description" : "Specifies whether a VM will be started during system bootup.", - "optional" : 1 - }, - "description" : { - "optional" : 1, - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", - "type" : "string" + "description" : "Sets the protection flag of the VM. This will prevent the remove operation." }, - "startup" : { - "format" : "pve-startup-order", + "usb[n]" : { "type" : "string", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "optional" : 1, - "description" : "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." - }, - "boot" : { - "pattern" : "[acdn]{1,4}", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", - "optional" : 1, - "default" : "cdn", - "type" : "string" - }, - "skiplock" : { - "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option.", - "type" : "boolean" - }, - "name" : { "optional" : 1, - "description" : "Set a name for the VM. Only used on the configuration web interface.", - "format" : "dns-name", - "type" : "string" + "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", + "format" : { + "host" : { + "description" : "The Host USB device or port or the value spice", + "type" : "string", + "format_description" : "HOSTUSBDEVICE|spice", + "format" : "pve-qm-usb-device", + "default_key" : 1 + }, + "usb3" : { + "description" : "Specifies whether if given host option is a USB3 device or port", + "optional" : 1, + "type" : "boolean", + "format_description" : "yes|no" + } + } }, "scsihw" : { + "description" : "scsi controller model", "enum" : [ "lsi", "lsi53c810", @@ -7758,80 +7696,26 @@ var pveapi = [ "megasas", "pvscsi" ], + "default" : "lsi", "optional" : 1, - "description" : "scsi controller model", - "type" : "string", - "default" : "lsi" - }, - "balloon" : { - "type" : "integer", - "minimum" : 0, - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", - "optional" : 1 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" - }, - "revert" : { - "optional" : 1, - "description" : "Revert a pending change.", - "format" : "pve-configid-list", "type" : "string" }, - "force" : { - "requires" : "delete", - "type" : "boolean", - "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", - "optional" : 1 - }, - "numa[n]" : { - "description" : "numa topology", + "cdrom" : { "optional" : 1, "type" : "string", - "format" : { - "cpus" : { - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "description" : "CPUs accessing this numa node.", - "format_description" : "id[-id];...", - "type" : "string" - }, - "memory" : { - "type" : "number", - "optional" : 1, - "description" : "Amount of memory this numa node provides.", - "format_description" : "mb" - }, - "hostnodes" : { - "type" : "string", - "description" : "host numa nodes to use", - "format_description" : "id[-id];...", - "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" - }, - "policy" : { - "enum" : [ - "preferred", - "bind", - "interleave" - ], - "optional" : 1, - "format_description" : "preferred|bind|interleave", - "description" : "numa allocation policy.", - "type" : "string" - } - } + "description" : "This is an alias for option -ide2", + "typetext" : "volume", + "format" : "pve-qm-drive" }, "cpu" : { - "optional" : 1, "description" : "Emulated CPU type.", + "optional" : 1, "type" : "string", "format" : { "cputype" : { - "type" : "string", "default" : "kvm64", + "type" : "string", + "description" : "Emulated CPU type.", "enum" : [ "486", "athlon", @@ -7862,332 +7746,443 @@ var pveapi = [ "Opteron_G5", "host" ], - "format_description" : "cputype", - "description" : "Emulated CPU type.", - "default_key" : 1 + "default_key" : 1, + "format_description" : "cputype" }, "hidden" : { - "optional" : 1, "description" : "Do not identify as a KVM virtual machine.", + "optional" : 1, "type" : "boolean", "default" : 0 } } }, - "autostart" : { - "optional" : 1, - "description" : "Automatic restart after crash (currently ignored).", + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "type" : "boolean", - "default" : 0 + "optional" : 1 }, - "vga" : { - "type" : "string", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ], + "memory" : { + "minimum" : 16, + "type" : "integer", "optional" : 1, - "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal." + "default" : 512, + "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device." }, - "startdate" : { - "default" : "now", - "type" : "string", - "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)", + "args" : { + "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", "optional" : 1, - "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)" + "type" : "string" }, - "acpi" : { + "template" : { "optional" : 1, - "description" : "Enable/disable ACPI.", "type" : "boolean", - "default" : 1 + "default" : 0, + "description" : "Enable/disable Template." }, - "scsi[n]" : { + "bios" : { + "enum" : [ + "seabios", + "ovmf" + ], + "description" : "Select BIOS implementation.", + "type" : "string", + "optional" : 1, + "default" : "seabios" + }, + "shares" : { + "default" : 1000, + "maximum" : 50000, + "optional" : 1, + "type" : "integer", + "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", + "minimum" : 0 + }, + "ostype" : { + "enum" : [ + "other", + "wxp", + "w2k", + "w2k3", + "w2k8", + "wvista", + "win7", + "win8", + "l24", + "l26", + "solaris" + ], + "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", + "optional" : 1, + "type" : "string" + }, + "unused[n]" : { + "type" : "string", + "optional" : 1, + "description" : "Reference to unused volumes.", + "format" : "pve-volume-id" + }, + "boot" : { + "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", + "pattern" : "[acdn]{1,4}", + "default" : "cdn", + "optional" : 1, + "type" : "string" + }, + "numa[n]" : { + "description" : "numa topology", + "type" : "string", + "optional" : 1, "format" : { - "secs" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", + "hostnodes" : { + "format_description" : "id[-id];...", + "type" : "string", "optional" : 1, - "type" : "integer" + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "description" : "host numa nodes to use" }, - "heads" : { + "cpus" : { + "format_description" : "id[-id];...", + "type" : "string", + "description" : "CPUs accessing this numa node.", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" + }, + "policy" : { + "type" : "string", + "optional" : 1, + "enum" : [ + "preferred", + "bind", + "interleave" + ], + "description" : "numa allocation policy.", + "format_description" : "preferred|bind|interleave" + }, + "memory" : { + "format_description" : "mb", + "description" : "Amount of memory this numa node provides.", + "optional" : 1, + "type" : "number" + } + } + }, + "autostart" : { + "default" : 0, + "type" : "boolean", + "optional" : 1, + "description" : "Automatic restart after crash (currently ignored)." + }, + "tdf" : { + "optional" : 1, + "type" : "boolean", + "default" : 0, + "description" : "Enable/disable time drift fix." + }, + "tablet" : { + "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", + "default" : 1, + "type" : "boolean", + "optional" : 1 + }, + "cpulimit" : { + "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", + "type" : "number", + "optional" : 1, + "default" : 0, + "maximum" : 128, + "minimum" : 0 + }, + "kvm" : { + "default" : 1, + "type" : "boolean", + "optional" : 1, + "description" : "Enable/disable KVM hardware virtualization." + }, + "sata[n]" : { + "format" : { + "file" : { + "type" : "string", + "description" : "The drive's backing volume.", + "default_key" : 1, + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume" + }, + "iops" : { + "description" : "Maximum r/w I/O speed in operations per second.", "type" : "integer", "optional" : 1, - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific head count." + "format_description" : "iops" }, "mbps_rd" : { - "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", "format_description" : "mbps", - "type" : "number" + "type" : "number", + "optional" : 1, + "description" : "Maximum read speed speed in megabytes per second." }, "mbps_wr" : { "description" : "Maximum write speed speed in megabytes per second.", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "type" : "number", + "format_description" : "mbps" }, - "cyls" : { + "iops_wr_max" : { "type" : "integer", "optional" : 1, - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific cylinder count." + "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "format_description" : "iops" }, - "format" : { - "type" : "string", + "backup" : { + "format_description" : "on|off", + "description" : "Whether the drive should be included when making backups.", + "type" : "boolean", + "optional" : 1 + }, + "aio" : { + "format_description" : "native|threads", "optional" : 1, - "format_description" : "drive format", - "description" : "The drive's backing file's data format.", + "type" : "string", + "description" : "AIO type to use.", "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "native", + "threads" ] }, - "iops_wr" : { - "format_description" : "iops", - "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", - "type" : "integer" - }, - "detect_zeroes" : { - "type" : "boolean", - "optional" : 1, - "description" : "Controls whether to detect and try to optimize writes of zeroes." - }, - "media" : { + "werror" : { "type" : "string", - "default" : "disk", - "format_description" : "cdrom|disk", - "description" : "The drive's media type.", "optional" : 1, + "description" : "Write error action.", "enum" : [ - "cdrom", - "disk" - ] + "enospc", + "ignore", + "report", + "stop" + ], + "format_description" : "enospc|ignore|report|stop" }, - "backup" : { - "type" : "boolean", - "description" : "Whether the drive should be included when making backups.", + "cyls" : { + "type" : "integer", "optional" : 1, - "format_description" : "on|off" + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "format_description" : "count" + }, + "mbps" : { + "format_description" : "mbps", + "optional" : 1, + "type" : "number", + "description" : "Maximum r/w speed speed in megabytes per second." }, "bps_rd" : { + "description" : "Maximum read speed speed in bytes per second.", "type" : "integer", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", "format_description" : "bps" }, - "iops_wr_max" : { - "type" : "integer", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "format_description" : "iops", + "trans" : { + "format_description" : "none|lba|auto", + "enum" : [ + "none", + "lba", + "auto" + ], + "description" : "Force disk geometry bios translation mode.", + "type" : "string", "optional" : 1 }, - "size" : { - "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect.", - "type" : "string", - "format" : "disk-size" + "volume" : { + "alias" : "file" }, - "iothread" : { - "type" : "boolean", + "iops_wr" : { + "format_description" : "iops", + "description" : "Maximum write I/O speed in operations per second.", "optional" : 1, - "description" : "Whether to use iothreads for this drive", - "format_description" : "off|on" + "type" : "integer" }, - "iops_max" : { - "type" : "integer", - "format_description" : "iops", + "secs" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." + "type" : "integer" }, - "mbps_rd_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "optional" : 1, - "type" : "number" + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "type" : "boolean", + "optional" : 1 }, - "aio" : { + "rerror" : { + "format_description" : "ignore|report|stop", + "optional" : 1, "type" : "string", "enum" : [ - "native", - "threads" + "ignore", + "report", + "stop" ], - "optional" : 1, - "format_description" : "native|threads", - "description" : "AIO type to use." + "description" : "Read error action." }, - "queues" : { - "minimum" : 2, - "type" : "integer", + "cache" : { + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "description" : "The drive's cache mode", "optional" : 1, - "format_description" : "nbqueues", - "description" : "Number of queues." - }, - "discard" : { "type" : "string", + "format_description" : "none|writethrough|writeback|unsafe|directsync" + }, + "media" : { + "description" : "The drive's media type.", "enum" : [ - "ignore", - "on" + "cdrom", + "disk" ], + "default" : "disk", "optional" : 1, - "format_description" : "ignore|on", - "description" : "Controls whether to pass discard/trim requests to the underlying storage." + "type" : "string", + "format_description" : "cdrom|disk" }, - "serial" : { + "snapshot" : { + "description" : "Whether the drive should be included when making snapshots.", + "type" : "boolean", "optional" : 1, - "format_description" : "serial", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "maxLength" : 60, - "type" : "string", - "format" : "urlencoded" + "format_description" : "on|off" }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "iops_max" : { + "type" : "integer", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", + "format_description" : "iops" }, - "file" : { - "description" : "The drive's backing volume.", - "format_description" : "volume", - "default_key" : 1, - "format" : "pve-volume-id-or-qm-path", - "type" : "string" + "iops_rd" : { + "format_description" : "iops", + "type" : "integer", + "optional" : 1, + "description" : "Maximum read I/O speed in operations per second." }, - "mbps" : { + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "type" : "string", + "optional" : 1, + "format" : "disk-size" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "type" : "number", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second." + "format_description" : "mbps" }, "bps_wr" : { - "format_description" : "bps", "description" : "Maximum write speed speed in bytes per second.", "optional" : 1, - "type" : "integer" - }, - "iops" : { - "description" : "Maximum r/w I/O speed in operations per second.", - "optional" : 1, - "format_description" : "iops", - "type" : "integer" + "type" : "integer", + "format_description" : "bps" }, - "trans" : { + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ - "none", - "lba", - "auto" + "ignore", + "on" ], + "type" : "string", "optional" : 1, - "description" : "Force disk geometry bios translation mode.", - "format_description" : "none|lba|auto", - "type" : "string" - }, - "volume" : { - "alias" : "file" + "format_description" : "ignore|on" }, - "iops_rd_max" : { + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool speed in megabytes per second.", "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "format_description" : "iops", - "type" : "integer" + "type" : "number", + "format_description" : "mbps" }, - "iops_rd" : { - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second.", + "heads" : { + "type" : "integer", "optional" : 1, - "type" : "integer" + "description" : "Force the drive's physical geometry to have a specific head count.", + "format_description" : "count" }, - "werror" : { - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "format_description" : "enospc|ignore|report|stop", + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", "optional" : 1, - "description" : "Write error action.", - "type" : "string" + "type" : "string", + "format" : "urlencoded", + "maxLength" : 60, + "format_description" : "serial" }, - "cache" : { + "format" : { + "format_description" : "drive format", + "description" : "The drive's backing file's data format.", "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "optional" : 1, - "description" : "The drive's cache mode", - "type" : "string" - }, - "snapshot" : { - "type" : "boolean", - "optional" : 1, - "description" : "Whether the drive should be included when making snapshots.", - "format_description" : "on|off" + "type" : "string", + "optional" : 1 }, "bps" : { - "type" : "integer", "optional" : 1, + "type" : "integer", "description" : "Maximum r/w speed speed in bytes per second.", "format_description" : "bps" }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "optional" : 1, + "type" : "integer", + "format_description" : "iops" + }, "mbps_wr_max" : { + "optional" : 1, "type" : "number", "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "optional" : 1, "format_description" : "mbps" } }, + "optional" : 1, "type" : "string", + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5)." + }, + "localtime" : { + "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "type" : "boolean", + "optional" : 1 + }, + "migrate_speed" : { + "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", + "default" : 0, "optional" : 1, - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." + "type" : "integer", + "minimum" : 0 }, - "delete" : { + "startdate" : { + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)", "type" : "string", - "format" : "pve-configid-list", "optional" : 1, - "description" : "A list of settings you want to delete." + "default" : "now", + "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", + "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'." }, - "shares" : { - "minimum" : 0, - "type" : "integer", - "maximum" : 50000, - "default" : 1000, - "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", + "force" : { + "requires" : "delete", + "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", + "type" : "boolean", "optional" : 1 }, - "smbios1" : { + "node" : { "type" : "string", - "format" : "pve-qm-smbios1", - "optional" : 1, - "description" : "Specify SMBIOS type 1 fields.", - "maxLength" : 256 + "description" : "The cluster node name.", + "format" : "pve-node" } - }, - "additionalProperties" : 0 + } }, - "proxyto" : "node", + "name" : "update_vm", + "protected" : 1, + "method" : "PUT", "permissions" : { "check" : [ "perm", @@ -8205,104 +8200,37 @@ var pveapi = [ 1 ] }, - "protected" : 1, - "method" : "POST", - "name" : "update_vm_async", + "proxyto" : "node", + "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.", "returns" : { - "optional" : 1, - "type" : "string" - }, - "description" : "Set virtual machine options (asynchrounous API)." - }, + "type" : "null" + } + } + }, + "text" : "config" + }, + { + "info" : { "GET" : { - "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "method" : "GET", - "name" : "vm_config", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "current" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "Get current values (instead of pending values)." - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - } - }, - "returns" : { - "properties" : { - "digest" : { - "type" : "string", - "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications." - } - }, - "type" : "object" - } - } - }, - "text" : "config", - "leaf" : 1 - }, - { - "info" : { - "GET" : { - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", "returns" : { "type" : "array", "items" : { "properties" : { - "delete" : { - "optional" : 1, - "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.", - "maximum" : 2, - "type" : "integer", - "minimum" : 0 - }, "key" : { - "type" : "string", - "description" : "Configuration option name." + "description" : "Configuration option name.", + "type" : "string" }, "value" : { - "type" : "string", + "description" : "Current value.", + "optional" : 1, + "type" : "string" + }, + "delete" : { + "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.", + "type" : "integer", "optional" : 1, - "description" : "Current value." + "maximum" : 2, + "minimum" : 0 }, "pending" : { "type" : "string", @@ -8313,8 +8241,23 @@ var pveapi = [ "type" : "object" } }, - "name" : "vm_pending", "method" : "GET", + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + } + }, + "additionalProperties" : 0 + }, "permissions" : { "check" : [ "perm", @@ -8324,25 +8267,24 @@ var pveapi = [ ] ] }, + "name" : "vm_pending", + "proxyto" : "node", "description" : "Get virtual machine configuration, including pending changes." } }, - "path" : "/nodes/{node}/qemu/{vmid}/pending", "text" : "pending", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/pending" }, { - "leaf" : 1, "text" : "unlink", - "path" : "/nodes/{node}/qemu/{vmid}/unlink", "info" : { "PUT" : { - "description" : "Unlink/delete disk images.", "returns" : { "type" : "null" }, - "method" : "PUT", - "name" : "unlink", + "description" : "Unlink/delete disk images.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -8352,41 +8294,47 @@ var pveapi = [ ] ] }, + "method" : "PUT", "protected" : 1, + "name" : "unlink", "parameters" : { "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "force" : { + "type" : "boolean", + "optional" : 1, + "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal." + }, "idlist" : { "description" : "A list of disk IDs you want to delete.", "type" : "string", "format" : "pve-configid-list" }, "vmid" : { - "minimum" : 1, "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - }, - "force" : { - "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", - "optional" : 1, - "type" : "boolean" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" } }, "additionalProperties" : 0 - }, - "proxyto" : "node" + } } - } + }, + "path" : "/nodes/{node}/qemu/{vmid}/unlink", + "leaf" : 1 }, { + "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/vncproxy", "info" : { "POST" : { + "protected" : 1, + "description" : "Creates a TCP VNC proxy connections.", "permissions" : { "check" : [ "perm", @@ -8396,141 +8344,142 @@ var pveapi = [ ] ] }, - "description" : "Creates a TCP VNC proxy connections.", - "protected" : 1, - "method" : "POST", - "name" : "vncproxy", "parameters" : { - "additionalProperties" : 0, "properties" : { "vmid" : { + "description" : "The (unique) ID of the VM.", "type" : "integer", - "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "websocket" : { - "description" : "starts websockify instead of vncproxy", - "optional" : 1, - "type" : "boolean" + "format" : "pve-vmid" }, "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" + }, + "websocket" : { + "description" : "starts websockify instead of vncproxy", + "type" : "boolean", + "optional" : 1 } - } + }, + "additionalProperties" : 0 }, + "name" : "vncproxy", + "method" : "POST", "returns" : { + "additionalProperties" : 0, "properties" : { - "upid" : { - "type" : "string" - }, - "ticket" : { + "cert" : { "type" : "string" }, - "user" : { + "upid" : { "type" : "string" }, "port" : { "type" : "integer" }, - "cert" : { + "ticket" : { + "type" : "string" + }, + "user" : { "type" : "string" } - }, - "additionalProperties" : 0 + } } } }, - "text" : "vncproxy", - "leaf" : 1 + "text" : "vncproxy" }, { - "leaf" : 1, - "text" : "vncwebsocket", "info" : { "GET" : { - "method" : "GET", - "name" : "vncwebsocket", - "returns" : { - "type" : "object", - "properties" : { - "port" : { - "type" : "string" - } - } + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ], + "description" : "You also need to pass a valid ticket (vncticket)." }, "parameters" : { "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - }, "port" : { - "description" : "Port number returned by previous vncproxy call.", "minimum" : 5900, + "description" : "Port number returned by previous vncproxy call.", "type" : "integer", "maximum" : 5999 }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", "maxLength" : 512, + "description" : "Ticket from previous call to vncproxy.", "type" : "string" }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." } }, "additionalProperties" : 0 }, - "permissions" : { - "description" : "You also need to pass a valid ticket (vncticket).", - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] - }, - "description" : "Opens a weksocket for VNC traffic." + "name" : "vncwebsocket", + "description" : "Opens a weksocket for VNC traffic.", + "method" : "GET", + "returns" : { + "properties" : { + "port" : { + "type" : "string" + } + }, + "type" : "object" + } } }, + "text" : "vncwebsocket", + "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket" }, { + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy", "info" : { "POST" : { - "description" : "Returns a SPICE configuration to connect to the VM.", - "returns" : { + "protected" : 1, + "name" : "spiceproxy", + "parameters" : { "properties" : { - "tls-port" : { - "type" : "integer" - }, - "password" : { - "type" : "string" - }, - "type" : { - "type" : "string" + "proxy" : { + "format" : "address", + "type" : "string", + "optional" : 1, + "description" : "SPICE 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 resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." }, - "host" : { - "type" : "string" + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." }, - "proxy" : { - "type" : "string" + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." } }, - "additionalProperties" : 1, - "description" : "Returned values can be directly passed to the 'remote-viewer' application." + "additionalProperties" : 0 }, - "name" : "spiceproxy", "method" : "POST", - "protected" : 1, + "description" : "Returns a SPICE configuration to connect to the VM.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -8540,63 +8489,99 @@ var pveapi = [ ] ] }, - "parameters" : { - "additionalProperties" : 0, + "returns" : { "properties" : { "proxy" : { - "format" : "address", - "type" : "string", - "optional" : 1, - "description" : "SPICE 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 resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." + "type" : "string" + }, + "tls-port" : { + "type" : "integer" + }, + "password" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "host" : { + "type" : "string" + } + }, + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", + "additionalProperties" : 1 + } + } + }, + "text" : "spiceproxy" + }, + { + "info" : { + "GET" : { + "method" : "GET", + "returns" : { + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } }, + "type" : "object" + }, + "type" : "array" + }, + "description" : "Directory index", + "proxyto" : "node", + "permissions" : { + "user" : "all" + }, + "parameters" : { + "properties" : { "vmid" : { + "minimum" : 1, "format" : "pve-vmid", "type" : "integer", - "minimum" : 1, "description" : "The (unique) ID of the VM." }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" } - } + }, + "additionalProperties" : 0 }, - "proxyto" : "node" + "name" : "vmcmdidx" } }, - "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy", - "leaf" : 1, - "text" : "spiceproxy" - }, - { - "text" : "status", - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/status", "children" : [ { - "leaf" : 1, - "text" : "current", - "path" : "/nodes/{node}/qemu/{vmid}/status/current", "info" : { "GET" : { - "proxyto" : "node", "parameters" : { "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, "vmid" : { - "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" } }, "additionalProperties" : 0 }, + "name" : "vm_status", + "protected" : 1, + "method" : "GET", "permissions" : { "check" : [ "perm", @@ -8606,69 +8591,71 @@ var pveapi = [ ] ] }, - "protected" : 1, + "proxyto" : "node", + "description" : "Get virtual machine status.", "returns" : { "type" : "object" - }, - "name" : "vm_status", - "method" : "GET", - "description" : "Get virtual machine status." + } } - } + }, + "text" : "current", + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/current" }, { - "text" : "start", + "path" : "/nodes/{node}/qemu/{vmid}/status/start", "leaf" : 1, + "text" : "start", "info" : { "POST" : { "method" : "POST", - "name" : "vm_start", - "returns" : { - "type" : "string" - }, - "description" : "Start virtual machine.", - "proxyto" : "node", + "protected" : 1, "parameters" : { "properties" : { - "skiplock" : { - "type" : "boolean", + "stateuri" : { + "description" : "Some command save/restore state from this location.", + "type" : "string", "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." + "maxLength" : 128 }, - "machine" : { + "node" : { "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "machine" : { "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", "description" : "Specific the Qemu machine type.", - "maxLength" : 40, - "optional" : 1 - }, - "node" : { - "description" : "The cluster node name.", "type" : "string", - "format" : "pve-node" + "optional" : 1, + "maxLength" : 40 }, - "stateuri" : { + "skiplock" : { + "type" : "boolean", "optional" : 1, - "description" : "Some command save/restore state from this location.", - "maxLength" : 128, - "type" : "string" + "description" : "Ignore locks - only root is allowed to use this option." }, "vmid" : { - "format" : "pve-vmid", - "type" : "integer", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "migratedfrom" : { "description" : "The cluster node name.", - "optional" : 1, "type" : "string", + "optional" : 1, "format" : "pve-node" } }, "additionalProperties" : 0 }, - "protected" : 1, + "name" : "vm_start", + "returns" : { + "type" : "string" + }, + "proxyto" : "node", + "description" : "Start virtual machine.", "permissions" : { "check" : [ "perm", @@ -8679,13 +8666,14 @@ var pveapi = [ ] } } - }, - "path" : "/nodes/{node}/qemu/{vmid}/status/start" + } }, { - "path" : "/nodes/{node}/qemu/{vmid}/status/stop", + "text" : "stop", "info" : { "POST" : { + "description" : "Stop virtual machine. The qemu process will exit immediately. Thisis akin to pulling the power plug of a running computer and may damage the VM data", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -8695,61 +8683,64 @@ var pveapi = [ ] ] }, + "returns" : { + "type" : "string" + }, "protected" : 1, "parameters" : { "properties" : { - "keepActive" : { - "type" : "boolean", - "default" : 0, + "timeout" : { + "minimum" : 0, "optional" : 1, - "description" : "Do not decativate storage volumes." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", "type" : "integer", - "description" : "The (unique) ID of the VM." + "description" : "Wait maximal timeout seconds." }, "migratedfrom" : { - "format" : "pve-node", - "type" : "string", "description" : "The cluster node name.", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "optional" : 1, + "format" : "pve-node" + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "skiplock" : { "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, "type" : "boolean" }, - "timeout" : { - "minimum" : 0, - "type" : "integer", + "keepActive" : { + "description" : "Do not decativate storage volumes.", + "type" : "boolean", "optional" : 1, - "description" : "Wait maximal timeout seconds." + "default" : 0 + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "description" : "Stop virtual machine. The qemu process will exit immediately. Thisis akin to pulling the power plug of a running computer and may damage the VM data", - "returns" : { - "type" : "string" - }, - "method" : "POST", - "name" : "vm_stop" + "name" : "vm_stop", + "method" : "POST" } }, - "leaf" : 1, - "text" : "stop" + "path" : "/nodes/{node}/qemu/{vmid}/status/stop", + "leaf" : 1 }, { + "path" : "/nodes/{node}/qemu/{vmid}/status/reset", + "leaf" : 1, + "text" : "reset", "info" : { "POST" : { + "proxyto" : "node", + "description" : "Reset virtual machine.", "permissions" : { "check" : [ "perm", @@ -8759,113 +8750,129 @@ var pveapi = [ ] ] }, + "returns" : { + "type" : "string" + }, "protected" : 1, - "proxyto" : "node", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, "node" : { + "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" }, "skiplock" : { "type" : "boolean", - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1 + "optional" : 1, + "description" : "Ignore locks - only root is allowed to use this option." + }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." } - }, - "additionalProperties" : 0 + } }, - "description" : "Reset virtual machine.", - "method" : "POST", "name" : "vm_reset", - "returns" : { - "type" : "string" - } + "method" : "POST" } - }, - "path" : "/nodes/{node}/qemu/{vmid}/status/reset", - "leaf" : 1, - "text" : "reset" + } }, { - "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown", + "text" : "shutdown", "info" : { "POST" : { + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "description" : "Shutdown virtual machine. This is similar to pressing the power button on a physical machine.This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.", + "proxyto" : "node", "returns" : { "type" : "string" }, - "method" : "POST", "name" : "vm_shutdown", - "description" : "Shutdown virtual machine. This is similar to pressing the power button on a physical machine.This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.", "parameters" : { + "additionalProperties" : 0, "properties" : { - "timeout" : { - "optional" : 1, - "description" : "Wait maximal timeout seconds.", - "minimum" : 0, - "type" : "integer" - }, "node" : { + "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "skiplock" : { - "type" : "boolean", - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1 + "type" : "string" }, "forceStop" : { - "optional" : 1, - "description" : "Make sure the VM stops.", "default" : 0, - "type" : "boolean" + "optional" : 1, + "type" : "boolean", + "description" : "Make sure the VM stops." }, "keepActive" : { "type" : "boolean", - "default" : 0, "optional" : 1, + "default" : 0, "description" : "Do not decativate storage volumes." }, + "timeout" : { + "minimum" : 0, + "description" : "Wait maximal timeout seconds.", + "optional" : 1, + "type" : "integer" + }, "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", + "minimum" : 1, "format" : "pve-vmid", - "minimum" : 1 + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "optional" : 1, + "type" : "boolean" } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + } }, - "protected" : 1 + "protected" : 1, + "method" : "POST" } }, - "leaf" : 1, - "text" : "shutdown" + "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown", + "leaf" : 1 }, { - "path" : "/nodes/{node}/qemu/{vmid}/status/suspend", + "text" : "suspend", "info" : { "POST" : { - "description" : "Suspend virtual machine.", "method" : "POST", + "parameters" : { + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "type" : "boolean", + "optional" : 1 + } + }, + "additionalProperties" : 0 + }, "name" : "vm_suspend", + "protected" : 1, "returns" : { "type" : "string" }, @@ -8878,58 +8885,38 @@ var pveapi = [ ] ] }, - "protected" : 1, - "proxyto" : "node", - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 - }, - "skiplock" : { - "type" : "boolean", - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - } + "description" : "Suspend virtual machine.", + "proxyto" : "node" } }, - "text" : "suspend", + "path" : "/nodes/{node}/qemu/{vmid}/status/suspend", "leaf" : 1 }, { - "text" : "resume", "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/resume", "info" : { "POST" : { - "proxyto" : "node", + "protected" : 1, + "name" : "vm_resume", "parameters" : { "additionalProperties" : 0, "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." }, "skiplock" : { - "optional" : 1, "description" : "Ignore locks - only root is allowed to use this option.", - "type" : "boolean" + "type" : "boolean", + "optional" : 1 }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 }, "nocheck" : { "type" : "boolean", @@ -8937,6 +8924,9 @@ var pveapi = [ } } }, + "method" : "POST", + "description" : "Resume virtual machine.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -8946,137 +8936,88 @@ var pveapi = [ ] ] }, - "protected" : 1, "returns" : { "type" : "string" - }, - "method" : "POST", - "name" : "vm_resume", - "description" : "Resume virtual machine." + } } }, - "path" : "/nodes/{node}/qemu/{vmid}/status/resume" + "text" : "resume" } ], + "text" : "status", + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/status" + }, + { + "text" : "sendkey", "info" : { - "GET" : { + "PUT" : { + "proxyto" : "node", + "description" : "Send key event to virtual machine.", "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] }, - "description" : "Directory index", - "method" : "GET", - "name" : "vmcmdidx", + "returns" : { + "type" : "null" + }, + "protected" : 1, "parameters" : { "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "key" : { + "description" : "The key (qemu monitor encoding).", + "type" : "string" + }, + "skiplock" : { + "optional" : 1, + "type" : "boolean", + "description" : "Ignore locks - only root is allowed to use this option." }, "vmid" : { - "type" : "integer", - "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "subdir" : { - "type" : "string" - } - } - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{subdir}" - } - ] - } + "name" : "vm_sendkey", + "method" : "PUT" } - } + }, + "path" : "/nodes/{node}/qemu/{vmid}/sendkey", + "leaf" : 1 }, { - "leaf" : 1, - "text" : "sendkey", - "path" : "/nodes/{node}/qemu/{vmid}/sendkey", "info" : { - "PUT" : { + "GET" : { "returns" : { - "type" : "null" - }, - "name" : "vm_sendkey", - "method" : "PUT", - "description" : "Send key event to virtual machine.", - "parameters" : { + "type" : "object", "properties" : { - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "key" : { - "type" : "string", - "description" : "The key (qemu monitor encoding)." - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, + "hasFeature" : { "type" : "boolean" - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] - } - } - } - }, - { - "text" : "feature", - "leaf" : 1, - "info" : { - "GET" : { - "description" : "Check if feature for virtual machine is available.", - "name" : "vm_feature", - "method" : "GET", - "returns" : { - "properties" : { + }, "nodes" : { + "type" : "array", "items" : { "type" : "string" - }, - "type" : "array" - }, - "hasFeature" : { - "type" : "boolean" + } } - }, - "type" : "object" + } }, - "protected" : 1, + "description" : "Check if feature for virtual machine is available.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -9086,132 +9027,138 @@ var pveapi = [ ] ] }, - "proxyto" : "node", + "method" : "GET", + "protected" : 1, + "name" : "vm_feature", "parameters" : { "properties" : { "vmid" : { - "description" : "The (unique) ID of the VM.", "minimum" : 1, + "format" : "pve-vmid", "type" : "integer", - "format" : "pve-vmid" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "description" : "The (unique) ID of the VM." }, "feature" : { - "type" : "string", "enum" : [ "snapshot", "clone", "copy" ], - "description" : "Feature to check." + "description" : "Feature to check.", + "type" : "string" }, "snapname" : { - "optional" : 1, "maxLength" : 40, + "format" : "pve-configid", "description" : "The name of the snapshot.", + "optional" : 1, + "type" : "string" + }, + "node" : { "type" : "string", - "format" : "pve-configid" + "description" : "The cluster node name.", + "format" : "pve-node" } }, "additionalProperties" : 0 } } }, + "text" : "feature", + "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/feature" }, { + "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/clone", "info" : { "POST" : { - "returns" : { - "type" : "string" - }, - "name" : "clone_vm", "method" : "POST", - "description" : "Create a copy of virtual machine/template.", - "proxyto" : "node", + "protected" : 1, + "name" : "clone_vm", "parameters" : { "additionalProperties" : 0, "properties" : { - "snapname" : { - "type" : "string", - "format" : "pve-configid", - "maxLength" : 40, - "description" : "The name of the snapshot.", - "optional" : 1 + "newid" : { + "minimum" : 1, + "format" : "pve-vmid", + "description" : "VMID for the clone.", + "type" : "integer" }, - "full" : { + "storage" : { + "format" : "pve-storage-id", + "description" : "Target storage for full clone.", + "requires" : "full", "optional" : 1, - "description" : "Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.", - "default" : 0, - "type" : "boolean" + "type" : "string" }, "target" : { - "description" : "Target node. Only allowed if the original VM is on shared storage.", - "optional" : 1, "format" : "pve-node", - "type" : "string" + "description" : "Target node. Only allowed if the original VM is on shared storage.", + "type" : "string", + "optional" : 1 }, - "pool" : { - "format" : "pve-poolid", + "snapname" : { + "format" : "pve-configid", + "maxLength" : 40, + "description" : "The name of the snapshot.", "type" : "string", - "description" : "Add the new VM to the specified pool.", "optional" : 1 }, "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" - }, - "description" : { - "description" : "Description for the new VM.", - "optional" : 1, + "description" : "The cluster node name.", "type" : "string" }, "name" : { + "optional" : 1, + "type" : "string", "description" : "Set a name for the new VM.", + "format" : "dns-name" + }, + "pool" : { + "description" : "Add the new VM to the specified pool.", + "type" : "string", "optional" : 1, - "format" : "dns-name", - "type" : "string" + "format" : "pve-poolid" }, - "newid" : { - "description" : "VMID for the clone.", + "vmid" : { "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" }, "format" : { - "type" : "string", - "requires" : "full", "enum" : [ "raw", "qcow2", "vmdk" ], "description" : "Target format for file storage.", - "optional" : 1 + "requires" : "full", + "optional" : 1, + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 + "full" : { + "optional" : 1, + "type" : "boolean", + "default" : 0, + "description" : "Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default." }, - "storage" : { - "description" : "Target storage for full clone.", + "description" : { + "description" : "Description for the new VM.", "optional" : 1, - "format" : "pve-storage-id", - "requires" : "full", "type" : "string" } } }, - "protected" : 1, + "returns" : { + "type" : "string" + }, + "description" : "Create a copy of virtual machine/template.", + "proxyto" : "node", "permissions" : { + "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage.", "check" : [ "and", [ @@ -9240,20 +9187,18 @@ var pveapi = [ "pool" ] ] - ], - "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage." + ] } } }, - "leaf" : 1, "text" : "clone" }, { - "leaf" : 1, "text" : "move_disk", - "path" : "/nodes/{node}/qemu/{vmid}/move_disk", "info" : { "POST" : { + "proxyto" : "node", + "description" : "Move volume to different storage.", "permissions" : { "check" : [ "and", @@ -9274,38 +9219,36 @@ var pveapi = [ ], "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage." }, + "returns" : { + "type" : "string", + "description" : "the task ID." + }, "protected" : 1, - "proxyto" : "node", "parameters" : { "additionalProperties" : 0, "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, "delete" : { - "type" : "boolean", - "default" : 0, "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.", - "optional" : 1 + "type" : "boolean", + "optional" : 1, + "default" : 0 }, - "format" : { + "storage" : { "type" : "string", - "description" : "Target Format.", - "optional" : 1, - "enum" : [ - "raw", - "qcow2", - "vmdk" - ] + "description" : "Target storage.", + "format" : "pve-storage-id" }, "vmid" : { "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", "type" : "integer", + "format" : "pve-vmid", "minimum" : 1 }, - "storage" : { - "description" : "Target storage.", - "format" : "pve-storage-id", - "type" : "string" - }, "disk" : { "type" : "string", "description" : "The disk you want to move.", @@ -9355,115 +9298,118 @@ var pveapi = [ "digest" : { "maxLength" : 40, "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" - }, - "node" : { "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "format" : { + "description" : "Target Format.", + "enum" : [ + "raw", + "qcow2", + "vmdk" + ], + "optional" : 1, + "type" : "string" } } }, - "description" : "Move volume to different storage.", - "method" : "POST", "name" : "move_vm_disk", - "returns" : { - "type" : "string", - "description" : "the task ID." - } + "method" : "POST" } - } + }, + "path" : "/nodes/{node}/qemu/{vmid}/move_disk", + "leaf" : 1 }, { - "text" : "migrate", "leaf" : 1, "path" : "/nodes/{node}/qemu/{vmid}/migrate", "info" : { "POST" : { + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Migrate" + ] + ] + }, "proxyto" : "node", + "description" : "Migrate virtual machine. Creates a new migration task.", + "returns" : { + "type" : "string", + "description" : "the task ID." + }, + "name" : "migrate_vm", "parameters" : { - "additionalProperties" : 0, "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." }, "online" : { "optional" : 1, - "description" : "Use online/live migration.", - "type" : "boolean" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "boolean", + "description" : "Use online/live migration." }, "force" : { "type" : "boolean", "optional" : 1, "description" : "Allow to migrate VMs which use local devices. Only root may use this option." }, + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" + }, "target" : { + "type" : "string", "description" : "Target node.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" } - } + }, + "additionalProperties" : 0 }, "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Migrate" - ] - ] - }, - "returns" : { - "description" : "the task ID.", - "type" : "string" - }, - "name" : "migrate_vm", - "method" : "POST", - "description" : "Migrate virtual machine. Creates a new migration task." + "method" : "POST" } - } + }, + "text" : "migrate" }, { + "path" : "/nodes/{node}/qemu/{vmid}/monitor", + "leaf" : 1, + "text" : "monitor", "info" : { "POST" : { "method" : "POST", - "name" : "monitor", - "returns" : { - "type" : "string" - }, - "description" : "Execute Qemu monitor commands.", - "proxyto" : "node", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "description" : "The cluster node name." }, "command" : { - "description" : "The monitor command.", - "type" : "string" + "type" : "string", + "description" : "The monitor command." }, "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, "format" : "pve-vmid", - "type" : "integer" + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." } - }, - "additionalProperties" : 0 + } }, + "name" : "monitor", "protected" : 1, + "returns" : { + "type" : "string" + }, "permissions" : { "check" : [ "perm", @@ -9472,43 +9418,32 @@ var pveapi = [ "VM.Monitor" ] ] - } + }, + "description" : "Execute Qemu monitor commands.", + "proxyto" : "node" } - }, - "path" : "/nodes/{node}/qemu/{vmid}/monitor", - "text" : "monitor", - "leaf" : 1 + } }, { "leaf" : 1, - "text" : "resize", "path" : "/nodes/{node}/qemu/{vmid}/resize", "info" : { "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ] - ] - }, "protected" : 1, "parameters" : { "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, "size" : { "description" : "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.", "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?", "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, "disk" : { + "type" : "string", "description" : "The disk you want to resize.", "enum" : [ "ide0", @@ -9551,19 +9486,19 @@ var pveapi = [ "sata3", "sata4", "sata5" - ], - "type" : "string" + ] }, "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "maxLength" : 40, "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", "type" : "string", - "format" : "pve-node" + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" }, "skiplock" : { "description" : "Ignore locks - only root is allowed to use this option.", @@ -9573,153 +9508,262 @@ var pveapi = [ }, "additionalProperties" : 0 }, - "proxyto" : "node", - "description" : "Extend volume size.", - "returns" : { - "type" : "null" - }, "name" : "resize_vm", - "method" : "PUT" - } - } - }, - { - "info" : { - "POST" : { - "description" : "Snapshot a VM.", - "method" : "POST", - "name" : "snapshot", - "returns" : { - "type" : "string", - "description" : "the task ID." - }, + "method" : "PUT", + "description" : "Extend volume size.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Snapshot" + "VM.Config.Disk" ] ] }, + "returns" : { + "type" : "null" + } + } + }, + "text" : "resize" + }, + { + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot", + "info" : { + "POST" : { "protected" : 1, + "name" : "snapshot", "parameters" : { + "additionalProperties" : 0, "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "description" : { - "type" : "string", - "description" : "A textual description or comment.", - "optional" : 1 - }, "vmstate" : { - "type" : "boolean", + "description" : "Save the vmstate", "optional" : 1, - "description" : "Save the vmstate" - }, - "snapname" : { - "format" : "pve-configid", - "type" : "string", - "maxLength" : 40, - "description" : "The name of the snapshot." + "type" : "boolean" }, "vmid" : { - "description" : "The (unique) ID of the VM.", "type" : "integer", + "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", "minimum" : 1 - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node" - }, - "GET" : { - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { + }, + "snapname" : { "type" : "string", + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40 + }, + "node" : { "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "description" : { + "description" : "A textual description or comment.", + "optional" : 1, + "type" : "string" } } }, + "method" : "POST", + "proxyto" : "node", + "description" : "Snapshot a VM.", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Snapshot" ] ] }, - "protected" : 1, "returns" : { - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} - } - }, - "name" : "snapshot_list", + "type" : "string", + "description" : "the task ID." + } + }, + "GET" : { "method" : "GET", - "description" : "List all snapshots." - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot", + "name" : "snapshot_list", + "parameters" : { + "properties" : { + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "description" : "List all snapshots." + } + }, "children" : [ { + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}", + "info" : { + "GET" : { + "method" : "GET", + "returns" : { + "type" : "array", + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{cmd}", + "rel" : "child" + } + ] + }, + "name" : "snapshot_cmd_idx", + "permissions" : { + "user" : "all" + }, + "parameters" : { + "properties" : { + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "snapname" : { + "format" : "pve-configid", + "maxLength" : 40, + "description" : "The name of the snapshot.", + "type" : "string" + } + }, + "additionalProperties" : 0 + }, + "description" : "" + }, + "DELETE" : { + "proxyto" : "node", + "description" : "Delete a VM snapshot.", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "returns" : { + "type" : "string", + "description" : "the task ID." + }, + "protected" : 1, + "parameters" : { + "properties" : { + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "snapname" : { + "maxLength" : 40, + "format" : "pve-configid", + "description" : "The name of the snapshot.", + "type" : "string" + }, + "force" : { + "description" : "For removal from config file, even if removing disk snapshots fails.", + "optional" : 1, + "type" : "boolean" + } + }, + "additionalProperties" : 0 + }, + "name" : "delsnapshot", + "method" : "DELETE" + } + }, + "text" : "{snapname}", "children" : [ { "text" : "config", - "leaf" : 1, "info" : { - "GET" : { - "method" : "GET", - "name" : "get_snapshot_config", - "proxyto" : "node", + "PUT" : { + "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - }, - "snapname" : { - "description" : "The name of the snapshot.", - "maxLength" : 40, + "description" : { "type" : "string", - "format" : "pve-configid" + "optional" : 1, + "description" : "A textual description or comment." }, "node" : { - "type" : "string", "format" : "pve-node", + "type" : "string", "description" : "The cluster node name." + }, + "snapname" : { + "maxLength" : 40, + "format" : "pve-configid", + "type" : "string", + "description" : "The name of the snapshot." + }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." } - } - }, - "returns" : { - "type" : "object" + }, + "additionalProperties" : 0 }, + "name" : "update_snapshot_config", + "method" : "PUT", + "proxyto" : "node", + "description" : "Update snapshot metadata.", "permissions" : { "check" : [ "perm", @@ -9729,87 +9773,89 @@ var pveapi = [ ] ] }, - "description" : "Get snapshot configuration" - }, - "PUT" : { - "description" : "Update snapshot metadata.", "returns" : { "type" : "null" + } + }, + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object" }, - "name" : "update_snapshot_config", - "method" : "PUT", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, + "proxyto" : "node", + "description" : "Get snapshot configuration", "parameters" : { "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" }, - "description" : { - "type" : "string", - "description" : "A textual description or comment.", - "optional" : 1 - }, "snapname" : { "description" : "The name of the snapshot.", - "maxLength" : 40, "type" : "string", + "maxLength" : 40, "format" : "pve-configid" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" } }, "additionalProperties" : 0 }, - "proxyto" : "node" + "name" : "get_snapshot_config", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + } } }, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config" + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config", + "leaf" : 1 }, { "leaf" : 1, - "text" : "rollback", + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback", "info" : { "POST" : { - "proxyto" : "node", + "method" : "POST", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, "snapname" : { - "type" : "string", "format" : "pve-configid", "maxLength" : 40, + "type" : "string", "description" : "The name of the snapshot." }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, "vmid" : { + "description" : "The (unique) ID of the VM.", "type" : "integer", - "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid" } } }, + "name" : "rollback", "protected" : 1, - "permissions" : { + "returns" : { + "type" : "string", + "description" : "the task ID." + }, + "permissions" : { "check" : [ "perm", "/vms/{vmid}", @@ -9818,149 +9864,31 @@ var pveapi = [ ] ] }, - "returns" : { - "description" : "the task ID.", - "type" : "string" - }, - "method" : "POST", - "name" : "rollback", + "proxyto" : "node", "description" : "Rollback VM state to specified snapshot." } }, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback" - } - ], - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}", - "info" : { - "GET" : { - "parameters" : { - "properties" : { - "snapname" : { - "format" : "pve-configid", - "type" : "string", - "description" : "The name of the snapshot.", - "maxLength" : 40 - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{cmd}" - } - ] - }, - "name" : "snapshot_cmd_idx", - "method" : "GET", - "permissions" : { - "user" : "all" - }, - "description" : "" - }, - "DELETE" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - }, - "force" : { - "type" : "boolean", - "optional" : 1, - "description" : "For removal from config file, even if removing disk snapshots fails." - }, - "snapname" : { - "type" : "string", - "format" : "pve-configid", - "maxLength" : 40, - "description" : "The name of the snapshot." - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - } - }, - "description" : "Delete a VM snapshot.", - "returns" : { - "type" : "string", - "description" : "the task ID." - }, - "method" : "DELETE", - "name" : "delsnapshot" + "text" : "rollback" } - }, - "leaf" : 0, - "text" : "{snapname}" + ] } ], - "text" : "snapshot", - "leaf" : 0 + "text" : "snapshot" }, { "text" : "template", - "leaf" : 1, "info" : { "POST" : { - "description" : "Create a Template.", - "method" : "POST", "name" : "template", - "returns" : { - "type" : "null" - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ], - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" - }, - "protected" : 1, "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" + "type" : "string", + "description" : "The cluster node name." }, "disk" : { - "optional" : 1, "description" : "If you want to convert only 1 disk to base image.", "enum" : [ "ide0", @@ -10004,595 +9932,657 @@ var pveapi = [ "sata4", "sata5" ], + "optional" : 1, "type" : "string" }, "vmid" : { - "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid", + "minimum" : 1 } - }, - "additionalProperties" : 0 + } }, - "proxyto" : "node" + "protected" : 1, + "method" : "POST", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ], + "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" + }, + "proxyto" : "node", + "description" : "Create a Template.", + "returns" : { + "type" : "null" + } } }, - "path" : "/nodes/{node}/qemu/{vmid}/template" + "path" : "/nodes/{node}/qemu/{vmid}/template", + "leaf" : 1 } ], - "text" : "{vmid}", - "leaf" : 0 + "info" : { + "GET" : { + "returns" : { + "items" : { + "type" : "object", + "properties" : { + "subdir" : { + "type" : "string" + } + } + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + }, + "method" : "GET", + "permissions" : { + "user" : "all" + }, + "name" : "vmdiridx", + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + } + }, + "additionalProperties" : 0 + }, + "description" : "Directory index", + "proxyto" : "node" + }, + "DELETE" : { + "proxyto" : "node", + "description" : "Destroy the vm (also delete all used/owned volumes).", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ] + }, + "returns" : { + "type" : "string" + }, + "protected" : 1, + "parameters" : { + "properties" : { + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + }, + "skiplock" : { + "optional" : 1, + "type" : "boolean", + "description" : "Ignore locks - only root is allowed to use this option." + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, + "name" : "destroy_vm", + "method" : "DELETE" + } + } } ], + "text" : "qemu", "info" : { "POST" : { - "returns" : { - "type" : "string" - }, - "name" : "create_vm", "method" : "POST", - "description" : "Create or restore a virtual machine.", "parameters" : { - "additionalProperties" : 0, "properties" : { - "memory" : { - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", + "serial[n]" : { + "type" : "string", "optional" : 1, - "minimum" : 16, - "type" : "integer", - "default" : 512 + "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "pattern" : "(/dev/.+|socket)" }, - "boot" : { - "pattern" : "[acdn]{1,4}", - "optional" : 1, - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", - "default" : "cdn", - "type" : "string" - }, - "startup" : { + "vcpus" : { + "minimum" : 1, + "default" : 0, + "type" : "integer", "optional" : 1, - "description" : "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.", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "type" : "string", - "format" : "pve-startup-order" + "description" : "Number of hotplugged vcpus." }, - "onboot" : { - "default" : 0, - "type" : "boolean", + "description" : { + "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", "optional" : 1, - "description" : "Specifies whether a VM will be started during system bootup." + "type" : "string" }, - "localtime" : { - "type" : "boolean", - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "parallel[n]" : { + "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", + "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "type" : "string", "optional" : 1 }, - "description" : { + "acpi" : { + "description" : "Enable/disable ACPI.", + "default" : 1, "optional" : 1, - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", - "type" : "string" + "type" : "boolean" }, - "balloon" : { - "type" : "integer", + "migrate_downtime" : { "minimum" : 0, - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", - "optional" : 1 + "default" : 0.1, + "optional" : 1, + "type" : "number", + "description" : "Set maximum tolerated downtime (in seconds) for migrations." }, "name" : { - "format" : "dns-name", - "type" : "string", "description" : "Set a name for the VM. Only used on the configuration web interface.", - "optional" : 1 + "type" : "string", + "optional" : 1, + "format" : "dns-name" }, - "scsihw" : { + "pool" : { + "format" : "pve-poolid", + "description" : "Add the VM to the specified pool.", "type" : "string", - "default" : "lsi", - "description" : "scsi controller model", + "optional" : 1 + }, + "cores" : { + "minimum" : 1, + "default" : 1, "optional" : 1, - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ] + "type" : "integer", + "description" : "The number of cores per socket." }, - "vmid" : { - "description" : "The (unique) ID of the VM.", + "sockets" : { + "description" : "The number of CPU sockets.", + "default" : 1, + "optional" : 1, "type" : "integer", - "format" : "pve-vmid", "minimum" : 1 }, - "numa[n]" : { + "storage" : { + "type" : "string", "optional" : 1, - "description" : "numa topology", - "format" : { - "cpus" : { - "description" : "CPUs accessing this numa node.", - "format_description" : "id[-id];...", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "type" : "string" - }, - "memory" : { - "optional" : 1, - "format_description" : "mb", - "description" : "Amount of memory this numa node provides.", - "type" : "number" - }, - "hostnodes" : { - "type" : "string", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "format_description" : "id[-id];...", - "optional" : 1, - "description" : "host numa nodes to use" - }, - "policy" : { - "type" : "string", - "enum" : [ - "preferred", - "bind", - "interleave" - ], - "description" : "numa allocation policy.", - "optional" : 1, - "format_description" : "preferred|bind|interleave" - } - }, - "type" : "string" + "description" : "Default storage.", + "format" : "pve-storage-id" }, - "force" : { + "freeze" : { "optional" : 1, - "description" : "Allow to overwrite existing VM.", - "requires" : "archive", - "type" : "boolean" + "type" : "boolean", + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution)." }, - "autostart" : { - "default" : 0, + "onboot" : { + "optional" : 1, "type" : "boolean", + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup." + }, + "startup" : { + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", + "format" : "pve-startup-order", + "type" : "string", "optional" : 1, - "description" : "Automatic restart after crash (currently ignored)." + "description" : "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." }, - "cpu" : { + "agent" : { + "default" : 0, + "type" : "boolean", "optional" : 1, - "description" : "Emulated CPU type.", - "type" : "string", - "format" : { - "hidden" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Do not identify as a KVM virtual machine." - }, - "cputype" : { - "type" : "string", - "default" : "kvm64", - "enum" : [ - "486", - "athlon", - "pentium", - "pentium2", - "pentium3", - "coreduo", - "core2duo", - "kvm32", - "kvm64", - "qemu32", - "qemu64", - "phenom", - "Conroe", - "Penryn", - "Nehalem", - "Westmere", - "SandyBridge", - "IvyBridge", - "Haswell", - "Haswell-noTSX", - "Broadwell", - "Broadwell-noTSX", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "host" - ], - "description" : "Emulated CPU type.", - "format_description" : "cputype", - "default_key" : 1 - } - } + "description" : "Enable/disable Qemu GuestAgent." }, - "acpi" : { - "description" : "Enable/disable ACPI.", + "reboot" : { + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "type" : "boolean", "optional" : 1, - "default" : 1, - "type" : "boolean" + "default" : 1 }, - "startdate" : { + "bootdisk" : { + "description" : "Enable booting from specified disk.", + "pattern" : "(ide|sata|scsi|virtio)\\d+", "type" : "string", - "default" : "now", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)", - "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", "optional" : 1, - "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)" + "format" : "pve-qm-bootdisk" }, - "vga" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", "type" : "string", "optional" : 1, - "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ] + "maxLength" : 256, + "format" : "pve-qm-smbios1" }, - "scsi[n]" : { - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", + "numa" : { + "description" : "Enable/disable NUMA.", + "default" : 0, + "optional" : 1, + "type" : "boolean" + }, + "cpuunits" : { + "minimum" : 0, + "default" : 1000, + "maximum" : 500000, + "type" : "integer", "optional" : 1, + "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." + }, + "ide[n]" : { "format" : { - "heads" : { + "bps_rd" : { + "format_description" : "bps", "type" : "integer", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count" + "description" : "Maximum read speed speed in bytes per second." }, - "mbps_rd" : { - "type" : "number", - "format_description" : "mbps", - "description" : "Maximum read speed speed in megabytes per second.", - "optional" : 1 - }, - "secs" : { - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific sector count.", + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "optional" : 1, + "type" : "integer", "format_description" : "count" }, - "cyls" : { - "type" : "integer", - "format_description" : "count", + "mbps" : { + "description" : "Maximum r/w speed speed in megabytes per second.", + "type" : "number", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count." + "format_description" : "mbps" }, - "mbps_wr" : { - "optional" : 1, - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps", - "type" : "number" - }, - "detect_zeroes" : { - "optional" : 1, - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "type" : "boolean" - }, - "iops_wr" : { - "type" : "integer", - "optional" : 1, - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second." - }, - "media" : { + "trans" : { "enum" : [ - "cdrom", - "disk" + "none", + "lba", + "auto" ], - "format_description" : "cdrom|disk", - "optional" : 1, - "description" : "The drive's media type.", + "description" : "Force disk geometry bios translation mode.", "type" : "string", - "default" : "disk" - }, - "format" : { - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "format_description" : "drive format", - "description" : "The drive's backing file's data format.", "optional" : 1, - "type" : "string" + "format_description" : "none|lba|auto" }, - "bps_rd" : { - "type" : "integer", - "description" : "Maximum read speed speed in bytes per second.", + "volume" : { + "alias" : "file" + }, + "mbps_rd" : { + "description" : "Maximum read speed speed in megabytes per second.", + "type" : "number", "optional" : 1, - "format_description" : "bps" + "format_description" : "mbps" }, - "backup" : { - "description" : "Whether the drive should be included when making backups.", + "mbps_wr" : { + "format_description" : "mbps", + "type" : "number", "optional" : 1, - "format_description" : "on|off", - "type" : "boolean" + "description" : "Maximum write speed speed in megabytes per second." }, - "iops_max" : { + "file" : { + "description" : "The drive's backing volume.", + "type" : "string", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "default_key" : 1 + }, + "iops" : { "format_description" : "iops", - "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "type" : "integer" + "description" : "Maximum r/w I/O speed in operations per second.", + "type" : "integer", + "optional" : 1 }, - "mbps_rd_max" : { + "model" : { + "maxLength" : 120, + "format" : "urlencoded", + "format_description" : "model", + "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", "optional" : 1, - "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number" + "type" : "string" }, "aio" : { - "type" : "string", - "optional" : 1, - "description" : "AIO type to use.", "format_description" : "native|threads", "enum" : [ "native", "threads" - ] + ], + "description" : "AIO type to use.", + "optional" : 1, + "type" : "string" }, - "queues" : { - "minimum" : 2, - "type" : "integer", - "format_description" : "nbqueues", + "werror" : { + "format_description" : "enospc|ignore|report|stop", + "type" : "string", "optional" : 1, - "description" : "Number of queues." + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "description" : "Write error action." }, "iops_wr_max" : { + "format_description" : "iops", "type" : "integer", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "optional" : 1, - "format_description" : "iops" - }, - "size" : { "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size", - "type" : "string" + "description" : "Maximum unthrottled write I/O pool speed in operations per second." }, - "iothread" : { + "backup" : { "type" : "boolean", - "description" : "Whether to use iothreads for this drive", - "format_description" : "off|on", - "optional" : 1 - }, - "mbps" : { - "type" : "number", "optional" : 1, - "description" : "Maximum r/w speed speed in megabytes per second.", - "format_description" : "mbps" + "description" : "Whether the drive should be included when making backups.", + "format_description" : "on|off" }, "bps_wr" : { - "description" : "Maximum write speed speed in bytes per second.", - "optional" : 1, "format_description" : "bps", - "type" : "integer" + "description" : "Maximum write speed speed in bytes per second.", + "type" : "integer", + "optional" : 1 }, - "iops" : { + "iops_rd" : { "format_description" : "iops", - "description" : "Maximum r/w I/O speed in operations per second.", + "description" : "Maximum read I/O speed in operations per second.", + "type" : "integer", + "optional" : 1 + }, + "size" : { + "format" : "disk-size", + "description" : "Disk size. This is purely informational and has no effect.", "optional" : 1, - "type" : "integer" + "type" : "string" }, "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "format_description" : "mbps", + "type" : "number", "optional" : 1, - "type" : "number" + "description" : "Maximum unthrottled r/w pool speed in megabytes per second." + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer", + "format_description" : "count" }, "serial" : { + "optional" : 1, "type" : "string", + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", "format" : "urlencoded", - "format_description" : "serial", - "optional" : 1, "maxLength" : 60, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long." + "format_description" : "serial" }, - "discard" : { - "enum" : [ - "ignore", - "on" - ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "mbps_wr_max" : { + "format_description" : "mbps", + "type" : "number", "optional" : 1, - "format_description" : "ignore|on", - "type" : "string" + "description" : "Maximum unthrottled write pool speed in megabytes per second." }, - "file" : { - "format" : "pve-volume-id-or-qm-path", + "format" : { + "optional" : 1, "type" : "string", - "format_description" : "volume", - "description" : "The drive's backing volume.", - "default_key" : 1 + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "format_description" : "drive format" }, - "iops_rd" : { + "iops_rd_max" : { + "optional" : 1, + "type" : "integer", + "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "format_description" : "iops" + }, + "bps" : { + "description" : "Maximum r/w speed speed in bytes per second.", "type" : "integer", "optional" : 1, - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second." + "format_description" : "bps" }, - "werror" : { + "discard" : { + "format_description" : "ignore|on", + "type" : "string", + "optional" : 1, + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ - "enospc", "ignore", - "report", - "stop" - ], - "optional" : 1, - "format_description" : "enospc|ignore|report|stop", - "description" : "Write error action.", - "type" : "string" + "on" + ] }, - "trans" : { - "format_description" : "none|lba|auto", + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "type" : "number", "optional" : 1, - "description" : "Force disk geometry bios translation mode.", + "format_description" : "mbps" + }, + "media" : { "enum" : [ - "none", - "lba", - "auto" + "cdrom", + "disk" ], - "type" : "string" + "description" : "The drive's media type.", + "optional" : 1, + "type" : "string", + "default" : "disk", + "format_description" : "cdrom|disk" }, - "volume" : { - "alias" : "file" + "secs" : { + "optional" : 1, + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific sector count.", + "format_description" : "count" }, - "iops_rd_max" : { + "iops_wr" : { "type" : "integer", "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "description" : "Maximum write I/O speed in operations per second.", "format_description" : "iops" }, - "cache" : { - "type" : "string", + "detect_zeroes" : { "optional" : 1, - "description" : "The drive's cache mode", - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ] - }, - "snapshot" : { "type" : "boolean", - "description" : "Whether the drive should be included when making snapshots.", - "format_description" : "on|off", - "optional" : 1 + "description" : "Controls whether to detect and try to optimize writes of zeroes." }, - "mbps_wr_max" : { - "type" : "number", + "rerror" : { + "format_description" : "ignore|report|stop", + "type" : "string", "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ] }, - "bps" : { - "format_description" : "bps", + "cache" : { + "format_description" : "none|writethrough|writeback|unsafe|directsync", "optional" : 1, - "description" : "Maximum r/w speed speed in bytes per second.", - "type" : "integer" + "type" : "string", + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ] + }, + "snapshot" : { + "format_description" : "on|off", + "optional" : 1, + "type" : "boolean", + "description" : "Whether the drive should be included when making snapshots." + }, + "iops_max" : { + "optional" : 1, + "type" : "integer", + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", + "format_description" : "iops" } }, + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", + "optional" : 1, "type" : "string" }, - "shares" : { + "archive" : { + "maxLength" : 255, + "description" : "The backup file.", "optional" : 1, - "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", - "minimum" : 0, - "maximum" : 50000, - "default" : 1000, - "type" : "integer" + "type" : "string" }, - "smbios1" : { - "description" : "Specify SMBIOS type 1 fields.", - "optional" : 1, - "maxLength" : 256, + "watchdog" : { + "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", "type" : "string", - "format" : "pve-qm-smbios1" - }, - "cores" : { - "type" : "integer", - "default" : 1, - "minimum" : 1, - "description" : "The number of cores per socket.", - "optional" : 1 + "optional" : 1, + "format" : "pve-qm-watchdog" }, - "migrate_downtime" : { - "description" : "Set maximum tolerated downtime (in seconds) for migrations.", + "hotplug" : { + "type" : "string", "optional" : 1, - "minimum" : 0, - "default" : 0.1, - "type" : "number" + "default" : "network,disk,usb", + "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", + "format" : "pve-hotplug-features" }, "keyboard" : { - "type" : "string", - "default" : "en-us", + "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", "enum" : [ + "da", + "sv", "en-gb", - "de-ch", - "en-us", + "lt", + "is", "mk", + "pl", + "hu", "fr-be", - "de", "pt-br", - "sv", - "fr-ch", + "de-ch", + "nl", "no", - "pt", - "hu", + "tr", "sl", - "lt", - "fi", - "it", - "nl", - "is", - "da", + "de", "fr-ca", - "pl", - "fr", - "es", "ja", - "tr" + "es", + "it", + "pt", + "fr", + "en-us", + "fi", + "fr-ch" ], - "optional" : 1, - "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file." - }, - "freeze" : { - "type" : "boolean", - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "default" : "en-us", + "type" : "string", "optional" : 1 }, - "net[n]" : { - "format" : "pve-qm-net", + "hostpci[n]" : { + "format" : "pve-qm-hostpci", + "optional" : 1, "type" : "string", + "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" + }, + "lock" : { "optional" : 1, - "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n" + "type" : "string", + "enum" : [ + "migrate", + "backup", + "snapshot", + "rollback" + ], + "description" : "Lock/unlock the VM." }, - "vcpus" : { - "minimum" : 1, + "autostart" : { + "description" : "Automatic restart after crash (currently ignored).", "default" : 0, - "type" : "integer", "optional" : 1, - "description" : "Number of hotplugged vcpus." + "type" : "boolean" }, - "pool" : { - "optional" : 1, - "description" : "Add the VM to the specified pool.", - "format" : "pve-poolid", - "type" : "string" + "tdf" : { + "description" : "Enable/disable time drift fix.", + "default" : 0, + "type" : "boolean", + "optional" : 1 }, - "archive" : { - "maxLength" : 255, + "numa[n]" : { + "format" : { + "hostnodes" : { + "description" : "host numa nodes to use", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "optional" : 1, + "type" : "string", + "format_description" : "id[-id];..." + }, + "cpus" : { + "format_description" : "id[-id];...", + "type" : "string", + "description" : "CPUs accessing this numa node.", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" + }, + "policy" : { + "description" : "numa allocation policy.", + "enum" : [ + "preferred", + "bind", + "interleave" + ], + "type" : "string", + "optional" : 1, + "format_description" : "preferred|bind|interleave" + }, + "memory" : { + "format_description" : "mb", + "type" : "number", + "optional" : 1, + "description" : "Amount of memory this numa node provides." + } + }, "optional" : 1, - "description" : "The backup file.", - "type" : "string" + "type" : "string", + "description" : "numa topology" }, - "hostpci[n]" : { - "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", + "boot" : { + "default" : "cdn", "optional" : 1, - "format" : "pve-qm-hostpci", - "type" : "string" + "type" : "string", + "pattern" : "[acdn]{1,4}", + "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)." }, - "kvm" : { - "default" : 1, - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable KVM hardware virtualization." + "unused[n]" : { + "format" : "pve-volume-id", + "description" : "Reference to unused volumes.", + "type" : "string", + "optional" : 1 }, "ostype" : { "type" : "string", + "optional" : 1, + "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", "enum" : [ "other", "wxp", @@ -10605,254 +10595,237 @@ var pveapi = [ "l24", "l26", "solaris" - ], - "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", - "optional" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "unused[n]" : { - "format" : "pve-volume-id", - "type" : "string", - "description" : "Reference to unused volumes.", - "optional" : 1 + ] }, - "watchdog" : { - "type" : "string", - "format" : "pve-qm-watchdog", + "unique" : { + "requires" : "archive", + "description" : "Assign a unique random ethernet address.", "optional" : 1, - "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)" + "type" : "boolean" }, - "template" : { + "migrate_speed" : { + "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", "default" : 0, - "type" : "boolean", - "description" : "Enable/disable Template.", - "optional" : 1 - }, - "reboot" : { "optional" : 1, - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "type" : "boolean", - "default" : 1 + "type" : "integer", + "minimum" : 0 }, - "machine" : { - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "description" : "Specific the Qemu machine type.", - "maxLength" : 40, + "startdate" : { + "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", + "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", + "default" : "now", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" }, - "hotplug" : { - "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", + "localtime" : { "optional" : 1, - "type" : "string", - "default" : "network,disk,usb", - "format" : "pve-hotplug-features" + "type" : "boolean", + "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS." }, - "protection" : { + "kvm" : { + "description" : "Enable/disable KVM hardware virtualization.", + "default" : 1, "type" : "boolean", - "default" : 0, - "description" : "Sets the protection flag of the VM. This will prevent the remove operation.", "optional" : 1 }, - "args" : { - "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", - "optional" : 1, - "type" : "string" - }, - "migrate_speed" : { - "minimum" : 0, - "default" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit." - }, - "bootdisk" : { - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "optional" : 1, - "description" : "Enable booting from specified disk.", - "type" : "string", - "format" : "pve-qm-bootdisk" - }, "sata[n]" : { - "type" : "string", "format" : { - "bps" : { - "description" : "Maximum r/w speed speed in bytes per second.", - "optional" : 1, - "format_description" : "bps", - "type" : "integer" - }, - "mbps_wr_max" : { + "mbps_rd" : { "format_description" : "mbps", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "description" : "Maximum read speed speed in megabytes per second.", "optional" : 1, "type" : "number" }, - "cache" : { - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "description" : "The drive's cache mode", + "mbps_wr" : { + "type" : "number", "optional" : 1, - "type" : "string" + "description" : "Maximum write speed speed in megabytes per second.", + "format_description" : "mbps" }, - "snapshot" : { - "format_description" : "on|off", + "file" : { + "description" : "The drive's backing volume.", + "type" : "string", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "default_key" : 1 + }, + "iops" : { + "type" : "integer", "optional" : 1, - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean" + "description" : "Maximum r/w I/O speed in operations per second.", + "format_description" : "iops" }, - "rerror" : { + "werror" : { + "description" : "Write error action.", "enum" : [ + "enospc", "ignore", "report", "stop" ], - "format_description" : "ignore|report|stop", - "description" : "Read error action.", + "type" : "string", "optional" : 1, - "type" : "string" + "format_description" : "enospc|ignore|report|stop" }, - "trans" : { + "aio" : { "enum" : [ - "none", - "lba", - "auto" + "native", + "threads" ], - "description" : "Force disk geometry bios translation mode.", - "format_description" : "none|lba|auto", + "description" : "AIO type to use.", + "type" : "string", "optional" : 1, - "type" : "string" + "format_description" : "native|threads" + }, + "iops_wr_max" : { + "format_description" : "iops", + "optional" : 1, + "type" : "integer", + "description" : "Maximum unthrottled write I/O pool speed in operations per second." + }, + "backup" : { + "type" : "boolean", + "optional" : 1, + "description" : "Whether the drive should be included when making backups.", + "format_description" : "on|off" + }, + "bps_rd" : { + "type" : "integer", + "optional" : 1, + "description" : "Maximum read speed speed in bytes per second.", + "format_description" : "bps" + }, + "cyls" : { + "optional" : 1, + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "format_description" : "count" + }, + "mbps" : { + "optional" : 1, + "type" : "number", + "description" : "Maximum r/w speed speed in megabytes per second.", + "format_description" : "mbps" }, "volume" : { "alias" : "file" }, - "iops_rd_max" : { - "type" : "integer", - "format_description" : "iops", - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "optional" : 1 + "trans" : { + "format_description" : "none|lba|auto", + "type" : "string", + "optional" : 1, + "enum" : [ + "none", + "lba", + "auto" + ], + "description" : "Force disk geometry bios translation mode." }, - "werror" : { - "format_description" : "enospc|ignore|report|stop", - "description" : "Write error action.", + "media" : { + "format_description" : "cdrom|disk", + "type" : "string", "optional" : 1, + "default" : "disk", + "enum" : [ + "cdrom", + "disk" + ], + "description" : "The drive's media type." + }, + "rerror" : { + "description" : "Read error action.", "enum" : [ - "enospc", "ignore", "report", "stop" ], - "type" : "string" - }, - "iops_rd" : { "optional" : 1, - "description" : "Maximum read I/O speed in operations per second.", - "format_description" : "iops", - "type" : "integer" + "type" : "string", + "format_description" : "ignore|report|stop" }, - "serial" : { - "format" : "urlencoded", + "cache" : { "type" : "string", "optional" : 1, - "format_description" : "serial", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "maxLength" : 60 + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "format_description" : "none|writethrough|writeback|unsafe|directsync" }, - "mbps_max" : { - "type" : "number", + "secs" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific sector count.", + "type" : "integer", + "optional" : 1 + }, + "iops_wr" : { + "format_description" : "iops", + "description" : "Maximum write I/O speed in operations per second.", "optional" : 1, - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "discard" : { + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", "optional" : 1, - "format_description" : "ignore|on", - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ], - "type" : "string" + "type" : "boolean" }, - "file" : { - "type" : "string", - "format" : "pve-volume-id-or-qm-path", - "default_key" : 1, - "format_description" : "volume", - "description" : "The drive's backing volume." + "iops_max" : { + "format_description" : "iops", + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", + "type" : "integer", + "optional" : 1 }, - "mbps" : { + "snapshot" : { + "format_description" : "on|off", + "description" : "Whether the drive should be included when making snapshots.", "optional" : 1, - "description" : "Maximum r/w speed speed in megabytes per second.", - "format_description" : "mbps", - "type" : "number" + "type" : "boolean" }, "bps_wr" : { "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", + "type" : "integer", "optional" : 1, - "type" : "integer" + "description" : "Maximum write speed speed in bytes per second." }, - "iops" : { - "description" : "Maximum r/w I/O speed in operations per second.", - "optional" : 1, + "mbps_max" : { + "format_description" : "mbps", + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "iops_rd" : { "format_description" : "iops", - "type" : "integer" + "optional" : 1, + "type" : "integer", + "description" : "Maximum read I/O speed in operations per second." }, "size" : { - "type" : "string", "format" : "disk-size", + "type" : "string", "optional" : 1, "description" : "Disk size. This is purely informational and has no effect." }, - "iops_wr_max" : { - "type" : "integer", + "iops_rd_max" : { "format_description" : "iops", "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second." + "type" : "integer", + "description" : "Maximum unthrottled read I/O pool speed in operations per second." }, - "mbps_rd_max" : { - "optional" : 1, + "mbps_wr_max" : { "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number" - }, - "aio" : { "optional" : 1, - "description" : "AIO type to use.", - "format_description" : "native|threads", - "enum" : [ - "native", - "threads" - ], - "type" : "string" - }, - "iops_max" : { - "type" : "integer", - "format_description" : "iops", - "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." - }, - "backup" : { - "type" : "boolean", - "format_description" : "on|off", - "description" : "Whether the drive should be included when making backups.", - "optional" : 1 + "type" : "number", + "description" : "Maximum unthrottled write pool speed in megabytes per second." }, - "bps_rd" : { - "optional" : 1, + "bps" : { "format_description" : "bps", - "description" : "Maximum read speed speed in bytes per second.", + "description" : "Maximum r/w speed speed in bytes per second.", + "optional" : 1, "type" : "integer" }, "format" : { @@ -10866,138 +10839,190 @@ var pveapi = [ "cloop" ], "description" : "The drive's backing file's data format.", + "type" : "string", "optional" : 1, - "format_description" : "drive format", - "type" : "string" + "format_description" : "drive format" }, - "media" : { - "type" : "string", - "default" : "disk", - "enum" : [ - "cdrom", - "disk" - ], - "description" : "The drive's media type.", + "heads" : { "optional" : 1, - "format_description" : "cdrom|disk" + "type" : "integer", + "description" : "Force the drive's physical geometry to have a specific head count.", + "format_description" : "count" }, - "detect_zeroes" : { - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "serial" : { + "format_description" : "serial", + "format" : "urlencoded", + "maxLength" : 60, + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "type" : "string", "optional" : 1 }, - "iops_wr" : { - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "type" : "string", "optional" : 1, - "type" : "integer" + "format_description" : "ignore|on" }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", - "optional" : 1, + "mbps_rd_max" : { "format_description" : "mbps", - "type" : "number" - }, - "cyls" : { - "format_description" : "count", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "type" : "integer" - }, - "secs" : { - "type" : "integer", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count.", - "format_description" : "count" - }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "format_description" : "count", - "type" : "integer" - }, - "mbps_rd" : { "type" : "number", - "format_description" : "mbps", - "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second." + "description" : "Maximum unthrottled read pool speed in megabytes per second." } }, "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", + "type" : "string", "optional" : 1 }, - "cdrom" : { - "description" : "This is an alias for option -ide2", - "typetext" : "volume", - "optional" : 1, + "node" : { "type" : "string", - "format" : "pve-qm-drive" + "description" : "The cluster node name.", + "format" : "pve-node" }, - "tdf" : { - "description" : "Enable/disable time drift fix.", + "force" : { + "requires" : "archive", + "description" : "Allow to overwrite existing VM.", + "type" : "boolean", + "optional" : 1 + }, + "cpulimit" : { + "minimum" : 0, + "default" : 0, + "maximum" : 128, + "type" : "number", + "optional" : 1, + "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit." + }, + "tablet" : { + "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", "optional" : 1, "type" : "boolean", - "default" : 0 + "default" : 1 }, - "serial[n]" : { + "vga" : { "type" : "string", - "pattern" : "(/dev/.+|socket)", - "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "optional" : 1 - }, - "sockets" : { - "description" : "The number of CPU sockets.", "optional" : 1, - "type" : "integer", - "default" : 1, - "minimum" : 1 + "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", + "enum" : [ + "std", + "cirrus", + "vmware", + "qxl", + "serial0", + "serial1", + "serial2", + "serial3", + "qxl2", + "qxl3", + "qxl4" + ] }, - "ide[n]" : { + "virtio[n]" : { + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "optional" : 1, + "type" : "string", "format" : { - "bps_rd" : { + "snapshot" : { + "description" : "Whether the drive should be included when making snapshots.", + "type" : "boolean", "optional" : 1, - "format_description" : "bps", - "description" : "Maximum read speed speed in bytes per second.", - "type" : "integer" + "format_description" : "on|off" }, - "backup" : { + "iops_max" : { + "format_description" : "iops", "optional" : 1, - "format_description" : "on|off", - "description" : "Whether the drive should be included when making backups.", - "type" : "boolean" + "type" : "integer", + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." }, - "model" : { - "type" : "string", - "format" : "urlencoded", + "iothread" : { + "format_description" : "off|on", + "type" : "boolean", "optional" : 1, - "maxLength" : 120, - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", - "format_description" : "model" + "description" : "Whether to use iothreads for this drive" }, "media" : { - "type" : "string", + "format_description" : "cdrom|disk", "default" : "disk", + "optional" : 1, + "type" : "string", + "description" : "The drive's media type.", "enum" : [ "cdrom", "disk" - ], - "format_description" : "cdrom|disk", + ] + }, + "secs" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "description" : "The drive's media type." + "type" : "integer" }, "iops_wr" : { - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", + "type" : "integer", "optional" : 1, - "type" : "integer" + "description" : "Maximum write I/O speed in operations per second.", + "format_description" : "iops" }, "detect_zeroes" : { + "optional" : 1, "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "description" : "Controls whether to detect and try to optimize writes of zeroes." + }, + "rerror" : { + "optional" : 1, + "type" : "string", + "enum" : [ + "ignore", + "report", + "stop" + ], + "description" : "Read error action.", + "format_description" : "ignore|report|stop" + }, + "cache" : { + "format_description" : "none|writethrough|writeback|unsafe|directsync", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "description" : "The drive's cache mode", + "optional" : 1, + "type" : "string" + }, + "heads" : { + "type" : "integer", + "optional" : 1, + "description" : "Force the drive's physical geometry to have a specific head count.", + "format_description" : "count" + }, + "serial" : { + "format_description" : "serial", + "maxLength" : 60, + "format" : "urlencoded", + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "type" : "string", + "optional" : 1 + }, + "mbps_wr_max" : { + "format_description" : "mbps", + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "type" : "number", "optional" : 1 }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "type" : "integer", + "optional" : 1, + "format_description" : "iops" + }, "format" : { - "type" : "string", "enum" : [ "raw", "cow", @@ -11008,73 +11033,69 @@ var pveapi = [ "cloop" ], "description" : "The drive's backing file's data format.", - "format_description" : "drive format", - "optional" : 1 - }, - "cyls" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1, - "type" : "integer" - }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps", "optional" : 1, - "type" : "number" + "type" : "string", + "format_description" : "drive format" }, - "heads" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific head count.", + "bps" : { + "format_description" : "bps", "optional" : 1, - "type" : "integer" + "type" : "integer", + "description" : "Maximum r/w speed speed in bytes per second." }, - "mbps_rd" : { - "type" : "number", - "description" : "Maximum read speed speed in megabytes per second.", - "format_description" : "mbps", + "discard" : { + "format_description" : "ignore|on", + "enum" : [ + "ignore", + "on" + ], + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "type" : "string", "optional" : 1 }, - "secs" : { - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific sector count.", + "mbps_rd_max" : { "optional" : 1, - "format_description" : "count" + "type" : "number", + "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "format_description" : "mbps" }, - "bps" : { - "description" : "Maximum r/w speed speed in bytes per second.", + "bps_wr" : { + "description" : "Maximum write speed speed in bytes per second.", + "type" : "integer", "optional" : 1, - "format_description" : "bps", - "type" : "integer" + "format_description" : "bps" }, - "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "iops_rd" : { + "format_description" : "iops", + "description" : "Maximum read I/O speed in operations per second.", + "type" : "integer", + "optional" : 1 + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "type" : "string", + "format" : "disk-size" }, - "snapshot" : { - "format_description" : "on|off", + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "optional" : 1, - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean" + "type" : "number", + "format_description" : "mbps" }, - "cache" : { + "aio" : { "type" : "string", - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "description" : "The drive's cache mode", "optional" : 1, "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ] + "native", + "threads" + ], + "description" : "AIO type to use.", + "format_description" : "native|threads" }, "werror" : { "optional" : 1, - "format_description" : "enospc|ignore|report|stop", + "type" : "string", "description" : "Write error action.", "enum" : [ "enospc", @@ -11082,925 +11103,938 @@ var pveapi = [ "report", "stop" ], - "type" : "string" + "format_description" : "enospc|ignore|report|stop" }, - "iops_rd" : { + "iops_wr_max" : { "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second.", + "description" : "Maximum unthrottled write I/O pool speed in operations per second.", "optional" : 1, "type" : "integer" }, - "rerror" : { + "backup" : { + "format_description" : "on|off", + "type" : "boolean", + "optional" : 1, + "description" : "Whether the drive should be included when making backups." + }, + "mbps_rd" : { + "format_description" : "mbps", + "description" : "Maximum read speed speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "mbps_wr" : { + "format_description" : "mbps", + "type" : "number", + "optional" : 1, + "description" : "Maximum write speed speed in megabytes per second." + }, + "file" : { "type" : "string", - "description" : "Read error action.", + "description" : "The drive's backing volume.", + "default_key" : 1, + "format_description" : "volume", + "format" : "pve-volume-id-or-qm-path" + }, + "iops" : { + "format_description" : "iops", + "type" : "integer", "optional" : 1, - "format_description" : "ignore|report|stop", - "enum" : [ - "ignore", - "report", - "stop" - ] + "description" : "Maximum r/w I/O speed in operations per second." }, "trans" : { + "type" : "string", + "optional" : 1, + "description" : "Force disk geometry bios translation mode.", "enum" : [ "none", "lba", "auto" ], - "optional" : 1, - "format_description" : "none|lba|auto", - "description" : "Force disk geometry bios translation mode.", - "type" : "string" + "format_description" : "none|lba|auto" }, "volume" : { "alias" : "file" }, - "iops_rd_max" : { + "bps_rd" : { + "description" : "Maximum read speed speed in bytes per second.", "type" : "integer", "optional" : 1, - "format_description" : "iops", - "description" : "Maximum unthrottled read I/O pool speed in operations per second." + "format_description" : "bps" }, - "mbps" : { - "format_description" : "mbps", + "cyls" : { + "type" : "integer", "optional" : 1, + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "format_description" : "count" + }, + "mbps" : { "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number" + "optional" : 1, + "type" : "number", + "format_description" : "mbps" + } + } + }, + "balloon" : { + "optional" : 1, + "type" : "integer", + "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", + "minimum" : 0 + }, + "scsi[n]" : { + "format" : { + "volume" : { + "alias" : "file" }, - "bps_wr" : { + "trans" : { + "type" : "string", "optional" : 1, - "description" : "Maximum write speed speed in bytes per second.", - "format_description" : "bps", - "type" : "integer" + "enum" : [ + "none", + "lba", + "auto" + ], + "description" : "Force disk geometry bios translation mode.", + "format_description" : "none|lba|auto" }, - "iops" : { + "queues" : { + "minimum" : 2, + "format_description" : "nbqueues", + "optional" : 1, + "type" : "integer", + "description" : "Number of queues." + }, + "bps_rd" : { + "format_description" : "bps", "type" : "integer", - "description" : "Maximum r/w I/O speed in operations per second.", "optional" : 1, - "format_description" : "iops" + "description" : "Maximum read speed speed in bytes per second." }, - "serial" : { - "format" : "urlencoded", - "type" : "string", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", + "mbps" : { + "format_description" : "mbps", + "description" : "Maximum r/w speed speed in megabytes per second.", "optional" : 1, - "maxLength" : 60 + "type" : "number" }, - "discard" : { + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer", + "format_description" : "count" + }, + "werror" : { "enum" : [ + "enospc", "ignore", - "on" + "report", + "stop" ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "description" : "Write error action.", "optional" : 1, - "format_description" : "ignore|on", - "type" : "string" + "type" : "string", + "format_description" : "enospc|ignore|report|stop" }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "aio" : { + "format_description" : "native|threads", + "optional" : 1, + "type" : "string", + "enum" : [ + "native", + "threads" + ], + "description" : "AIO type to use." + }, + "backup" : { + "format_description" : "on|off", "optional" : 1, + "type" : "boolean", + "description" : "Whether the drive should be included when making backups." + }, + "iops_wr_max" : { + "format_description" : "iops", + "type" : "integer", + "optional" : 1, + "description" : "Maximum unthrottled write I/O pool speed in operations per second." + }, + "mbps_wr" : { "format_description" : "mbps", - "type" : "number" + "description" : "Maximum write speed speed in megabytes per second.", + "type" : "number", + "optional" : 1 + }, + "mbps_rd" : { + "format_description" : "mbps", + "type" : "number", + "optional" : 1, + "description" : "Maximum read speed speed in megabytes per second." + }, + "iops" : { + "format_description" : "iops", + "description" : "Maximum r/w I/O speed in operations per second.", + "optional" : 1, + "type" : "integer" }, "file" : { - "type" : "string", "format" : "pve-volume-id-or-qm-path", - "default_key" : 1, "format_description" : "volume", - "description" : "The drive's backing volume." + "default_key" : 1, + "description" : "The drive's backing volume.", + "type" : "string" }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "bps" : { + "type" : "integer", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "description" : "Maximum r/w speed speed in bytes per second.", + "format_description" : "bps" }, - "aio" : { + "mbps_wr_max" : { "optional" : 1, - "format_description" : "native|threads", - "description" : "AIO type to use.", + "type" : "number", + "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "format_description" : "mbps" + }, + "format" : { + "optional" : 1, + "type" : "string", "enum" : [ - "native", - "threads" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], - "type" : "string" + "description" : "The drive's backing file's data format.", + "format_description" : "drive format" }, - "iops_max" : { + "iops_rd_max" : { + "format_description" : "iops", "type" : "integer", "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" + "description" : "Maximum unthrottled read I/O pool speed in operations per second." }, - "size" : { + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "optional" : 1, "type" : "string", - "format" : "disk-size", - "description" : "Disk size. This is purely informational and has no effect.", - "optional" : 1 - }, - "iops_wr_max" : { - "format_description" : "iops", - "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "type" : "integer" - } - }, - "type" : "string", - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", - "optional" : 1 - }, - "cpuunits" : { - "optional" : 1, - "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "minimum" : 0, - "type" : "integer", - "default" : 1000, - "maximum" : 500000 - }, - "cpulimit" : { - "optional" : 1, - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", - "minimum" : 0, - "default" : 0, - "type" : "number", - "maximum" : 128 - }, - "storage" : { - "optional" : 1, - "description" : "Default storage.", - "format" : "pve-storage-id", - "type" : "string" - }, - "unique" : { - "type" : "boolean", - "requires" : "archive", - "description" : "Assign a unique random ethernet address.", - "optional" : 1 - }, - "numa" : { - "type" : "boolean", - "default" : 0, - "description" : "Enable/disable NUMA.", - "optional" : 1 - }, - "lock" : { - "type" : "string", - "optional" : 1, - "description" : "Lock/unlock the VM.", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ] - }, - "agent" : { - "optional" : 1, - "description" : "Enable/disable Qemu GuestAgent.", - "type" : "boolean", - "default" : 0 - }, - "virtio[n]" : { - "type" : "string", - "format" : { - "secs" : { - "type" : "integer", - "format_description" : "count", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count." + "format_description" : "serial", + "format" : "urlencoded", + "maxLength" : 60 }, "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "type" : "integer", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", "format_description" : "count" }, - "mbps_rd" : { - "type" : "number", + "mbps_rd_max" : { "format_description" : "mbps", - "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second." + "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "type" : "number", + "optional" : 1 }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", + "discard" : { + "enum" : [ + "ignore", + "on" + ], + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "type" : "string", "optional" : 1, - "format_description" : "mbps", - "type" : "number" + "format_description" : "ignore|on" }, - "cyls" : { + "bps_wr" : { + "format_description" : "bps", + "description" : "Maximum write speed speed in bytes per second.", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "format_description" : "count", "type" : "integer" }, - "format" : { - "type" : "string", - "description" : "The drive's backing file's data format.", + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "type" : "number", "optional" : 1, - "format_description" : "drive format", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ] + "format_description" : "mbps" }, - "media" : { - "optional" : 1, - "format_description" : "cdrom|disk", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], - "default" : "disk", - "type" : "string" + "size" : { + "format" : "disk-size", + "description" : "Disk size. This is purely informational and has no effect.", + "type" : "string", + "optional" : 1 }, - "iops_wr" : { + "iops_rd" : { "format_description" : "iops", + "description" : "Maximum read I/O speed in operations per second.", "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", "type" : "integer" }, - "detect_zeroes" : { - "type" : "boolean", + "iops_max" : { + "format_description" : "iops", "optional" : 1, - "description" : "Controls whether to detect and try to optimize writes of zeroes." + "type" : "integer", + "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." }, - "backup" : { + "snapshot" : { + "description" : "Whether the drive should be included when making snapshots.", + "optional" : 1, "type" : "boolean", - "description" : "Whether the drive should be included when making backups.", - "format_description" : "on|off", - "optional" : 1 + "format_description" : "on|off" }, - "bps_rd" : { - "type" : "integer", - "format_description" : "bps", - "description" : "Maximum read speed speed in bytes per second.", - "optional" : 1 - }, - "size" : { + "media" : { + "format_description" : "cdrom|disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], + "default" : "disk", "type" : "string", - "format" : "disk-size", - "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect." + "optional" : 1 }, "iothread" : { - "description" : "Whether to use iothreads for this drive", - "optional" : 1, "format_description" : "off|on", - "type" : "boolean" - }, - "iops_wr_max" : { - "type" : "integer", - "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "optional" : 1 - }, - "mbps_rd_max" : { - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "format_description" : "mbps", + "description" : "Whether to use iothreads for this drive", + "type" : "boolean", "optional" : 1 }, - "aio" : { - "type" : "string", - "description" : "AIO type to use.", - "format_description" : "native|threads", - "optional" : 1, - "enum" : [ - "native", - "threads" - ] - }, - "iops_max" : { - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "discard" : { - "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "format_description" : "ignore|on", + "cache" : { + "description" : "The drive's cache mode", "enum" : [ - "ignore", - "on" + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" ], - "type" : "string" - }, - "serial" : { - "format_description" : "serial", - "optional" : 1, - "maxLength" : 60, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "type" : "string" - }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", "optional" : 1, - "format_description" : "mbps", - "type" : "number" - }, - "file" : { "type" : "string", - "format" : "pve-volume-id-or-qm-path", - "default_key" : 1, - "description" : "The drive's backing volume.", - "format_description" : "volume" - }, - "bps_wr" : { - "format_description" : "bps", - "optional" : 1, - "description" : "Maximum write speed speed in bytes per second.", - "type" : "integer" + "format_description" : "none|writethrough|writeback|unsafe|directsync" }, - "mbps" : { - "type" : "number", - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second.", + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "type" : "boolean", "optional" : 1 }, - "iops" : { + "iops_wr" : { + "format_description" : "iops", + "description" : "Maximum write I/O speed in operations per second.", "type" : "integer", - "optional" : 1, - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops" - }, - "rerror" : { - "description" : "Read error action.", - "optional" : 1, - "format_description" : "ignore|report|stop", - "enum" : [ - "ignore", - "report", - "stop" - ], - "type" : "string" + "optional" : 1 }, - "trans" : { - "enum" : [ - "none", - "lba", - "auto" - ], - "format_description" : "none|lba|auto", - "description" : "Force disk geometry bios translation mode.", - "optional" : 1, - "type" : "string" - }, - "volume" : { - "alias" : "file" - }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "optional" : 1, - "format_description" : "iops", - "type" : "integer" - }, - "werror" : { - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action.", - "format_description" : "enospc|ignore|report|stop", - "optional" : 1, - "type" : "string" - }, - "iops_rd" : { - "description" : "Maximum read I/O speed in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "mbps_wr_max" : { - "type" : "number", - "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" - }, - "bps" : { + "secs" : { + "format_description" : "count", + "description" : "Force the drive's physical geometry to have a specific sector count.", "type" : "integer", - "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", "optional" : 1 - }, - "cache" : { - "type" : "string", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "description" : "The drive's cache mode", - "optional" : 1, - "format_description" : "none|writethrough|writeback|unsafe|directsync" - }, - "snapshot" : { - "optional" : 1, - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean" } }, - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", - "optional" : 1 + "type" : "string", + "optional" : 1, + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." }, - "bios" : { + "net[n]" : { + "optional" : 1, + "type" : "string", + "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", + "format" : "pve-qm-net" + }, + "machine" : { + "maxLength" : 40, + "description" : "Specific the Qemu machine type.", + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", + "optional" : 1, + "type" : "string" + }, + "smp" : { + "description" : "The number of CPUs. Please use option -sockets instead.", "optional" : 1, + "type" : "integer", + "default" : 1, + "minimum" : 1 + }, + "bios" : { "description" : "Select BIOS implementation.", "enum" : [ "seabios", "ovmf" ], "default" : "seabios", + "optional" : 1, "type" : "string" }, - "parallel[n]" : { + "shares" : { + "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", + "type" : "integer", "optional" : 1, - "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "type" : "string" + "default" : 1000, + "maximum" : 50000, + "minimum" : 0 + }, + "template" : { + "description" : "Enable/disable Template.", + "default" : 0, + "optional" : 1, + "type" : "boolean" + }, + "scsihw" : { + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], + "description" : "scsi controller model", + "type" : "string", + "optional" : 1, + "default" : "lsi" }, "usb[n]" : { + "type" : "string", + "optional" : 1, + "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", "format" : { + "host" : { + "default_key" : 1, + "format_description" : "HOSTUSBDEVICE|spice", + "format" : "pve-qm-usb-device", + "type" : "string", + "description" : "The Host USB device or port or the value spice" + }, "usb3" : { + "format_description" : "yes|no", "description" : "Specifies whether if given host option is a USB3 device or port", "optional" : 1, - "format_description" : "yes|no", "type" : "boolean" + } + } + }, + "cpu" : { + "format" : { + "hidden" : { + "description" : "Do not identify as a KVM virtual machine.", + "type" : "boolean", + "optional" : 1, + "default" : 0 }, - "host" : { - "description" : "The Host USB device or port or the value spice", - "format_description" : "HOSTUSBDEVICE|spice", - "default_key" : 1, - "format" : "pve-qm-usb-device", - "type" : "string" + "cputype" : { + "description" : "Emulated CPU type.", + "enum" : [ + "486", + "athlon", + "pentium", + "pentium2", + "pentium3", + "coreduo", + "core2duo", + "kvm32", + "kvm64", + "qemu32", + "qemu64", + "phenom", + "Conroe", + "Penryn", + "Nehalem", + "Westmere", + "SandyBridge", + "IvyBridge", + "Haswell", + "Haswell-noTSX", + "Broadwell", + "Broadwell-noTSX", + "Opteron_G1", + "Opteron_G2", + "Opteron_G3", + "Opteron_G4", + "Opteron_G5", + "host" + ], + "default" : "kvm64", + "type" : "string", + "format_description" : "cputype", + "default_key" : 1 } }, "type" : "string", "optional" : 1, - "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n" + "description" : "Emulated CPU type." }, - "smp" : { - "minimum" : 1, - "default" : 1, - "type" : "integer", - "description" : "The number of CPUs. Please use option -sockets instead.", + "cdrom" : { + "format" : "pve-qm-drive", + "typetext" : "volume", + "description" : "This is an alias for option -ide2", + "type" : "string", "optional" : 1 }, - "tablet" : { + "memory" : { + "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", + "default" : 512, "optional" : 1, - "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", - "default" : 1, - "type" : "boolean" + "type" : "integer", + "minimum" : 16 + }, + "args" : { + "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", + "type" : "string", + "optional" : 1 + }, + "protection" : { + "description" : "Sets the protection flag of the VM. This will prevent the remove operation.", + "default" : 0, + "type" : "boolean", + "optional" : 1 } - } + }, + "additionalProperties" : 0 }, - "proxyto" : "node", + "name" : "create_vm", "protected" : 1, + "returns" : { + "type" : "string" + }, "permissions" : { - "user" : "all", - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore (option 'archive'), it is enough if the user has 'VM.Backup' permission and the VM already exists. If you create disks you need 'Datastore.AllocateSpace' on any used storage." - } + "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore (option 'archive'), it is enough if the user has 'VM.Backup' permission and the VM already exists. If you create disks you need 'Datastore.AllocateSpace' on any used storage.", + "user" : "all" + }, + "description" : "Create or restore a virtual machine.", + "proxyto" : "node" }, "GET" : { + "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "full" : { - "optional" : 1, - "description" : "Determine the full status of active VMs.", - "type" : "boolean" - }, "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" + "type" : "string", + "description" : "The cluster node name." + }, + "full" : { + "optional" : 1, + "type" : "boolean", + "description" : "Determine the full status of active VMs." } - } + }, + "additionalProperties" : 0 }, + "name" : "vmlist", + "method" : "GET", + "description" : "Virtual machine index (per node).", "proxyto" : "node", - "protected" : 1, "permissions" : { - "description" : "Only list VMs where you have VM.Audit permissons on /vms/.", - "user" : "all" + "user" : "all", + "description" : "Only list VMs where you have VM.Audit permissons on /vms/." }, "returns" : { + "type" : "array", "links" : [ { - "rel" : "child", - "href" : "{vmid}" + "href" : "{vmid}", + "rel" : "child" } ], "items" : { "properties" : {}, "type" : "object" - }, - "type" : "array" - }, - "name" : "vmlist", - "method" : "GET", - "description" : "Virtual machine index (per node)." + } + } } - } + }, + "path" : "/nodes/{node}/qemu", + "leaf" : 0 }, { + "path" : "/nodes/{node}/lxc", + "leaf" : 0, + "text" : "lxc", "children" : [ { + "path" : "/nodes/{node}/lxc/{vmid}", "leaf" : 0, - "text" : "{vmid}", "children" : [ { - "leaf" : 1, "text" : "config", - "path" : "/nodes/{node}/lxc/{vmid}/config", "info" : { "PUT" : { + "protected" : 1, "parameters" : { "properties" : { + "cmode" : { + "optional" : 1, + "type" : "string", + "default" : "tty", + "enum" : [ + "shell", + "console", + "tty" + ], + "description" : "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)." + }, + "description" : { + "type" : "string", + "optional" : 1, + "description" : "Container description. Only used on the configuration web interface." + }, + "swap" : { + "minimum" : 0, + "description" : "Amount of SWAP for the VM in MB.", + "optional" : 1, + "type" : "integer", + "default" : 512 + }, + "ostype" : { + "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", + "enum" : [ + "debian", + "ubuntu", + "centos", + "fedora", + "opensuse", + "archlinux", + "alpine", + "unmanaged" + ], + "type" : "string", + "optional" : 1 + }, + "unprivileged" : { + "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", + "type" : "boolean", + "optional" : 1, + "default" : 0 + }, + "unused[n]" : { + "type" : "string", + "optional" : 1, + "description" : "Reference to unused volumes.", + "format" : "pve-volume-id" + }, + "delete" : { + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "description" : "A list of settings you want to delete." + }, "console" : { + "description" : "Attach a console device (/dev/console) to the container.", "default" : 1, - "type" : "boolean", "optional" : 1, - "description" : "Attach a console device (/dev/console) to the container." + "type" : "boolean" + }, + "mp[n]" : { + "format" : { + "ro" : { + "format_description" : "ro", + "description" : "Read-only mountpoint (not supported with bind mounts)", + "type" : "boolean", + "optional" : 1 + }, + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "type" : "boolean", + "optional" : 1, + "format_description" : "acl" + }, + "size" : { + "format_description" : "DiskSize", + "format" : "disk-size", + "optional" : 1, + "type" : "string", + "description" : "Volume size (read only value)." + }, + "backup" : { + "description" : "Whether to include the mountpoint in backups.", + "optional" : 1, + "type" : "boolean", + "format_description" : "[1|0]" + }, + "quota" : { + "type" : "boolean", + "optional" : 1, + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "format_description" : "[0|1]" + }, + "volume" : { + "default_key" : 1, + "format_description" : "volume", + "format" : "pve-lxc-mp-string", + "type" : "string", + "description" : "Volume, device or directory to mount into the container." + }, + "mp" : { + "description" : "Path to the mountpoint as seen from inside the container.", + "type" : "string", + "format" : "pve-lxc-mp-string", + "format_description" : "Path" + } + }, + "type" : "string", + "optional" : 1, + "description" : "Use volume as container mount point (experimental feature)." }, "cpulimit" : { - "minimum" : 0, - "maximum" : 128, + "optional" : 1, "type" : "number", + "maximum" : 128, "default" : 0, "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.", + "minimum" : 0 + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "startup" : { + "description" : "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.", + "type" : "string", + "optional" : 1, + "format" : "pve-startup-order", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "digest" : { + "type" : "string", + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, + "onboot" : { + "description" : "Specifies whether a VM will be started during system bootup.", + "default" : 0, + "type" : "boolean", "optional" : 1 }, - "cpuunits" : { + "tty" : { "minimum" : 0, "type" : "integer", - "default" : 1024, - "maximum" : 500000, "optional" : 1, - "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." + "default" : 2, + "maximum" : 6, + "description" : "Specify the number of tty available to the container" + }, + "arch" : { + "description" : "OS architecture type.", + "enum" : [ + "amd64", + "i386" + ], + "default" : "amd64", + "type" : "string", + "optional" : 1 }, "net[n]" : { - "description" : "Specifies network interfaces for the container.", - "optional" : 1, "format" : { - "ip6" : { - "format" : "pve-ipv6-config", + "firewall" : { + "format_description" : "[1|0]", + "optional" : 1, + "type" : "boolean", + "description" : "Controls whether this interface's firewall rules should be used." + }, + "type" : { "type" : "string", - "description" : "IPv6 address in CIDR format.", "optional" : 1, - "format_description" : "IPv6Format/CIDR" + "enum" : [ + "veth" + ], + "description" : "Network interface type." }, - "firewall" : { - "type" : "boolean", + "ip" : { + "description" : "IPv4 address in CIDR format.", "optional" : 1, - "format_description" : "[1|0]", - "description" : "Controls whether this interface's firewall rules should be used." + "type" : "string", + "format_description" : "IPv4Format/CIDR", + "format" : "pve-ipv4-config" }, - "mtu" : { - "type" : "integer", - "minimum" : 64, - "format_description" : "Number", + "trunks" : { + "type" : "string", "optional" : 1, - "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)" + "description" : "VLAN ids to pass through the interface", + "pattern" : "(?^:\\d+(?:;\\d+)*)", + "format_description" : "vlanid[;vlanid...]" }, "gw6" : { - "optional" : 1, "format_description" : "GatewayIPv6", - "description" : "Default gateway for IPv6 traffic.", "format" : "ipv6", + "description" : "Default gateway for IPv6 traffic.", + "optional" : 1, "type" : "string" }, - "hwaddr" : { - "type" : "string", - "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", - "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", + "tag" : { + "format_description" : "VlanNo", + "minimum" : "2", + "description" : "VLAN tag for this interface.", "optional" : 1, - "format_description" : "MAC" + "type" : "integer", + "maximum" : "4094" }, - "gw" : { - "format_description" : "GatewayIPv4", - "description" : "Default gateway for IPv4 traffic.", + "ip6" : { "optional" : 1, "type" : "string", - "format" : "ipv4" + "description" : "IPv6 address in CIDR format.", + "format" : "pve-ipv6-config", + "format_description" : "IPv6Format/CIDR" }, - "ip" : { - "format" : "pve-ipv4-config", + "gw" : { + "format" : "ipv4", + "format_description" : "GatewayIPv4", + "optional" : 1, "type" : "string", - "description" : "IPv4 address in CIDR format.", - "format_description" : "IPv4Format/CIDR", - "optional" : 1 + "description" : "Default gateway for IPv4 traffic." }, - "tag" : { + "bridge" : { + "format_description" : "vmbr", "optional" : 1, - "description" : "VLAN tag for this interface.", - "format_description" : "VlanNo", - "minimum" : "2", - "type" : "integer", - "maximum" : "4094" - }, - "rate" : { - "type" : "number", - "description" : "Apply rate limiting to the interface", - "format_description" : "mbps", - "optional" : 1 + "type" : "string", + "description" : "Bridge to attach the network device to.", + "pattern" : "[-_.\\w\\d]+" }, "name" : { + "format_description" : "String", "type" : "string", "pattern" : "[-_.\\w\\d]+", - "format_description" : "String", "description" : "Name of the network device as seen from inside the container. (lxc.network.name)" }, - "bridge" : { - "pattern" : "[-_.\\w\\d]+", + "hwaddr" : { + "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", + "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", "optional" : 1, - "description" : "Bridge to attach the network device to.", - "format_description" : "vmbr", - "type" : "string" - }, - "trunks" : { "type" : "string", + "format_description" : "MAC" + }, + "mtu" : { + "minimum" : 64, + "format_description" : "Number", + "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", "optional" : 1, - "description" : "VLAN ids to pass through the interface", - "format_description" : "vlanid[;vlanid...]", - "pattern" : "(?^:\\d+(?:;\\d+)*)" + "type" : "integer" }, - "type" : { - "description" : "Network interface type.", + "rate" : { + "description" : "Apply rate limiting to the interface", + "type" : "number", "optional" : 1, - "enum" : [ - "veth" - ], - "type" : "string" + "format_description" : "mbps" } }, + "description" : "Specifies network interfaces for the container.", + "optional" : 1, "type" : "string" }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "lock" : { - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], + "searchdomain" : { + "type" : "string", "optional" : 1, - "description" : "Lock/unlock the VM.", - "type" : "string" + "description" : "Sets 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" }, - "swap" : { + "cpuunits" : { "minimum" : 0, + "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", "type" : "integer", - "default" : 512, - "description" : "Amount of SWAP for the VM in MB.", - "optional" : 1 - }, - "description" : { - "description" : "Container description. Only used on the configuration web interface.", - "optional" : 1, - "type" : "string" - }, - "onboot" : { - "description" : "Specifies whether a VM will be started during system bootup.", "optional" : 1, - "default" : 0, - "type" : "boolean" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "default" : 1024, + "maximum" : 500000 }, - "ostype" : { + "nameserver" : { + "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", "type" : "string", - "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", "optional" : 1, - "enum" : [ - "debian", - "ubuntu", - "centos", - "fedora", - "opensuse", - "archlinux", - "alpine", - "unmanaged" - ] + "format" : "address-list" }, - "tty" : { - "minimum" : 0, - "default" : 2, - "maximum" : 6, + "vmid" : { + "description" : "The (unique) ID of the VM.", "type" : "integer", - "description" : "Specify the number of tty available to the container", - "optional" : 1 + "format" : "pve-vmid", + "minimum" : 1 }, "hostname" : { - "description" : "Set a host name for the container.", - "optional" : 1, "maxLength" : 255, + "format" : "dns-name", "type" : "string", - "format" : "dns-name" - }, - "startup" : { - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "optional" : 1, - "description" : "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.", - "format" : "pve-startup-order", - "type" : "string" - }, - "memory" : { - "description" : "Amount of RAM for the VM in MB.", - "optional" : 1, - "type" : "integer", - "default" : 512, - "minimum" : 16 - }, - "cmode" : { - "type" : "string", - "default" : "tty", - "description" : "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).", "optional" : 1, - "enum" : [ - "shell", - "console", - "tty" - ] + "description" : "Set a host name for the container." }, - "mp[n]" : { + "rootfs" : { + "description" : "Use volume as container root.", "optional" : 1, - "description" : "Use volume as container mount point (experimental feature).", "type" : "string", "format" : { "acl" : { + "format_description" : "acl", "type" : "boolean", "optional" : 1, - "format_description" : "acl", "description" : "Explicitly enable or disable ACL support." }, "ro" : { - "type" : "boolean", - "optional" : 1, + "format_description" : "ro", "description" : "Read-only mountpoint (not supported with bind mounts)", - "format_description" : "ro" - }, - "mp" : { - "format" : "pve-lxc-mp-string", - "type" : "string", - "format_description" : "Path", - "description" : "Path to the mountpoint as seen from inside the container." + "optional" : 1, + "type" : "boolean" }, "backup" : { - "optional" : 1, - "description" : "Whether to include the mountpoint in backups.", "format_description" : "[1|0]", + "description" : "Whether to include the mountpoint in backups.", + "optional" : 1, "type" : "boolean" }, - "volume" : { - "description" : "Volume, device or directory to mount into the container.", - "format_description" : "volume", - "default_key" : 1, - "format" : "pve-lxc-mp-string", - "type" : "string" - }, "size" : { - "description" : "Volume size (read only value).", "optional" : 1, + "type" : "string", + "description" : "Volume size (read only value).", "format_description" : "DiskSize", - "format" : "disk-size", - "type" : "string" + "format" : "disk-size" }, "quota" : { - "type" : "boolean", - "format_description" : "[0|1]", + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", "optional" : 1, - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)" + "type" : "boolean", + "format_description" : "[0|1]" + }, + "volume" : { + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "type" : "string" } } }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" - }, "template" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "Enable/disable Template." - }, - "nameserver" : { - "type" : "string", - "format" : "address-list", + "description" : "Enable/disable Template.", "optional" : 1, - "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver." + "type" : "boolean", + "default" : 0 }, - "arch" : { - "type" : "string", - "default" : "amd64", - "optional" : 1, - "description" : "OS architecture type.", + "lock" : { + "description" : "Lock/unlock the VM.", "enum" : [ - "amd64", - "i386" - ] - }, - "unused[n]" : { - "format" : "pve-volume-id", + "migrate", + "backup", + "snapshot", + "rollback" + ], "type" : "string", - "description" : "Reference to unused volumes.", "optional" : 1 }, "protection" : { - "type" : "boolean", - "default" : 0, "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", - "optional" : 1 - }, - "rootfs" : { - "type" : "string", - "format" : { - "backup" : { - "type" : "boolean", - "description" : "Whether to include the mountpoint in backups.", - "optional" : 1, - "format_description" : "[1|0]" - }, - "volume" : { - "description" : "Volume, device or directory to mount into the container.", - "format_description" : "volume", - "default_key" : 1, - "format" : "pve-lxc-mp-string", - "type" : "string" - }, - "size" : { - "optional" : 1, - "description" : "Volume size (read only value).", - "format_description" : "DiskSize", - "type" : "string", - "format" : "disk-size" - }, - "quota" : { - "format_description" : "[0|1]", - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "optional" : 1, - "type" : "boolean" - }, - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "format_description" : "acl", - "optional" : 1, - "type" : "boolean" - }, - "ro" : { - "type" : "boolean", - "description" : "Read-only mountpoint (not supported with bind mounts)", - "optional" : 1, - "format_description" : "ro" - } - }, - "optional" : 1, - "description" : "Use volume as container root." - }, - "unprivileged" : { - "optional" : 1, - "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", "type" : "boolean", - "default" : 0 - }, - "delete" : { - "description" : "A list of settings you want to delete.", "optional" : 1, - "format" : "pve-configid-list", - "type" : "string" + "default" : 0 }, - "searchdomain" : { - "format" : "dns-name-list", - "type" : "string", + "memory" : { + "description" : "Amount of RAM for the VM in MB.", + "default" : 512, + "type" : "integer", "optional" : 1, - "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver." + "minimum" : 16 } }, "additionalProperties" : 0 }, + "name" : "update_vm", + "method" : "PUT", "proxyto" : "node", - "protected" : 1, + "description" : "Set container options.", "permissions" : { "check" : [ "perm", @@ -12018,41 +12052,35 @@ var pveapi = [ }, "returns" : { "type" : "null" - }, - "method" : "PUT", - "name" : "update_vm", - "description" : "Set container options." + } }, "GET" : { "method" : "GET", - "name" : "vm_config", "returns" : { "type" : "object", "properties" : { "digest" : { - "type" : "string", - "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications." + "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", + "type" : "string" } } }, - "proxyto" : "node", "parameters" : { "additionalProperties" : 0, "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, "vmid" : { - "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", "type" : "integer", "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "format" : "pve-vmid" } } }, - "description" : "Get container configuration.", "permissions" : { "check" : [ "perm", @@ -12061,89 +12089,115 @@ var pveapi = [ "VM.Audit" ] ] - } + }, + "name" : "vm_config", + "description" : "Get container configuration.", + "proxyto" : "node" } - } + }, + "path" : "/nodes/{node}/lxc/{vmid}/config", + "leaf" : 1 }, { "path" : "/nodes/{node}/lxc/{vmid}/status", + "leaf" : 0, + "text" : "status", "children" : [ { + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/current", "info" : { "GET" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : "node", + "method" : "GET", "parameters" : { - "additionalProperties" : 0, "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 - }, "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" } - } + }, + "additionalProperties" : 0 }, - "description" : "Get virtual machine status.", - "method" : "GET", "name" : "vm_status", + "protected" : 1, "returns" : { "type" : "object" - } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "description" : "Get virtual machine status." } }, - "path" : "/nodes/{node}/lxc/{vmid}/status/current", - "leaf" : 1, "text" : "current" }, { - "text" : "start", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/start", "info" : { "POST" : { - "name" : "vm_start", - "method" : "POST", + "proxyto" : "node", + "description" : "Start the container.", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, "returns" : { "type" : "string" }, - "description" : "Start the container.", - "proxyto" : "node", + "protected" : 1, + "name" : "vm_start", "parameters" : { "additionalProperties" : 0, "properties" : { - "skiplock" : { - "type" : "boolean", - "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." - }, "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" }, + "skiplock" : { + "optional" : 1, + "type" : "boolean", + "description" : "Ignore locks - only root is allowed to use this option." + }, "vmid" : { + "description" : "The (unique) ID of the VM.", "type" : "integer", - "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid" } } }, + "method" : "POST" + } + }, + "text" : "start", + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/start" + }, + { + "info" : { + "POST" : { + "returns" : { + "type" : "string" + }, "permissions" : { "check" : [ "perm", @@ -12153,42 +12207,77 @@ var pveapi = [ ] ] }, + "description" : "Stop the container. This will abruptly stop all processes running in the container.", + "proxyto" : "node", + "method" : "POST", + "name" : "vm_stop", + "parameters" : { + "properties" : { + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "type" : "boolean", + "optional" : 1 + }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + }, + "additionalProperties" : 0 + }, "protected" : 1 } - } + }, + "text" : "stop", + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/stop" }, { - "path" : "/nodes/{node}/lxc/{vmid}/status/stop", + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", "info" : { "POST" : { - "method" : "POST", - "name" : "vm_stop", - "returns" : { - "type" : "string" - }, - "description" : "Stop the container. This will abruptly stop all processes running in the container.", - "proxyto" : "node", + "protected" : 1, + "name" : "vm_shutdown", "parameters" : { "properties" : { "node" : { + "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "type" : "string" }, - "skiplock" : { + "forceStop" : { + "description" : "Make sure the Container stops.", + "optional" : 1, "type" : "boolean", + "default" : 0 + }, + "timeout" : { + "description" : "Wait maximal timeout seconds.", + "default" : 60, + "type" : "integer", "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." + "minimum" : 0 }, "vmid" : { - "type" : "integer", - "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" } }, "additionalProperties" : 0 }, + "method" : "POST", + "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -12198,23 +12287,23 @@ var pveapi = [ ] ] }, - "protected" : 1 + "returns" : { + "type" : "string" + } } }, - "leaf" : 1, - "text" : "stop" + "text" : "shutdown" }, { - "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", "info" : { "POST" : { - "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.", - "name" : "vm_shutdown", - "method" : "POST", "returns" : { "type" : "string" }, - "protected" : 1, + "proxyto" : "node", + "description" : "Suspend the container.", "permissions" : { "check" : [ "perm", @@ -12224,45 +12313,39 @@ var pveapi = [ ] ] }, - "proxyto" : "node", + "method" : "POST", + "protected" : 1, + "name" : "vm_suspend", "parameters" : { "additionalProperties" : 0, "properties" : { - "timeout" : { - "description" : "Wait maximal timeout seconds.", - "optional" : 1, + "vmid" : { "type" : "integer", - "default" : 60, - "minimum" : 0 + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "forceStop" : { - "type" : "boolean", - "default" : 0, - "description" : "Make sure the Container stops.", - "optional" : 1 - }, - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." + "type" : "string", + "format" : "pve-node" } } } } }, - "leaf" : 1, - "text" : "shutdown" + "text" : "suspend" }, { + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/resume", "info" : { "POST" : { - "protected" : 1, + "returns" : { + "type" : "string" + }, + "description" : "Resume the container.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -12272,87 +12355,348 @@ var pveapi = [ ] ] }, - "proxyto" : "node", + "method" : "POST", + "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { "node" : { - "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "format" : "pve-node" }, "vmid" : { - "minimum" : 1, "type" : "integer", + "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." + "minimum" : 1 } - } + }, + "additionalProperties" : 0 }, - "description" : "Suspend the container.", - "returns" : { - "type" : "string" + "name" : "vm_resume" + } + }, + "text" : "resume" + } + ], + "info" : { + "GET" : { + "proxyto" : "node", + "description" : "Directory index", + "name" : "vmcmdidx", + "permissions" : { + "user" : "all" + }, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" }, - "method" : "POST", - "name" : "vm_suspend" + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "description" : "The (unique) ID of the VM." + } } }, - "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", - "text" : "suspend", - "leaf" : 1 - }, + "method" : "GET", + "returns" : { + "type" : "array", + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "rel" : "child", + "href" : "{subdir}" + } + ] + } + } + } + }, + { + "path" : "/nodes/{node}/lxc/{vmid}/snapshot", + "leaf" : 0, + "text" : "snapshot", + "children" : [ { + "text" : "{snapname}", + "children" : [ + { + "info" : { + "POST" : { + "returns" : { + "type" : "string", + "description" : "the task ID." + }, + "proxyto" : "node", + "description" : "Rollback LXC state to specified snapshot.", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "method" : "POST", + "protected" : 1, + "parameters" : { + "properties" : { + "snapname" : { + "format" : "pve-configid", + "maxLength" : 40, + "description" : "The name of the snapshot.", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + } + }, + "additionalProperties" : 0 + }, + "name" : "rollback" + } + }, + "text" : "rollback", + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback" + }, + { + "text" : "config", + "info" : { + "GET" : { + "returns" : { + "type" : "object" + }, + "method" : "GET", + "description" : "Get snapshot configuration", + "proxyto" : "node", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "snapname" : { + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "description" : "The name of the snapshot." + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "name" : "get_snapshot_config" + }, + "PUT" : { + "protected" : 1, + "name" : "update_snapshot_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "type" : "string", + "format" : "pve-configid", + "maxLength" : 40 + }, + "description" : { + "description" : "A textual description or comment.", + "type" : "string", + "optional" : 1 + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + } + } + }, + "method" : "PUT", + "description" : "Update snapshot metadata.", + "proxyto" : "node", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "returns" : { + "type" : "null" + } + } + }, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config", + "leaf" : 1 + } + ], "info" : { - "POST" : { + "GET" : { "parameters" : { - "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, "vmid" : { "description" : "The (unique) ID of the VM.", - "minimum" : 1, "type" : "integer", + "minimum" : 1, "format" : "pve-vmid" + }, + "snapname" : { + "type" : "string", + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40 + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" } - } + }, + "additionalProperties" : 0 }, - "proxyto" : "node", + "name" : "snapshot_cmd_idx", + "permissions" : { + "user" : "all" + }, + "description" : "", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{cmd}", + "rel" : "child" + } + ], + "type" : "array" + }, + "method" : "GET" + }, + "DELETE" : { "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.PowerMgmt" + "VM.Snapshot" ] ] }, - "protected" : 1, + "proxyto" : "node", + "description" : "Delete a LXC snapshot.", "returns" : { + "description" : "the task ID.", "type" : "string" }, - "name" : "vm_resume", - "method" : "POST", - "description" : "Resume the container." + "name" : "delsnapshot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "force" : { + "description" : "For removal from config file, even if removing disk snapshots fails.", + "type" : "boolean", + "optional" : 1 + }, + "snapname" : { + "maxLength" : 40, + "format" : "pve-configid", + "type" : "string", + "description" : "The name of the snapshot." + } + } + }, + "protected" : 1, + "method" : "DELETE" } }, - "path" : "/nodes/{node}/lxc/{vmid}/status/resume", - "text" : "resume", - "leaf" : 1 + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", + "leaf" : 0 } ], "info" : { "GET" : { - "description" : "Directory index", "permissions" : { - "user" : "all" - }, - "name" : "vmcmdidx", - "method" : "GET", + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "description" : "List all snapshots.", "proxyto" : "node", + "returns" : { + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + }, "parameters" : { "properties" : { "node" : { @@ -12361,823 +12705,452 @@ var pveapi = [ "description" : "The cluster node name." }, "vmid" : { - "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "description" : "The (unique) ID of the VM.", + "type" : "integer" } }, "additionalProperties" : 0 }, - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "subdir" : { - "type" : "string" - } - } - }, - "type" : "array", - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ] - } - } - }, - "leaf" : 0, - "text" : "status" - }, - { - "info" : { - "POST" : { - "description" : "Snapshot a container.", - "returns" : { - "type" : "string", - "description" : "the task ID." - }, - "name" : "snapshot", - "method" : "POST", + "name" : "list", "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, + "method" : "GET" + }, + "POST" : { "parameters" : { "additionalProperties" : 0, "properties" : { "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", "type" : "integer", - "description" : "The (unique) ID of the VM." + "format" : "pve-vmid", + "minimum" : 1 + }, + "description" : { + "type" : "string", + "optional" : 1, + "description" : "A textual description or comment." }, "snapname" : { - "maxLength" : 40, "description" : "The name of the snapshot.", - "format" : "pve-configid", - "type" : "string" - }, - "node" : { - "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "maxLength" : 40, + "format" : "pve-configid" }, - "description" : { - "optional" : 1, - "description" : "A textual description or comment.", - "type" : "string" - } - } - }, - "proxyto" : "node" - }, - "GET" : { - "name" : "list", - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ] - }, - "description" : "List all snapshots.", - "parameters" : { - "properties" : { "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 } - }, - "additionalProperties" : 0 + } }, - "proxyto" : "node", + "name" : "snapshot", "protected" : 1, + "method" : "POST", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Snapshot" ] ] + }, + "description" : "Snapshot a container.", + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" } } - }, + } + }, + { "children" : [ { - "info" : { - "DELETE" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "force" : { - "description" : "For removal from config file, even if removing disk snapshots fails.", - "optional" : 1, - "type" : "boolean" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "maxLength" : 40, - "type" : "string", - "format" : "pve-configid" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "description" : "Delete a LXC snapshot.", - "name" : "delsnapshot", - "method" : "DELETE", - "returns" : { - "type" : "string", - "description" : "the task ID." - } - }, - "GET" : { - "description" : "", - "permissions" : { - "user" : "all" - }, - "method" : "GET", - "name" : "snapshot_cmd_idx", - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{cmd}" - } - ], - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - } - }, - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "snapname" : { - "format" : "pve-configid", - "type" : "string", - "maxLength" : 40, - "description" : "The name of the snapshot." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - } - } - }, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", + "text" : "rules", "children" : [ { + "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}", "leaf" : 1, - "text" : "rollback", + "text" : "{pos}", "info" : { - "POST" : { - "description" : "Rollback LXC state to specified snapshot.", - "name" : "rollback", - "method" : "POST", + "GET" : { "returns" : { - "description" : "the task ID.", - "type" : "string" - }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "parameters" : { "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "snapname" : { - "maxLength" : 40, - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "type" : "string" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "pos" : { + "type" : "integer" } }, - "additionalProperties" : 0 - }, - "proxyto" : "node" - } - }, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback" - }, - { - "leaf" : 1, - "text" : "config", - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "description" : "Get snapshot configuration", - "method" : "GET", - "name" : "get_snapshot_config", - "returns" : { "type" : "object" }, + "method" : "GET", "parameters" : { - "additionalProperties" : 0, "properties" : { - "snapname" : { - "format" : "pve-configid", - "type" : "string", - "maxLength" : 40, - "description" : "The name of the snapshot." - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, "vmid" : { + "type" : "integer", "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", - "type" : "integer", "minimum" : 1 + }, + "pos" : { + "type" : "integer", + "optional" : 1, + "description" : "Update rule at position .", + "minimum" : 0 + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." } - } - }, - "proxyto" : "node" - }, - "PUT" : { - "description" : "Update snapshot metadata.", - "name" : "update_snapshot_config", - "method" : "PUT", - "returns" : { - "type" : "null" + }, + "additionalProperties" : 0 }, - "protected" : 1, + "name" : "get_rule", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Snapshot" + "VM.Audit" ] ] }, + "proxyto" : null, + "description" : "Get single rule data." + }, + "PUT" : { "parameters" : { - "additionalProperties" : 0, "properties" : { - "snapname" : { - "description" : "The name of the snapshot.", - "maxLength" : 40, + "dest" : { "type" : "string", - "format" : "pve-configid" + "optional" : 1, + "description" : "Restrict 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" }, - "description" : { + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "type" : "string", - "description" : "A textual description or comment.", "optional" : 1 }, - "node" : { - "description" : "The cluster node name.", + "source" : { + "format" : "pve-fw-addr-spec", "type" : "string", - "format" : "pve-node" + "optional" : 1, + "description" : "Restrict 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." }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, + "moveto" : { + "minimum" : 0, "type" : "integer", - "format" : "pve-vmid" - } - } - }, - "proxyto" : "node" - } - }, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config" - } - ], - "leaf" : 0, - "text" : "{snapname}" - } - ], - "path" : "/nodes/{node}/lxc/{vmid}/snapshot", - "text" : "snapshot", - "leaf" : 0 - }, - { - "children" : [ - { - "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", - "children" : [ - { - "info" : { - "PUT" : { - "description" : "Modify rule data.", - "returns" : { - "type" : "null" - }, - "name" : "update_rule", - "method" : "PUT", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "dest" : { - "format" : "pve-fw-addr-spec", + "optional" : 1, + "description" : "Move rule to new position . Other arguments are ignored." + }, + "node" : { "type" : "string", - "description" : "Restrict 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.", - "optional" : 1 + "description" : "The cluster node name.", + "format" : "pve-node" }, - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "comment" : { "optional" : 1, - "maxLength" : 20, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "type" : "string" }, - "comment" : { + "delete" : { "type" : "string", - "optional" : 1 + "optional" : 1, + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list" }, - "pos" : { - "type" : "integer", - "minimum" : 0, + "dport" : { + "format" : "pve-fw-dport-spec", + "type" : "string", "optional" : 1, - "description" : "Update rule at position ." + "description" : "Restrict 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." }, "type" : { + "optional" : 1, + "type" : "string", "enum" : [ "in", "out", "group" - ], + ] + }, + "sport" : { + "description" : "Restrict 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.", "optional" : 1, - "type" : "string" + "type" : "string", + "format" : "pve-fw-sport-spec" }, "iface" : { - "description" : "Network 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", "maxLength" : 20, - "optional" : 1, "minLength" : 2, - "format" : "pve-iface", + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "optional" : 1, "type" : "string" }, - "digest" : { - "type" : "string", - "maxLength" : 40, + "pos" : { "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + "type" : "integer", + "description" : "Update rule at position .", + "minimum" : 0 }, - "source" : { - "optional" : 1, - "description" : "Restrict 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.", + "proto" : { "type" : "string", - "format" : "pve-fw-addr-spec" + "optional" : 1, + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec" }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "macro" : { + "optional" : 1, "type" : "string", - "maxLength" : 128, - "optional" : 1 - }, - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." + "maxLength" : 128 }, "enable" : { - "optional" : 1, "minimum" : 0, - "type" : "integer" - }, - "moveto" : { - "optional" : 1, - "description" : "Move rule to new position . Other arguments are ignored.", "type" : "integer", - "minimum" : 0 - }, - "dport" : { - "description" : "Restrict 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.", - "optional" : 1, - "format" : "pve-fw-dport-spec", - "type" : "string" + "optional" : 1 }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "optional" : 1, + "action" : { "type" : "string", - "format" : "pve-fw-protocol-spec" - }, - "sport" : { "optional" : 1, - "description" : "Restrict 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", - "type" : "string" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "optional" : 1, - "type" : "string", - "format" : "pve-configid-list" + "minLength" : 2, + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "maxLength" : 20 } - } + }, + "additionalProperties" : 0 }, - "proxyto" : null + "name" : "update_rule", + "protected" : 1, + "method" : "PUT", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "description" : "Modify rule data.", + "proxyto" : null, + "returns" : { + "type" : "null" + } }, "DELETE" : { + "name" : "delete_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "digest" : { + "node" : { + "description" : "The cluster node name.", "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "optional" : 1 + "format" : "pve-node" }, "pos" : { - "type" : "integer", "minimum" : 0, - "description" : "Update rule at position .", - "optional" : 1 + "type" : "integer", + "optional" : 1, + "description" : "Update rule at position ." }, - "node" : { + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + }, + "digest" : { + "maxLength" : 40, "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." } } }, - "proxyto" : null, "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, "method" : "DELETE", - "name" : "delete_rule", - "returns" : { - "type" : "null" - }, - "description" : "Delete rule." - }, - "GET" : { - "description" : "Get single rule data.", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Config.Network" ] ] }, "proxyto" : null, - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - }, - "pos" : { - "description" : "Update rule at position .", - "optional" : 1, - "minimum" : 0, - "type" : "integer" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - }, + "description" : "Delete rule.", "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "method" : "GET", - "name" : "get_rule" + "type" : "null" + } } - }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}", - "leaf" : 1, - "text" : "{pos}" + } } ], "info" : { - "POST" : { - "description" : "Create new rule.", - "method" : "POST", - "name" : "create_rule", - "returns" : { - "type" : "null" + "GET" : { + "parameters" : { + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" + } + }, + "additionalProperties" : 0 }, - "protected" : 1, "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Config.Network" + "VM.Audit" ] ] }, + "name" : "get_rules", "proxyto" : null, + "description" : "List rules.", + "returns" : { + "type" : "array", + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "rel" : "child", + "href" : "{pos}" + } + ] + }, + "method" : "GET" + }, + "POST" : { + "protected" : 1, + "name" : "create_rule", "parameters" : { "properties" : { - "dest" : { - "description" : "Restrict 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.", - "optional" : 1, - "type" : "string", - "format" : "pve-fw-addr-spec" + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, - "node" : { + "proto" : { + "optional" : 1, "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec" }, "pos" : { - "type" : "integer", "minimum" : 0, "description" : "Update rule at position .", - "optional" : 1 + "optional" : 1, + "type" : "integer" }, - "action" : { + "macro" : { "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "optional" : 0, - "maxLength" : 20, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name." + "optional" : 1, + "maxLength" : 128 }, - "comment" : { + "action" : { + "maxLength" : 20, "type" : "string", - "optional" : 1 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "minLength" : 2 }, "type" : { - "type" : "string", "enum" : [ "in", "out", "group" ], - "optional" : 0 - }, - "macro" : { - "type" : "string", - "maxLength" : 128, - "optional" : 1 - }, - "dport" : { - "description" : "Restrict 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.", - "optional" : 1, - "format" : "pve-fw-dport-spec", + "optional" : 0, "type" : "string" }, "enable" : { "type" : "integer", - "minimum" : 0, - "optional" : 1 + "optional" : 1, + "minimum" : 0 }, - "digest" : { + "dport" : { + "format" : "pve-fw-dport-spec", "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" + "type" : "string", + "description" : "Restrict 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." }, - "iface" : { + "sport" : { + "format" : "pve-fw-sport-spec", "type" : "string", - "format" : "pve-iface", - "minLength" : 2, - "maxLength" : 20, "optional" : 1, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings." + "description" : "Restrict 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." }, - "proto" : { - "type" : "string", - "format" : "pve-fw-protocol-spec", + "dest" : { "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." + "type" : "string", + "description" : "Restrict 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" }, - "sport" : { - "description" : "Restrict 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.", + "digest" : { + "maxLength" : 40, "optional" : 1, "type" : "string", - "format" : "pve-fw-sport-spec" + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." }, "source" : { - "optional" : 1, - "description" : "Restrict 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", + "description" : "Restrict 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.", + "optional" : 1, "type" : "string" - } - }, - "additionalProperties" : 0 - } - }, - "GET" : { - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "pos" : { - "type" : "integer" - } - } - }, - "links" : [ - { - "rel" : "child", - "href" : "{pos}" - } - ] - }, - "proxyto" : null, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" - } - } - }, - "method" : "GET", - "name" : "get_rules", - "description" : "List rules.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - } - } - }, - "leaf" : 0, - "text" : "rules" - }, - { - "leaf" : 0, - "text" : "aliases", - "info" : { - "POST" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64, - "description" : "Alias name." - }, - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "cidr" : { - "type" : "string", - "format" : "IPorCIDR", - "description" : "Network/IP specification in CIDR format." }, "comment" : { "optional" : 1, "type" : "string" }, "node" : { + "description" : "The cluster node name.", "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "format" : "pve-node" + }, + "iface" : { + "maxLength" : 20, + "format" : "pve-iface", + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "minLength" : 2, + "optional" : 1, + "type" : "string" } - } - }, - "returns" : { - "type" : "null" + }, + "additionalProperties" : 0 }, "method" : "POST", - "name" : "create_alias", - "description" : "Create IP or Network Alias.", + "description" : "Create new rule.", + "proxyto" : null, "permissions" : { "check" : [ "perm", @@ -13187,282 +13160,242 @@ var pveapi = [ ] ] }, - "protected" : 1 - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "description" : "List aliases", - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, "returns" : { - "type" : "array", - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "digest" : { - "type" : "string", - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0 - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "name" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] - }, - "name" : "get_aliases", - "method" : "GET" + "type" : "null" + } } }, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", + "leaf" : 0 + }, + { "children" : [ { - "text" : "{name}", - "leaf" : 1, "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}", + "leaf" : 1, + "text" : "{name}", "info" : { - "DELETE" : { - "description" : "Remove IP or Network alias.", + "GET" : { + "returns" : { + "type" : "object" + }, + "method" : "GET", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Config.Network" + "VM.Audit" ] ] }, + "parameters" : { + "properties" : { + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "name" : { + "type" : "string", + "minLength" : 2, + "description" : "Alias name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "maxLength" : 64 + } + }, + "additionalProperties" : 0 + }, + "name" : "read_alias", + "description" : "Read alias." + }, + "PUT" : { "protected" : 1, + "description" : "Update IP or Network alias.", "parameters" : { "properties" : { - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "comment" : { + "type" : "string", + "optional" : 1 + }, + "rename" : { + "maxLength" : 64, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rename an existing alias.", + "minLength" : 2, "optional" : 1, "type" : "string" }, - "node" : { + "name" : { + "maxLength" : 64, "type" : "string", + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Alias name." + }, + "node" : { "format" : "pve-node", + "type" : "string", "description" : "The cluster node name." }, + "digest" : { + "type" : "string", + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, + "cidr" : { + "type" : "string", + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR" + }, "vmid" : { + "minimum" : 1, "format" : "pve-vmid", "type" : "integer", - "minimum" : 1, "description" : "The (unique) ID of the VM." - }, - "name" : { - "type" : "string", - "maxLength" : 64, - "description" : "Alias name.", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" } }, "additionalProperties" : 0 }, - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "name" : "remove_alias" - }, - "GET" : { - "description" : "Read alias.", + "name" : "update_alias", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Config.Network" ] ] }, "returns" : { - "type" : "object" + "type" : "null" }, - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "name" : "read_alias", - "method" : "GET" + "method" : "PUT" }, - "PUT" : { - "name" : "update_alias", - "method" : "PUT", + "DELETE" : { "returns" : { "type" : "null" }, + "method" : "DELETE", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, "parameters" : { "additionalProperties" : 0, "properties" : { - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, "name" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "maxLength" : 64, - "description" : "Alias name.", - "type" : "string" - }, - "digest" : { "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "maxLength" : 40 + "description" : "Alias name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2 }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "rename" : { "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64, - "description" : "Rename an existing alias.", - "optional" : 1 + "format" : "pve-node" }, - "cidr" : { - "format" : "IPorCIDR", + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" + }, + "digest" : { + "maxLength" : 40, + "optional" : 1, "type" : "string", - "description" : "Network/IP specification in CIDR format." + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." } } }, + "name" : "remove_alias", "protected" : 1, - "description" : "Update IP or Network alias.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - } + "description" : "Remove IP or Network alias." } } } ], - "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases" - }, - { - "text" : "ipset", - "leaf" : 0, + "text" : "aliases", "info" : { - "POST" : { - "name" : "create_ipset", - "method" : "POST", + "GET" : { + "method" : "GET", + "returns" : { + "items" : { + "type" : "object", + "properties" : { + "digest" : { + "maxLength" : 40, + "type" : "string", + "optional" : 0, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "cidr" : { + "type" : "string" + }, + "comment" : { + "type" : "string", + "optional" : 1 + }, + "name" : { + "type" : "string" + } + } + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + }, + "description" : "List aliases", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, "node" : { - "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "maxLength" : 40, - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" + "description" : "The cluster node name.", + "format" : "pve-node" }, - "rename" : { - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64, - "optional" : 1, - "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet." + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 } - }, - "additionalProperties" : 0 + } }, + "name" : "get_aliases" + }, + "POST" : { "returns" : { "type" : "null" }, + "method" : "POST", "permissions" : { "check" : [ "perm", @@ -13472,11 +13405,51 @@ var pveapi = [ ] ] }, - "description" : "Create new IPSet", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string", + "description" : "Alias name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "maxLength" : 64 + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 + }, + "cidr" : { + "type" : "string", + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR" + } + } + }, + "name" : "create_alias", + "description" : "Create IP or Network Alias.", "protected" : 1 - }, + } + }, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases", + "leaf" : 0 + }, + { + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", + "info" : { "GET" : { - "description" : "List IPSets", "permissions" : { "check" : [ "perm", @@ -13486,6 +13459,7 @@ var pveapi = [ ] ] }, + "name" : "ipset_index", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -13495,58 +13469,120 @@ var pveapi = [ "description" : "The cluster node name." }, "vmid" : { - "minimum" : 1, "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" } } }, + "description" : "List IPSets", + "method" : "GET", "returns" : { + "type" : "array", + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], "items" : { "type" : "object", "properties" : { + "comment" : { + "type" : "string", + "optional" : 1 + }, "name" : { - "description" : "IP set name.", "maxLength" : 64, + "description" : "IP set name.", "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "minLength" : 2, "type" : "string" }, - "comment" : { - "optional" : 1, - "type" : "string" - }, "digest" : { "type" : "string", - "maxLength" : 40, + "optional" : 0, "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0 + "maxLength" : 40 } } - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } + } + } + }, + "POST" : { + "method" : "POST", + "returns" : { + "type" : "null" + }, + "protected" : 1, + "description" : "Create new IPSet", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] ] }, - "method" : "GET", - "name" : "ipset_index" + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 + }, + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "optional" : 1, + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "rename" : { + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", + "type" : "string", + "optional" : 1, + "maxLength" : 64 + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "name" : { + "minLength" : 2, + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string", + "maxLength" : 64 + } + } + }, + "name" : "create_ipset" } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", + "text" : "ipset", "children" : [ { - "text" : "{name}", - "leaf" : 0, "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}", + "leaf" : 0, "children" : [ { "info" : { "DELETE" : { + "returns" : { + "type" : "null" + }, + "method" : "DELETE", "permissions" : { "check" : [ "perm", @@ -13556,144 +13592,91 @@ var pveapi = [ ] ] }, - "description" : "Remove IP or Network from IPSet.", - "protected" : 1, - "name" : "remove_ip", - "method" : "DELETE", "parameters" : { "additionalProperties" : 0, "properties" : { - "cidr" : { - "type" : "string", - "format" : "IPorCIDRorAlias", - "description" : "Network/IP specification in CIDR format." - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" }, "digest" : { - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "maxLength" : 40, - "type" : "string" - }, - "name" : { "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 64, - "description" : "IP set name." - }, - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - } - } - }, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "description" : "Read IP or Network settings from IPSet.", - "protected" : 1, - "name" : "read_ip", - "method" : "GET", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." }, "cidr" : { - "description" : "Network/IP specification in CIDR format.", "type" : "string", + "description" : "Network/IP specification in CIDR format.", "format" : "IPorCIDRorAlias" }, - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, "name" : { "maxLength" : 64, + "minLength" : 2, "description" : "IP set name.", "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, "type" : "string" + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" } } }, - "returns" : { - "type" : "object" - } + "name" : "remove_ip", + "protected" : 1, + "description" : "Remove IP or Network from IPSet." }, "PUT" : { - "method" : "PUT", - "name" : "update_ip", "returns" : { "type" : "null" }, + "method" : "PUT", "parameters" : { "additionalProperties" : 0, "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, + "cidr" : { + "format" : "IPorCIDRorAlias", + "description" : "Network/IP specification in CIDR format.", "type" : "string" }, + "digest" : { + "optional" : 1, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, "vmid" : { - "description" : "The (unique) ID of the VM.", "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 + "description" : "The (unique) ID of the VM.", + "minimum" : 1, + "format" : "pve-vmid" }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string" + "nomatch" : { + "optional" : 1, + "type" : "boolean" }, "node" : { + "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" }, - "digest" : { - "type" : "string", - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1 + "name" : { + "maxLength" : 64, + "minLength" : 2, + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" }, "comment" : { "type" : "string", "optional" : 1 - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" } } }, - "protected" : 1, - "description" : "Update IP or Network settings", "permissions" : { "check" : [ "perm", @@ -13702,84 +13685,178 @@ var pveapi = [ "VM.Config.Network" ] ] - } + }, + "name" : "update_ip", + "description" : "Update IP or Network settings", + "protected" : 1 + }, + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object" + }, + "name" : "read_ip", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "parameters" : { + "properties" : { + "cidr" : { + "format" : "IPorCIDRorAlias", + "type" : "string", + "description" : "Network/IP specification in CIDR format." + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "The (unique) ID of the VM." + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "name" : { + "maxLength" : 64, + "type" : "string", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "IP set name.", + "minLength" : 2 + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "description" : "Read IP or Network settings from IPSet." } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}", + "text" : "{cidr}", "leaf" : 1, - "text" : "{cidr}" + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}" } ], + "text" : "{name}", "info" : { "GET" : { - "name" : "get_ipset", - "method" : "GET", - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{cidr}" + "description" : "List IPSet content", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "minLength" : 2, + "type" : "string", + "maxLength" : 64 + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" } - ], + } + }, + "name" : "get_ipset", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "type" : "array", "items" : { + "type" : "object", "properties" : { "cidr" : { "type" : "string" }, "digest" : { - "maxLength" : 40, - "optional" : 0, "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" + "optional" : 0, + "type" : "string", + "maxLength" : 40 }, "comment" : { "optional" : 1, "type" : "string" + }, + "nomatch" : { + "type" : "boolean", + "optional" : 1 } - }, - "type" : "object" + } }, - "type" : "array" + "links" : [ + { + "rel" : "child", + "href" : "{cidr}" + } + ] + }, + "method" : "GET" + }, + "DELETE" : { + "returns" : { + "type" : "null" }, + "method" : "DELETE", + "name" : "delete_ipset", "parameters" : { - "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, "vmid" : { - "type" : "integer", "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" }, "name" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "minLength" : 2, "description" : "IP set name.", - "maxLength" : 64, - "type" : "string" + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string", + "maxLength" : 64 } - } + }, + "additionalProperties" : 0 }, "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Config.Network" ] ] }, - "description" : "List IPSet content" + "protected" : 1, + "description" : "Delete IPSet" }, - "DELETE" : { + "POST" : { + "description" : "Add IP or Network to IPSet.", + "protected" : 1, + "name" : "create_ip", "permissions" : { "check" : [ "perm", @@ -13789,162 +13866,121 @@ var pveapi = [ ] ] }, - "description" : "Delete IPSet", - "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "nomatch" : { + "type" : "boolean", + "optional" : 1 }, "name" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "description" : "IP set name.", "maxLength" : 64, - "type" : "string" - } - } - }, - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "name" : "delete_ipset" - }, - "POST" : { - "returns" : { - "type" : "null" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "type" : "string", "description" : "IP set name.", - "maxLength" : 64, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" + "minLength" : 2, + "type" : "string" }, - "cidr" : { + "node" : { "type" : "string", - "format" : "IPorCIDRorAlias", - "description" : "Network/IP specification in CIDR format." - }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 + "description" : "The cluster node name.", + "format" : "pve-node" }, "comment" : { "optional" : 1, "type" : "string" }, - "node" : { - "format" : "pve-node", + "cidr" : { + "description" : "Network/IP specification in CIDR format.", "type" : "string", - "description" : "The cluster node name." + "format" : "IPorCIDRorAlias" + }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" } - } + }, + "additionalProperties" : 0 }, - "method" : "POST", - "name" : "create_ip", - "protected" : 1, - "description" : "Add IP or Network to IPSet.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - } + "returns" : { + "type" : "null" + }, + "method" : "POST" } } } ] }, { - "leaf" : 1, "text" : "options", "info" : { - "PUT" : { - "name" : "set_options", - "method" : "PUT", + "GET" : { + "method" : "GET", "returns" : { - "type" : "null" - }, - "description" : "Set Firewall options.", - "parameters" : { + "type" : "object", "properties" : { - "node" : { + "log_level_in" : { + "optional" : 1, "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ] }, "policy_out" : { - "type" : "string", - "description" : "Output policy.", - "optional" : 1, "enum" : [ "ACCEPT", "REJECT", "DROP" - ] + ], + "description" : "Output policy.", + "optional" : 1, + "type" : "string" }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", + "radv" : { + "description" : "Allow sending Router Advertisement.", + "type" : "boolean", + "optional" : 1 + }, + "ipfilter" : { "optional" : 1, - "type" : "boolean" + "type" : "boolean", + "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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." }, "policy_in" : { + "description" : "Input policy.", "enum" : [ "ACCEPT", "REJECT", "DROP" ], - "optional" : 1, - "description" : "Input policy.", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer" + "type" : "string", + "optional" : 1 }, - "dhcp" : { + "macfilter" : { + "description" : "Enable/disable MAC address filter.", "optional" : 1, - "description" : "Enable DHCP.", "type" : "boolean" }, "ndp" : { + "optional" : 1, "type" : "boolean", - "description" : "Enable NDP.", - "optional" : 1 + "description" : "Enable NDP." }, - "ipfilter" : { - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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.", + "dhcp" : { + "description" : "Enable DHCP.", "optional" : 1, "type" : "boolean" }, - "log_level_in" : { - "optional" : 1, - "description" : "Log level for incoming traffic.", + "log_level_out" : { "enum" : [ "emerg", "alert", @@ -13956,21 +13992,58 @@ var pveapi = [ "debug", "nolog" ], + "description" : "Log level for outgoing traffic.", + "optional" : 1, "type" : "string" }, "enable" : { - "type" : "boolean", + "description" : "Enable/disable firewall rules.", "optional" : 1, - "description" : "Enable/disable firewall rules." + "type" : "boolean" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "parameters" : { + "properties" : { + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 }, - "digest" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, + "name" : "get_options", + "description" : "Get VM firewall options.", + "proxyto" : "node" + }, + "PUT" : { + "protected" : 1, + "name" : "set_options", + "parameters" : { + "properties" : { + "enable" : { + "description" : "Enable/disable firewall rules.", "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, - "type" : "string" + "type" : "boolean" }, "log_level_out" : { - "type" : "string", + "description" : "Log level for outgoing traffic.", "enum" : [ "emerg", "alert", @@ -13982,97 +14055,32 @@ var pveapi = [ "debug", "nolog" ], - "description" : "Log level for outgoing traffic.", + "type" : "string", "optional" : 1 }, - "radv" : { - "description" : "Allow sending Router Advertisement.", - "optional" : 1, - "type" : "boolean" + "vmid" : { + "type" : "integer", + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1 }, "delete" : { "type" : "string", - "format" : "pve-configid-list", "optional" : 1, - "description" : "A list of settings you want to delete." - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1 - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "description" : "Get VM firewall options.", - "method" : "GET", - "name" : "get_options", - "returns" : { - "properties" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list" + }, "policy_out" : { - "optional" : 1, - "description" : "Output policy.", "enum" : [ "ACCEPT", "REJECT", "DROP" ], - "type" : "string" - }, - "ipfilter" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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." - }, - "dhcp" : { - "description" : "Enable DHCP.", - "optional" : 1, - "type" : "boolean" - }, - "ndp" : { - "optional" : 1, - "description" : "Enable NDP.", - "type" : "boolean" - }, - "policy_in" : { + "description" : "Output policy.", "type" : "string", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "description" : "Input policy.", "optional" : 1 }, - "macfilter" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable MAC address filter." - }, - "enable" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable firewall rules." - }, "log_level_in" : { - "type" : "string", "enum" : [ "emerg", "alert", @@ -14085,104 +14093,126 @@ var pveapi = [ "nolog" ], "description" : "Log level for incoming traffic.", + "type" : "string", "optional" : 1 }, - "radv" : { + "ipfilter" : { + "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net 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.", "optional" : 1, - "description" : "Allow sending Router Advertisement.", "type" : "boolean" }, - "log_level_out" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "radv" : { + "description" : "Allow sending Router Advertisement.", + "type" : "boolean", + "optional" : 1 + }, + "macfilter" : { + "type" : "boolean", + "optional" : 1, + "description" : "Enable/disable MAC address filter." + }, + "policy_in" : { "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "ACCEPT", + "REJECT", + "DROP" ], + "description" : "Input policy.", + "type" : "string", + "optional" : 1 + }, + "ndp" : { + "description" : "Enable NDP.", + "type" : "boolean", + "optional" : 1 + }, + "digest" : { + "maxLength" : 40, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "optional" : 1, - "description" : "Log level for outgoing traffic.", "type" : "string" + }, + "dhcp" : { + "type" : "boolean", + "optional" : 1, + "description" : "Enable DHCP." } }, - "type" : "object" + "additionalProperties" : 0 }, + "method" : "PUT", "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } + "description" : "Set Firewall options.", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "returns" : { + "type" : "null" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/options" + "path" : "/nodes/{node}/lxc/{vmid}/firewall/options", + "leaf" : 1 }, { - "path" : "/nodes/{node}/lxc/{vmid}/firewall/log", "info" : { "GET" : { - "name" : "log", "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "t" : { - "description" : "Line text", - "type" : "string" - }, - "n" : { - "description" : "Line number", - "type" : "integer" - } - } - } - }, - "description" : "Read firewall log", - "proxyto" : "node", + "name" : "log", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" }, "limit" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, - "start" : { + "optional" : 1, "type" : "integer", - "minimum" : 0, - "optional" : 1 + "minimum" : 0 }, "vmid" : { - "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer" } } }, "protected" : 1, + "returns" : { + "items" : { + "properties" : { + "t" : { + "description" : "Line text", + "type" : "string" + }, + "n" : { + "description" : "Line number", + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + }, "permissions" : { "check" : [ "perm", @@ -14191,17 +14221,20 @@ var pveapi = [ "VM.Console" ] ] - } + }, + "proxyto" : "node", + "description" : "Read firewall log" } }, "text" : "log", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/log" }, { "text" : "refs", - "leaf" : 1, "info" : { "GET" : { + "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", "permissions" : { "check" : [ "perm", @@ -14211,42 +14244,38 @@ var pveapi = [ ] ] }, - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "method" : "GET", - "name" : "refs", "parameters" : { + "additionalProperties" : 0, "properties" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, "type" : { "type" : "string", + "optional" : 1, "enum" : [ "alias", "ipset" ], - "description" : "Only list references of specified type.", - "optional" : 1 - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "description" : "Only list references of specified type." }, "node" : { + "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" } - }, - "additionalProperties" : 0 + } }, + "name" : "refs", + "method" : "GET", "returns" : { "type" : "array", "items" : { "type" : "object", "properties" : { - "name" : { - "type" : "string" - }, "type" : { "type" : "string", "enum" : [ @@ -14254,6 +14283,9 @@ var pveapi = [ "ipset" ] }, + "name" : { + "type" : "string" + }, "comment" : { "type" : "string", "optional" : 1 @@ -14263,95 +14295,70 @@ var pveapi = [ } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs" + "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs", + "leaf" : 1 } ], - "path" : "/nodes/{node}/lxc/{vmid}/firewall", + "text" : "firewall", "info" : { "GET" : { + "description" : "Directory index.", "permissions" : { "user" : "all" }, - "description" : "Directory index.", - "method" : "GET", - "name" : "index", "parameters" : { "properties" : { "vmid" : { - "description" : "The (unique) ID of the VM.", "minimum" : 1, + "format" : "pve-vmid", "type" : "integer", - "format" : "pve-vmid" + "description" : "The (unique) ID of the VM." }, "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" + "type" : "string", + "description" : "The cluster node name." } }, "additionalProperties" : 0 }, + "name" : "index", + "method" : "GET", "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : {} + }, "links" : [ { - "href" : "{name}", - "rel" : "child" + "rel" : "child", + "href" : "{name}" } - ], - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - } + ] } } }, - "text" : "firewall", + "path" : "/nodes/{node}/lxc/{vmid}/firewall", "leaf" : 0 }, { "text" : "rrd", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/rrd", "info" : { "GET" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, "description" : "Read VM RRD statistics (returns PNG)", - "returns" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" - } - } - }, + "protected" : 1, + "name" : "rrd", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "cf" : { - "optional" : 1, - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "type" : "string" + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" }, "timeframe" : { + "type" : "string", "description" : "Specify the time frame you are interested in.", "enum" : [ "hour", @@ -14359,35 +14366,67 @@ var pveapi = [ "week", "month", "year" - ], - "type" : "string" + ] }, - "node" : { - "description" : "The cluster node name.", + "ds" : { + "description" : "The list of datasources you want to display.", "type" : "string", - "format" : "pve-node" + "format" : "pve-configid-list" }, - "ds" : { - "format" : "pve-configid-list", + "cf" : { + "optional" : 1, "type" : "string", - "description" : "The list of datasources you want to display." + "enum" : [ + "AVERAGE", + "MAX" + ], + "description" : "The RRD consolidation function" + }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" } - }, - "additionalProperties" : 0 + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, "method" : "GET", - "name" : "rrd" + "returns" : { + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" + } } - } + }, + "path" : "/nodes/{node}/lxc/{vmid}/rrd", + "leaf" : 1 }, { "text" : "rrddata", - "leaf" : 1, "info" : { "GET" : { "parameters" : { + "additionalProperties" : 0, "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, "timeframe" : { + "type" : "string", "description" : "Specify the time frame you are interested in.", "enum" : [ "hour", @@ -14395,41 +14434,25 @@ var pveapi = [ "week", "month", "year" - ], - "type" : "string" + ] + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "minimum" : 1, + "format" : "pve-vmid" }, "cf" : { "enum" : [ "AVERAGE", "MAX" ], - "optional" : 1, "description" : "The RRD consolidation function", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "optional" : 1 } - }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} } }, - "method" : "GET", - "name" : "rrddata", "permissions" : { "check" : [ "perm", @@ -14439,16 +14462,49 @@ var pveapi = [ ] ] }, + "name" : "rrddata", "description" : "Read VM RRD statistics", - "protected" : 1 + "protected" : 1, + "returns" : { + "type" : "array", + "items" : { + "properties" : {}, + "type" : "object" + } + }, + "method" : "GET" } }, - "path" : "/nodes/{node}/lxc/{vmid}/rrddata" + "path" : "/nodes/{node}/lxc/{vmid}/rrddata", + "leaf" : 1 }, { + "text" : "vncproxy", "info" : { "POST" : { + "protected" : 1, "description" : "Creates a TCP VNC proxy connections.", + "parameters" : { + "properties" : { + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "websocket" : { + "type" : "boolean", + "optional" : 1, + "description" : "use websocket instead of standard VNC." + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, "permissions" : { "check" : [ "perm", @@ -14458,98 +14514,76 @@ var pveapi = [ ] ] }, - "protected" : 1, "name" : "vncproxy", "method" : "POST", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "websocket" : { - "description" : "use websocket instead of standard VNC.", - "optional" : 1, - "type" : "boolean" - }, - "vmid" : { - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, "returns" : { + "additionalProperties" : 0, "properties" : { - "upid" : { + "cert" : { "type" : "string" }, - "ticket" : { + "upid" : { "type" : "string" }, "user" : { "type" : "string" }, - "cert" : { + "ticket" : { "type" : "string" }, "port" : { "type" : "integer" } - }, - "additionalProperties" : 0 + } } } }, "path" : "/nodes/{node}/lxc/{vmid}/vncproxy", - "leaf" : 1, - "text" : "vncproxy" + "leaf" : 1 }, { - "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket", + "text" : "vncwebsocket", "info" : { "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ], - "description" : "You also need to pass a valid ticket (vncticket)." - }, - "description" : "Opens a weksocket for VNC traffic.", "parameters" : { - "additionalProperties" : 0, "properties" : { - "vmid" : { - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM." + "vncticket" : { + "type" : "string", + "description" : "Ticket from previous call to vncproxy.", + "maxLength" : 512 }, "port" : { + "minimum" : 5900, "maximum" : 5999, "type" : "integer", - "minimum" : 5900, "description" : "Port number returned by previous vncproxy call." }, "node" : { + "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", - "maxLength" : 512, "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "type" : "integer", + "format" : "pve-vmid", + "minimum" : 1 } - } + }, + "additionalProperties" : 0 + }, + "name" : "vncwebsocket", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ], + "description" : "You also need to pass a valid ticket (vncticket)." }, + "description" : "Opens a weksocket for VNC traffic.", "returns" : { "type" : "object", "properties" : { @@ -14558,41 +14592,45 @@ var pveapi = [ } } }, - "method" : "GET", - "name" : "vncwebsocket" + "method" : "GET" } }, - "text" : "vncwebsocket", + "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket", "leaf" : 1 }, { "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy", + "leaf" : 1, + "text" : "spiceproxy", "info" : { "POST" : { - "proxyto" : "node", + "protected" : 1, "parameters" : { "additionalProperties" : 0, "properties" : { "vmid" : { - "type" : "integer", "format" : "pve-vmid", "minimum" : 1, + "type" : "integer", "description" : "The (unique) ID of the VM." }, "proxy" : { - "description" : "SPICE 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 resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", "optional" : 1, "type" : "string", + "description" : "SPICE 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 resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", "format" : "address" }, "node" : { "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" } } }, - "protected" : 1, + "name" : "spiceproxy", + "method" : "POST", + "description" : "Returns a SPICE configuration to connect to the CT.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -14603,51 +14641,52 @@ var pveapi = [ ] }, "returns" : { + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", + "additionalProperties" : 1, "properties" : { "type" : { "type" : "string" }, - "password" : { + "host" : { "type" : "string" }, "proxy" : { "type" : "string" }, - "host" : { - "type" : "string" - }, "tls-port" : { "type" : "integer" + }, + "password" : { + "type" : "string" } - }, - "additionalProperties" : 1, - "description" : "Returned values can be directly passed to the 'remote-viewer' application." - }, - "method" : "POST", - "name" : "spiceproxy", - "description" : "Returns a SPICE configuration to connect to the CT." + } + } } - }, - "text" : "spiceproxy", - "leaf" : 1 + } }, { - "text" : "migrate", "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/migrate", "info" : { "POST" : { + "method" : "POST", "parameters" : { "properties" : { + "target" : { + "format" : "pve-node", + "description" : "Target node.", + "type" : "string" + }, "vmid" : { - "description" : "The (unique) ID of the VM.", "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "online" : { - "optional" : 1, "description" : "Use online/live migration.", - "type" : "boolean" + "type" : "boolean", + "optional" : 1 }, "node" : { "format" : "pve-node", @@ -14655,19 +14694,19 @@ var pveapi = [ "description" : "The cluster node name." }, "force" : { - "type" : "boolean", "optional" : 1, + "type" : "boolean", "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node." - }, - "target" : { - "type" : "string", - "format" : "pve-node", - "description" : "Target node." } }, "additionalProperties" : 0 }, - "proxyto" : "node", + "name" : "migrate_vm", + "protected" : 1, + "returns" : { + "type" : "string", + "description" : "the task ID." + }, "permissions" : { "check" : [ "perm", @@ -14677,65 +14716,48 @@ var pveapi = [ ] ] }, - "protected" : 1, - "returns" : { - "description" : "the task ID.", - "type" : "string" - }, - "name" : "migrate_vm", - "method" : "POST", + "proxyto" : "node", "description" : "Migrate the container to another node. Creates a new migration task." } }, - "path" : "/nodes/{node}/lxc/{vmid}/migrate" + "text" : "migrate" }, { - "text" : "feature", - "leaf" : 1, "info" : { "GET" : { - "method" : "GET", "name" : "vm_feature", - "returns" : { - "properties" : { - "hasFeature" : { - "type" : "boolean" - } - }, - "type" : "object" - }, - "description" : "Check if feature for virtual machine is available.", - "proxyto" : "node", "parameters" : { + "additionalProperties" : 0, "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, "snapname" : { - "maxLength" : 40, - "description" : "The name of the snapshot.", - "optional" : 1, "type" : "string", - "format" : "pve-configid" + "optional" : 1, + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40 }, "feature" : { - "description" : "Feature to check.", "enum" : [ "snapshot" ], - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "description" : "Feature to check.", "type" : "string" }, "vmid" : { - "minimum" : 1, + "description" : "The (unique) ID of the VM.", "type" : "integer", - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM." + "minimum" : 1, + "format" : "pve-vmid" } - }, - "additionalProperties" : 0 + } }, + "protected" : 1, + "method" : "GET", "permissions" : { "check" : [ "perm", @@ -14745,44 +14767,50 @@ var pveapi = [ ] ] }, - "protected" : 1 + "proxyto" : "node", + "description" : "Check if feature for virtual machine is available.", + "returns" : { + "properties" : { + "hasFeature" : { + "type" : "boolean" + } + }, + "type" : "object" + } } }, + "text" : "feature", + "leaf" : 1, "path" : "/nodes/{node}/lxc/{vmid}/feature" }, { - "path" : "/nodes/{node}/lxc/{vmid}/template", + "text" : "template", "info" : { "POST" : { - "returns" : { - "type" : "null" - }, "name" : "template", - "method" : "POST", - "description" : "Create a Template.", - "proxyto" : "node", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, "vmid" : { - "description" : "The (unique) ID of the VM.", + "minimum" : 1, "format" : "pve-vmid", "type" : "integer", - "minimum" : 1 + "description" : "The (unique) ID of the VM." + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" }, "experimental" : { - "type" : "boolean", "default" : 0, + "type" : "boolean", "description" : "The template feature is experimental, set this flag if you know what you are doing." } } }, "protected" : 1, + "method" : "POST", "permissions" : { "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}", "check" : [ @@ -14792,26 +14820,91 @@ var pveapi = [ "VM.Allocate" ] ] + }, + "description" : "Create a Template.", + "proxyto" : "node", + "returns" : { + "type" : "null" } } }, - "leaf" : 1, - "text" : "template" + "path" : "/nodes/{node}/lxc/{vmid}/template", + "leaf" : 1 }, { + "path" : "/nodes/{node}/lxc/{vmid}/clone", "leaf" : 1, "text" : "clone", - "path" : "/nodes/{node}/lxc/{vmid}/clone", "info" : { "POST" : { - "description" : "Create a container clone/copy", "name" : "clone_vm", - "method" : "POST", - "returns" : { - "type" : "string" + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "full" : { + "optional" : 1, + "type" : "boolean", + "default" : 0, + "description" : "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." + }, + "experimental" : { + "type" : "boolean", + "default" : 0, + "description" : "The clone feature is experimental, set this flag if you know what you are doing." + }, + "description" : { + "description" : "Description for the new CT.", + "optional" : 1, + "type" : "string" + }, + "hostname" : { + "format" : "dns-name", + "type" : "string", + "optional" : 1, + "description" : "Set a hostname for the new CT." + }, + "vmid" : { + "minimum" : 1, + "format" : "pve-vmid", + "description" : "The (unique) ID of the VM.", + "type" : "integer" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "snapname" : { + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "optional" : 1, + "description" : "The name of the snapshot." + }, + "pool" : { + "optional" : 1, + "type" : "string", + "description" : "Add the new CT to the specified pool.", + "format" : "pve-poolid" + }, + "newid" : { + "minimum" : 1, + "format" : "pve-vmid", + "type" : "integer", + "description" : "VMID for the clone." + }, + "storage" : { + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "requires" : "full", + "description" : "Target storage for full clone." + } + } }, + "protected" : 1, + "method" : "POST", "permissions" : { - "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage.", "check" : [ "and", [ @@ -14840,127 +14933,41 @@ var pveapi = [ "pool" ] ] - ] + ], + "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage." }, - "protected" : 1, "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "requires" : "full", - "type" : "string", - "format" : "pve-storage-id", - "description" : "Target storage for full clone.", - "optional" : 1 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - }, - "newid" : { - "description" : "VMID for the clone.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "experimental" : { - "description" : "The clone feature is experimental, set this flag if you know what you are doing.", - "type" : "boolean", - "default" : 0 - }, - "description" : { - "optional" : 1, - "description" : "Description for the new CT.", - "type" : "string" - }, - "hostname" : { - "description" : "Set a hostname for the new CT.", - "optional" : 1, - "type" : "string", - "format" : "dns-name" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "pool" : { - "optional" : 1, - "description" : "Add the new CT to the specified pool.", - "format" : "pve-poolid", - "type" : "string" - }, - "snapname" : { - "optional" : 1, - "description" : "The name of the snapshot.", - "maxLength" : 40, - "type" : "string", - "format" : "pve-configid" - }, - "full" : { - "optional" : 1, - "description" : "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.", - "default" : 0, - "type" : "boolean" - } - } + "description" : "Create a container clone/copy", + "returns" : { + "type" : "string" } } } }, { "text" : "resize", - "leaf" : 1, "info" : { "PUT" : { - "description" : "Resize a container mountpoint.", - "returns" : { - "description" : "the task ID.", - "type" : "string" - }, - "method" : "PUT", - "name" : "resize_vm", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ], - "any", - 1 - ] - }, - "protected" : 1, "parameters" : { "properties" : { - "vmid" : { - "format" : "pve-vmid", - "type" : "integer", - "minimum" : 1, - "description" : "The (unique) ID of the VM." + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." }, "size" : { - "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?", - "description" : "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.", - "type" : "string" - }, - "digest" : { "type" : "string", - "maxLength" : 40, - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + "description" : "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.", + "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?" }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, "disk" : { - "type" : "string", + "description" : "The disk you want to resize.", "enum" : [ "rootfs", "mp0", @@ -14974,77 +14981,108 @@ var pveapi = [ "mp8", "mp9" ], - "description" : "The disk you want to resize." + "type" : "string" + }, + "digest" : { + "optional" : 1, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 } }, "additionalProperties" : 0 }, - "proxyto" : "node" + "name" : "resize_vm", + "protected" : 1, + "method" : "PUT", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ], + "any", + 1 + ] + }, + "description" : "Resize a container mountpoint.", + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } } }, - "path" : "/nodes/{node}/lxc/{vmid}/resize" + "path" : "/nodes/{node}/lxc/{vmid}/resize", + "leaf" : 1 } ], + "text" : "{vmid}", "info" : { "DELETE" : { - "name" : "destroy_vm", - "method" : "DELETE", + "description" : "Destroy the container (also delete all uses files).", + "proxyto" : "node", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ] + }, "returns" : { "type" : "string" }, - "description" : "Destroy the container (also delete all uses files).", + "protected" : 1, + "name" : "destroy_vm", "parameters" : { "properties" : { "vmid" : { - "minimum" : 1, "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", "description" : "The (unique) ID of the VM." }, "node" : { - "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "description" : "The cluster node name." } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ] - } + "method" : "DELETE" }, "GET" : { "returns" : { "type" : "array", + "links" : [ + { + "rel" : "child", + "href" : "{subdir}" + } + ], "items" : { - "type" : "object", "properties" : { "subdir" : { "type" : "string" } - } - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ] + }, + "type" : "object" + } }, + "method" : "GET", "proxyto" : "node", + "description" : "Directory index", + "name" : "vmdiridx", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" }, "vmid" : { @@ -15053,371 +15091,255 @@ var pveapi = [ "format" : "pve-vmid", "minimum" : 1 } - }, - "additionalProperties" : 0 + } }, - "method" : "GET", - "name" : "vmdiridx", - "description" : "Directory index", "permissions" : { "user" : "all" } } - }, - "path" : "/nodes/{node}/lxc/{vmid}" + } } ], - "path" : "/nodes/{node}/lxc", "info" : { - "GET" : { - "permissions" : { - "description" : "Only list CTs where you have VM.Audit permissons on /vms/.", - "user" : "all" - }, - "protected" : 1, - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", - "description" : "LXC container index (per node).", - "method" : "GET", - "name" : "vmlist", - "returns" : { - "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{vmid}" - } - ] - } - }, "POST" : { - "protected" : 1, - "permissions" : { - "user" : "all", - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore, it is enough if the user has 'VM.Backup' permission and the VM already exists. You also need 'Datastore.AllocateSpace' permissions on the storage." - }, + "method" : "POST", + "name" : "create_vm", "parameters" : { + "additionalProperties" : 0, "properties" : { - "net[n]" : { - "format" : { - "gw6" : { - "type" : "string", - "format" : "ipv6", - "description" : "Default gateway for IPv6 traffic.", - "format_description" : "GatewayIPv6", - "optional" : 1 - }, - "hwaddr" : { - "type" : "string", - "optional" : 1, - "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", - "format_description" : "MAC", - "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})" - }, - "gw" : { - "type" : "string", - "format" : "ipv4", - "format_description" : "GatewayIPv4", - "optional" : 1, - "description" : "Default gateway for IPv4 traffic." - }, - "ip" : { - "format_description" : "IPv4Format/CIDR", - "optional" : 1, - "description" : "IPv4 address in CIDR format.", - "type" : "string", - "format" : "pve-ipv4-config" - }, - "rate" : { - "type" : "number", - "format_description" : "mbps", - "description" : "Apply rate limiting to the interface", - "optional" : 1 - }, - "tag" : { - "type" : "integer", - "maximum" : "4094", - "minimum" : "2", - "format_description" : "VlanNo", - "description" : "VLAN tag for this interface.", - "optional" : 1 - }, - "name" : { - "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", - "format_description" : "String", - "pattern" : "[-_.\\w\\d]+", - "type" : "string" - }, - "bridge" : { - "type" : "string", - "format_description" : "vmbr", - "description" : "Bridge to attach the network device to.", - "optional" : 1, - "pattern" : "[-_.\\w\\d]+" - }, - "trunks" : { - "type" : "string", - "format_description" : "vlanid[;vlanid...]", - "description" : "VLAN ids to pass through the interface", - "optional" : 1, - "pattern" : "(?^:\\d+(?:;\\d+)*)" - }, - "type" : { - "type" : "string", - "enum" : [ - "veth" - ], - "optional" : 1, - "description" : "Network interface type." - }, - "ip6" : { - "format_description" : "IPv6Format/CIDR", - "optional" : 1, - "description" : "IPv6 address in CIDR format.", - "format" : "pve-ipv6-config", - "type" : "string" - }, - "firewall" : { - "format_description" : "[1|0]", - "optional" : 1, - "description" : "Controls whether this interface's firewall rules should be used.", - "type" : "boolean" - }, - "mtu" : { - "type" : "integer", - "minimum" : 64, - "format_description" : "Number", - "optional" : 1, - "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)" - } - }, + "storage" : { + "description" : "Default Storage.", + "default" : "local", "type" : "string", "optional" : 1, - "description" : "Specifies network interfaces for the container." + "format" : "pve-storage-id" }, - "swap" : { - "type" : "integer", - "default" : 512, - "minimum" : 0, + "onboot" : { + "type" : "boolean", + "optional" : 1, + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup." + }, + "startup" : { + "description" : "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.", + "type" : "string", + "optional" : 1, + "format" : "pve-startup-order", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "console" : { + "description" : "Attach a console device (/dev/console) to the container.", + "default" : 1, "optional" : 1, - "description" : "Amount of SWAP for the VM in MB." + "type" : "boolean" }, "pool" : { "optional" : 1, + "type" : "string", "description" : "Add the VM to the specified pool.", - "format" : "pve-poolid", - "type" : "string" + "format" : "pve-poolid" }, - "mp[n]" : { + "cmode" : { + "enum" : [ + "shell", + "console", + "tty" + ], + "description" : "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).", + "type" : "string", "optional" : 1, - "description" : "Use volume as container mount point (experimental feature).", + "default" : "tty" + }, + "description" : { + "type" : "string", + "optional" : 1, + "description" : "Container description. Only used on the configuration web interface." + }, + "lock" : { + "optional" : 1, + "type" : "string", + "enum" : [ + "migrate", + "backup", + "snapshot", + "rollback" + ], + "description" : "Lock/unlock the VM." + }, + "rootfs" : { + "type" : "string", + "optional" : 1, + "description" : "Use volume as container root.", "format" : { - "quota" : { + "ro" : { "type" : "boolean", - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "format_description" : "[0|1]", - "optional" : 1 + "optional" : 1, + "description" : "Read-only mountpoint (not supported with bind mounts)", + "format_description" : "ro" }, - "size" : { - "format" : "disk-size", - "type" : "string", - "description" : "Volume size (read only value).", - "format_description" : "DiskSize", - "optional" : 1 + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean", + "format_description" : "acl" }, "backup" : { - "type" : "boolean", "description" : "Whether to include the mountpoint in backups.", - "format_description" : "[1|0]", - "optional" : 1 + "type" : "boolean", + "optional" : 1, + "format_description" : "[1|0]" + }, + "size" : { + "format" : "disk-size", + "format_description" : "DiskSize", + "description" : "Volume size (read only value).", + "optional" : 1, + "type" : "string" }, "volume" : { + "default_key" : 1, "format" : "pve-lxc-mp-string", - "type" : "string", "format_description" : "volume", - "description" : "Volume, device or directory to mount into the container.", - "default_key" : 1 - }, - "mp" : { - "description" : "Path to the mountpoint as seen from inside the container.", - "format_description" : "Path", "type" : "string", - "format" : "pve-lxc-mp-string" + "description" : "Volume, device or directory to mount into the container." }, - "ro" : { - "type" : "boolean", - "description" : "Read-only mountpoint (not supported with bind mounts)", + "quota" : { + "format_description" : "[0|1]", "optional" : 1, - "format_description" : "ro" - }, - "acl" : { "type" : "boolean", - "optional" : 1, - "format_description" : "acl", - "description" : "Explicitly enable or disable ACL support." + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)" } - }, - "type" : "string" + } }, "vmid" : { - "type" : "integer", "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM." + "description" : "The (unique) ID of the VM.", + "type" : "integer" }, - "description" : { - "description" : "Container description. Only used on the configuration web interface.", + "cpuunits" : { + "minimum" : 0, + "maximum" : 500000, + "default" : 1024, + "type" : "integer", "optional" : 1, - "type" : "string" + "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." }, "tty" : { "minimum" : 0, - "maximum" : 6, - "type" : "integer", - "default" : 2, "description" : "Specify the number of tty available to the container", - "optional" : 1 - }, - "onboot" : { - "default" : 0, - "type" : "boolean", + "default" : 2, + "maximum" : 6, "optional" : 1, - "description" : "Specifies whether a VM will be started during system bootup." - }, - "ostemplate" : { - "type" : "string", - "description" : "The OS template or backup file.", - "maxLength" : 255 + "type" : "integer" }, - "startup" : { - "description" : "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.", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "optional" : 1, + "arch" : { + "default" : "amd64", "type" : "string", - "format" : "pve-startup-order" - }, - "memory" : { - "default" : 512, - "type" : "integer", - "minimum" : 16, - "optional" : 1, - "description" : "Amount of RAM for the VM in MB." - }, - "searchdomain" : { - "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", "optional" : 1, - "type" : "string", - "format" : "dns-name-list" + "description" : "OS architecture type.", + "enum" : [ + "amd64", + "i386" + ] }, - "ignore-unpack-errors" : { - "type" : "boolean", - "optional" : 1, - "description" : "Ignore errors when extracting the template." + "ostemplate" : { + "maxLength" : 255, + "description" : "The OS template or backup file.", + "type" : "string" }, "force" : { + "type" : "boolean", "optional" : 1, - "description" : "Allow to overwrite existing container.", - "type" : "boolean" - }, - "restore" : { - "optional" : 1, - "description" : "Mark this as restore task.", - "type" : "boolean" + "description" : "Allow to overwrite existing container." }, - "unprivileged" : { - "optional" : 1, - "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", - "default" : 0, - "type" : "boolean" + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." }, "cpulimit" : { - "default" : 0, - "type" : "number", - "maximum" : 128, "minimum" : 0, + "type" : "number", "optional" : 1, + "default" : 0, + "maximum" : 128, "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit." }, - "storage" : { + "mp[n]" : { + "format" : { + "backup" : { + "optional" : 1, + "type" : "boolean", + "description" : "Whether to include the mountpoint in backups.", + "format_description" : "[1|0]" + }, + "size" : { + "format_description" : "DiskSize", + "format" : "disk-size", + "type" : "string", + "optional" : 1, + "description" : "Volume size (read only value)." + }, + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "type" : "boolean", + "optional" : 1, + "format_description" : "acl" + }, + "ro" : { + "format_description" : "ro", + "description" : "Read-only mountpoint (not supported with bind mounts)", + "type" : "boolean", + "optional" : 1 + }, + "volume" : { + "format_description" : "volume", + "format" : "pve-lxc-mp-string", + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "type" : "string" + }, + "quota" : { + "optional" : 1, + "type" : "boolean", + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "format_description" : "[0|1]" + }, + "mp" : { + "type" : "string", + "description" : "Path to the mountpoint as seen from inside the container.", + "format_description" : "Path", + "format" : "pve-lxc-mp-string" + } + }, + "description" : "Use volume as container mount point (experimental feature).", "type" : "string", - "default" : "local", - "format" : "pve-storage-id", - "description" : "Default Storage.", "optional" : 1 }, - "cpuunits" : { - "optional" : 1, - "description" : "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.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "minimum" : 0, - "default" : 1024, - "type" : "integer", - "maximum" : 500000 - }, - "console" : { - "description" : "Attach a console device (/dev/console) to the container.", - "optional" : 1, + "unprivileged" : { "type" : "boolean", - "default" : 1 - }, - "lock" : { - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "description" : "Lock/unlock the VM.", - "optional" : 1, - "type" : "string" - }, - "template" : { "optional" : 1, - "description" : "Enable/disable Template.", "default" : 0, - "type" : "boolean" - }, - "password" : { - "minLength" : 5, - "optional" : 1, - "description" : "Sets root password inside container.", - "type" : "string" + "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)" }, "unused[n]" : { - "format" : "pve-volume-id", + "description" : "Reference to unused volumes.", "type" : "string", "optional" : 1, - "description" : "Reference to unused volumes." + "format" : "pve-volume-id" }, - "arch" : { - "enum" : [ - "amd64", - "i386" - ], - "description" : "OS architecture type.", + "swap" : { + "description" : "Amount of SWAP for the VM in MB.", + "default" : 512, "optional" : 1, - "type" : "string", - "default" : "amd64" - }, - "nameserver" : { - "type" : "string", - "format" : "address-list", - "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", - "optional" : 1 + "type" : "integer", + "minimum" : 0 }, "ostype" : { + "type" : "string", + "optional" : 1, + "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", "enum" : [ "debian", "ubuntu", @@ -15427,143 +15349,373 @@ var pveapi = [ "archlinux", "alpine", "unmanaged" - ], - "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", - "optional" : 1, - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + ] }, - "hostname" : { - "format" : "dns-name", - "type" : "string", + "memory" : { + "description" : "Amount of RAM for the VM in MB.", + "type" : "integer", "optional" : 1, - "maxLength" : 255, - "description" : "Set a host name for the container." + "default" : 512, + "minimum" : 16 }, "ssh-public-keys" : { - "type" : "string", + "description" : "Setup public SSH keys (one key per line, OpenSSH format).", "optional" : 1, - "description" : "Setup public SSH keys (one key per line, OpenSSH format)." + "type" : "string" }, - "cmode" : { - "default" : "tty", - "type" : "string", - "enum" : [ - "shell", - "console", - "tty" - ], + "protection" : { + "type" : "boolean", + "optional" : 1, + "default" : 0, + "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation." + }, + "ignore-unpack-errors" : { + "type" : "boolean", "optional" : 1, - "description" : "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)." + "description" : "Ignore errors when extracting the template." }, - "protection" : { + "template" : { + "description" : "Enable/disable Template.", "optional" : 1, - "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", "type" : "boolean", "default" : 0 }, - "rootfs" : { + "restore" : { "optional" : 1, - "description" : "Use volume as container root.", + "type" : "boolean", + "description" : "Mark this as restore task." + }, + "hostname" : { + "format" : "dns-name", + "maxLength" : 255, + "description" : "Set a host name for the container.", + "optional" : 1, + "type" : "string" + }, + "password" : { + "optional" : 1, + "type" : "string", + "description" : "Sets root password inside container.", + "minLength" : 5 + }, + "searchdomain" : { + "format" : "dns-name-list", + "optional" : 1, + "type" : "string", + "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver." + }, + "nameserver" : { + "format" : "address-list", + "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", "type" : "string", + "optional" : 1 + }, + "net[n]" : { "format" : { - "ro" : { - "optional" : 1, - "description" : "Read-only mountpoint (not supported with bind mounts)", - "format_description" : "ro", - "type" : "boolean" + "gw6" : { + "format" : "ipv6", + "format_description" : "GatewayIPv6", + "description" : "Default gateway for IPv6 traffic.", + "type" : "string", + "optional" : 1 }, - "acl" : { - "format_description" : "acl", - "description" : "Explicitly enable or disable ACL support.", + "tag" : { + "description" : "VLAN tag for this interface.", + "type" : "integer", "optional" : 1, - "type" : "boolean" - }, - "volume" : { - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "format_description" : "volume", - "type" : "string", - "format" : "pve-lxc-mp-string" + "maximum" : "4094", + "format_description" : "VlanNo", + "minimum" : "2" }, - "backup" : { + "firewall" : { "format_description" : "[1|0]", - "description" : "Whether to include the mountpoint in backups.", + "description" : "Controls whether this interface's firewall rules should be used.", "optional" : 1, "type" : "boolean" }, - "size" : { - "format_description" : "DiskSize", - "description" : "Volume size (read only value).", + "type" : { + "type" : "string", "optional" : 1, + "description" : "Network interface type.", + "enum" : [ + "veth" + ] + }, + "trunks" : { + "format_description" : "vlanid[;vlanid...]", "type" : "string", - "format" : "disk-size" + "optional" : 1, + "pattern" : "(?^:\\d+(?:;\\d+)*)", + "description" : "VLAN ids to pass through the interface" }, - "quota" : { - "type" : "boolean", - "format_description" : "[0|1]", - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "ip" : { + "format" : "pve-ipv4-config", + "format_description" : "IPv4Format/CIDR", + "description" : "IPv4 address in CIDR format.", + "type" : "string", + "optional" : 1 + }, + "rate" : { + "description" : "Apply rate limiting to the interface", + "optional" : 1, + "type" : "number", + "format_description" : "mbps" + }, + "ip6" : { + "type" : "string", + "optional" : 1, + "description" : "IPv6 address in CIDR format.", + "format" : "pve-ipv6-config", + "format_description" : "IPv6Format/CIDR" + }, + "gw" : { + "format" : "ipv4", + "format_description" : "GatewayIPv4", + "description" : "Default gateway for IPv4 traffic.", + "optional" : 1, + "type" : "string" + }, + "bridge" : { + "format_description" : "vmbr", + "optional" : 1, + "type" : "string", + "description" : "Bridge to attach the network device to.", + "pattern" : "[-_.\\w\\d]+" + }, + "name" : { + "type" : "string", + "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", + "pattern" : "[-_.\\w\\d]+", + "format_description" : "String" + }, + "mtu" : { + "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", + "type" : "integer", + "optional" : 1, + "format_description" : "Number", + "minimum" : 64 + }, + "hwaddr" : { + "format_description" : "MAC", + "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", + "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", + "type" : "string", "optional" : 1 } - } + }, + "description" : "Specifies network interfaces for the container.", + "optional" : 1, + "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "proxyto" : "node", - "description" : "Create or restore a container.", - "method" : "POST", - "name" : "create_vm", + "protected" : 1, "returns" : { "type" : "string" + }, + "permissions" : { + "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore, it is enough if the user has 'VM.Backup' permission and the VM already exists. You also need 'Datastore.AllocateSpace' permissions on the storage.", + "user" : "all" + }, + "proxyto" : "node", + "description" : "Create or restore a container." + }, + "GET" : { + "name" : "vmlist", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + } + }, + "protected" : 1, + "method" : "GET", + "permissions" : { + "description" : "Only list CTs where you have VM.Audit permissons on /vms/.", + "user" : "all" + }, + "proxyto" : "node", + "description" : "LXC container index (per node).", + "returns" : { + "items" : { + "type" : "object", + "properties" : {} + }, + "links" : [ + { + "rel" : "child", + "href" : "{vmid}" + } + ], + "type" : "array" } } - }, - "text" : "lxc", - "leaf" : 0 + } }, { - "text" : "ceph", - "leaf" : 0, + "info" : { + "GET" : { + "description" : "Directory index.", + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + } + }, + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "name" : "index", + "method" : "GET", + "returns" : { + "type" : "array", + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ] + } + } + }, "children" : [ { - "leaf" : 0, - "text" : "osd", + "info" : { + "POST" : { + "name" : "createosd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "fstype" : { + "enum" : [ + "xfs", + "ext4", + "btrfs" + ], + "description" : "File system type.", + "type" : "string", + "optional" : 1, + "default" : "xfs" + }, + "journal_dev" : { + "type" : "string", + "optional" : 1, + "description" : "Block device name for journal." + }, + "dev" : { + "description" : "Block device name.", + "type" : "string" + } + } + }, + "proxyto" : "node", + "description" : "Create OSD", + "protected" : 1, + "method" : "POST", + "returns" : { + "type" : "string" + } + }, + "GET" : { + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "proxyto" : "node", + "description" : "Get Ceph osd list/tree.", + "returns" : { + "type" : "object" + }, + "name" : "index", + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "method" : "GET" + } + }, "children" : [ { - "text" : "{osdid}", "leaf" : 0, - "children" : [ - { - "path" : "/nodes/{node}/ceph/osd/{osdid}/in", - "info" : { - "POST" : { - "returns" : { - "type" : "null" + "path" : "/nodes/{node}/ceph/osd/{osdid}", + "info" : { + "DELETE" : { + "name" : "destroyosd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "osdid" : { + "type" : "integer", + "description" : "OSD ID" }, - "method" : "POST", - "name" : "in", - "description" : "ceph osd in", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "osdid" : { - "type" : "integer", - "description" : "OSD ID" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - } + "cleanup" : { + "description" : "If set, we remove partition table entries.", + "optional" : 1, + "type" : "boolean", + "default" : 0 }, - "protected" : 1, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + } + } + }, + "protected" : 1, + "description" : "Destroy OSD", + "proxyto" : "node", + "method" : "DELETE", + "returns" : { + "type" : "string" + } + } + }, + "children" : [ + { + "text" : "in", + "info" : { + "POST" : { "permissions" : { "check" : [ "perm", @@ -15572,23 +15724,39 @@ var pveapi = [ "Sys.Modify" ] ] - } + }, + "description" : "ceph osd in", + "proxyto" : "node", + "returns" : { + "type" : "null" + }, + "name" : "in", + "parameters" : { + "properties" : { + "osdid" : { + "type" : "integer", + "description" : "OSD ID" + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "method" : "POST" } }, - "leaf" : 1, - "text" : "in" + "path" : "/nodes/{node}/ceph/osd/{osdid}/in", + "leaf" : 1 }, { - "text" : "out", "leaf" : 1, + "path" : "/nodes/{node}/ceph/osd/{osdid}/out", "info" : { "POST" : { - "description" : "ceph osd out", - "returns" : { - "type" : "null" - }, - "method" : "POST", - "name" : "out", "permissions" : { "check" : [ "perm", @@ -15598,83 +15766,48 @@ var pveapi = [ ] ] }, - "protected" : 1, "proxyto" : "node", + "description" : "ceph osd out", + "returns" : { + "type" : "null" + }, "parameters" : { "properties" : { - "osdid" : { - "type" : "integer", - "description" : "OSD ID" - }, "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." + }, + "osdid" : { + "type" : "integer", + "description" : "OSD ID" } }, "additionalProperties" : 0 - } - } - }, - "path" : "/nodes/{node}/ceph/osd/{osdid}/out" - } - ], - "info" : { - "DELETE" : { - "protected" : 1, - "description" : "Destroy OSD", - "returns" : { - "type" : "string" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." }, - "cleanup" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "If set, we remove partition table entries." - }, - "osdid" : { - "type" : "integer", - "description" : "OSD ID" - } + "name" : "out", + "protected" : 1, + "method" : "POST" } }, - "proxyto" : "node", - "name" : "destroyosd", - "method" : "DELETE" + "text" : "out" } - }, - "path" : "/nodes/{node}/ceph/osd/{osdid}" + ], + "text" : "{osdid}" } ], - "path" : "/nodes/{node}/ceph/osd", + "text" : "osd", + "leaf" : 0, + "path" : "/nodes/{node}/ceph/osd" + }, + { + "path" : "/nodes/{node}/ceph/disks", + "leaf" : 1, + "text" : "disks", "info" : { "GET" : { - "name" : "index", - "method" : "GET", - "returns" : { - "type" : "object" - }, - "description" : "Get Ceph osd list/tree.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - } - }, "proxyto" : "node", - "protected" : 1, + "description" : "List local disks.", "permissions" : { "check" : [ "perm", @@ -15686,75 +15819,90 @@ var pveapi = [ "any", 1 ] - } - }, - "POST" : { - "protected" : 1, - "description" : "Create OSD", + }, "returns" : { - "type" : "string" + "type" : "array", + "items" : { + "properties" : { + "vendor" : { + "type" : "string", + "optional" : 1 + }, + "osdid" : { + "type" : "integer" + }, + "serial" : { + "type" : "string", + "optional" : 1 + }, + "model" : { + "type" : "string", + "optional" : 1 + }, + "used" : { + "optional" : 1, + "type" : "string" + }, + "size" : { + "type" : "integer" + }, + "dev" : { + "type" : "string" + }, + "gpt" : { + "type" : "boolean" + } + }, + "type" : "object" + } }, + "protected" : 1, + "name" : "disks", "parameters" : { "additionalProperties" : 0, "properties" : { - "fstype" : { - "type" : "string", - "default" : "xfs", - "enum" : [ - "xfs", - "ext4", - "btrfs" - ], - "optional" : 1, - "description" : "File system type." - }, "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "dev" : { "type" : "string", - "description" : "Block device name." + "description" : "The cluster node name.", + "format" : "pve-node" }, - "journal_dev" : { - "description" : "Block device name for journal.", + "type" : { "optional" : 1, - "type" : "string" + "type" : "string", + "description" : "Only list specific types of disks.", + "enum" : [ + "unused", + "journal_disks" + ] } } }, - "proxyto" : "node", - "method" : "POST", - "name" : "createosd" + "method" : "GET" } } }, { - "path" : "/nodes/{node}/ceph/disks", + "path" : "/nodes/{node}/ceph/config", + "leaf" : 1, + "text" : "config", "info" : { "GET" : { - "proxyto" : "node", + "method" : "GET", + "returns" : { + "type" : "string" + }, + "description" : "Get Ceph configuration.", "parameters" : { + "additionalProperties" : 0, "properties" : { - "type" : { - "type" : "string", - "description" : "Only list specific types of disks.", - "optional" : 1, - "enum" : [ - "unused", - "journal_disks" - ] - }, "node" : { - "description" : "The cluster node name.", "format" : "pve-node", + "description" : "The cluster node name.", "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, + "name" : "config", "permissions" : { "check" : [ "perm", @@ -15766,55 +15914,91 @@ var pveapi = [ "any", 1 ] - }, - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "used" : { - "optional" : 1, - "type" : "string" - }, - "size" : { - "type" : "integer" - }, - "vendor" : { - "type" : "string", - "optional" : 1 - }, - "gpt" : { - "type" : "boolean" - }, - "model" : { - "type" : "string", - "optional" : 1 - }, - "serial" : { - "type" : "string", - "optional" : 1 - }, - "osdid" : { - "type" : "integer" + } + } + } + }, + { + "path" : "/nodes/{node}/ceph/mon", + "leaf" : 0, + "text" : "mon", + "children" : [ + { + "path" : "/nodes/{node}/ceph/mon/{monid}", + "leaf" : 1, + "text" : "{monid}", + "info" : { + "DELETE" : { + "proxyto" : "node", + "description" : "Destroy Ceph monitor.", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "returns" : { + "type" : "string" + }, + "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "monid" : { + "description" : "Monitor ID", + "type" : "integer" + } + } + }, + "name" : "destroymon", + "method" : "DELETE" + } + } + } + ], + "info" : { + "GET" : { + "method" : "GET", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + } + }, + "name" : "listmon", + "protected" : 1, + "returns" : { + "items" : { + "properties" : { + "name" : { + "type" : "string" }, - "dev" : { + "addr" : { "type" : "string" } - } + }, + "type" : "object" }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], "type" : "array" }, - "method" : "GET", - "name" : "disks", - "description" : "List local disks." - } - }, - "leaf" : 1, - "text" : "disks" - }, - { - "path" : "/nodes/{node}/ceph/config", - "info" : { - "GET" : { "permissions" : { "check" : [ "perm", @@ -15827,31 +16011,48 @@ var pveapi = [ 1 ] }, - "description" : "Get Ceph configuration.", + "description" : "Get Ceph monitor list.", + "proxyto" : "node" + }, + "POST" : { + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "description" : "Create Ceph Monitor", + "proxyto" : "node", "returns" : { "type" : "string" }, "parameters" : { "properties" : { "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" + "type" : "string", + "description" : "The cluster node name." } }, "additionalProperties" : 0 }, - "method" : "GET", - "name" : "config" + "name" : "createmon", + "protected" : 1, + "method" : "POST" } - }, - "leaf" : 1, - "text" : "config" + } }, { "info" : { "POST" : { - "protected" : 1, + "returns" : { + "type" : "null" + }, + "proxyto" : "node", + "description" : "Create initial ceph default configuration and setup symlinks.", "permissions" : { "check" : [ "perm", @@ -15861,36 +16062,151 @@ var pveapi = [ ] ] }, + "method" : "POST", + "protected" : 1, + "name" : "init", "parameters" : { "properties" : { + "pg_bits" : { + "description" : "Placement group bits, used to specify the default number of placement groups.\n\nNOTE: 'osd pool default pg num' does not work for default pools.", + "default" : 6, + "maximum" : 14, + "optional" : 1, + "type" : "integer", + "minimum" : 6 + }, + "size" : { + "minimum" : 1, + "maximum" : 3, + "default" : 2, + "type" : "integer", + "optional" : 1, + "description" : "Number of replicas per object" + }, "node" : { "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "network" : { + "optional" : 1, + "type" : "string", + "description" : "Use specific network for all ceph related traffic", + "format" : "CIDR", + "maxLength" : 128 + } + }, + "additionalProperties" : 0 + } + } + }, + "text" : "init", + "leaf" : 1, + "path" : "/nodes/{node}/ceph/init" + }, + { + "path" : "/nodes/{node}/ceph/stop", + "leaf" : 1, + "text" : "stop", + "info" : { + "POST" : { + "method" : "POST", + "name" : "stop", + "parameters" : { + "properties" : { + "node" : { "format" : "pve-node", + "description" : "The cluster node name.", "type" : "string" + }, + "service" : { + "type" : "string", + "optional" : 1, + "description" : "Ceph service name.", + "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}" } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "description" : "Create Ceph Monitor", - "method" : "POST", - "name" : "createmon", + "protected" : 1, "returns" : { "type" : "string" - } - }, - "GET" : { + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "description" : "Stop ceph services.", + "proxyto" : "node" + } + } + }, + { + "path" : "/nodes/{node}/ceph/start", + "leaf" : 1, + "text" : "start", + "info" : { + "POST" : { + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, "proxyto" : "node", + "description" : "Start ceph services.", + "returns" : { + "type" : "string" + }, + "name" : "start", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "service" : { + "description" : "Ceph service name.", + "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}", "type" : "string", - "description" : "The cluster node name." + "optional" : 1 + } + } + }, + "protected" : 1, + "method" : "POST" + } + } + }, + { + "text" : "status", + "info" : { + "GET" : { + "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" } } }, + "name" : "status", + "method" : "GET", + "description" : "Get ceph status.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -15903,832 +16219,730 @@ var pveapi = [ 1 ] }, - "protected" : 1, "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{name}" + "type" : "object" + } + } + }, + "path" : "/nodes/{node}/ceph/status", + "leaf" : 1 + }, + { + "info" : { + "GET" : { + "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + } + }, + "name" : "lspools", + "method" : "GET", + "proxyto" : "node", + "description" : "List all pools.", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "returns" : { + "links" : [ + { + "rel" : "child", + "href" : "{pool_name}" } ], - "type" : "array", "items" : { "type" : "object", "properties" : { - "name" : { + "pool_name" : { "type" : "string" }, - "addr" : { - "type" : "string" + "pool" : { + "type" : "integer" + }, + "size" : { + "type" : "integer" } } - } + }, + "type" : "array" + } + }, + "POST" : { + "returns" : { + "type" : "null" }, - "method" : "GET", - "name" : "listmon", - "description" : "Get Ceph monitor list." + "proxyto" : "node", + "description" : "Create POOL", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "method" : "POST", + "protected" : 1, + "name" : "createpool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "size" : { + "maximum" : 3, + "default" : 2, + "optional" : 1, + "type" : "integer", + "description" : "Number of replicas per object", + "minimum" : 1 + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "name" : { + "description" : "The name of the pool. It must be unique.", + "type" : "string" + }, + "crush_ruleset" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "default" : 0, + "maximum" : 32768, + "description" : "The ruleset to use for mapping object placement in the cluster." + }, + "pg_num" : { + "optional" : 1, + "type" : "integer", + "maximum" : 32768, + "default" : 64, + "description" : "Number of placement groups.", + "minimum" : 8 + }, + "min_size" : { + "optional" : 1, + "type" : "integer", + "maximum" : 3, + "default" : 1, + "description" : "Minimum number of replicas per object", + "minimum" : 1 + } + } + } } }, "children" : [ { + "path" : "/nodes/{node}/ceph/pools/{name}", + "leaf" : 1, + "text" : "{name}", "info" : { "DELETE" : { + "method" : "DELETE", "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, "parameters" : { - "additionalProperties" : 0, "properties" : { "node" : { "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" }, - "monid" : { - "description" : "Monitor ID", - "type" : "integer" + "name" : { + "type" : "string", + "description" : "The name of the pool. It must be unique." } - } + }, + "additionalProperties" : 0 }, - "proxyto" : "node", - "description" : "Destroy Ceph monitor.", - "name" : "destroymon", - "method" : "DELETE", + "name" : "destroypool", "returns" : { - "type" : "string" + "type" : "null" + }, + "proxyto" : "node", + "description" : "Destroy pool", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] } } - }, - "path" : "/nodes/{node}/ceph/mon/{monid}", - "text" : "{monid}", - "leaf" : 1 + } } ], - "path" : "/nodes/{node}/ceph/mon", + "text" : "pools", "leaf" : 0, - "text" : "mon" + "path" : "/nodes/{node}/ceph/pools" }, { - "text" : "init", "leaf" : 1, + "path" : "/nodes/{node}/ceph/crush", "info" : { - "POST" : { + "GET" : { + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "description" : "Get OSD crush map", + "proxyto" : "node", "returns" : { - "type" : "null" + "type" : "string" }, - "name" : "init", - "method" : "POST", - "description" : "Create initial ceph default configuration and setup symlinks.", "parameters" : { "properties" : { "node" : { - "type" : "string", "format" : "pve-node", - "description" : "The cluster node name." - }, - "pg_bits" : { - "optional" : 1, - "description" : "Placement group bits, used to specify the default number of placement groups.\n\nNOTE: 'osd pool default pg num' does not work for default pools.", - "minimum" : 6, - "maximum" : 14, - "default" : 6, - "type" : "integer" - }, - "size" : { - "description" : "Number of replicas per object", - "optional" : 1, - "minimum" : 1, - "maximum" : 3, - "type" : "integer", - "default" : 2 - }, - "network" : { - "optional" : 1, - "maxLength" : 128, - "description" : "Use specific network for all ceph related traffic", - "format" : "CIDR", + "description" : "The cluster node name.", "type" : "string" } }, "additionalProperties" : 0 }, - "proxyto" : "node", + "name" : "crush", "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - } + "method" : "GET" } }, - "path" : "/nodes/{node}/ceph/init" + "text" : "crush" }, { - "path" : "/nodes/{node}/ceph/stop", "info" : { - "POST" : { - "description" : "Stop ceph services.", + "GET" : { "returns" : { - "type" : "string" + "type" : "array", + "items" : { + "properties" : { + "t" : { + "type" : "string", + "description" : "Line text" + }, + "n" : { + "type" : "integer", + "description" : "Line number" + } + }, + "type" : "object" + } }, - "method" : "POST", - "name" : "stop", - "protected" : 1, + "description" : "Read ceph log", + "proxyto" : "node", "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "Sys.Modify" + "Sys.Syslog" ] ] }, - "parameters" : { - "properties" : { + "method" : "GET", + "protected" : 1, + "name" : "log", + "parameters" : { + "properties" : { + "start" : { + "minimum" : 0, + "type" : "integer", + "optional" : 1 + }, "node" : { "description" : "The cluster node name.", "type" : "string", "format" : "pve-node" }, - "service" : { - "type" : "string", - "description" : "Ceph service name.", + "limit" : { + "type" : "integer", "optional" : 1, - "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}" + "minimum" : 0 } }, "additionalProperties" : 0 - }, - "proxyto" : "node" + } } }, + "text" : "log", "leaf" : 1, - "text" : "stop" - }, - { - "leaf" : 1, - "text" : "start", - "path" : "/nodes/{node}/ceph/start", - "info" : { - "POST" : { - "returns" : { - "type" : "string" + "path" : "/nodes/{node}/ceph/log" + } + ], + "text" : "ceph", + "leaf" : 0, + "path" : "/nodes/{node}/ceph" + }, + { + "text" : "vzdump", + "info" : { + "POST" : { + "permissions" : { + "user" : "all", + "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage." + }, + "description" : "Create backup.", + "proxyto" : "node", + "returns" : { + "type" : "string" + }, + "name" : "vzdump", + "parameters" : { + "properties" : { + "exclude" : { + "format" : "pve-vmid-list", + "description" : "Exclude specified guest systems (assumes --all)", + "type" : "string", + "optional" : 1 }, - "name" : "start", - "method" : "POST", - "description" : "Start ceph services.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "service" : { - "optional" : 1, - "description" : "Ceph service name.", - "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}", - "type" : "string" - } - } + "node" : { + "format" : "pve-node", + "type" : "string", + "optional" : 1, + "description" : "Only run if executed on this node." }, - "proxyto" : "node", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - } - } - } - }, - { - "path" : "/nodes/{node}/ceph/status", - "info" : { - "GET" : { - "description" : "Get ceph status.", - "name" : "status", - "method" : "GET", - "returns" : { - "type" : "object" + "size" : { + "description" : "Unused, will be removed in a future release.", + "type" : "integer", + "optional" : 1, + "default" : 1024, + "minimum" : 500 }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] + "pigz" : { + "type" : "integer", + "optional" : 1, + "default" : 0, + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." }, - "protected" : 1, - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - }, - "additionalProperties" : 0 - } - } - }, - "text" : "status", - "leaf" : 1 - }, - { - "text" : "pools", - "leaf" : 0, - "children" : [ - { - "text" : "{name}", - "leaf" : 1, - "info" : { - "DELETE" : { - "description" : "Destroy pool", - "name" : "destroypool", - "method" : "DELETE", - "returns" : { - "type" : "null" - }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "name" : { - "description" : "The name of the pool. It must be unique.", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node" - } + "storage" : { + "format" : "pve-storage-id", + "description" : "Store resulting file to this storage.", + "type" : "string", + "optional" : 1 }, - "path" : "/nodes/{node}/ceph/pools/{name}" - } - ], - "info" : { - "POST" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "stdexcludes" : { + "default" : 1, + "type" : "boolean", + "optional" : 1, + "description" : "Exclude temporary files and logs." }, - "protected" : 1, - "proxyto" : "node", - "parameters" : { - "properties" : { - "pg_num" : { - "description" : "Number of placement groups.", - "optional" : 1, - "minimum" : 8, - "maximum" : 32768, - "type" : "integer", - "default" : 64 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "crush_ruleset" : { - "optional" : 1, - "description" : "The ruleset to use for mapping object placement in the cluster.", - "default" : 0, - "type" : "integer", - "maximum" : 32768, - "minimum" : 0 - }, - "min_size" : { - "minimum" : 1, - "maximum" : 3, - "default" : 1, - "type" : "integer", - "description" : "Minimum number of replicas per object", - "optional" : 1 - }, - "size" : { - "maximum" : 3, - "default" : 2, - "type" : "integer", - "minimum" : 1, - "optional" : 1, - "description" : "Number of replicas per object" - }, - "name" : { - "description" : "The name of the pool. It must be unique.", - "type" : "string" - } - }, - "additionalProperties" : 0 + "exclude-path" : { + "format" : "string-alist", + "type" : "string", + "optional" : 1, + "description" : "Exclude certain files/directories (shell globs)." }, - "description" : "Create POOL", - "name" : "createpool", - "method" : "POST", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 + "quiet" : { + "description" : "Be quiet.", + "optional" : 1, + "type" : "boolean", + "default" : 0 + }, + "stopwait" : { + "optional" : 1, + "type" : "integer", + "default" : 10, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0 + }, + "remove" : { + "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", + "type" : "boolean", + "optional" : 1, + "default" : 1 + }, + "stdout" : { + "description" : "Write tar to stdout, not to a file.", + "type" : "boolean", + "optional" : 1 + }, + "all" : { + "default" : 0, + "type" : "boolean", + "optional" : 1, + "description" : "Backup all known guest systems on this host." + }, + "mailnotification" : { + "description" : "Specify when to send an email", + "enum" : [ + "always", + "failure" + ], + "default" : "always", + "type" : "string", + "optional" : 1 + }, + "lockwait" : { + "minimum" : 0, + "type" : "integer", + "optional" : 1, + "default" : 180, + "description" : "Maximal time to wait for the global lock (minutes)." + }, + "script" : { + "type" : "string", + "optional" : 1, + "description" : "Use specified hook script." + }, + "dumpdir" : { + "type" : "string", + "optional" : 1, + "description" : "Store resulting files to specified directory." + }, + "mailto" : { + "optional" : 1, + "type" : "string", + "description" : "Comma-separated list of email addresses that should receive email notifications.", + "format" : "string-list" + }, + "compress" : { + "default" : "0", + "type" : "string", + "optional" : 1, + "description" : "Compress dump file.", + "enum" : [ + "0", + "1", + "gzip", + "lzo" ] }, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 + "tmpdir" : { + "optional" : 1, + "type" : "string", + "description" : "Store temporary files to specified directory." }, - "proxyto" : "node", - "description" : "List all pools.", + "mode" : { + "description" : "Backup mode.", + "enum" : [ + "snapshot", + "suspend", + "stop" + ], + "default" : "snapshot", + "type" : "string", + "optional" : 1 + }, + "maxfiles" : { + "default" : 1, + "optional" : 1, + "type" : "integer", + "description" : "Maximal number of backup files per guest system.", + "minimum" : 1 + }, + "stop" : { + "type" : "boolean", + "optional" : 1, + "default" : 0, + "description" : "Stop runnig backup jobs on this host." + }, + "ionice" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "default" : 7, + "maximum" : 8, + "description" : "Set CFQ ionice priority." + }, + "bwlimit" : { + "optional" : 1, + "type" : "integer", + "default" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "minimum" : 0 + }, + "vmid" : { + "format" : "pve-vmid-list", + "description" : "The ID of the guest system you want to backup.", + "optional" : 1, + "type" : "string" + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "method" : "POST" + } + }, + "path" : "/nodes/{node}/vzdump", + "leaf" : 1 + }, + { + "info" : { + "GET" : { + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + } + }, + "name" : "index", + "protected" : 1, + "method" : "GET", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "description" : "Service list.", + "returns" : { + "links" : [ + { + "rel" : "child", + "href" : "{service}" + } + ], + "items" : { + "type" : "object", + "properties" : {} + }, + "type" : "array" + } + } + }, + "text" : "services", + "children" : [ + { + "leaf" : 0, + "path" : "/nodes/{node}/services/{service}", + "info" : { + "GET" : { + "method" : "GET", "returns" : { "links" : [ { "rel" : "child", - "href" : "{pool_name}" + "href" : "{subdir}" } ], - "type" : "array", "items" : { "properties" : { - "pool_name" : { + "subdir" : { "type" : "string" - }, - "pool" : { - "type" : "integer" - }, - "size" : { - "type" : "integer" } }, "type" : "object" - } + }, + "type" : "array" }, - "method" : "GET", - "name" : "lspools" - } - }, - "path" : "/nodes/{node}/ceph/pools" - }, - { - "text" : "crush", - "leaf" : 1, - "path" : "/nodes/{node}/ceph/crush", - "info" : { - "GET" : { - "proxyto" : "node", + "description" : "Directory index", + "name" : "srvcmdidx", "parameters" : { - "additionalProperties" : 0, "properties" : { + "service" : { + "enum" : [ + "pveproxy", + "pvedaemon", + "spiceproxy", + "pvestatd", + "pve-cluster", + "corosync", + "pve-firewall", + "pvefw-logger", + "pve-ha-crm", + "pve-ha-lrm", + "sshd", + "syslog", + "cron", + "postfix", + "ksmtuned", + "systemd-timesyncd" + ], + "description" : "Service ID", + "type" : "string" + }, "node" : { + "description" : "The cluster node name.", "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "format" : "pve-node" } - } + }, + "additionalProperties" : 0 }, "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 + "Sys.Audit" + ] ] - }, - "protected" : 1, - "method" : "GET", - "name" : "crush", - "returns" : { - "type" : "string" - }, - "description" : "Get OSD crush map" + } } - } - }, - { - "leaf" : 1, - "text" : "log", - "path" : "/nodes/{node}/ceph/log", - "info" : { - "GET" : { - "name" : "log", - "method" : "GET", - "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" + }, + "children" : [ + { + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/state", + "info" : { + "GET" : { + "returns" : { + "properties" : {}, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "description" : "Read service properties", + "method" : "GET", + "name" : "service_state", + "parameters" : { + "properties" : { + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "service" : { + "enum" : [ + "pveproxy", + "pvedaemon", + "spiceproxy", + "pvestatd", + "pve-cluster", + "corosync", + "pve-firewall", + "pvefw-logger", + "pve-ha-crm", + "pve-ha-lrm", + "sshd", + "syslog", + "cron", + "postfix", + "ksmtuned", + "systemd-timesyncd" + ], + "description" : "Service ID", + "type" : "string" + } }, - "t" : { - "type" : "string", - "description" : "Line text" - } + "additionalProperties" : 0 }, - "type" : "object" - }, - "type" : "array" + "protected" : 1 + } }, - "description" : "Read ceph log", - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "text" : "state" + }, + { + "text" : "start", + "info" : { + "POST" : { + "returns" : { "type" : "string" }, - "limit" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "start" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1 - } - }, - "additionalProperties" : 0 + "description" : "Start service.", + "proxyto" : "node", + "method" : "POST", + "name" : "service_start", + "parameters" : { + "properties" : { + "service" : { + "type" : "string", + "enum" : [ + "pveproxy", + "pvedaemon", + "spiceproxy", + "pvestatd", + "pve-cluster", + "corosync", + "pve-firewall", + "pvefw-logger", + "pve-ha-crm", + "pve-ha-lrm", + "sshd", + "syslog", + "cron", + "postfix", + "ksmtuned", + "systemd-timesyncd" + ], + "description" : "Service ID" + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + }, + "additionalProperties" : 0 + }, + "protected" : 1 + } }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Syslog" - ] - ] - } - } - } - } - ], - "path" : "/nodes/{node}/ceph", - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "description" : "Directory index.", - "name" : "index", - "method" : "GET", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - } - }, - "returns" : { - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "items" : { - "properties" : {}, - "type" : "object" + "path" : "/nodes/{node}/services/{service}/start", + "leaf" : 1 }, - "type" : "array" - } - } - } - }, - { - "info" : { - "POST" : { - "protected" : 1, - "permissions" : { - "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.", - "user" : "all" - }, - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "mailnotification" : { - "default" : "always", - "type" : "string", - "optional" : 1, - "description" : "Specify when to send an email", - "enum" : [ - "always", - "failure" - ] - }, - "stdexcludes" : { - "default" : 1, - "type" : "boolean", - "optional" : 1, - "description" : "Exclude temporary files and logs." - }, - "pigz" : { - "default" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." - }, - "maxfiles" : { - "optional" : 1, - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1, - "type" : "integer", - "default" : 1 - }, - "lockwait" : { - "minimum" : 0, - "default" : 180, - "type" : "integer", - "description" : "Maximal time to wait for the global lock (minutes).", - "optional" : 1 - }, - "vmid" : { - "optional" : 1, - "description" : "The ID of the guest system you want to backup.", - "format" : "pve-vmid-list", - "type" : "string" - }, - "dumpdir" : { - "description" : "Store resulting files to specified directory.", - "optional" : 1, - "type" : "string" - }, - "ionice" : { - "maximum" : 8, - "type" : "integer", - "default" : 7, - "minimum" : 0, - "description" : "Set CFQ ionice priority.", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "optional" : 1, - "description" : "Only run if executed on this node." - }, - "quiet" : { - "description" : "Be quiet.", - "optional" : 1, - "default" : 0, - "type" : "boolean" - }, - "mailto" : { - "format" : "string-list", - "type" : "string", - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "optional" : 1 - }, - "mode" : { - "default" : "snapshot", - "type" : "string", - "description" : "Backup mode.", - "optional" : 1, - "enum" : [ - "snapshot", - "suspend", - "stop" - ] - }, - "exclude" : { - "description" : "Exclude specified guest systems (assumes --all)", - "optional" : 1, - "format" : "pve-vmid-list", - "type" : "string" - }, - "stopwait" : { - "default" : 10, - "type" : "integer", - "minimum" : 0, - "optional" : 1, - "description" : "Maximal time to wait until a guest system is stopped (minutes)." - }, - "exclude-path" : { - "description" : "Exclude certain files/directories (shell globs).", - "optional" : 1, - "format" : "string-alist", - "type" : "string" - }, - "all" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Backup all known guest systems on this host." - }, - "remove" : { - "type" : "boolean", - "default" : 1, - "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", - "optional" : 1 - }, - "storage" : { - "type" : "string", - "format" : "pve-storage-id", - "optional" : 1, - "description" : "Store resulting file to this storage." - }, - "stdout" : { - "optional" : 1, - "description" : "Write tar to stdout, not to a file.", - "type" : "boolean" - }, - "compress" : { - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "description" : "Compress dump file.", - "optional" : 1, - "default" : "0", - "type" : "string" - }, - "size" : { - "optional" : 1, - "description" : "Unused, will be removed in a future release.", - "minimum" : 500, - "type" : "integer", - "default" : 1024 - }, - "bwlimit" : { - "minimum" : 0, - "default" : 0, - "type" : "integer", - "description" : "Limit I/O bandwidth (KBytes per second).", - "optional" : 1 - }, - "tmpdir" : { - "type" : "string", - "optional" : 1, - "description" : "Store temporary files to specified directory." - }, - "stop" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Stop runnig backup jobs on this host." - }, - "script" : { - "description" : "Use specified hook script.", - "optional" : 1, - "type" : "string" - } - } - }, - "description" : "Create backup.", - "returns" : { - "type" : "string" - }, - "name" : "vzdump", - "method" : "POST" - } - }, - "path" : "/nodes/{node}/vzdump", - "leaf" : 1, - "text" : "vzdump" - }, - { - "path" : "/nodes/{node}/services", - "children" : [ - { - "children" : [ { - "leaf" : 1, - "text" : "state", - "path" : "/nodes/{node}/services/{service}/state", + "text" : "stop", "info" : { - "GET" : { - "name" : "service_state", - "method" : "GET", + "POST" : { "returns" : { - "type" : "object", - "properties" : {} - }, - "description" : "Read service properties", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "service" : { - "description" : "Service ID", - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } + "type" : "string" }, + "description" : "Stop service.", "proxyto" : "node", - "protected" : 1, "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Modify" ] ] - } - } - } - }, - { - "info" : { - "POST" : { - "proxyto" : "node", + }, + "method" : "POST", + "protected" : 1, + "name" : "service_stop", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { "format" : "pve-node", @@ -16757,37 +16971,21 @@ var pveapi = [ "description" : "Service ID", "type" : "string" } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "string" - }, - "name" : "service_start", - "method" : "POST", - "description" : "Start service." + } + } } }, - "path" : "/nodes/{node}/services/{service}/start", - "text" : "start", + "path" : "/nodes/{node}/services/{service}/stop", "leaf" : 1 }, { - "text" : "stop", + "path" : "/nodes/{node}/services/{service}/restart", "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/stop", + "text" : "restart", "info" : { "POST" : { + "proxyto" : "node", + "description" : "Restart service.", "permissions" : { "check" : [ "perm", @@ -16797,14 +16995,19 @@ var pveapi = [ ] ] }, + "returns" : { + "type" : "string" + }, "protected" : 1, - "proxyto" : "node", "parameters" : { "additionalProperties" : 0, "properties" : { - "service" : { + "node" : { + "description" : "The cluster node name.", "type" : "string", - "description" : "Service ID", + "format" : "pve-node" + }, + "service" : { "enum" : [ "pveproxy", "pvedaemon", @@ -16822,36 +17025,27 @@ var pveapi = [ "postfix", "ksmtuned", "systemd-timesyncd" - ] - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + ], + "description" : "Service ID", + "type" : "string" } } }, - "description" : "Stop service.", - "returns" : { - "type" : "string" - }, - "name" : "service_stop", + "name" : "service_restart", "method" : "POST" } } }, { - "path" : "/nodes/{node}/services/{service}/restart", + "path" : "/nodes/{node}/services/{service}/reload", + "leaf" : 1, + "text" : "reload", "info" : { "POST" : { + "name" : "service_reload", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, "service" : { "type" : "string", "description" : "Service ID", @@ -16873,10 +17067,16 @@ var pveapi = [ "ksmtuned", "systemd-timesyncd" ] + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" } } }, - "proxyto" : "node", + "protected" : 1, + "method" : "POST", "permissions" : { "check" : [ "perm", @@ -16886,1130 +17086,1041 @@ var pveapi = [ ] ] }, - "protected" : 1, - "name" : "service_restart", - "method" : "POST", - "returns" : { - "type" : "string" - }, - "description" : "Restart service." - } - }, - "leaf" : 1, - "text" : "restart" - }, - { - "leaf" : 1, - "text" : "reload", - "path" : "/nodes/{node}/services/{service}/reload", - "info" : { - "POST" : { - "name" : "service_reload", - "method" : "POST", - "returns" : { - "type" : "string" - }, "description" : "Reload service.", "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "service" : { - "type" : "string", - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID" - } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "returns" : { + "type" : "string" } } } } ], + "text" : "{service}" + } + ], + "leaf" : 0, + "path" : "/nodes/{node}/services" + }, + { + "text" : "subscription", + "info" : { + "GET" : { + "permissions" : { + "user" : "all" + }, + "parameters" : { + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, + "name" : "get", + "description" : "Read subscription info.", + "proxyto" : "node", + "returns" : { + "type" : "object" + }, + "method" : "GET" + }, + "PUT" : { + "returns" : { + "type" : "null" + }, + "method" : "PUT", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "key" : { + "description" : "Proxmox VE subscription key", + "type" : "string" + } + } + }, + "name" : "set", + "protected" : 1, + "description" : "Set subscription key.", + "proxyto" : "node" + }, + "POST" : { + "proxyto" : "node", + "protected" : 1, + "description" : "Update subscription info.", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "description" : "Always connect to server, even if we have up to date info inside local cache.", + "default" : 0, + "type" : "boolean", + "optional" : 1 + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + } + }, + "name" : "update", + "returns" : { + "type" : "null" + }, + "method" : "POST" + } + }, + "path" : "/nodes/{node}/subscription", + "leaf" : 1 + }, + { + "path" : "/nodes/{node}/network", + "leaf" : 0, + "children" : [ + { "info" : { - "GET" : { + "DELETE" : { + "returns" : { + "type" : "null" + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "proxyto" : "node", + "description" : "Delete network device configuration", + "method" : "DELETE", "parameters" : { - "additionalProperties" : 0, "properties" : { - "service" : { - "type" : "string", - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID" - }, "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." + }, + "iface" : { + "maxLength" : 20, + "format" : "pve-iface", + "description" : "Network interface name.", + "minLength" : 2, + "type" : "string" } - } + }, + "additionalProperties" : 0 + }, + "name" : "delete_network", + "protected" : 1 + }, + "PUT" : { + "returns" : { + "type" : "null" + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "proxyto" : "node", + "description" : "Update network device configuration", + "method" : "PUT", + "name" : "update_network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "slaves" : { + "optional" : 1, + "type" : "string", + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list" + }, + "netmask" : { + "format" : "ipv4mask", + "optional" : 1, + "type" : "string", + "description" : "Network mask.", + "requires" : "address" + }, + "address" : { + "format" : "ipv4", + "requires" : "netmask", + "description" : "IP address.", + "type" : "string", + "optional" : 1 + }, + "bridge_ports" : { + "format" : "pve-iface-list", + "description" : "Specify the iterfaces you want to add to your bridge.", + "type" : "string", + "optional" : 1 + }, + "autostart" : { + "optional" : 1, + "type" : "boolean", + "description" : "Automatically start interface on boot." + }, + "type" : { + "type" : "string", + "description" : "Network interface type", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "unknown" + ] + }, + "gateway6" : { + "type" : "string", + "optional" : 1, + "description" : "Default ipv6 gateway address.", + "format" : "ipv6" + }, + "gateway" : { + "format" : "ipv4", + "optional" : 1, + "type" : "string", + "description" : "Default gateway address." + }, + "ovs_bridge" : { + "type" : "string", + "optional" : 1, + "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", + "format" : "pve-iface" + }, + "delete" : { + "type" : "string", + "optional" : 1, + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list" + }, + "comments" : { + "description" : "Comments", + "type" : "string", + "optional" : 1 + }, + "ovs_tag" : { + "optional" : 1, + "type" : "integer", + "maximum" : 4094, + "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", + "minimum" : 1 + }, + "ovs_options" : { + "description" : "OVS interface options.", + "optional" : 1, + "type" : "string", + "maxLength" : 1024 + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "comments6" : { + "type" : "string", + "optional" : 1, + "description" : "Comments" + }, + "bridge_vlan_aware" : { + "optional" : 1, + "type" : "boolean", + "description" : "Enable bridge vlan support." + }, + "address6" : { + "format" : "ipv6", + "optional" : 1, + "type" : "string", + "description" : "IP address.", + "requires" : "netmask6" + }, + "bond_xmit_hash_policy" : { + "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.", + "enum" : [ + "layer2", + "layer2+3", + "layer3+4" + ], + "optional" : 1, + "type" : "string" + }, + "ovs_bonds" : { + "format" : "pve-iface-list", + "description" : "Specify the interfaces used by the bonding device.", + "optional" : 1, + "type" : "string" + }, + "bond_mode" : { + "optional" : 1, + "type" : "string", + "description" : "Bonding mode.", + "enum" : [ + "balance-rr", + "active-backup", + "balance-xor", + "broadcast", + "802.3ad", + "balance-tlb", + "balance-alb", + "balance-slb", + "lacp-balance-slb", + "lacp-balance-tcp" + ] + }, + "iface" : { + "format" : "pve-iface", + "maxLength" : 20, + "minLength" : 2, + "description" : "Network interface name.", + "type" : "string" + }, + "ovs_ports" : { + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "description" : "Specify the iterfaces you want to add to your bridge." + }, + "netmask6" : { + "maximum" : 128, + "type" : "integer", + "optional" : 1, + "requires" : "address6", + "description" : "Network mask.", + "minimum" : 0 + } + } + }, + "protected" : 1 + }, + "GET" : { + "description" : "Read network device configuration", + "proxyto" : "node", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "iface" : { + "type" : "string", + "description" : "Network interface name.", + "minLength" : 2, + "maxLength" : 20, + "format" : "pve-iface" + } + } + }, + "name" : "network_config", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "properties" : { + "method" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "method" : "GET" + } + }, + "text" : "{iface}", + "leaf" : 1, + "path" : "/nodes/{node}/network/{iface}" + } + ], + "text" : "network", + "info" : { + "GET" : { + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "rel" : "child", + "href" : "{iface}" + } + ], + "type" : "array" + }, + "method" : "GET", + "proxyto" : "node", + "description" : "List available networks", + "permissions" : { + "user" : "all" + }, + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "optional" : 1, + "type" : "string", + "description" : "Only list specific interface types.", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "any_bridge" + ] + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + } + } + }, + "DELETE" : { + "proxyto" : "node", + "description" : "Revert network configuration changes.", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "returns" : { + "type" : "null" + }, + "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + } + }, + "name" : "revert_network_changes", + "method" : "DELETE" + }, + "POST" : { + "protected" : 1, + "name" : "create_network", + "parameters" : { + "properties" : { + "ovs_bridge" : { + "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", + "type" : "string", + "optional" : 1, + "format" : "pve-iface" + }, + "gateway" : { + "type" : "string", + "optional" : 1, + "description" : "Default gateway address.", + "format" : "ipv4" + }, + "gateway6" : { + "format" : "ipv6", + "description" : "Default ipv6 gateway address.", + "type" : "string", + "optional" : 1 + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "ovs_options" : { + "maxLength" : 1024, + "description" : "OVS interface options.", + "type" : "string", + "optional" : 1 + }, + "comments" : { + "optional" : 1, + "type" : "string", + "description" : "Comments" + }, + "ovs_tag" : { + "optional" : 1, + "type" : "integer", + "maximum" : 4094, + "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", + "minimum" : 1 + }, + "netmask" : { + "optional" : 1, + "type" : "string", + "requires" : "address", + "description" : "Network mask.", + "format" : "ipv4mask" + }, + "slaves" : { + "type" : "string", + "optional" : 1, + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list" + }, + "type" : { + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "unknown" + ], + "description" : "Network interface type", + "type" : "string" + }, + "autostart" : { + "description" : "Automatically start interface on boot.", + "type" : "boolean", + "optional" : 1 + }, + "bridge_ports" : { + "format" : "pve-iface-list", + "type" : "string", + "optional" : 1, + "description" : "Specify the iterfaces you want to add to your bridge." + }, + "address" : { + "requires" : "netmask", + "description" : "IP address.", + "type" : "string", + "optional" : 1, + "format" : "ipv4" + }, + "bond_mode" : { + "description" : "Bonding mode.", + "enum" : [ + "balance-rr", + "active-backup", + "balance-xor", + "broadcast", + "802.3ad", + "balance-tlb", + "balance-alb", + "balance-slb", + "lacp-balance-slb", + "lacp-balance-tcp" + ], + "optional" : 1, + "type" : "string" + }, + "ovs_bonds" : { + "format" : "pve-iface-list", + "type" : "string", + "optional" : 1, + "description" : "Specify the interfaces used by the bonding device." + }, + "netmask6" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "maximum" : 128, + "description" : "Network mask.", + "requires" : "address6" + }, + "ovs_ports" : { + "optional" : 1, + "type" : "string", + "description" : "Specify the iterfaces you want to add to your bridge.", + "format" : "pve-iface-list" }, - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{subdir}" - } - ] + "iface" : { + "format" : "pve-iface", + "maxLength" : 20, + "type" : "string", + "description" : "Network interface name.", + "minLength" : 2 }, - "method" : "GET", - "name" : "srvcmdidx", - "description" : "Directory index", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "comments6" : { + "optional" : 1, + "type" : "string", + "description" : "Comments" + }, + "bridge_vlan_aware" : { + "description" : "Enable bridge vlan support.", + "optional" : 1, + "type" : "boolean" + }, + "address6" : { + "format" : "ipv6", + "description" : "IP address.", + "requires" : "netmask6", + "optional" : 1, + "type" : "string" + }, + "bond_xmit_hash_policy" : { + "type" : "string", + "optional" : 1, + "enum" : [ + "layer2", + "layer2+3", + "layer3+4" + ], + "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes." } - } + }, + "additionalProperties" : 0 }, - "path" : "/nodes/{node}/services/{service}", - "leaf" : 0, - "text" : "{service}" - } - ], - "info" : { - "GET" : { + "method" : "POST", + "proxyto" : "node", + "description" : "Create network device configuration", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } - }, - "proxyto" : "node", - "description" : "Service list.", - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{service}" - } - ] - }, - "method" : "GET", - "name" : "index" - } - }, - "leaf" : 0, - "text" : "services" - }, - { - "info" : { - "GET" : { - "permissions" : { - "user" : "all" - }, - "description" : "Read subscription info.", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - } - }, - "returns" : { - "type" : "object" - }, - "method" : "GET", - "name" : "get" - }, - "POST" : { - "method" : "POST", - "name" : "update", - "proxyto" : "node", - "parameters" : { - "properties" : { - "force" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Always connect to server, even if we have up to date info inside local cache." - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "null" - }, - "description" : "Update subscription info.", - "protected" : 1 - }, - "PUT" : { "returns" : { "type" : "null" - }, - "proxyto" : "node", - "parameters" : { - "properties" : { - "key" : { - "type" : "string", - "description" : "Proxmox VE subscription key" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "method" : "PUT", - "name" : "set", - "protected" : 1, - "description" : "Set subscription key." + } } - }, - "path" : "/nodes/{node}/subscription", - "leaf" : 1, - "text" : "subscription" + } }, { + "path" : "/nodes/{node}/tasks", "leaf" : 0, - "text" : "network", - "path" : "/nodes/{node}/network", + "text" : "tasks", "children" : [ { - "leaf" : 1, - "text" : "{iface}", - "path" : "/nodes/{node}/network/{iface}", + "leaf" : 0, + "path" : "/nodes/{node}/tasks/{upid}", "info" : { - "PUT" : { - "method" : "PUT", - "name" : "update_network", + "DELETE" : { "returns" : { "type" : "null" }, - "description" : "Update network device configuration", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ovs_tag" : { - "minimum" : 1, - "type" : "integer", - "maximum" : 4094, - "optional" : 1, - "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)" - }, - "ovs_bonds" : { - "format" : "pve-iface-list", - "type" : "string", - "optional" : 1, - "description" : "Specify the interfaces used by the bonding device." - }, - "gateway6" : { - "description" : "Default ipv6 gateway address.", - "optional" : 1, - "format" : "ipv6", - "type" : "string" - }, - "type" : { - "type" : "string", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "unknown" - ], - "description" : "Network interface type" - }, - "comments6" : { - "type" : "string", - "description" : "Comments", - "optional" : 1 - }, - "iface" : { - "type" : "string", - "format" : "pve-iface", - "minLength" : 2, - "maxLength" : 20, - "description" : "Network interface name." - }, - "bond_xmit_hash_policy" : { - "optional" : 1, - "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.", - "enum" : [ - "layer2", - "layer2+3", - "layer3+4" - ], - "type" : "string" - }, - "slaves" : { - "optional" : 1, - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list", - "type" : "string" - }, - "netmask" : { - "description" : "Network mask.", - "optional" : 1, - "requires" : "address", - "type" : "string", - "format" : "ipv4mask" - }, + "permissions" : { + "user" : "all", + "description" : "The user needs 'Sys.Modify' permissions on '/nodes/' if the task does not belong to him." + }, + "description" : "Stop a task.", + "proxyto" : "node", + "method" : "DELETE", + "name" : "stop_task", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "address" : { - "optional" : 1, - "description" : "IP address.", - "requires" : "netmask", - "type" : "string", - "format" : "ipv4" - }, - "bridge_ports" : { - "format" : "pve-iface-list", - "type" : "string", - "description" : "Specify the iterfaces you want to add to your bridge.", - "optional" : 1 - }, - "comments" : { - "description" : "Comments", - "optional" : 1, - "type" : "string" - }, - "bond_mode" : { - "type" : "string", - "enum" : [ - "balance-rr", - "active-backup", - "balance-xor", - "broadcast", - "802.3ad", - "balance-tlb", - "balance-alb", - "balance-slb", - "lacp-balance-slb", - "lacp-balance-tcp" - ], - "description" : "Bonding mode.", - "optional" : 1 - }, - "bridge_vlan_aware" : { - "type" : "boolean", - "description" : "Enable bridge vlan support.", - "optional" : 1 - }, - "autostart" : { - "type" : "boolean", - "optional" : 1, - "description" : "Automatically start interface on boot." - }, - "ovs_bridge" : { - "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", - "optional" : 1, - "type" : "string", - "format" : "pve-iface" - }, - "address6" : { - "optional" : 1, - "description" : "IP address.", - "requires" : "netmask6", - "type" : "string", - "format" : "ipv6" - }, - "delete" : { - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "type" : "string" - }, - "ovs_options" : { - "type" : "string", - "description" : "OVS interface options.", - "maxLength" : 1024, - "optional" : 1 - }, - "ovs_ports" : { - "optional" : 1, - "description" : "Specify the iterfaces you want to add to your bridge.", "type" : "string", - "format" : "pve-iface-list" + "description" : "The cluster node name.", + "format" : "pve-node" }, - "gateway" : { - "description" : "Default gateway address.", - "optional" : 1, - "format" : "ipv4", + "upid" : { "type" : "string" - }, - "netmask6" : { - "description" : "Network mask.", - "optional" : 1, - "minimum" : 0, - "maximum" : 128, - "requires" : "address6", - "type" : "integer" } } }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - } + "protected" : 1 }, "GET" : { - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "description" : "Read network device configuration", "method" : "GET", - "name" : "network_config", "returns" : { - "type" : "object", - "properties" : { - "method" : { - "type" : "string" - }, - "type" : { - "type" : "string" + "links" : [ + { + "href" : "{name}", + "rel" : "child" } - } + ], + "items" : { + "type" : "object", + "properties" : {} + }, + "type" : "array" }, - "proxyto" : "node", + "description" : "", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { + "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "type" : "string" }, - "iface" : { - "minLength" : 2, - "description" : "Network interface name.", - "maxLength" : 20, - "type" : "string", - "format" : "pve-iface" + "upid" : { + "type" : "string" } - }, - "additionalProperties" : 0 - } - }, - "DELETE" : { - "description" : "Delete network device configuration", - "method" : "DELETE", - "name" : "delete_network", - "returns" : { - "type" : "null" + } }, - "protected" : 1, + "name" : "upid_index", "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "user" : "all" + } + } + }, + "children" : [ + { + "info" : { + "GET" : { + "method" : "GET", + "name" : "read_task_log", + "parameters" : { + "properties" : { + "start" : { + "optional" : 1, + "type" : "integer", + "minimum" : 0 + }, + "upid" : { + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "limit" : { + "type" : "integer", + "optional" : 1, + "minimum" : 0 + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "n" : { + "type" : "integer", + "description" : "Line number" + }, + "t" : { + "type" : "string", + "description" : "Line text" + } + } + } + }, + "permissions" : { + "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", + "user" : "all" + }, + "proxyto" : "node", + "description" : "Read task log." + } }, - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "text" : "log", + "leaf" : 1, + "path" : "/nodes/{node}/tasks/{upid}/log" + }, + { + "path" : "/nodes/{node}/tasks/{upid}/status", + "leaf" : 1, + "text" : "status", + "info" : { + "GET" : { + "name" : "read_task_status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, + "upid" : { + "type" : "string" + } + } + }, + "protected" : 1, + "method" : "GET", + "permissions" : { + "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", + "user" : "all" }, - "iface" : { - "description" : "Network interface name.", - "maxLength" : 20, - "minLength" : 2, - "format" : "pve-iface", - "type" : "string" + "proxyto" : "node", + "description" : "Read task status.", + "returns" : { + "properties" : { + "pid" : { + "type" : "integer" + }, + "status" : { + "type" : "string", + "enum" : [ + "running", + "stopped" + ] + } + }, + "type" : "object" } - }, - "additionalProperties" : 0 + } } } - } + ], + "text" : "{upid}" } ], "info" : { - "DELETE" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - } - }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "method" : "DELETE", - "name" : "revert_network_changes", - "returns" : { - "type" : "null" - }, - "description" : "Revert network configuration changes." - }, "GET" : { - "description" : "List available networks", - "permissions" : { - "user" : "all" - }, - "name" : "index", - "method" : "GET", "returns" : { "type" : "array", "items" : { "type" : "object", - "properties" : {} + "properties" : { + "upid" : { + "type" : "string" + } + } }, "links" : [ { - "href" : "{iface}", - "rel" : "child" + "rel" : "child", + "href" : "{upid}" } ] }, + "method" : "GET", "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "type" : "string", - "optional" : 1, - "description" : "Only list specific interface types.", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "any_bridge" - ] - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } - } - }, - "POST" : { - "method" : "POST", - "name" : "create_network", - "returns" : { - "type" : "null" + "description" : "Read task list for one node (finished tasks).", + "permissions" : { + "user" : "all", + "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/ (the the task runs on)." }, - "description" : "Create network device configuration", - "proxyto" : "node", "parameters" : { + "additionalProperties" : 0, "properties" : { - "slaves" : { - "format" : "pve-iface-list", - "type" : "string", - "description" : "Specify the interfaces used by the bonding device.", - "optional" : 1 - }, - "bond_xmit_hash_policy" : { - "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.", - "optional" : 1, - "enum" : [ - "layer2", - "layer2+3", - "layer3+4" - ], - "type" : "string" - }, - "comments6" : { - "description" : "Comments", - "optional" : 1, - "type" : "string" - }, - "iface" : { - "type" : "string", - "format" : "pve-iface", - "minLength" : 2, - "description" : "Network interface name.", - "maxLength" : 20 - }, - "type" : { - "type" : "string", - "description" : "Network interface type", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "unknown" - ] - }, - "ovs_tag" : { - "minimum" : 1, + "vmid" : { + "description" : "Only list tasks for this VM.", "type" : "integer", - "maximum" : 4094, - "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", - "optional" : 1 - }, - "ovs_bonds" : { - "description" : "Specify the interfaces used by the bonding device.", - "optional" : 1, - "type" : "string", - "format" : "pve-iface-list" - }, - "gateway6" : { - "type" : "string", - "format" : "ipv6", - "optional" : 1, - "description" : "Default ipv6 gateway address." - }, - "ovs_options" : { - "type" : "string", - "description" : "OVS interface options.", "optional" : 1, - "maxLength" : 1024 - }, - "address6" : { - "format" : "ipv6", - "requires" : "netmask6", - "type" : "string", - "description" : "IP address.", - "optional" : 1 + "format" : "pve-vmid", + "minimum" : 1 }, - "netmask6" : { + "start" : { "minimum" : 0, - "type" : "integer", - "requires" : "address6", - "maximum" : 128, - "description" : "Network mask.", - "optional" : 1 - }, - "ovs_ports" : { - "format" : "pve-iface-list", - "type" : "string", - "optional" : 1, - "description" : "Specify the iterfaces you want to add to your bridge." - }, - "gateway" : { - "format" : "ipv4", - "type" : "string", - "description" : "Default gateway address.", - "optional" : 1 - }, - "ovs_bridge" : { "optional" : 1, - "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", - "format" : "pve-iface", - "type" : "string" + "type" : "integer" }, - "autostart" : { - "description" : "Automatically start interface on boot.", + "errors" : { "optional" : 1, "type" : "boolean" }, - "bond_mode" : { - "type" : "string", - "enum" : [ - "balance-rr", - "active-backup", - "balance-xor", - "broadcast", - "802.3ad", - "balance-tlb", - "balance-alb", - "balance-slb", - "lacp-balance-slb", - "lacp-balance-tcp" - ], - "description" : "Bonding mode.", - "optional" : 1 - }, - "bridge_vlan_aware" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable bridge vlan support." - }, - "comments" : { - "type" : "string", - "description" : "Comments", - "optional" : 1 - }, "node" : { "description" : "The cluster node name.", "type" : "string", "format" : "pve-node" }, - "netmask" : { - "type" : "string", - "requires" : "address", - "format" : "ipv4mask", - "description" : "Network mask.", + "limit" : { + "minimum" : 0, + "type" : "integer", "optional" : 1 }, - "bridge_ports" : { - "description" : "Specify the iterfaces you want to add to your bridge.", - "optional" : 1, + "userfilter" : { "type" : "string", - "format" : "pve-iface-list" - }, - "address" : { - "optional" : 1, - "description" : "IP address.", - "format" : "ipv4", - "requires" : "netmask", - "type" : "string" + "optional" : 1 } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - } + "name" : "node_tasks" } } }, { "leaf" : 0, - "text" : "tasks", + "path" : "/nodes/{node}/scan", "info" : { "GET" : { - "permissions" : { - "user" : "all", - "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/ (the the task runs on)." - }, - "description" : "Read task list for one node (finished tasks).", - "method" : "GET", - "name" : "node_tasks", "parameters" : { "additionalProperties" : 0, "properties" : { - "limit" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1 - }, "node" : { "description" : "The cluster node name.", "type" : "string", "format" : "pve-node" - }, - "errors" : { - "type" : "boolean", - "optional" : 1 - }, - "start" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1 - }, - "vmid" : { - "description" : "Only list tasks for this VM.", - "optional" : 1, - "minimum" : 1, - "type" : "integer", - "format" : "pve-vmid" - }, - "userfilter" : { - "type" : "string", - "optional" : 1 } } }, - "proxyto" : "node", + "permissions" : { + "user" : "all" + }, + "name" : "index", + "description" : "Index of available scan methods", + "method" : "GET", "returns" : { + "type" : "array", "items" : { "properties" : { - "upid" : { + "method" : { "type" : "string" } }, "type" : "object" }, - "type" : "array", "links" : [ { - "href" : "{upid}", - "rel" : "child" + "rel" : "child", + "href" : "{method}" } ] } } }, - "path" : "/nodes/{node}/tasks", "children" : [ { - "text" : "{upid}", - "leaf" : 0, - "children" : [ - { - "text" : "log", - "leaf" : 1, - "path" : "/nodes/{node}/tasks/{upid}/log", - "info" : { - "GET" : { - "permissions" : { - "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", - "user" : "all" - }, - "protected" : 1, - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "limit" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, - "start" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, - "upid" : { - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "description" : "Read task log.", - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "n" : { - "type" : "integer", - "description" : "Line number" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } - } - }, - "type" : "array" - }, - "method" : "GET", - "name" : "read_task_log" - } - } - }, - { - "text" : "status", - "leaf" : 1, - "info" : { - "GET" : { - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "upid" : { - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } - }, - "protected" : 1, - "permissions" : { - "user" : "all", - "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him." - }, - "method" : "GET", - "name" : "read_task_status", - "returns" : { - "type" : "object", - "properties" : { - "status" : { - "enum" : [ - "running", - "stopped" - ], - "type" : "string" - }, - "pid" : { - "type" : "integer" - } - } - }, - "description" : "Read task status." - } - }, - "path" : "/nodes/{node}/tasks/{upid}/status" - } - ], "info" : { "GET" : { - "description" : "", + "proxyto" : "node", + "description" : "Scan zfs pool list on local node.", "permissions" : { - "user" : "all" - }, - "name" : "upid_index", - "method" : "GET", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "upid" : { - "type" : "string" - } - } + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] }, "returns" : { "type" : "array", "items" : { - "type" : "object", - "properties" : {} - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] - } - }, - "DELETE" : { + "properties" : { + "pool" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "upid" : { - "type" : "string" - }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" } - } - }, - "proxyto" : "node", - "permissions" : { - "user" : "all", - "description" : "The user needs 'Sys.Modify' permissions on '/nodes/' if the task does not belong to him." - }, - "protected" : 1, - "method" : "DELETE", - "name" : "stop_task", - "returns" : { - "type" : "null" + }, + "additionalProperties" : 0 }, - "description" : "Stop a task." + "name" : "zfsscan", + "method" : "GET" } }, - "path" : "/nodes/{node}/tasks/{upid}" - } - ] - }, - { - "text" : "scan", - "leaf" : 0, - "path" : "/nodes/{node}/scan", - "children" : [ - { "text" : "zfs", "leaf" : 1, - "path" : "/nodes/{node}/scan/zfs", + "path" : "/nodes/{node}/scan/zfs" + }, + { + "leaf" : 1, + "path" : "/nodes/{node}/scan/nfs", "info" : { "GET" : { + "description" : "Scan remote NFS server.", + "proxyto" : "node", + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, "returns" : { "type" : "array", "items" : { + "type" : "object", "properties" : { - "pool" : { + "path" : { + "type" : "string" + }, + "options" : { "type" : "string" } - }, - "type" : "object" + } } }, - "name" : "zfsscan", - "method" : "GET", - "description" : "Scan zfs pool list on local node.", + "protected" : 1, + "name" : "nfsscan", "parameters" : { "properties" : { "node" : { - "type" : "string", "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" + }, + "server" : { + "format" : "pve-storage-server", + "type" : "string" } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "protected" : 1 + "method" : "GET" } - } + }, + "text" : "nfs" }, { - "path" : "/nodes/{node}/scan/nfs", + "leaf" : 1, + "path" : "/nodes/{node}/scan/glusterfs", "info" : { "GET" : { - "description" : "Scan remote NFS server.", - "method" : "GET", - "name" : "nfsscan", "returns" : { "items" : { - "type" : "object", "properties" : { - "path" : { - "type" : "string" - }, - "options" : { + "volname" : { "type" : "string" } - } + }, + "type" : "object" }, "type" : "array" }, - "protected" : 1, "permissions" : { "check" : [ "perm", @@ -18019,46 +18130,35 @@ var pveapi = [ ] ] }, + "description" : "Scan remote GlusterFS server.", "proxyto" : "node", + "method" : "GET", + "name" : "glusterfsscan", "parameters" : { "properties" : { - "server" : { - "type" : "string", - "format" : "pve-storage-server" - }, "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." + }, + "server" : { + "format" : "pve-storage-server", + "type" : "string" } }, "additionalProperties" : 0 - } + }, + "protected" : 1 } }, - "leaf" : 1, - "text" : "nfs" + "text" : "glusterfs" }, { - "path" : "/nodes/{node}/scan/glusterfs", + "text" : "iscsi", "info" : { "GET" : { "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "server" : { - "format" : "pve-storage-server", - "type" : "string" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - } - }, - "protected" : 1, + "description" : "Scan remote iSCSI server.", "permissions" : { "check" : [ "perm", @@ -18068,29 +18168,6 @@ var pveapi = [ ] ] }, - "name" : "glusterfsscan", - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "volname" : { - "type" : "string" - } - } - } - }, - "description" : "Scan remote GlusterFS server." - } - }, - "text" : "glusterfs", - "leaf" : 1 - }, - { - "path" : "/nodes/{node}/scan/iscsi", - "info" : { - "GET" : { "returns" : { "type" : "array", "items" : { @@ -18105,9 +18182,7 @@ var pveapi = [ "type" : "object" } }, - "method" : "GET", - "name" : "iscsiscan", - "description" : "Scan remote iSCSI server.", + "protected" : 1, "parameters" : { "properties" : { "portal" : { @@ -18115,34 +18190,25 @@ var pveapi = [ "format" : "pve-storage-portal-dns" }, "node" : { + "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "format" : "pve-node" } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - } + "name" : "iscsiscan", + "method" : "GET" } }, - "text" : "iscsi", + "path" : "/nodes/{node}/scan/iscsi", "leaf" : 1 }, { - "path" : "/nodes/{node}/scan/lvm", "info" : { "GET" : { "returns" : { + "type" : "array", "items" : { "type" : "object", "properties" : { @@ -18150,23 +18216,10 @@ var pveapi = [ "type" : "string" } } - }, - "type" : "array" - }, - "name" : "lvmscan", - "method" : "GET", - "description" : "List local LVM volume groups.", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + } }, "proxyto" : "node", + "description" : "List local LVM volume groups.", "permissions" : { "check" : [ "perm", @@ -18176,44 +18229,57 @@ var pveapi = [ ] ] }, - "protected" : 1 + "method" : "GET", + "protected" : 1, + "name" : "lvmscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + } + } } }, + "text" : "lvm", "leaf" : 1, - "text" : "lvm" + "path" : "/nodes/{node}/scan/lvm" }, { - "leaf" : 1, - "text" : "lvmthin", "info" : { "GET" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, "parameters" : { "properties" : { "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" + "type" : "string", + "description" : "The cluster node name." }, "vg" : { - "type" : "string", "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+", + "type" : "string", "maxLength" : 100 } }, "additionalProperties" : 0 }, - "proxyto" : "node", + "name" : "lvmthinscan", + "protected" : 1, + "method" : "GET", + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, "description" : "List local LVM Thin Pools.", + "proxyto" : "node", "returns" : { "type" : "array", "items" : { @@ -18224,141 +18290,140 @@ var pveapi = [ }, "type" : "object" } - }, - "method" : "GET", - "name" : "lvmthinscan" + } } }, + "text" : "lvmthin", + "leaf" : 1, "path" : "/nodes/{node}/scan/lvmthin" }, { - "text" : "usb", - "leaf" : 1, "path" : "/nodes/{node}/scan/usb", + "leaf" : 1, + "text" : "usb", "info" : { "GET" : { + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "proxyto" : "node", "description" : "List local USB devices.", "returns" : { "items" : { "properties" : { - "port" : { - "type" : "integer" - }, - "prodid" : { + "speed" : { "type" : "string" }, - "manufacturer" : { + "serial" : { "optional" : 1, "type" : "string" }, "product" : { - "optional" : 1, - "type" : "string" + "type" : "string", + "optional" : 1 }, - "class" : { + "devnum" : { "type" : "integer" }, - "devnum" : { + "vendid" : { + "type" : "string" + }, + "busnum" : { "type" : "integer" }, - "level" : { + "class" : { "type" : "integer" }, - "vendid" : { + "usbpath" : { + "optional" : 1, "type" : "string" }, - "usbpath" : { - "type" : "string", - "optional" : 1 + "prodid" : { + "type" : "string" }, - "busnum" : { + "level" : { "type" : "integer" }, - "serial" : { + "manufacturer" : { "optional" : 1, "type" : "string" }, - "speed" : { - "type" : "string" + "port" : { + "type" : "integer" } }, "type" : "object" - }, - "type" : "array" - }, - "name" : "usbscan", - "method" : "GET", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + }, + "type" : "array" }, + "name" : "usbscan", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "format" : "pve-node", + "type" : "string", "description" : "The cluster node name." } } }, - "proxyto" : "node" + "protected" : 1, + "method" : "GET" } } } ], - "info" : { - "GET" : { - "description" : "Index of available scan methods", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "method" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{method}" - } - ] - }, - "method" : "GET", - "name" : "index" - } - } + "text" : "scan" }, { - "text" : "storage", + "path" : "/nodes/{node}/storage", "leaf" : 0, + "text" : "storage", "children" : [ { + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}", "info" : { "GET" : { - "description" : "", + "returns" : { + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "items" : { + "type" : "object", + "properties" : { + "subdir" : { + "type" : "string" + } + } + }, + "type" : "array" + }, + "method" : "GET", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "storage" : { + "description" : "The storage identifier.", + "type" : "string", + "format" : "pve-storage-id" + } + } + }, "permissions" : { "check" : [ "perm", @@ -18371,200 +18436,34 @@ var pveapi = [ 1 ] }, - "method" : "GET", "name" : "diridx", - "parameters" : { - "properties" : { - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "description" : "The storage identifier." - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array", - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ] - } + "description" : "" } }, + "text" : "{storage}", "children" : [ { - "children" : [ - { - "path" : "/nodes/{node}/storage/{storage}/content/{volume}", - "info" : { - "DELETE" : { - "protected" : 1, - "permissions" : { - "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).", - "user" : "all" - }, - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "storage" : { - "optional" : 1, - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string" - }, - "volume" : { - "description" : "Volume identifier", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", - "description" : "Delete volume", - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "name" : "delete" - }, - "GET" : { - "returns" : { - "type" : "object" - }, - "name" : "info", - "method" : "GET", - "description" : "Get volume attributes", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "optional" : 1, - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string" - }, - "volume" : { - "description" : "Volume identifier", - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } - }, - "protected" : 1, - "permissions" : { - "user" : "all", - "description" : "You need read access for the volume." - } - }, - "POST" : { - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "target" : { - "description" : "Target volume identifier", - "type" : "string" - }, - "volume" : { - "type" : "string", - "description" : "Source volume identifier" - }, - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "description" : "The storage identifier.", - "optional" : 1 - }, - "target_node" : { - "format" : "pve-node", - "type" : "string", - "optional" : 1, - "description" : "Target node. Default is local node." - } - } - }, - "returns" : { - "type" : "string" - }, - "method" : "POST", - "name" : "copy", - "description" : "Copy a volume. This is experimental code - do not use.", - "protected" : 1 - } - }, - "text" : "{volume}", - "leaf" : 1 - } - ], "info" : { "GET" : { - "returns" : { - "items" : { - "properties" : { - "volid" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{volid}" - } - ] - }, "method" : "GET", - "name" : "index", - "description" : "List storage content.", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "optional" : 1, - "description" : "Only list images for this VM", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, "storage" : { "description" : "The storage identifier.", "type" : "string", "format" : "pve-storage-id" }, + "vmid" : { + "format" : "pve-vmid", + "minimum" : 1, + "description" : "Only list images for this VM", + "optional" : 1, + "type" : "integer" + }, "node" : { - "type" : "string", "format" : "pve-node", + "type" : "string", "description" : "The cluster node name." }, "content" : { @@ -18573,10 +18472,27 @@ var pveapi = [ "type" : "string", "format" : "pve-storage-content" } + } + }, + "name" : "index", + "protected" : 1, + "returns" : { + "type" : "array", + "items" : { + "properties" : { + "volid" : { + "type" : "string" + } + }, + "type" : "object" }, - "additionalProperties" : 0 + "links" : [ + { + "href" : "{volid}", + "rel" : "child" + } + ] }, - "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -18589,9 +18505,16 @@ var pveapi = [ 1 ] }, - "protected" : 1 + "proxyto" : "node", + "description" : "List storage content." }, "POST" : { + "returns" : { + "description" : "Volume identifier", + "type" : "string" + }, + "description" : "Allocate disk images.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -18601,74 +18524,195 @@ var pveapi = [ ] ] }, + "method" : "POST", "protected" : 1, "parameters" : { "additionalProperties" : 0, "properties" : { - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "description" : "The storage identifier." - }, "format" : { - "type" : "string", "requires" : "size", "enum" : [ "raw", "qcow2", "subvol" ], + "type" : "string", "optional" : 1 }, "vmid" : { - "description" : "Specify owner VM", - "minimum" : 1, "format" : "pve-vmid", + "minimum" : 1, + "description" : "Specify owner VM", "type" : "integer" }, + "storage" : { + "format" : "pve-storage-id", + "description" : "The storage identifier.", + "type" : "string" + }, "size" : { - "type" : "string", + "pattern" : "\\d+[MG]?", "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)", - "pattern" : "\\d+[MG]?" + "type" : "string" }, "filename" : { - "description" : "The name of the file to create.", - "type" : "string" + "type" : "string", + "description" : "The name of the file to create." }, "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" } } }, - "proxyto" : "node", - "description" : "Allocate disk images.", - "name" : "create", - "method" : "POST", - "returns" : { - "description" : "Volume identifier", - "type" : "string" - } + "name" : "create" } }, - "path" : "/nodes/{node}/storage/{storage}/content", + "children" : [ + { + "info" : { + "GET" : { + "returns" : { + "type" : "object" + }, + "proxyto" : "node", + "description" : "Get volume attributes", + "permissions" : { + "description" : "You need read access for the volume.", + "user" : "all" + }, + "method" : "GET", + "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "storage" : { + "type" : "string", + "optional" : 1, + "description" : "The storage identifier.", + "format" : "pve-storage-id" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "volume" : { + "description" : "Volume identifier", + "type" : "string" + } + } + }, + "name" : "info" + }, + "DELETE" : { + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "volume" : { + "type" : "string", + "description" : "Volume identifier" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "storage" : { + "format" : "pve-storage-id", + "description" : "The storage identifier.", + "optional" : 1, + "type" : "string" + } + } + }, + "name" : "delete", + "protected" : 1, + "method" : "DELETE", + "permissions" : { + "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).", + "user" : "all" + }, + "proxyto" : "node", + "description" : "Delete volume", + "returns" : { + "type" : "null" + } + }, + "POST" : { + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "target" : { + "type" : "string", + "description" : "Target volume identifier" + }, + "target_node" : { + "type" : "string", + "optional" : 1, + "description" : "Target node. Default is local node.", + "format" : "pve-node" + }, + "storage" : { + "format" : "pve-storage-id", + "description" : "The storage identifier.", + "type" : "string", + "optional" : 1 + }, + "volume" : { + "type" : "string", + "description" : "Source volume identifier" + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + } + }, + "name" : "copy", + "description" : "Copy a volume. This is experimental code - do not use.", + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + }, + "method" : "POST" + } + }, + "text" : "{volume}", + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/content/{volume}" + } + ], "text" : "content", - "leaf" : 0 + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}/content" }, { - "text" : "status", "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/status", "info" : { "GET" : { - "method" : "GET", - "name" : "read_status", + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] + }, + "description" : "Read storage status.", + "proxyto" : "node", "returns" : { "properties" : {}, "type" : "object" }, - "description" : "Read storage status.", - "proxyto" : "node", "parameters" : { "properties" : { "storage" : { @@ -18678,63 +18722,37 @@ var pveapi = [ }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" } }, "additionalProperties" : 0 }, + "name" : "read_status", "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] - } + "method" : "GET" } }, - "path" : "/nodes/{node}/storage/{storage}/status" + "text" : "status" }, { - "path" : "/nodes/{node}/storage/{storage}/rrd", "info" : { "GET" : { - "method" : "GET", - "name" : "rrd", - "returns" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" - } - } - }, - "description" : "Read storage RRD statistics (returns PNG).", - "proxyto" : "node", + "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "cf" : { - "optional" : 1, - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "type" : "string" + "ds" : { + "type" : "string", + "description" : "The list of datasources you want to display.", + "format" : "pve-configid-list" }, - "storage" : { - "description" : "The storage identifier.", + "node" : { + "description" : "The cluster node name.", "type" : "string", - "format" : "pve-storage-id" + "format" : "pve-node" }, "timeframe" : { + "type" : "string", "enum" : [ "hour", "day", @@ -18742,21 +18760,29 @@ var pveapi = [ "month", "year" ], - "description" : "Specify the time frame you are interested in.", - "type" : "string" + "description" : "Specify the time frame you are interested in." }, - "node" : { + "storage" : { "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The storage identifier.", + "format" : "pve-storage-id" }, - "ds" : { - "format" : "pve-configid-list", + "cf" : { "type" : "string", - "description" : "The list of datasources you want to display." + "optional" : 1, + "enum" : [ + "AVERAGE", + "MAX" + ], + "description" : "The RRD consolidation function" } - } + }, + "additionalProperties" : 0 }, + "name" : "rrd", + "method" : "GET", + "proxyto" : "node", + "description" : "Read storage RRD statistics (returns PNG).", "permissions" : { "check" : [ "perm", @@ -18769,55 +18795,41 @@ var pveapi = [ 1 ] }, - "protected" : 1 + "returns" : { + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" + } } }, + "text" : "rrd", "leaf" : 1, - "text" : "rrd" + "path" : "/nodes/{node}/storage/{storage}/rrd" }, { - "text" : "rrddata", - "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/rrddata", "info" : { "GET" : { - "description" : "Read storage RRD statistics.", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} - } - }, - "method" : "GET", - "name" : "rrddata", - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] - }, "protected" : 1, - "proxyto" : "node", "parameters" : { - "additionalProperties" : 0, "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + }, "timeframe" : { + "type" : "string", + "description" : "Specify the time frame you are interested in.", "enum" : [ "hour", "day", "week", "month", "year" - ], - "description" : "Specify the time frame you are interested in.", - "type" : "string" + ] }, "storage" : { "format" : "pve-storage-id", @@ -18826,65 +18838,87 @@ var pveapi = [ }, "cf" : { "type" : "string", + "optional" : 1, "enum" : [ "AVERAGE", "MAX" ], - "optional" : 1, "description" : "The RRD consolidation function" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" } - } + }, + "additionalProperties" : 0 + }, + "name" : "rrddata", + "method" : "GET", + "proxyto" : "node", + "description" : "Read storage RRD statistics.", + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] + }, + "returns" : { + "items" : { + "type" : "object", + "properties" : {} + }, + "type" : "array" } } - } + }, + "text" : "rrddata", + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/rrddata" }, { - "text" : "upload", - "leaf" : 1, "path" : "/nodes/{node}/storage/{storage}/upload", + "leaf" : 1, + "text" : "upload", "info" : { "POST" : { - "method" : "POST", - "name" : "upload", "returns" : { "type" : "string" }, + "method" : "POST", + "description" : "Upload templates and ISO images.", + "protected" : 1, "parameters" : { + "additionalProperties" : 0, "properties" : { "storage" : { - "description" : "The storage identifier.", "format" : "pve-storage-id", + "description" : "The storage identifier.", "type" : "string" }, "tmpfilename" : { "optional" : 1, - "description" : "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trustet port on localhost.", - "type" : "string" + "type" : "string", + "description" : "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trustet port on localhost." }, "content" : { - "format" : "pve-storage-content", + "description" : "Content type.", "type" : "string", - "description" : "Content type." + "format" : "pve-storage-content" }, "filename" : { - "description" : "The name of the file to create.", - "type" : "string" + "type" : "string", + "description" : "The name of the file to create." }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, - "description" : "Upload templates and ISO images.", + "name" : "upload", "permissions" : { "check" : [ "perm", @@ -18897,17 +18931,19 @@ var pveapi = [ } } } - ], - "path" : "/nodes/{node}/storage/{storage}", - "text" : "{storage}", - "leaf" : 0 + ] } ], - "path" : "/nodes/{node}/storage", "info" : { "GET" : { + "permissions" : { + "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", + "user" : "all" + }, + "proxyto" : "node", "description" : "Get status for all datastores.", "returns" : { + "type" : "array", "items" : { "type" : "object", "properties" : { @@ -18916,193 +18952,196 @@ var pveapi = [ } } }, - "type" : "array", "links" : [ { - "rel" : "child", - "href" : "{storage}" + "href" : "{storage}", + "rel" : "child" } ] }, - "name" : "index", - "method" : "GET", - "permissions" : { - "user" : "all", - "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'" - }, - "protected" : 1, "parameters" : { - "additionalProperties" : 0, "properties" : { - "node" : { - "type" : "string", + "target" : { "format" : "pve-node", - "description" : "The cluster node name." - }, - "content" : { + "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.", "type" : "string", - "format" : "pve-storage-content-list", - "description" : "Only list stores which support this content type.", "optional" : 1 }, - "target" : { + "storage" : { + "format" : "pve-storage-id", + "type" : "string", "optional" : 1, - "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.", - "format" : "pve-node", - "type" : "string" + "description" : "Only list status for specified storage" }, "enabled" : { - "optional" : 1, "description" : "Only list stores which are enabled (not disabled in config).", - "default" : 0, - "type" : "boolean" + "type" : "boolean", + "optional" : 1, + "default" : 0 }, - "storage" : { - "format" : "pve-storage-id", + "content" : { + "format" : "pve-storage-content-list", "type" : "string", "optional" : 1, - "description" : "Only list status for specified storage" + "description" : "Only list stores which support this content type." + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" } - } + }, + "additionalProperties" : 0 }, - "proxyto" : "node" + "name" : "index", + "protected" : 1, + "method" : "GET" } } }, { "text" : "apt", - "leaf" : 0, "children" : [ { "info" : { "POST" : { + "returns" : { + "type" : "string" + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "description" : "This is used to resynchronize the package index files from their sources (apt-get update).", "proxyto" : "node", + "method" : "POST", + "name" : "update_database", "parameters" : { "additionalProperties" : 0, "properties" : { "notify" : { - "optional" : 1, "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').", "default" : 0, - "type" : "boolean" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "boolean", + "optional" : 1 }, "quiet" : { - "type" : "boolean", "default" : 0, "optional" : 1, + "type" : "boolean", "description" : "Only produces output suitable for logging, omitting progress indicators." + }, + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" } } }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "method" : "POST", - "name" : "update_database", - "returns" : { - "type" : "string" - }, - "description" : "This is used to resynchronize the package index files from their sources (apt-get update)." + "protected" : 1 }, "GET" : { - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "proxyto" : "node", + "method" : "GET", + "name" : "list_updates", "parameters" : { "properties" : { "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" } }, "additionalProperties" : 0 }, + "protected" : 1, + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : {} + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, "description" : "List available updates.", - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - } - }, - "name" : "list_updates", - "method" : "GET" + "proxyto" : "node" } }, - "path" : "/nodes/{node}/apt/update", "text" : "update", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/apt/update" }, { "leaf" : 1, - "text" : "changelog", + "path" : "/nodes/{node}/apt/changelog", "info" : { "GET" : { "method" : "GET", - "name" : "changelog", "returns" : { "type" : "string" }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "name" : "changelog", "parameters" : { "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, "name" : { "description" : "Package name.", "type" : "string" }, "version" : { + "description" : "Package version.", "type" : "string", - "optional" : 1, - "description" : "Package version." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "optional" : 1 } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "description" : "Get package changelogs." + "description" : "Get package changelogs.", + "proxyto" : "node" } }, - "path" : "/nodes/{node}/apt/changelog" + "text" : "changelog" }, { "text" : "versions", - "leaf" : 1, "info" : { "GET" : { + "name" : "versions", + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + } + }, + "additionalProperties" : 0 + }, "permissions" : { "check" : [ "perm", @@ -19112,212 +19151,135 @@ var pveapi = [ ] ] }, + "proxyto" : "node", "description" : "Get package information for important Proxmox packages.", "method" : "GET", - "name" : "versions", "returns" : { + "type" : "array", "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array" - }, - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } + "properties" : {}, + "type" : "object" } } } }, - "path" : "/nodes/{node}/apt/versions" + "path" : "/nodes/{node}/apt/versions", + "leaf" : 1 } ], - "path" : "/nodes/{node}/apt", "info" : { "GET" : { - "description" : "Directory index for apt (Advanced Package Tool).", - "permissions" : { - "user" : "all" - }, - "method" : "GET", - "name" : "index", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, "returns" : { + "type" : "array", "items" : { + "type" : "object", "properties" : { "id" : { "type" : "string" } - }, - "type" : "object" + } }, - "type" : "array", "links" : [ { - "rel" : "child", - "href" : "{id}" + "href" : "{id}", + "rel" : "child" } ] - } + }, + "method" : "GET", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + } + } + }, + "name" : "index", + "permissions" : { + "user" : "all" + }, + "description" : "Directory index for apt (Advanced Package Tool)." } - } + }, + "path" : "/nodes/{node}/apt", + "leaf" : 0 }, { - "leaf" : 0, - "text" : "firewall", - "path" : "/nodes/{node}/firewall", "children" : [ { + "text" : "rules", "children" : [ { - "leaf" : 1, "text" : "{pos}", - "path" : "/nodes/{node}/firewall/rules/{pos}", "info" : { "DELETE" : { - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, + "method" : "DELETE", "protected" : 1, - "proxyto" : "node", "parameters" : { "additionalProperties" : 0, "properties" : { - "pos" : { - "description" : "Update rule at position .", - "optional" : 1, - "type" : "integer", - "minimum" : 0 + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" }, "digest" : { + "maxLength" : 40, "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", "optional" : 1, - "maxLength" : 40, "type" : "string" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "pos" : { + "type" : "integer", + "optional" : 1, + "description" : "Update rule at position .", + "minimum" : 0 } } }, - "description" : "Delete rule.", "name" : "delete_rule", - "method" : "DELETE", "returns" : { "type" : "null" - } - }, - "GET" : { - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" }, "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "pos" : { - "minimum" : 0, - "type" : "integer", - "description" : "Update rule at position .", - "optional" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - } - } - }, - "name" : "get_rule", - "method" : "GET", + "description" : "Delete rule.", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Modify" ] ] - }, - "description" : "Get single rule data." + } }, "PUT" : { - "method" : "PUT", "name" : "update_rule", - "returns" : { - "type" : "null" - }, - "description" : "Modify rule data.", - "proxyto" : "node", "parameters" : { - "additionalProperties" : 0, "properties" : { - "sport" : { - "optional" : 1, - "description" : "Restrict 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.", - "type" : "string", - "format" : "pve-fw-sport-spec" - }, - "delete" : { + "dest" : { "type" : "string", - "format" : "pve-configid-list", - "optional" : 1, - "description" : "A list of settings you want to delete." - }, - "moveto" : { - "type" : "integer", - "minimum" : 0, "optional" : 1, - "description" : "Move rule to new position . Other arguments are ignored." + "description" : "Restrict 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" }, - "enable" : { + "digest" : { + "maxLength" : 40, "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "dport" : { - "format" : "pve-fw-dport-spec", "type" : "string", - "optional" : 1, - "description" : "Restrict 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." + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." }, - "proto" : { - "type" : "string", - "format" : "pve-fw-protocol-spec", + "source" : { + "format" : "pve-fw-addr-spec", "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." + "type" : "string", + "description" : "Restrict 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." }, - "macro" : { + "comment" : { "optional" : 1, - "maxLength" : 128, "type" : "string" }, "node" : { @@ -19325,62 +19287,82 @@ var pveapi = [ "type" : "string", "description" : "The cluster node name." }, - "source" : { - "format" : "pve-fw-addr-spec", - "type" : "string", - "description" : "Restrict 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.", - "optional" : 1 - }, - "iface" : { - "maxLength" : 20, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "moveto" : { + "minimum" : 0, + "description" : "Move rule to new position . Other arguments are ignored.", "optional" : 1, - "minLength" : 2, - "format" : "pve-iface", - "type" : "string" + "type" : "integer" }, - "digest" : { + "delete" : { + "type" : "string", "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string" + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list" }, "type" : { - "type" : "string", "optional" : 1, + "type" : "string", "enum" : [ "in", "out", "group" ] }, - "dest" : { + "dport" : { + "format" : "pve-fw-dport-spec", + "description" : "Restrict 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.", + "type" : "string", + "optional" : 1 + }, + "sport" : { "optional" : 1, - "description" : "Restrict 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", - "type" : "string" + "type" : "string", + "description" : "Restrict 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" }, - "action" : { + "iface" : { "maxLength" : 20, + "format" : "pve-iface", + "type" : "string", "optional" : 1, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings." }, - "comment" : { + "proto" : { + "format" : "pve-fw-protocol-spec", "type" : "string", - "optional" : 1 + "optional" : 1, + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." }, "pos" : { - "description" : "Update rule at position .", + "minimum" : 0, + "type" : "integer", + "optional" : 1, + "description" : "Update rule at position ." + }, + "macro" : { + "maxLength" : 128, + "optional" : 1, + "type" : "string" + }, + "action" : { + "minLength" : 2, + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string", "optional" : 1, + "maxLength" : 20 + }, + "enable" : { "minimum" : 0, - "type" : "integer" + "type" : "integer", + "optional" : 1 } - } + }, + "additionalProperties" : 0 }, "protected" : 1, + "method" : "PUT", "permissions" : { "check" : [ "perm", @@ -19389,45 +19371,79 @@ var pveapi = [ "Sys.Modify" ] ] + }, + "proxyto" : "node", + "description" : "Modify rule data.", + "returns" : { + "type" : "null" } + }, + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object", + "properties" : { + "pos" : { + "type" : "integer" + } + } + }, + "parameters" : { + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "pos" : { + "minimum" : 0, + "description" : "Update rule at position .", + "type" : "integer", + "optional" : 1 + } + }, + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "name" : "get_rule", + "proxyto" : "node", + "description" : "Get single rule data." } - } + }, + "path" : "/nodes/{node}/firewall/rules/{pos}", + "leaf" : 1 } ], - "path" : "/nodes/{node}/firewall/rules", "info" : { "GET" : { - "method" : "GET", - "name" : "get_rules", "returns" : { - "links" : [ - { - "href" : "{pos}", - "rel" : "child" - } - ], "items" : { + "type" : "object", "properties" : { "pos" : { "type" : "integer" } - }, - "type" : "object" - }, - "type" : "array" - }, - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." } }, - "additionalProperties" : 0 + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "type" : "array" }, - "proxyto" : "node", + "method" : "GET", "description" : "List rules.", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -19436,101 +19452,117 @@ var pveapi = [ "Sys.Audit" ] ] - } + }, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + } + }, + "name" : "get_rules" }, "POST" : { - "proxyto" : "node", + "method" : "POST", + "name" : "create_rule", "parameters" : { "properties" : { - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "proto" : { + "dport" : { + "format" : "pve-fw-dport-spec", "type" : "string", - "format" : "pve-fw-protocol-spec", "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." + "description" : "Restrict 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." }, - "iface" : { - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "enable" : { + "minimum" : 0, "optional" : 1, - "maxLength" : 20, - "minLength" : 2, - "format" : "pve-iface", + "type" : "integer" + }, + "type" : { + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 0, "type" : "string" }, - "dport" : { - "optional" : 1, - "description" : "Restrict 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.", + "action" : { + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "minLength" : 2, + "optional" : 0, "type" : "string", - "format" : "pve-fw-dport-spec" + "maxLength" : 20 }, - "enable" : { + "pos" : { "minimum" : 0, + "description" : "Update rule at position .", "type" : "integer", "optional" : 1 }, - "source" : { - "description" : "Restrict 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.", + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", "optional" : 1, - "format" : "pve-fw-addr-spec", - "type" : "string" + "type" : "string", + "format" : "pve-fw-protocol-spec" }, - "sport" : { - "description" : "Restrict 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.", - "optional" : 1, + "macro" : { "type" : "string", - "format" : "pve-fw-sport-spec" + "optional" : 1, + "maxLength" : 128 }, "node" : { - "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "format" : "pve-node" }, - "pos" : { - "type" : "integer", - "minimum" : 0, - "description" : "Update rule at position .", - "optional" : 1 + "comment" : { + "optional" : 1, + "type" : "string" }, - "action" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "iface" : { + "format" : "pve-iface", "maxLength" : 20, - "optional" : 0, + "minLength" : 2, + "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "optional" : 1, "type" : "string" }, - "comment" : { - "type" : "string", - "optional" : 1 + "sport" : { + "format" : "pve-fw-sport-spec", + "description" : "Restrict 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.", + "optional" : 1, + "type" : "string" }, "dest" : { - "format" : "pve-fw-addr-spec", + "description" : "Restrict 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.", "type" : "string", "optional" : 1, - "description" : "Restrict 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." - }, - "macro" : { - "type" : "string", - "maxLength" : 128, - "optional" : 1 + "format" : "pve-fw-addr-spec" }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" + "source" : { + "format" : "pve-fw-addr-spec", + "description" : "Restrict 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.", + "type" : "string", + "optional" : 1 + }, + "digest" : { + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." } }, "additionalProperties" : 0 }, + "protected" : 1, + "returns" : { + "type" : "null" + }, "permissions" : { "check" : [ "perm", @@ -19540,47 +19572,53 @@ var pveapi = [ ] ] }, - "protected" : 1, - "returns" : { - "type" : "null" - }, - "method" : "POST", - "name" : "create_rule", - "description" : "Create new rule." + "description" : "Create new rule.", + "proxyto" : "node" } }, - "text" : "rules", + "path" : "/nodes/{node}/firewall/rules", "leaf" : 0 }, { + "leaf" : 1, "path" : "/nodes/{node}/firewall/options", "info" : { "PUT" : { "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "proxyto" : "node", + "name" : "set_options", "parameters" : { + "additionalProperties" : 0, "properties" : { "digest" : { + "type" : "string", + "optional" : 1, "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, + "nf_conntrack_max" : { + "minimum" : 32768, + "type" : "integer", "optional" : 1, - "maxLength" : 40, - "type" : "string" + "description" : "Maximum number of tracked connections." }, - "enable" : { - "description" : "Enable host firewall rules.", + "ndp" : { "optional" : 1, - "type" : "boolean" + "type" : "boolean", + "description" : "Enable NDP." }, - "log_level_in" : { + "nf_conntrack_tcp_timeout_established" : { + "minimum" : 7875, + "optional" : 1, + "type" : "integer", + "description" : "Conntrack established timeout." + }, + "nosmurfs" : { + "description" : "Enable SMURFS filter.", + "type" : "boolean", + "optional" : 1 + }, + "tcp_flags_log_level" : { + "optional" : 1, "type" : "string", "enum" : [ "emerg", @@ -19593,32 +19631,11 @@ var pveapi = [ "debug", "nolog" ], - "optional" : 1, - "description" : "Log level for incoming traffic." - }, - "nosmurfs" : { - "type" : "boolean", - "description" : "Enable SMURFS filter.", - "optional" : 1 + "description" : "Log level for illegal tcp flags filter." }, - "tcpflags" : { - "type" : "boolean", + "log_level_in" : { "optional" : 1, - "description" : "Filter illegal combinations of TCP flags." - }, - "nf_conntrack_max" : { - "type" : "integer", - "minimum" : 32768, - "description" : "Maximum number of tracked connections.", - "optional" : 1 - }, - "delete" : { - "format" : "pve-configid-list", "type" : "string", - "description" : "A list of settings you want to delete.", - "optional" : 1 - }, - "log_level_out" : { "enum" : [ "emerg", "alert", @@ -19630,25 +19647,9 @@ var pveapi = [ "debug", "nolog" ], - "description" : "Log level for outgoing traffic.", - "optional" : 1, - "type" : "string" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "nf_conntrack_tcp_timeout_established" : { - "minimum" : 7875, - "type" : "integer", - "description" : "Conntrack established timeout.", - "optional" : 1 + "description" : "Log level for incoming traffic." }, - "tcp_flags_log_level" : { - "type" : "string", - "description" : "Log level for illegal tcp flags filter.", - "optional" : 1, + "smurf_log_level" : { "enum" : [ "emerg", "alert", @@ -19659,15 +19660,28 @@ var pveapi = [ "info", "debug", "nolog" - ] + ], + "description" : "Log level for SMURFS filter.", + "optional" : 1, + "type" : "string" }, - "ndp" : { - "type" : "boolean", + "delete" : { + "description" : "A list of settings you want to delete.", + "type" : "string", "optional" : 1, - "description" : "Enable NDP." + "format" : "pve-configid-list" }, - "smurf_log_level" : { + "node" : { + "format" : "pve-node", "type" : "string", + "description" : "The cluster node name." + }, + "tcpflags" : { + "optional" : 1, + "type" : "boolean", + "description" : "Filter illegal combinations of TCP flags." + }, + "log_level_out" : { "enum" : [ "emerg", "alert", @@ -19679,20 +19693,36 @@ var pveapi = [ "debug", "nolog" ], + "description" : "Log level for outgoing traffic.", + "type" : "string", + "optional" : 1 + }, + "enable" : { + "type" : "boolean", "optional" : 1, - "description" : "Log level for SMURFS filter." + "description" : "Enable host firewall rules." } - }, - "additionalProperties" : 0 + } }, + "method" : "PUT", + "proxyto" : "node", "description" : "Set Firewall options.", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, "returns" : { "type" : "null" - }, - "name" : "set_options", - "method" : "PUT" + } }, "GET" : { + "proxyto" : "node", + "description" : "Get host firewall options.", "permissions" : { "check" : [ "perm", @@ -19702,23 +19732,35 @@ var pveapi = [ ] ] }, - "description" : "Get host firewall options.", - "method" : "GET", + "parameters" : { + "properties" : { + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, "name" : "get_options", "returns" : { + "type" : "object", "properties" : { "nf_conntrack_tcp_timeout_established" : { - "optional" : 1, "description" : "Conntrack established timeout.", "type" : "integer", + "optional" : 1, "minimum" : 7875 }, - "ndp" : { + "nosmurfs" : { + "description" : "Enable SMURFS filter.", "type" : "boolean", - "description" : "Enable NDP.", "optional" : 1 }, - "smurf_log_level" : { + "tcp_flags_log_level" : { + "type" : "string", + "optional" : 1, + "description" : "Log level for illegal tcp flags filter.", "enum" : [ "emerg", "alert", @@ -19729,13 +19771,20 @@ var pveapi = [ "info", "debug", "nolog" - ], - "description" : "Log level for SMURFS filter.", + ] + }, + "nf_conntrack_max" : { + "description" : "Maximum number of tracked connections.", + "type" : "integer", "optional" : 1, - "type" : "string" + "minimum" : 32768 }, - "tcp_flags_log_level" : { - "type" : "string", + "ndp" : { + "type" : "boolean", + "optional" : 1, + "description" : "Enable NDP." + }, + "smurf_log_level" : { "enum" : [ "emerg", "alert", @@ -19747,10 +19796,14 @@ var pveapi = [ "debug", "nolog" ], + "description" : "Log level for SMURFS filter.", "optional" : 1, - "description" : "Log level for illegal tcp flags filter." + "type" : "string" }, "log_level_in" : { + "optional" : 1, + "type" : "string", + "description" : "Log level for incoming traffic.", "enum" : [ "emerg", "alert", @@ -19761,33 +19814,15 @@ var pveapi = [ "info", "debug", "nolog" - ], - "description" : "Log level for incoming traffic.", - "optional" : 1, - "type" : "string" - }, - "enable" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable host firewall rules." - }, - "nf_conntrack_max" : { - "description" : "Maximum number of tracked connections.", - "optional" : 1, - "type" : "integer", - "minimum" : 32768 + ] }, "tcpflags" : { - "optional" : 1, "description" : "Filter illegal combinations of TCP flags.", - "type" : "boolean" - }, - "nosmurfs" : { "type" : "boolean", - "optional" : 1, - "description" : "Enable SMURFS filter." + "optional" : 1 }, "log_level_out" : { + "description" : "Log level for outgoing traffic.", "enum" : [ "emerg", "alert", @@ -19799,33 +19834,51 @@ var pveapi = [ "debug", "nolog" ], + "type" : "string", + "optional" : 1 + }, + "enable" : { + "description" : "Enable host firewall rules.", "optional" : 1, - "description" : "Log level for outgoing traffic.", - "type" : "string" + "type" : "boolean" } - }, - "type" : "object" + } }, - "proxyto" : "node", + "method" : "GET" + } + }, + "text" : "options" + }, + { + "leaf" : 1, + "path" : "/nodes/{node}/firewall/log", + "info" : { + "GET" : { + "protected" : 1, + "name" : "log", "parameters" : { "properties" : { + "start" : { + "type" : "integer", + "optional" : 1, + "minimum" : 0 + }, + "limit" : { + "type" : "integer", + "optional" : 1, + "minimum" : 0 + }, "node" : { - "type" : "string", "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "type" : "string" } }, "additionalProperties" : 0 - } - } - }, - "leaf" : 1, - "text" : "options" - }, - { - "path" : "/nodes/{node}/firewall/log", - "info" : { - "GET" : { + }, + "method" : "GET", + "description" : "Read firewall log", + "proxyto" : "node", "permissions" : { "check" : [ "perm", @@ -19835,351 +19888,125 @@ var pveapi = [ ] ] }, - "protected" : 1, - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "limit" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "start" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - } - } - }, - "description" : "Read firewall log", "returns" : { "items" : { "type" : "object", "properties" : { - "t" : { - "description" : "Line text", - "type" : "string" - }, "n" : { "type" : "integer", "description" : "Line number" + }, + "t" : { + "type" : "string", + "description" : "Line text" } } }, "type" : "array" - }, - "method" : "GET", - "name" : "log" + } } }, - "text" : "log", - "leaf" : 1 + "text" : "log" } ], + "text" : "firewall", "info" : { "GET" : { "parameters" : { - "additionalProperties" : 0, "properties" : { "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" } - } + }, + "additionalProperties" : 0 }, + "permissions" : { + "user" : "all" + }, + "name" : "index", + "description" : "Directory index.", "returns" : { + "type" : "array", "items" : { "properties" : {}, "type" : "object" }, - "type" : "array", "links" : [ { - "href" : "{name}", - "rel" : "child" + "rel" : "child", + "href" : "{name}" } ] }, - "name" : "index", - "method" : "GET", - "description" : "Directory index.", - "permissions" : { - "user" : "all" - } + "method" : "GET" } - } + }, + "path" : "/nodes/{node}/firewall", + "leaf" : 0 }, { - "text" : "version", - "leaf" : 1, - "path" : "/nodes/{node}/version", "info" : { "GET" : { - "description" : "API version details", - "permissions" : { - "user" : "all" - }, - "proxyto" : "node", "parameters" : { - "additionalProperties" : 0, "properties" : { "node" : { "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } - }, - "returns" : { - "properties" : { - "version" : { - "type" : "string" - }, - "release" : { - "type" : "string" - }, - "repoid" : { - "type" : "string" - } - }, - "type" : "object" - }, - "method" : "GET", - "name" : "version" - } - } - }, - { - "text" : "status", - "leaf" : 1, - "path" : "/nodes/{node}/status", - "info" : { - "GET" : { - "method" : "GET", - "name" : "status", - "returns" : { - "type" : "object", - "properties" : {} - }, - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "type" : "string" } }, "additionalProperties" : 0 }, - "description" : "Read node status", + "name" : "version", "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - } - }, - "POST" : { - "returns" : { - "type" : "null" + "user" : "all" }, - "name" : "node_cmd", - "method" : "POST", - "description" : "Reboot or shutdown a node.", "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "command" : { - "enum" : [ - "reboot", - "shutdown" - ], - "description" : "Specify the command.", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.PowerMgmt" - ] - ] - }, - "protected" : 1 - } - } - }, - { - "leaf" : 1, - "text" : "netstat", - "path" : "/nodes/{node}/netstat", - "info" : { - "GET" : { + "description" : "API version details", "method" : "GET", - "name" : "netstat", - "proxyto" : "node", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - }, "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} - } - }, - "description" : "Read tap/vm network device interface counters", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - } - } - } - }, - { - "info" : { - "POST" : { - "parameters" : { - "additionalProperties" : 0, + "type" : "object", "properties" : { - "commands" : { - "description" : "JSON encoded array of commands.", + "repoid" : { "type" : "string" }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - } - }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "protected" : 1, - "returns" : { - "properties" : {}, - "type" : "array" - }, - "method" : "POST", - "name" : "execute", - "description" : "Execute multiple commands in order." + "release" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + } + } } }, - "path" : "/nodes/{node}/execute", + "text" : "version", "leaf" : 1, - "text" : "execute" + "path" : "/nodes/{node}/version" }, { - "text" : "rrd", - "leaf" : 1, - "path" : "/nodes/{node}/rrd", "info" : { "GET" : { "method" : "GET", - "name" : "rrd", "returns" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" - } - } + "properties" : {}, + "type" : "object" }, + "description" : "Read node status", + "proxyto" : "node", + "name" : "status", "parameters" : { "properties" : { "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" - }, - "ds" : { - "format" : "pve-configid-list", "type" : "string", - "description" : "The list of datasources you want to display." - }, - "cf" : { - "description" : "The RRD consolidation function", - "optional" : 1, - "enum" : [ - "AVERAGE", - "MAX" - ], - "type" : "string" - }, - "timeframe" : { - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "description" : "Specify the time frame you are interested in.", - "type" : "string" + "description" : "The cluster node name.", + "format" : "pve-node" } }, "additionalProperties" : 0 }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "description" : "Read node RRD statistics (returns PNG)" - } - } - }, - { - "path" : "/nodes/{node}/rrddata", - "info" : { - "GET" : { - "protected" : 1, - "description" : "Read node RRD statistics", "permissions" : { "check" : [ "perm", @@ -20188,209 +20015,115 @@ var pveapi = [ "Sys.Audit" ] ] - }, - "method" : "GET", - "name" : "rrddata", - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - } - }, + } + }, + "POST" : { + "name" : "node_cmd", "parameters" : { "properties" : { "node" : { "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "format" : "pve-node" }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", + "command" : { + "description" : "Specify the command.", "enum" : [ - "hour", - "day", - "week", - "month", - "year" + "reboot", + "shutdown" ], "type" : "string" - }, - "cf" : { - "type" : "string", - "optional" : 1, - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ] } }, "additionalProperties" : 0 + }, + "protected" : 1, + "method" : "POST", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.PowerMgmt" + ] + ] + }, + "proxyto" : "node", + "description" : "Reboot or shutdown a node.", + "returns" : { + "type" : "null" } } }, - "text" : "rrddata", - "leaf" : 1 + "text" : "status", + "leaf" : 1, + "path" : "/nodes/{node}/status" }, { - "text" : "syslog", "leaf" : 1, - "path" : "/nodes/{node}/syslog", + "path" : "/nodes/{node}/netstat", "info" : { "GET" : { - "method" : "GET", - "name" : "syslog", "returns" : { "type" : "array", "items" : { - "type" : "object", - "properties" : { - "t" : { - "description" : "Line text", - "type" : "string" - }, - "n" : { - "description" : "Line number", - "type" : "integer" - } - } - } - }, - "description" : "Read system log", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "start" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "since" : { - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "description" : "Display all log since this date-time string.", - "optional" : 1, - "type" : "string" - }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - }, - "limit" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "until" : { - "type" : "string", - "optional" : 1, - "description" : "Display all log until this date-time string.", - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$" - } + "properties" : {}, + "type" : "object" } }, + "method" : "GET", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Syslog" + "Sys.Audit" ] ] }, - "protected" : 1 - } - } - }, - { - "text" : "vncshell", - "leaf" : 1, - "path" : "/nodes/{node}/vncshell", - "info" : { - "POST" : { - "name" : "vncshell", - "method" : "POST", - "returns" : { - "additionalProperties" : 0, - "properties" : { - "cert" : { - "type" : "string" - }, - "port" : { - "type" : "integer" - }, - "ticket" : { - "type" : "string" - }, - "upid" : { - "type" : "string" - }, - "user" : { - "type" : "string" - } - } - }, "parameters" : { "properties" : { - "upgrade" : { - "type" : "boolean", - "default" : 0, - "optional" : 1, - "description" : "Run 'apt-get dist-upgrade' instead of normal shell." - }, "node" : { - "format" : "pve-node", + "description" : "The cluster node name.", "type" : "string", - "description" : "The cluster node name." - }, - "websocket" : { - "type" : "boolean", - "optional" : 1, - "description" : "use websocket instead of standard vnc." + "format" : "pve-node" } }, "additionalProperties" : 0 }, - "protected" : 1, + "name" : "netstat", + "proxyto" : "node", + "description" : "Read tap/vm network device interface counters" + } + }, + "text" : "netstat" + }, + { + "info" : { + "POST" : { + "returns" : { + "properties" : {}, + "type" : "array" + }, + "proxyto" : "node", + "description" : "Execute multiple commands in order.", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Console" + "Sys.Audit" ] - ], - "description" : "Restricted to users on realm 'pam'" - }, - "description" : "Creates a VNC Shell proxy." - } - } - }, - { - "info" : { - "GET" : { - "returns" : { - "properties" : { - "port" : { - "type" : "string" - } - }, - "type" : "object" + ] }, + "method" : "POST", + "protected" : 1, + "name" : "execute", "parameters" : { "additionalProperties" : 0, "properties" : { - "port" : { - "description" : "Port number returned by previous vncproxy call.", - "minimum" : 5900, - "type" : "integer", - "maximum" : 5999 - }, - "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", - "maxLength" : 512, + "commands" : { + "description" : "JSON encoded array of commands.", "type" : "string" }, "node" : { @@ -20399,1000 +20132,1032 @@ var pveapi = [ "description" : "The cluster node name." } } - }, - "name" : "vncwebsocket", - "method" : "GET", - "description" : "Opens a weksocket for VNC traffic.", - "permissions" : { - "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket).", - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Console" - ] - ] } } }, - "path" : "/nodes/{node}/vncwebsocket", + "text" : "execute", "leaf" : 1, - "text" : "vncwebsocket" + "path" : "/nodes/{node}/execute" }, { + "text" : "rrd", "info" : { - "POST" : { + "GET" : { + "name" : "rrd", "parameters" : { + "additionalProperties" : 0, "properties" : { - "upgrade" : { - "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", - "optional" : 1, - "type" : "boolean", - "default" : 0 + "ds" : { + "type" : "string", + "description" : "The list of datasources you want to display.", + "format" : "pve-configid-list" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" }, "node" : { "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string" + "type" : "string", + "format" : "pve-node" }, - "proxy" : { + "cf" : { "type" : "string", - "format" : "address", - "description" : "SPICE 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 resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", - "optional" : 1 + "optional" : 1, + "enum" : [ + "AVERAGE", + "MAX" + ], + "description" : "The RRD consolidation function" } - }, - "additionalProperties" : 0 + } }, - "proxyto" : "node", - "protected" : 1, "permissions" : { - "description" : "Restricted to users on realm 'pam'", "check" : [ "perm", "/nodes/{node}", [ - "Sys.Console" + "Sys.Audit" ] ] }, - "method" : "POST", - "name" : "spiceshell", + "protected" : 1, + "description" : "Read node RRD statistics (returns PNG)", "returns" : { - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", - "additionalProperties" : 1, + "type" : "object", "properties" : { - "tls-port" : { - "type" : "integer" - }, - "type" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "proxy" : { - "type" : "string" - }, - "host" : { + "filename" : { "type" : "string" } } }, - "description" : "Creates a SPICE shell." + "method" : "GET" } }, - "path" : "/nodes/{node}/spiceshell", - "text" : "spiceshell", + "path" : "/nodes/{node}/rrd", "leaf" : 1 }, { + "leaf" : 1, + "path" : "/nodes/{node}/rrddata", "info" : { - "PUT" : { + "GET" : { + "name" : "rrddata", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Modify" + "Sys.Audit" ] ] }, - "protected" : 1, "parameters" : { "properties" : { - "dns3" : { - "type" : "string", - "format" : "ip", - "description" : "Third name server IP address.", - "optional" : 1 - }, - "search" : { - "description" : "Search domain for host-name lookup.", - "type" : "string" - }, - "dns1" : { - "format" : "ip", - "type" : "string", - "optional" : 1, - "description" : "First name server IP address." - }, - "dns2" : { - "description" : "Second name server IP address.", + "cf" : { "optional" : 1, - "format" : "ip", - "type" : "string" + "type" : "string", + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ] }, "node" : { - "description" : "The cluster node name.", "format" : "pve-node", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "proxyto" : "node", - "description" : "Write DNS settings.", - "returns" : { - "type" : "null" - }, - "method" : "PUT", - "name" : "update_dns" - }, - "GET" : { - "description" : "Read DNS settings.", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "additionalProperties" : 0, - "properties" : { - "dns3" : { - "optional" : 1, - "description" : "Third name server IP address.", - "type" : "string" - }, - "search" : { "type" : "string", - "description" : "Search domain for host-name lookup.", - "optional" : 1 + "description" : "The cluster node name." }, - "dns1" : { + "timeframe" : { "type" : "string", - "description" : "First name server IP address.", - "optional" : 1 - }, - "dns2" : { - "description" : "Second name server IP address.", - "optional" : 1, - "type" : "string" + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ] } }, - "type" : "object" + "additionalProperties" : 0 }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." - } + "protected" : 1, + "description" : "Read node RRD statistics", + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : {} } }, - "proxyto" : "node", - "method" : "GET", - "name" : "dns" + "method" : "GET" } }, - "path" : "/nodes/{node}/dns", - "leaf" : 1, - "text" : "dns" + "text" : "rrddata" }, { - "text" : "time", "leaf" : 1, + "path" : "/nodes/{node}/syslog", "info" : { "GET" : { - "name" : "time", - "method" : "GET", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, + "description" : "Read system log", "proxyto" : "node", - "returns" : { - "properties" : { - "time" : { - "type" : "integer", - "minimum" : 1297163644, - "description" : "Seconds since 1970-01-01 00:00:00 UTC." - }, - "localtime" : { - "type" : "integer", - "minimum" : 1297163644, - "description" : "Seconds since 1970-01-01 00:00:00 (local time)" - }, - "timezone" : { - "type" : "string", - "description" : "Time zone" - } - }, - "additionalProperties" : 0, - "type" : "object" - }, - "description" : "Read server time and time zone settings.", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Syslog" ] ] - } - }, - "PUT" : { - "method" : "PUT", - "name" : "set_timezone", + }, "returns" : { - "type" : "null" + "items" : { + "properties" : { + "t" : { + "type" : "string", + "description" : "Line text" + }, + "n" : { + "description" : "Line number", + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" }, - "description" : "Set time zone.", + "protected" : 1, "parameters" : { "properties" : { + "since" : { + "optional" : 1, + "type" : "string", + "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", + "description" : "Display all log since this date-time string." + }, "node" : { - "description" : "The cluster node name.", "type" : "string", + "description" : "The cluster node name.", "format" : "pve-node" }, - "timezone" : { - "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.", + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "until" : { + "description" : "Display all log until this date-time string.", + "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", + "optional" : 1, "type" : "string" + }, + "start" : { + "minimum" : 0, + "type" : "integer", + "optional" : 1 } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1 + "name" : "syslog", + "method" : "GET" } }, - "path" : "/nodes/{node}/time" + "text" : "syslog" }, { - "leaf" : 1, - "text" : "aplinfo", "info" : { "POST" : { - "parameters" : { + "returns" : { "properties" : { - "template" : { - "type" : "string", - "maxLength" : 255, - "description" : "The template wich will downloaded" + "user" : { + "type" : "string" }, - "storage" : { - "description" : "Only list status for specified storage", - "type" : "string", - "format" : "pve-storage-id" + "port" : { + "type" : "integer" }, - "node" : { - "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "cert" : { + "type" : "string" } }, "additionalProperties" : 0 }, - "proxyto" : "node", + "method" : "POST", "permissions" : { + "description" : "Restricted to users on realm 'pam'", "check" : [ "perm", - "/storage/{storage}", + "/nodes/{node}", [ - "Datastore.AllocateTemplate" + "Sys.Console" ] ] }, - "protected" : 1, - "method" : "POST", - "name" : "apl_download", - "returns" : { - "type" : "string" - }, - "description" : "Download appliance templates." - }, - "GET" : { - "method" : "GET", - "name" : "aplinfo", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" - }, "parameters" : { "properties" : { + "upgrade" : { + "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", + "default" : 0, + "type" : "boolean", + "optional" : 1 + }, "node" : { "type" : "string", - "format" : "pve-node", - "description" : "The cluster node name." + "description" : "The cluster node name.", + "format" : "pve-node" + }, + "websocket" : { + "optional" : 1, + "type" : "boolean", + "description" : "use websocket instead of standard vnc." } }, "additionalProperties" : 0 }, - "proxyto" : "node", - "description" : "Get list of appliances.", - "permissions" : { - "user" : "all" - } + "name" : "vncshell", + "protected" : 1, + "description" : "Creates a VNC Shell proxy." } }, - "path" : "/nodes/{node}/aplinfo" + "text" : "vncshell", + "leaf" : 1, + "path" : "/nodes/{node}/vncshell" }, { + "text" : "vncwebsocket", "info" : { "GET" : { + "method" : "GET", + "returns" : { + "properties" : { + "port" : { + "type" : "string" + } + }, + "type" : "object" + }, + "description" : "Opens a weksocket for VNC traffic.", "parameters" : { - "additionalProperties" : 0, "properties" : { + "vncticket" : { + "maxLength" : 512, + "description" : "Ticket from previous call to vncproxy.", + "type" : "string" + }, "node" : { + "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "type" : "string" + }, + "port" : { + "minimum" : 5900, + "description" : "Port number returned by previous vncproxy call.", + "maximum" : 5999, + "type" : "integer" } - } + }, + "additionalProperties" : 0 }, - "proxyto" : "node", - "protected" : 1, + "name" : "vncwebsocket", "permissions" : { + "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket).", "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Console" ] ] - }, - "name" : "report", - "method" : "GET", - "returns" : { - "type" : "string" - }, - "description" : "Gather various systems information about a node" + } } }, - "path" : "/nodes/{node}/report", - "text" : "report", + "path" : "/nodes/{node}/vncwebsocket", "leaf" : 1 }, { "info" : { "POST" : { + "method" : "POST", + "protected" : 1, "parameters" : { + "additionalProperties" : 0, "properties" : { - "node" : { + "upgrade" : { + "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", + "default" : 0, + "type" : "boolean", + "optional" : 1 + }, + "proxy" : { + "format" : "address", + "optional" : 1, "type" : "string", + "description" : "SPICE 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 resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." + }, + "node" : { "format" : "pve-node", + "type" : "string", "description" : "The cluster node name." + } + } + }, + "name" : "spiceshell", + "returns" : { + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", + "additionalProperties" : 1, + "properties" : { + "proxy" : { + "type" : "string" }, - "force" : { - "optional" : 1, - "description" : "force if onboot=0.", - "type" : "boolean" + "tls-port" : { + "type" : "integer" + }, + "password" : { + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "host" : { + "type" : "string" } - }, - "additionalProperties" : 0 + } }, "proxyto" : "node", + "description" : "Creates a SPICE shell.", "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "VM.PowerMgmt" + "Sys.Console" ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "string" - }, - "name" : "startall", - "method" : "POST", - "description" : "Start all VMs and containers (when onboot=1)." + ], + "description" : "Restricted to users on realm 'pam'" + } } }, - "path" : "/nodes/{node}/startall", + "text" : "spiceshell", "leaf" : 1, - "text" : "startall" + "path" : "/nodes/{node}/spiceshell" }, { - "text" : "stopall", + "path" : "/nodes/{node}/dns", "leaf" : 1, + "text" : "dns", "info" : { - "POST" : { - "proxyto" : "node", + "GET" : { + "method" : "GET", + "returns" : { + "type" : "object", + "additionalProperties" : 0, + "properties" : { + "search" : { + "description" : "Search domain for host-name lookup.", + "type" : "string", + "optional" : 1 + }, + "dns3" : { + "optional" : 1, + "type" : "string", + "description" : "Third name server IP address." + }, + "dns2" : { + "description" : "Second name server IP address.", + "type" : "string", + "optional" : 1 + }, + "dns1" : { + "type" : "string", + "optional" : 1, + "description" : "First name server IP address." + } + } + }, + "name" : "dns", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + } + } + }, + "description" : "Read DNS settings.", + "proxyto" : "node" + }, + "PUT" : { + "name" : "update_dns", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "search" : { + "description" : "Search domain for host-name lookup.", + "type" : "string" + }, + "dns3" : { + "description" : "Third name server IP address.", + "type" : "string", + "optional" : 1, + "format" : "ip" + }, + "dns2" : { "type" : "string", + "optional" : 1, + "description" : "Second name server IP address.", + "format" : "ip" + }, + "node" : { "format" : "pve-node", + "type" : "string", "description" : "The cluster node name." + }, + "dns1" : { + "description" : "First name server IP address.", + "optional" : 1, + "type" : "string", + "format" : "ip" } } }, + "protected" : 1, + "method" : "PUT", "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "VM.PowerMgmt" + "Sys.Modify" ] ] }, - "protected" : 1, + "description" : "Write DNS settings.", + "proxyto" : "node", "returns" : { - "type" : "string" - }, - "method" : "POST", - "name" : "stopall", - "description" : "Stop all VMs and Containers." + "type" : "null" + } } - }, - "path" : "/nodes/{node}/stopall" + } }, { "info" : { - "POST" : { + "GET" : { + "method" : "GET", + "returns" : { + "properties" : { + "localtime" : { + "minimum" : 1297163644, + "type" : "integer", + "description" : "Seconds since 1970-01-01 00:00:00 (local time)" + }, + "time" : { + "minimum" : 1297163644, + "type" : "integer", + "description" : "Seconds since 1970-01-01 00:00:00 UTC." + }, + "timezone" : { + "type" : "string", + "description" : "Time zone" + } + }, + "type" : "object", + "additionalProperties" : 0 + }, "proxyto" : "node", + "description" : "Read server time and time zone settings.", "parameters" : { - "additionalProperties" : 0, "properties" : { "node" : { "format" : "pve-node", "type" : "string", "description" : "The cluster node name." - }, - "target" : { - "type" : "string", - "format" : "pve-node", - "description" : "Target node." - }, - "maxworkers" : { - "minimum" : 1, - "type" : "integer", - "optional" : 1, - "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!" } - } + }, + "additionalProperties" : 0 }, + "name" : "time", "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "VM.Migrate" + "Sys.Audit" ] ] + } + }, + "PUT" : { + "returns" : { + "type" : "null" }, - "protected" : 1, - "returns" : { - "type" : "string" - }, - "method" : "POST", - "name" : "migrateall", - "description" : "Migrate all VMs and Containers." - } - }, - "path" : "/nodes/{node}/migrateall", - "text" : "migrateall", - "leaf" : 1 - } - ], - "info" : { - "GET" : { - "name" : "index", - "method" : "GET", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] - }, - "permissions" : { - "user" : "all" - }, - "description" : "Node index." - } - } - } - ], - "info" : { - "GET" : { - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{node}" - } - ], - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} - } - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "index", - "method" : "GET", - "permissions" : { - "user" : "all" - }, - "description" : "Cluster node index." - } - } - }, - { - "leaf" : 0, - "text" : "storage", - "path" : "/storage", - "children" : [ - { - "path" : "/storage/{storage}", - "info" : { - "DELETE" : { - "protected" : 1, - "description" : "Delete storage configuration.", - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "returns" : { - "type" : "null" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string" - } - } - }, - "method" : "DELETE", - "name" : "delete" - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Allocate" - ] - ] - }, - "description" : "Read storage configuration.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "description" : "The storage identifier." - } - } - }, - "returns" : {}, - "method" : "GET", - "name" : "read" - }, - "PUT" : { - "method" : "PUT", - "name" : "update", - "returns" : { - "type" : "null" - }, - "parameters" : { - "type" : "object", - "additionalProperties" : 0, - "properties" : { - "maxfiles" : { - "type" : "integer", - "minimum" : 0, - "optional" : 1, - "description" : "Maximal number of backup files per VM. Use '0' for unlimted." - }, - "content" : { - "format" : "pve-storage-content-list", - "type" : "string", - "optional" : 1, - "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n" - }, - "username" : { - "description" : "RBD Id.", - "optional" : 1, - "type" : "string" - }, - "server" : { - "format" : "pve-storage-server", - "type" : "string", - "optional" : 1, - "description" : "Server IP or DNS name." - }, - "krbd" : { - "description" : "Access rbd through krbd kernel module.", - "optional" : 1, - "type" : "boolean" - }, - "options" : { - "optional" : 1, - "description" : "NFS mount options (see 'man nfs')", - "type" : "string", - "format" : "pve-storage-options" + "description" : "Set time zone.", + "proxyto" : "node", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "comstar_hg" : { - "type" : "string", - "description" : "host group for comstar views", - "optional" : 1 + "method" : "PUT", + "protected" : 1, + "parameters" : { + "properties" : { + "timezone" : { + "type" : "string", + "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names." + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 }, - "delete" : { - "maxLength" : 4096, - "optional" : 1, - "description" : "A list of settings you want to delete.", - "type" : "string", - "format" : "pve-configid-list" + "name" : "set_timezone" + } + }, + "text" : "time", + "leaf" : 1, + "path" : "/nodes/{node}/time" + }, + { + "info" : { + "POST" : { + "protected" : 1, + "name" : "apl_download", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "storage" : { + "description" : "Only list status for specified storage", + "type" : "string", + "format" : "pve-storage-id" + }, + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + }, + "template" : { + "type" : "string", + "description" : "The template wich will downloaded", + "maxLength" : 255 + } + } }, - "sparse" : { - "description" : "use sparse volumes", - "optional" : 1, - "type" : "boolean" + "method" : "POST", + "proxyto" : "node", + "description" : "Download appliance templates.", + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.AllocateTemplate" + ] + ] }, - "format" : { - "optional" : 1, - "description" : "Default image format.", - "format" : "pve-storage-format", + "returns" : { "type" : "string" + } + }, + "GET" : { + "returns" : { + "items" : { + "type" : "object", + "properties" : {} + }, + "type" : "array" }, - "disable" : { - "type" : "boolean", - "description" : "Flag to disable the storage.", - "optional" : 1 + "method" : "GET", + "description" : "Get list of appliances.", + "proxyto" : "node", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + } }, - "saferemove_throughput" : { - "type" : "string", - "description" : "Wipe throughput (cstream -t parameter value).", - "optional" : 1 + "name" : "aplinfo", + "permissions" : { + "user" : "all" + } + } + }, + "text" : "aplinfo", + "leaf" : 1, + "path" : "/nodes/{node}/aplinfo" + }, + { + "info" : { + "GET" : { + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "description" : "The cluster node name.", + "type" : "string" + } + }, + "additionalProperties" : 0 }, - "saferemove" : { - "description" : "Zero-out data when removing LVs.", - "optional" : 1, - "type" : "boolean" + "name" : "report", + "protected" : 1, + "method" : "GET", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "description" : "Gather various systems information about a node", + "proxyto" : "node", + "returns" : { "type" : "string" + } + } + }, + "text" : "report", + "leaf" : 1, + "path" : "/nodes/{node}/report" + }, + { + "text" : "startall", + "info" : { + "POST" : { + "method" : "POST", + "protected" : 1, + "parameters" : { + "properties" : { + "force" : { + "optional" : 1, + "type" : "boolean", + "description" : "force if onboot=0." + }, + "node" : { + "type" : "string", + "description" : "The cluster node name.", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 }, - "nodes" : { - "type" : "string", - "format" : "pve-node-list", - "optional" : 1, - "description" : "List of cluster node names." - }, - "pool" : { - "description" : "Pool.", - "optional" : 1, + "name" : "startall", + "returns" : { "type" : "string" }, - "comstar_tg" : { - "type" : "string", - "description" : "target group for comstar views", - "optional" : 1 - }, - "nowritecache" : { - "description" : "disable write caching on the target", - "optional" : 1, - "type" : "boolean" - }, - "redundancy" : { - "type" : "integer", - "maximum" : 16, - "default" : 2, - "minimum" : 1, - "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster.", - "optional" : 1 + "proxyto" : "node", + "description" : "Start all VMs and containers (when onboot=1).", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "VM.PowerMgmt" + ] + ] + } + } + }, + "path" : "/nodes/{node}/startall", + "leaf" : 1 + }, + { + "text" : "stopall", + "info" : { + "POST" : { + "description" : "Stop all VMs and Containers.", + "proxyto" : "node", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "VM.PowerMgmt" + ] + ] }, - "transport" : { - "enum" : [ - "tcp", - "rdma", - "unix" - ], - "optional" : 1, - "description" : "Gluster transport: tcp or rdma", + "returns" : { "type" : "string" }, - "shared" : { - "optional" : 1, - "description" : "Mark storage as shared.", - "type" : "boolean" + "protected" : 1, + "parameters" : { + "properties" : { + "node" : { + "format" : "pve-node", + "type" : "string", + "description" : "The cluster node name." + } + }, + "additionalProperties" : 0 }, - "blocksize" : { - "description" : "block size", - "optional" : 1, + "name" : "stopall", + "method" : "POST" + } + }, + "path" : "/nodes/{node}/stopall", + "leaf" : 1 + }, + { + "info" : { + "POST" : { + "returns" : { "type" : "string" }, - "storage" : { - "description" : "The storage identifier.", - "type" : "string", - "format" : "pve-storage-id" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "VM.Migrate" + ] + ] }, - "server2" : { - "format" : "pve-storage-server", - "requires" : "server", - "type" : "string", - "optional" : 1, - "description" : "Backup volfile server IP or DNS name." - } + "proxyto" : "node", + "description" : "Migrate all VMs and Containers.", + "method" : "POST", + "parameters" : { + "properties" : { + "maxworkers" : { + "optional" : 1, + "type" : "integer", + "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!", + "minimum" : 1 + }, + "node" : { + "description" : "The cluster node name.", + "type" : "string", + "format" : "pve-node" + }, + "target" : { + "description" : "Target node.", + "type" : "string", + "format" : "pve-node" + } + }, + "additionalProperties" : 0 + }, + "name" : "migrateall", + "protected" : 1 } }, - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "description" : "Update storage configuration." + "text" : "migrateall", + "leaf" : 1, + "path" : "/nodes/{node}/migrateall" } - }, - "leaf" : 1, - "text" : "{storage}" + ], + "text" : "{node}", + "leaf" : 0, + "path" : "/nodes/{node}" } ], "info" : { "GET" : { + "permissions" : { + "user" : "all" + }, "parameters" : { - "properties" : { - "type" : { - "type" : "string", - "enum" : [ - "rbd", - "sheepdog", - "lvm", - "iscsi", - "nfs", - "zfs", - "glusterfs", - "iscsidirect", - "lvmthin", - "drbd", - "zfspool", - "dir" - ], - "description" : "Only list storage of specific type", - "optional" : 1 - } - }, "additionalProperties" : 0 }, + "name" : "index", + "description" : "Cluster node index.", + "method" : "GET", "returns" : { "links" : [ { - "href" : "{storage}", + "href" : "{node}", "rel" : "child" } ], "items" : { - "type" : "object", - "properties" : { - "storage" : { - "type" : "string" - } - } + "properties" : {}, + "type" : "object" }, "type" : "array" - }, - "name" : "index", - "method" : "GET", - "description" : "Storage index.", - "permissions" : { - "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", - "user" : "all" } - }, + } + } + }, + { + "info" : { "POST" : { - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] + "returns" : { + "type" : "null" }, + "method" : "POST", "description" : "Create a new storage.", "protected" : 1, "name" : "create", - "method" : "POST", "parameters" : { + "additionalProperties" : 0, "type" : "object", "properties" : { - "nowritecache" : { - "description" : "disable write caching on the target", - "optional" : 1, - "type" : "boolean" - }, - "comstar_tg" : { + "volume" : { + "description" : "Glusterfs Volume.", "type" : "string", - "description" : "target group for comstar views", "optional" : 1 }, - "shared" : { - "optional" : 1, - "description" : "Mark storage as shared.", - "type" : "boolean" + "sparse" : { + "description" : "use sparse volumes", + "type" : "boolean", + "optional" : 1 }, - "transport" : { - "description" : "Gluster transport: tcp or rdma", - "optional" : 1, + "type" : { + "description" : "Storage type.", "enum" : [ - "tcp", - "rdma", - "unix" + "zfspool", + "lvm", + "iscsi", + "rbd", + "dir", + "iscsidirect", + "nfs", + "glusterfs", + "zfs", + "lvmthin", + "sheepdog", + "drbd" ], "type" : "string" }, + "iscsiprovider" : { + "description" : "iscsi provider", + "type" : "string", + "optional" : 1 + }, + "saferemove" : { + "optional" : 1, + "type" : "boolean", + "description" : "Zero-out data when removing LVs." + }, + "storage" : { + "type" : "string", + "description" : "The storage identifier.", + "format" : "pve-storage-id" + }, "redundancy" : { "minimum" : 1, + "optional" : 1, "type" : "integer", "maximum" : 16, "default" : 2, - "optional" : 1, "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster." }, - "storage" : { - "description" : "The storage identifier.", + "pool" : { "type" : "string", - "format" : "pve-storage-id" + "optional" : 1, + "description" : "Pool." }, - "saferemove" : { - "description" : "Zero-out data when removing LVs.", + "path" : { + "description" : "File system path.", "optional" : 1, - "type" : "boolean" + "type" : "string", + "format" : "pve-storage-path" }, - "nodes" : { + "server" : { + "optional" : 1, "type" : "string", - "format" : "pve-node-list", - "description" : "List of cluster node names.", - "optional" : 1 + "description" : "Server IP or DNS name.", + "format" : "pve-storage-server" }, - "sparse" : { - "description" : "use sparse volumes", + "comstar_tg" : { "optional" : 1, - "type" : "boolean" + "type" : "string", + "description" : "target group for comstar views" }, "saferemove_throughput" : { - "description" : "Wipe throughput (cstream -t parameter value).", + "type" : "string", "optional" : 1, - "type" : "string" + "description" : "Wipe throughput (cstream -t parameter value)." }, - "format" : { + "maxfiles" : { + "type" : "integer", + "optional" : 1, + "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", + "minimum" : 0 + }, + "options" : { + "type" : "string", + "optional" : 1, + "description" : "NFS mount options (see 'man nfs')", + "format" : "pve-storage-options" + }, + "comstar_hg" : { + "optional" : 1, + "type" : "string", + "description" : "host group for comstar views" + }, + "username" : { + "description" : "RBD Id.", "type" : "string", - "format" : "pve-storage-format", - "description" : "Default image format.", "optional" : 1 }, - "content" : { + "authsupported" : { "optional" : 1, - "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", + "type" : "string", + "description" : "Authsupported." + }, + "server2" : { + "description" : "Backup volfile server IP or DNS name.", + "requires" : "server", + "type" : "string", + "optional" : 1, + "format" : "pve-storage-server" + }, + "content" : { "format" : "pve-storage-content-list", + "optional" : 1, + "type" : "string", + "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n" + }, + "base" : { + "description" : "Base volume. This volume is automatically activated.", + "type" : "string", + "optional" : 1, + "format" : "pve-volume-id" + }, + "monhost" : { + "description" : "Monitors daemon ips.", + "optional" : 1, "type" : "string" }, - "portal" : { + "format" : { + "optional" : 1, "type" : "string", - "format" : "pve-storage-portal-dns", + "description" : "Default image format.", + "format" : "pve-storage-format" + }, + "nowritecache" : { + "type" : "boolean", "optional" : 1, - "description" : "iSCSI portal (IP or DNS name with optional port)." + "description" : "disable write caching on the target" + }, + "target" : { + "description" : "iSCSI target.", + "type" : "string", + "optional" : 1 }, - "server" : { - "description" : "Server IP or DNS name.", + "thinpool" : { + "type" : "string", "optional" : 1, - "format" : "pve-storage-server", - "type" : "string" + "description" : "LVM thin pool LV name.", + "format" : "pve-storage-vgname" }, "krbd" : { "type" : "boolean", "optional" : 1, "description" : "Access rbd through krbd kernel module." }, - "monhost" : { - "optional" : 1, - "description" : "Monitors daemon ips.", - "type" : "string" - }, - "server2" : { - "format" : "pve-storage-server", - "requires" : "server", - "type" : "string", - "description" : "Backup volfile server IP or DNS name.", - "optional" : 1 - }, - "blocksize" : { + "shared" : { + "description" : "Mark storage as shared.", "optional" : 1, - "description" : "block size", - "type" : "string" + "type" : "boolean" }, - "type" : { - "description" : "Storage type.", + "transport" : { "enum" : [ - "rbd", - "sheepdog", - "lvm", - "iscsi", - "nfs", - "zfs", - "glusterfs", - "iscsidirect", - "lvmthin", - "drbd", - "zfspool", - "dir" + "tcp", + "rdma", + "unix" ], + "description" : "Gluster transport: tcp or rdma", + "optional" : 1, "type" : "string" }, "vgname" : { @@ -21401,222 +21166,449 @@ var pveapi = [ "type" : "string", "format" : "pve-storage-vgname" }, - "iscsiprovider" : { - "description" : "iscsi provider", + "blocksize" : { "optional" : 1, - "type" : "string" - }, - "pool" : { "type" : "string", - "optional" : 1, - "description" : "Pool." - }, - "path" : { - "description" : "File system path.", - "optional" : 1, - "format" : "pve-storage-path", - "type" : "string" + "description" : "block size" }, "export" : { - "description" : "NFS export path.", "optional" : 1, "type" : "string", + "description" : "NFS export path.", "format" : "pve-storage-path" }, - "disable" : { - "description" : "Flag to disable the storage.", + "portal" : { + "type" : "string", "optional" : 1, - "type" : "boolean" + "description" : "iSCSI portal (IP or DNS name with optional port).", + "format" : "pve-storage-portal-dns" }, - "base" : { + "nodes" : { + "format" : "pve-node-list", + "description" : "List of cluster node names.", "type" : "string", - "format" : "pve-volume-id", - "description" : "Base volume. This volume is automatically activated.", "optional" : 1 }, - "volume" : { - "type" : "string", + "disable" : { + "type" : "boolean", "optional" : 1, - "description" : "Glusterfs Volume." - }, - "target" : { + "description" : "Flag to disable the storage." + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + } + }, + "GET" : { + "returns" : { + "type" : "array", + "items" : { + "type" : "object", + "properties" : { + "storage" : { + "type" : "string" + } + } + }, + "links" : [ + { + "rel" : "child", + "href" : "{storage}" + } + ] + }, + "method" : "GET", + "parameters" : { + "properties" : { + "type" : { "type" : "string", "optional" : 1, - "description" : "iSCSI target." + "description" : "Only list storage of specific type", + "enum" : [ + "zfspool", + "lvm", + "iscsi", + "rbd", + "dir", + "iscsidirect", + "nfs", + "glusterfs", + "zfs", + "lvmthin", + "sheepdog", + "drbd" + ] + } + }, + "additionalProperties" : 0 + }, + "permissions" : { + "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", + "user" : "all" + }, + "name" : "index", + "description" : "Storage index." + } + }, + "text" : "storage", + "children" : [ + { + "leaf" : 1, + "path" : "/storage/{storage}", + "info" : { + "GET" : { + "name" : "read", + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Allocate" + ] + ] }, - "maxfiles" : { - "optional" : 1, - "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", - "minimum" : 0, - "type" : "integer" + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "storage" : { + "format" : "pve-storage-id", + "description" : "The storage identifier.", + "type" : "string" + } + } }, - "authsupported" : { - "type" : "string", - "optional" : 1, - "description" : "Authsupported." + "description" : "Read storage configuration.", + "returns" : {}, + "method" : "GET" + }, + "DELETE" : { + "returns" : { + "type" : "null" }, - "thinpool" : { - "type" : "string", - "format" : "pve-storage-vgname", - "optional" : 1, - "description" : "LVM thin pool LV name." + "method" : "DELETE", + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] }, - "options" : { - "description" : "NFS mount options (see 'man nfs')", - "optional" : 1, - "format" : "pve-storage-options", - "type" : "string" + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "storage" : { + "format" : "pve-storage-id", + "type" : "string", + "description" : "The storage identifier." + } + } + }, + "name" : "delete", + "protected" : 1, + "description" : "Delete storage configuration." + }, + "PUT" : { + "method" : "PUT", + "returns" : { + "type" : "null" + }, + "parameters" : { + "additionalProperties" : 0, + "type" : "object", + "properties" : { + "delete" : { + "maxLength" : 4096, + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "description" : "A list of settings you want to delete." + }, + "transport" : { + "type" : "string", + "optional" : 1, + "enum" : [ + "tcp", + "rdma", + "unix" + ], + "description" : "Gluster transport: tcp or rdma" + }, + "shared" : { + "description" : "Mark storage as shared.", + "type" : "boolean", + "optional" : 1 + }, + "krbd" : { + "optional" : 1, + "type" : "boolean", + "description" : "Access rbd through krbd kernel module." + }, + "pool" : { + "description" : "Pool.", + "type" : "string", + "optional" : 1 + }, + "redundancy" : { + "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster.", + "type" : "integer", + "optional" : 1, + "maximum" : 16, + "default" : 2, + "minimum" : 1 + }, + "server" : { + "description" : "Server IP or DNS name.", + "type" : "string", + "optional" : 1, + "format" : "pve-storage-server" + }, + "saferemove" : { + "type" : "boolean", + "optional" : 1, + "description" : "Zero-out data when removing LVs." + }, + "digest" : { + "maxLength" : 40, + "type" : "string", + "optional" : 1, + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + }, + "storage" : { + "format" : "pve-storage-id", + "description" : "The storage identifier.", + "type" : "string" + }, + "sparse" : { + "description" : "use sparse volumes", + "type" : "boolean", + "optional" : 1 + }, + "nowritecache" : { + "description" : "disable write caching on the target", + "type" : "boolean", + "optional" : 1 + }, + "format" : { + "description" : "Default image format.", + "optional" : 1, + "type" : "string", + "format" : "pve-storage-format" + }, + "content" : { + "format" : "pve-storage-content-list", + "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", + "type" : "string", + "optional" : 1 + }, + "server2" : { + "format" : "pve-storage-server", + "type" : "string", + "optional" : 1, + "description" : "Backup volfile server IP or DNS name.", + "requires" : "server" + }, + "disable" : { + "description" : "Flag to disable the storage.", + "type" : "boolean", + "optional" : 1 + }, + "nodes" : { + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "description" : "List of cluster node names." + }, + "comstar_hg" : { + "type" : "string", + "optional" : 1, + "description" : "host group for comstar views" + }, + "options" : { + "format" : "pve-storage-options", + "description" : "NFS mount options (see 'man nfs')", + "type" : "string", + "optional" : 1 + }, + "saferemove_throughput" : { + "optional" : 1, + "type" : "string", + "description" : "Wipe throughput (cstream -t parameter value)." + }, + "maxfiles" : { + "minimum" : 0, + "type" : "integer", + "optional" : 1, + "description" : "Maximal number of backup files per VM. Use '0' for unlimted." + }, + "blocksize" : { + "optional" : 1, + "type" : "string", + "description" : "block size" + }, + "username" : { + "description" : "RBD Id.", + "type" : "string", + "optional" : 1 + }, + "comstar_tg" : { + "description" : "target group for comstar views", + "type" : "string", + "optional" : 1 + } + } }, - "username" : { - "description" : "RBD Id.", - "optional" : 1, - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] }, - "comstar_hg" : { - "type" : "string", - "description" : "host group for comstar views", - "optional" : 1 - } - }, - "additionalProperties" : 0 + "name" : "update", + "description" : "Update storage configuration.", + "protected" : 1 + } }, - "returns" : { - "type" : "null" - } + "text" : "{storage}" } - } + ], + "leaf" : 0, + "path" : "/storage" }, { - "text" : "access", "leaf" : 0, + "path" : "/access", "info" : { "GET" : { + "method" : "GET", "returns" : { "type" : "array", + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], "items" : { - "type" : "object", "properties" : { "subdir" : { "type" : "string" } - } - }, - "links" : [ - { - "rel" : "child", - "href" : "{subdir}" - } - ] - }, - "parameters" : { - "additionalProperties" : 0 + }, + "type" : "object" + } }, - "method" : "GET", "name" : "index", - "description" : "Directory index.", "permissions" : { "user" : "all" - } + }, + "parameters" : { + "additionalProperties" : 0 + }, + "description" : "Directory index." } }, - "path" : "/access", + "text" : "access", "children" : [ { - "leaf" : 0, - "text" : "users", "info" : { "POST" : { - "name" : "create_user", "method" : "POST", + "returns" : { + "type" : "null" + }, + "protected" : 1, + "description" : "Create new user.", + "name" : "create_user", + "permissions" : { + "check" : [ + "and", + [ + "userid-param", + "Realm.AllocateUser" + ], + [ + "userid-group", + [ + "User.Modify" + ], + "groups_param", + 1 + ] + ], + "description" : "You need 'Realm.AllocateUser' on '/access/realm/' on the realm of user , and 'User.Modify' permissions to '/access/groups/' for any group specified (or 'User.Modify' on '/access/groups' if you pass no groups." + }, "parameters" : { - "additionalProperties" : 0, "properties" : { - "keys" : { - "type" : "string", + "enable" : { + "type" : "boolean", "optional" : 1, - "description" : "Keys for two factor auth (yubico)." + "default" : 1, + "description" : "Enable the account (default). You can set this to '0' to disable the accout" }, "lastname" : { "type" : "string", "optional" : 1 }, - "firstname" : { + "keys" : { "optional" : 1, - "type" : "string" + "type" : "string", + "description" : "Keys for two factor auth (yubico)." }, - "comment" : { + "firstname" : { "optional" : 1, "type" : "string" }, - "userid" : { - "type" : "string", - "format" : "pve-userid", - "maxLength" : 64, - "description" : "User ID" - }, - "email" : { + "groups" : { "optional" : 1, "type" : "string", - "format" : "email-opt" + "format" : "pve-groupid-list" }, "password" : { - "minLength" : 5, - "maxLength" : 64, "optional" : 1, + "type" : "string", "description" : "Initial password.", + "minLength" : 5, + "maxLength" : 64 + }, + "email" : { + "format" : "email-opt", + "optional" : 1, "type" : "string" }, - "enable" : { - "default" : 1, - "type" : "boolean", - "description" : "Enable the account (default). You can set this to '0' to disable the accout", + "comment" : { + "type" : "string", "optional" : 1 }, + "userid" : { + "type" : "string", + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64 + }, "expire" : { "minimum" : 0, + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", "type" : "integer", - "optional" : 1, - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date." - }, - "groups" : { - "type" : "string", - "format" : "pve-groupid-list", "optional" : 1 } - } - }, - "returns" : { - "type" : "null" - }, - "description" : "Create new user.", - "permissions" : { - "check" : [ - "and", - [ - "userid-param", - "Realm.AllocateUser" - ], - [ - "userid-group", - [ - "User.Modify" - ], - "groups_param", - 1 - ] - ], - "description" : "You need 'Realm.AllocateUser' on '/access/realm/' on the realm of user , and 'User.Modify' permissions to '/access/groups/' for any group specified (or 'User.Modify' on '/access/groups' if you pass no groups." - }, - "protected" : 1 + }, + "additionalProperties" : 0 + } }, "GET" : { "returns" : { - "links" : [ - { - "href" : "{userid}", - "rel" : "child" - } - ], "items" : { "type" : "object", "properties" : { @@ -21625,95 +21617,97 @@ var pveapi = [ } } }, + "links" : [ + { + "href" : "{userid}", + "rel" : "child" + } + ], "type" : "array" }, + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { "enabled" : { + "description" : "Optional filter for enable property.", "type" : "boolean", - "optional" : 1, - "description" : "Optional filter for enable property." + "optional" : 1 } } }, - "method" : "GET", - "name" : "index", - "description" : "User index.", "permissions" : { - "user" : "all", - "description" : "The returned list is restricted to users where you have 'User.Modify' or 'Sys.Audit' permissions on '/access/groups' or on a group the user belongs too. But it always includes the current (authenticated) user." - } + "description" : "The returned list is restricted to users where you have 'User.Modify' or 'Sys.Audit' permissions on '/access/groups' or on a group the user belongs too. But it always includes the current (authenticated) user.", + "user" : "all" + }, + "description" : "User index." } }, - "path" : "/access/users", + "text" : "users", "children" : [ { - "text" : "{userid}", "leaf" : 1, + "path" : "/access/users/{userid}", "info" : { "PUT" : { - "name" : "update_user", - "method" : "PUT", - "returns" : { - "type" : "null" - }, + "protected" : 1, + "description" : "Update user configuration.", + "name" : "update_user", "parameters" : { + "additionalProperties" : 0, "properties" : { "expire" : { - "optional" : 1, - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", "minimum" : 0, - "type" : "integer" - }, - "enable" : { - "type" : "boolean", - "description" : "Enable/disable the account.", - "optional" : 1 + "type" : "integer", + "optional" : 1, + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date." }, - "groups" : { + "comment" : { "type" : "string", - "format" : "pve-groupid-list", "optional" : 1 }, - "append" : { - "type" : "boolean", - "requires" : "groups", - "optional" : 1 + "email" : { + "format" : "email-opt", + "optional" : 1, + "type" : "string" }, "userid" : { - "maxLength" : 64, "description" : "User ID", + "type" : "string", "format" : "pve-userid", + "maxLength" : 64 + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, "type" : "string" }, - "comment" : { + "groups" : { + "format" : "pve-groupid-list", "type" : "string", "optional" : 1 }, "firstname" : { - "type" : "string", - "optional" : 1 - }, - "keys" : { - "description" : "Keys for two factor auth (yubico).", "optional" : 1, "type" : "string" }, - "lastname" : { + "enable" : { + "type" : "boolean", "optional" : 1, - "type" : "string" + "description" : "Enable/disable the account." }, - "email" : { + "append" : { + "optional" : 1, + "type" : "boolean", + "requires" : "groups" + }, + "lastname" : { "optional" : 1, - "format" : "email-opt", "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, - "description" : "Update user configuration.", "permissions" : { "check" : [ "userid-group", @@ -21723,26 +21717,26 @@ var pveapi = [ "groups_param", 1 ] - } - }, - "DELETE" : { - "method" : "DELETE", - "name" : "delete_user", + }, "returns" : { "type" : "null" }, + "method" : "PUT" + }, + "DELETE" : { + "protected" : 1, + "description" : "Delete user.", "parameters" : { "additionalProperties" : 0, "properties" : { "userid" : { + "maxLength" : 64, "format" : "pve-userid", "type" : "string", - "maxLength" : 64, "description" : "User ID" } } }, - "protected" : 1, "permissions" : { "check" : [ "and", @@ -21758,56 +21752,60 @@ var pveapi = [ ] ] }, - "description" : "Delete user." + "name" : "delete_user", + "method" : "DELETE", + "returns" : { + "type" : "null" + } }, "GET" : { + "method" : "GET", "returns" : { + "additionalProperties" : 0, "properties" : { - "email" : { - "optional" : 1, - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" + "keys" : { + "type" : "string", + "optional" : 1 }, "firstname" : { - "optional" : 1, - "type" : "string" - }, - "keys" : { "type" : "string", "optional" : 1 }, + "groups" : { + "type" : "array" + }, + "enable" : { + "type" : "boolean" + }, "lastname" : { "optional" : 1, "type" : "string" }, - "groups" : { - "type" : "array" - }, "expire" : { "type" : "integer", "optional" : 1 }, - "enable" : { - "type" : "boolean" + "email" : { + "type" : "string", + "optional" : 1 + }, + "comment" : { + "type" : "string", + "optional" : 1 } - }, - "additionalProperties" : 0 + } }, "parameters" : { "properties" : { "userid" : { - "maxLength" : 64, "description" : "User ID", + "type" : "string", "format" : "pve-userid", - "type" : "string" + "maxLength" : 64 } }, "additionalProperties" : 0 }, - "method" : "GET", "name" : "read_user", "permissions" : { "check" : [ @@ -21821,31 +21819,49 @@ var pveapi = [ "description" : "Get user configuration." } }, - "path" : "/access/users/{userid}" + "text" : "{userid}" } - ] + ], + "leaf" : 0, + "path" : "/access/users" }, { "info" : { - "POST" : { - "name" : "create_group", - "method" : "POST", + "GET" : { + "name" : "index", + "permissions" : { + "user" : "all", + "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/." + }, "parameters" : { - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "groupid" : { - "type" : "string", - "format" : "pve-groupid" - } - }, "additionalProperties" : 0 }, + "description" : "Group index.", + "method" : "GET", + "returns" : { + "links" : [ + { + "href" : "{groupid}", + "rel" : "child" + } + ], + "items" : { + "properties" : { + "groupid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { "returns" : { "type" : "null" }, + "method" : "POST", + "name" : "create_group", "permissions" : { "check" : [ "perm", @@ -21855,48 +21871,103 @@ var pveapi = [ ] ] }, - "description" : "Create new group.", - "protected" : 1 - }, - "GET" : { - "name" : "index", - "method" : "GET", "parameters" : { - "additionalProperties" : 0 - }, - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "groupid" : { - "type" : "string" - } - } - }, - "type" : "array", - "links" : [ - { - "href" : "{groupid}", - "rel" : "child" + "additionalProperties" : 0, + "properties" : { + "groupid" : { + "format" : "pve-groupid", + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" } - ] - }, - "permissions" : { - "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/.", - "user" : "all" + } }, - "description" : "Group index." + "description" : "Create new group.", + "protected" : 1 } }, "children" : [ { - "text" : "{groupid}", - "leaf" : 1, "info" : { "DELETE" : { + "permissions" : { + "check" : [ + "perm", + "/access/groups", + [ + "Group.Allocate" + ] + ] + }, + "name" : "delete_group", + "parameters" : { + "properties" : { + "groupid" : { + "type" : "string", + "format" : "pve-groupid" + } + }, + "additionalProperties" : 0 + }, + "protected" : 1, + "description" : "Delete group.", + "returns" : { + "type" : "null" + }, + "method" : "DELETE" + }, + "PUT" : { + "method" : "PUT", "returns" : { "type" : "null" }, + "description" : "Update group data.", + "protected" : 1, + "permissions" : { + "check" : [ + "perm", + "/access/groups", + [ + "Group.Allocate" + ] + ] + }, + "name" : "update_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "groupid" : { + "type" : "string", + "format" : "pve-groupid" + }, + "comment" : { + "type" : "string", + "optional" : 1 + } + } + } + }, + "GET" : { + "returns" : { + "properties" : { + "comment" : { + "type" : "string", + "optional" : 1 + }, + "members" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object", + "additionalProperties" : 0 + }, + "method" : "GET", + "name" : "read_group", "parameters" : { "properties" : { "groupid" : { @@ -21906,123 +21977,154 @@ var pveapi = [ }, "additionalProperties" : 0 }, - "name" : "delete_group", - "method" : "DELETE", - "protected" : 1, "permissions" : { "check" : [ "perm", "/access/groups", [ + "Sys.Audit", "Group.Allocate" - ] + ], + "any", + 1 ] }, - "description" : "Delete group." - }, + "description" : "Get group configuration." + } + }, + "text" : "{groupid}", + "leaf" : 1, + "path" : "/access/groups/{groupid}" + } + ], + "text" : "groups", + "leaf" : 0, + "path" : "/access/groups" + }, + { + "children" : [ + { + "text" : "{roleid}", + "info" : { "GET" : { - "returns" : { + "returns" : {}, + "method" : "GET", + "name" : "read_role", + "parameters" : { "properties" : { - "members" : { - "type" : "array", - "items" : { - "type" : "string" - } - }, - "comment" : { - "type" : "string", - "optional" : 1 + "roleid" : { + "format" : "pve-roleid", + "type" : "string" } }, - "additionalProperties" : 0, - "type" : "object" + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "description" : "Get role configuration." + }, + "DELETE" : { + "method" : "DELETE", + "returns" : { + "type" : "null" }, + "description" : "Delete role.", + "protected" : 1, + "name" : "delete_role", "parameters" : { "additionalProperties" : 0, "properties" : { - "groupid" : { - "type" : "string", - "format" : "pve-groupid" + "roleid" : { + "format" : "pve-roleid", + "type" : "string" } } }, - "name" : "read_group", - "method" : "GET", - "description" : "Get group configuration.", "permissions" : { "check" : [ "perm", - "/access/groups", + "/access", [ - "Sys.Audit", - "Group.Allocate" - ], - "any", - 1 + "Sys.Modify" + ] ] } }, "PUT" : { - "name" : "update_group", - "method" : "PUT", - "returns" : { - "type" : "null" + "permissions" : { + "check" : [ + "perm", + "/access", + [ + "Sys.Modify" + ] + ] }, "parameters" : { "additionalProperties" : 0, "properties" : { - "comment" : { - "type" : "string", + "append" : { + "requires" : "privs", + "type" : "boolean", "optional" : 1 }, - "groupid" : { - "format" : "pve-groupid", + "roleid" : { + "format" : "pve-roleid", + "type" : "string" + }, + "privs" : { + "format" : "pve-priv-list", "type" : "string" } } }, + "name" : "update_role", + "description" : "Create new role.", "protected" : 1, - "description" : "Update group data.", - "permissions" : { - "check" : [ - "perm", - "/access/groups", - [ - "Group.Allocate" - ] - ] + "method" : "PUT", + "returns" : { + "type" : "null" } } }, - "path" : "/access/groups/{groupid}" + "path" : "/access/roles/{roleid}", + "leaf" : 1 } ], - "path" : "/access/groups", - "leaf" : 0, - "text" : "groups" - }, - { + "text" : "roles", "info" : { - "POST" : { - "name" : "create_role", - "method" : "POST", + "GET" : { + "description" : "Role index.", + "name" : "index", "parameters" : { - "properties" : { - "roleid" : { - "type" : "string", - "format" : "pve-roleid" - }, - "privs" : { - "type" : "string", - "format" : "pve-priv-list", - "optional" : 1 - } - }, "additionalProperties" : 0 }, + "permissions" : { + "user" : "all" + }, "returns" : { - "type" : "null" + "type" : "array", + "links" : [ + { + "href" : "{roleid}", + "rel" : "child" + } + ], + "items" : { + "type" : "object", + "properties" : { + "roleid" : { + "type" : "string" + } + } + } }, + "method" : "GET" + }, + "POST" : { + "description" : "Create new role.", + "protected" : 1, "permissions" : { "check" : [ "perm", @@ -22032,655 +22134,553 @@ var pveapi = [ ] ] }, - "description" : "Create new role.", - "protected" : 1 - }, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "roleid" : { + "type" : "string", + "format" : "pve-roleid" + }, + "privs" : { + "format" : "pve-priv-list", + "optional" : 1, + "type" : "string" + } + } + }, + "name" : "create_role", + "method" : "POST", + "returns" : { + "type" : "null" + } + } + }, + "path" : "/access/roles", + "leaf" : 0 + }, + { + "info" : { "GET" : { - "method" : "GET", - "name" : "index", + "permissions" : { + "user" : "all", + "description" : "The returned list is restricted to objects where you have rights to modify permissions." + }, + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "read_acl", + "description" : "Get Access Control List (ACLs).", "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{roleid}" - } - ], - "type" : "array", "items" : { - "type" : "object", "properties" : { + "path" : { + "type" : "string" + }, + "type" : { + "enum" : [ + "user", + "group" + ], + "type" : "string" + }, + "propagate" : { + "type" : "boolean" + }, "roleid" : { "type" : "string" + }, + "ugid" : { + "type" : "string" } + }, + "type" : "object", + "additionalProperties" : 0 + }, + "type" : "array" + }, + "method" : "GET" + }, + "PUT" : { + "name" : "update_acl", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "type" : "boolean", + "optional" : 1, + "description" : "Remove permissions (instead of adding it)." + }, + "users" : { + "format" : "pve-userid-list", + "type" : "string", + "optional" : 1, + "description" : "List of users." + }, + "path" : { + "description" : "Access control path", + "type" : "string" + }, + "roles" : { + "description" : "List of roles.", + "type" : "string", + "format" : "pve-roleid-list" + }, + "propagate" : { + "description" : "Allow to propagate (inherit) permissions.", + "type" : "boolean", + "optional" : 1, + "default" : 1 + }, + "groups" : { + "description" : "List of groups.", + "optional" : 1, + "type" : "string", + "format" : "pve-groupid-list" } } }, - "parameters" : { - "additionalProperties" : 0 - }, "permissions" : { - "user" : "all" + "check" : [ + "perm-modify", + "{path}" + ] + }, + "description" : "Update Access Control List (add or remove permissions).", + "protected" : 1, + "returns" : { + "type" : "null" }, - "description" : "Role index." + "method" : "PUT" } }, + "text" : "acl", + "leaf" : 1, + "path" : "/access/acl" + }, + { + "text" : "domains", "children" : [ { + "path" : "/access/domains/{realm}", "leaf" : 1, - "text" : "{roleid}", - "path" : "/access/roles/{roleid}", + "text" : "{realm}", "info" : { "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/access", - [ - "Sys.Modify" - ] - ] - }, - "description" : "Create new role.", - "protected" : 1, - "name" : "update_role", - "method" : "PUT", "parameters" : { - "additionalProperties" : 0, "properties" : { - "privs" : { - "format" : "pve-priv-list", + "base_dn" : { + "maxLength" : 256, + "type" : "string", + "optional" : 1, + "description" : "LDAP base domain name", + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*" + }, + "realm" : { + "description" : "Authentication domain ID", + "type" : "string", + "format" : "pve-realm", + "maxLength" : 32 + }, + "user_attr" : { + "maxLength" : 256, + "pattern" : "\\S{2,}", + "description" : "LDAP user attribute name", + "optional" : 1, "type" : "string" }, - "append" : { + "secure" : { "type" : "boolean", - "requires" : "privs", - "optional" : 1 + "optional" : 1, + "description" : "Use secure LDAPS protocol." }, - "roleid" : { - "format" : "pve-roleid", - "type" : "string" - } - } - }, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "returns" : {}, - "parameters" : { - "properties" : { - "roleid" : { - "format" : "pve-roleid", + "server1" : { + "format" : "address", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "description" : "Server IP address (or DNS name)" + }, + "domain" : { + "maxLength" : 256, + "description" : "AD domain name", + "pattern" : "\\S+", + "optional" : 1, "type" : "string" + }, + "server2" : { + "maxLength" : 256, + "format" : "address", + "type" : "string", + "optional" : 1, + "description" : "Fallback Server IP address (or DNS name)" + }, + "delete" : { + "type" : "string", + "optional" : 1, + "description" : "A list of settings you want to delete.", + "maxLength" : 4096, + "format" : "pve-configid-list" + }, + "comment" : { + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "description" : "Description." + }, + "default" : { + "description" : "Use this as default realm", + "type" : "boolean", + "optional" : 1 + }, + "port" : { + "description" : "Server port.", + "maximum" : 65535, + "type" : "integer", + "optional" : 1, + "minimum" : 1 + }, + "digest" : { + "optional" : 1, + "type" : "string", + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40 + }, + "tfa" : { + "optional" : 1, + "type" : "string", + "description" : "Use Two-factor authentication.", + "maxLength" : 128, + "format" : "pve-tfa-config" } }, + "type" : "object", "additionalProperties" : 0 }, - "method" : "GET", - "name" : "read_role", - "description" : "Get role configuration.", - "permissions" : { - "user" : "all" - } - }, - "DELETE" : { - "protected" : 1, + "name" : "update", "permissions" : { "check" : [ "perm", - "/access", + "/access/realm", [ - "Sys.Modify" + "Realm.Allocate" ] ] }, - "description" : "Delete role.", + "protected" : 1, + "description" : "Update authentication server settings.", + "returns" : { + "type" : "null" + }, + "method" : "PUT" + }, + "DELETE" : { + "method" : "DELETE", "returns" : { "type" : "null" }, + "protected" : 1, + "description" : "Delete an authentication server.", "parameters" : { - "additionalProperties" : 0, "properties" : { - "roleid" : { + "realm" : { + "format" : "pve-realm", + "maxLength" : 32, "type" : "string", - "format" : "pve-roleid" + "description" : "Authentication domain ID" } - } - }, - "method" : "DELETE", - "name" : "delete_role" - } - } - } - ], - "path" : "/access/roles", - "text" : "roles", - "leaf" : 0 - }, - { - "info" : { - "PUT" : { - "permissions" : { - "check" : [ - "perm-modify", - "{path}" - ] - }, - "description" : "Update Access Control List (add or remove permissions).", - "protected" : 1, - "method" : "PUT", - "name" : "update_acl", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "propagate" : { - "type" : "boolean", - "default" : 1, - "optional" : 1, - "description" : "Allow to propagate (inherit) permissions." - }, - "roles" : { - "type" : "string", - "format" : "pve-roleid-list", - "description" : "List of roles." - }, - "users" : { - "format" : "pve-userid-list", - "type" : "string", - "description" : "List of users.", - "optional" : 1 - }, - "groups" : { - "optional" : 1, - "description" : "List of groups.", - "format" : "pve-groupid-list", - "type" : "string" - }, - "delete" : { - "type" : "boolean", - "description" : "Remove permissions (instead of adding it).", - "optional" : 1 - }, - "path" : { - "type" : "string", - "description" : "Access control path" - } - } - }, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "method" : "GET", - "name" : "read_acl", - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "propagate" : { - "type" : "boolean" - }, - "ugid" : { - "type" : "string" - }, - "path" : { - "type" : "string" }, - "type" : { - "type" : "string", - "enum" : [ - "user", - "group" + "additionalProperties" : 0 + }, + "name" : "delete", + "permissions" : { + "check" : [ + "perm", + "/access/realm", + [ + "Realm.Allocate" ] + ] + } + }, + "GET" : { + "parameters" : { + "properties" : { + "realm" : { + "type" : "string", + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32 + } }, - "roleid" : { - "type" : "string" - } + "additionalProperties" : 0 }, - "additionalProperties" : 0, - "type" : "object" + "name" : "read", + "permissions" : { + "check" : [ + "perm", + "/access/realm", + [ + "Realm.Allocate", + "Sys.Audit" + ], + "any", + 1 + ] + }, + "description" : "Get auth server configuration.", + "method" : "GET", + "returns" : {} } - }, - "parameters" : { - "additionalProperties" : 0 - }, - "description" : "Get Access Control List (ACLs).", - "permissions" : { - "user" : "all", - "description" : "The returned list is restricted to objects where you have rights to modify permissions." } } - }, - "path" : "/access/acl", - "text" : "acl", - "leaf" : 1 - }, - { + ], "info" : { "GET" : { - "permissions" : { - "user" : "world", - "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated)." - }, - "description" : "Authentication domain index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, "returns" : { + "type" : "array", "links" : [ { "rel" : "child", "href" : "{realm}" } ], - "type" : "array", "items" : { "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, "realm" : { "type" : "string" }, "tfa" : { + "description" : "Two-factor authentication provider.", "enum" : [ "yubico", "oath" ], - "description" : "Two-factor authentication provider.", - "optional" : 1, - "type" : "string" - }, - "comment" : { "type" : "string", "optional" : 1 } }, "type" : "object" } - } + }, + "method" : "GET", + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "index", + "permissions" : { + "user" : "world", + "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated)." + }, + "description" : "Authentication domain index." }, "POST" : { - "description" : "Add an authentication server.", - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate" - ] - ] + "method" : "POST", + "returns" : { + "type" : "null" }, + "description" : "Add an authentication server.", "protected" : 1, + "name" : "create", "parameters" : { "properties" : { "server1" : { - "format" : "address", - "type" : "string", - "description" : "Server IP address (or DNS name)", "optional" : 1, - "maxLength" : 256 - }, - "default" : { - "type" : "boolean", - "optional" : 1, - "description" : "Use this as default realm" - }, - "realm" : { "type" : "string", - "format" : "pve-realm", - "description" : "Authentication domain ID", - "maxLength" : 32 - }, - "base_dn" : { - "type" : "string", - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "description" : "Server IP address (or DNS name)", "maxLength" : 256, - "description" : "LDAP base domain name", - "optional" : 1 + "format" : "address" }, - "tfa" : { - "format" : "pve-tfa-config", - "type" : "string", - "maxLength" : 128, - "optional" : 1, - "description" : "Use Two-factor authentication." - }, - "server2" : { - "format" : "address", - "type" : "string", - "description" : "Fallback Server IP address (or DNS name)", - "maxLength" : 256, + "secure" : { + "description" : "Use secure LDAPS protocol.", + "type" : "boolean", "optional" : 1 }, - "domain" : { - "pattern" : "\\S+", - "optional" : 1, - "description" : "AD domain name", - "maxLength" : 256, - "type" : "string" - }, "type" : { - "type" : "string", "description" : "Realm type.", "enum" : [ "ldap", + "pam", "pve", - "ad", - "pam" - ] + "ad" + ], + "type" : "string" }, "user_attr" : { - "type" : "string", "pattern" : "\\S{2,}", "description" : "LDAP user attribute name", - "maxLength" : 256, - "optional" : 1 - }, - "port" : { - "minimum" : 1, - "type" : "integer", - "maximum" : 65535, - "description" : "Server port.", - "optional" : 1 - }, - "comment" : { - "type" : "string", - "description" : "Description.", - "maxLength" : 4096, - "optional" : 1 - }, - "secure" : { "optional" : 1, - "description" : "Use secure LDAPS protocol.", - "type" : "boolean" - } - }, - "additionalProperties" : 0, - "type" : "object" - }, - "returns" : { - "type" : "null" - }, - "name" : "create", - "method" : "POST" - } - }, - "children" : [ - { - "path" : "/access/domains/{realm}", - "info" : { - "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate" - ] - ] - }, - "description" : "Update authentication server settings.", - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "type" : "string", - "description" : "Description.", - "maxLength" : 4096, - "optional" : 1 - }, - "secure" : { - "type" : "boolean", - "optional" : 1, - "description" : "Use secure LDAPS protocol." - }, - "user_attr" : { - "type" : "string", - "pattern" : "\\S{2,}", - "optional" : 1, - "description" : "LDAP user attribute name", - "maxLength" : 256 - }, - "port" : { - "description" : "Server port.", - "optional" : 1, - "minimum" : 1, - "maximum" : 65535, - "type" : "integer" - }, - "domain" : { - "type" : "string", - "pattern" : "\\S+", - "optional" : 1, - "description" : "AD domain name", - "maxLength" : 256 - }, - "server2" : { - "type" : "string", - "format" : "address", - "optional" : 1, - "maxLength" : 256, - "description" : "Fallback Server IP address (or DNS name)" - }, - "digest" : { - "type" : "string", - "optional" : 1, - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "realm" : { - "maxLength" : 32, - "description" : "Authentication domain ID", - "format" : "pve-realm", - "type" : "string" - }, - "default" : { - "type" : "boolean", - "optional" : 1, - "description" : "Use this as default realm" - }, - "tfa" : { - "description" : "Use Two-factor authentication.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "format" : "pve-tfa-config" - }, - "base_dn" : { - "type" : "string", - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", - "optional" : 1, - "description" : "LDAP base domain name", - "maxLength" : 256 - }, - "delete" : { - "maxLength" : 4096, - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "type" : "string" - }, - "server1" : { - "format" : "address", - "type" : "string", - "description" : "Server IP address (or DNS name)", - "maxLength" : 256, - "optional" : 1 - } - }, - "type" : "object" + "type" : "string", + "maxLength" : 256 }, - "returns" : { - "type" : "null" + "realm" : { + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "description" : "Authentication domain ID" }, - "method" : "PUT", - "name" : "update" - }, - "GET" : { - "description" : "Get auth server configuration.", - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate", - "Sys.Audit" - ], - "any", - 1 - ] + "base_dn" : { + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "description" : "LDAP base domain name", + "optional" : 1, + "type" : "string", + "maxLength" : 256 }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "realm" : { - "description" : "Authentication domain ID", - "maxLength" : 32, - "type" : "string", - "format" : "pve-realm" - } - } + "tfa" : { + "description" : "Use Two-factor authentication.", + "optional" : 1, + "type" : "string", + "maxLength" : 128, + "format" : "pve-tfa-config" }, - "returns" : {}, - "name" : "read", - "method" : "GET" - }, - "DELETE" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "realm" : { - "maxLength" : 32, - "description" : "Authentication domain ID", - "type" : "string", - "format" : "pve-realm" - } - } + "port" : { + "minimum" : 1, + "maximum" : 65535, + "type" : "integer", + "optional" : 1, + "description" : "Server port." }, - "returns" : { - "type" : "null" + "default" : { + "optional" : 1, + "type" : "boolean", + "description" : "Use this as default realm" }, - "method" : "DELETE", - "name" : "delete", - "description" : "Delete an authentication server.", - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate" - ] - ] + "comment" : { + "maxLength" : 4096, + "description" : "Description.", + "type" : "string", + "optional" : 1 }, - "protected" : 1 - } + "domain" : { + "maxLength" : 256, + "type" : "string", + "optional" : 1, + "pattern" : "\\S+", + "description" : "AD domain name" + }, + "server2" : { + "maxLength" : 256, + "format" : "address", + "type" : "string", + "optional" : 1, + "description" : "Fallback Server IP address (or DNS name)" + } + }, + "additionalProperties" : 0, + "type" : "object" }, - "leaf" : 1, - "text" : "{realm}" + "permissions" : { + "check" : [ + "perm", + "/access/realm", + [ + "Realm.Allocate" + ] + ] + } } - ], + }, "path" : "/access/domains", - "leaf" : 0, - "text" : "domains" + "leaf" : 0 }, { - "path" : "/access/ticket", "info" : { "POST" : { "method" : "POST", - "name" : "create_ticket", "returns" : { + "type" : "object", "properties" : { "CSRFPreventionToken" : { "optional" : 1, "type" : "string" }, "ticket" : { - "type" : "string", - "optional" : 1 + "optional" : 1, + "type" : "string" }, "username" : { "type" : "string" } - }, - "type" : "object" + } }, "parameters" : { "properties" : { + "password" : { + "description" : "The secret password. This can also be a valid ticket.", + "type" : "string" + }, + "privs" : { + "maxLength" : 64, + "format" : "pve-priv-list", + "optional" : 1, + "type" : "string", + "requires" : "path", + "description" : "Verify ticket, and check if user have access 'privs' on 'path'" + }, "otp" : { - "description" : "One-time password for Two-factor authentication.", "optional" : 1, - "type" : "string" + "type" : "string", + "description" : "One-time password for Two-factor authentication." }, "path" : { "requires" : "privs", - "type" : "string", + "description" : "Verify ticket, and check if user have access 'privs' on 'path'", "optional" : 1, - "maxLength" : 64, - "description" : "Verify ticket, and check if user have access 'privs' on 'path'" - }, - "password" : { - "description" : "The secret password. This can also be a valid ticket.", - "type" : "string" + "type" : "string", + "maxLength" : 64 }, "realm" : { - "optional" : 1, - "maxLength" : 32, "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username @.", + "optional" : 1, "type" : "string", + "maxLength" : 32, "format" : "pve-realm" }, "username" : { "description" : "User name", - "maxLength" : 64, - "type" : "string" - }, - "privs" : { - "format" : "pve-priv-list", "type" : "string", - "requires" : "path", - "description" : "Verify ticket, and check if user have access 'privs' on 'path'", - "optional" : 1, "maxLength" : 64 } }, "additionalProperties" : 0 }, - "protected" : 1, - "description" : "Create or verify authentication ticket.", + "name" : "create_ticket", "permissions" : { "user" : "world", "description" : "You need to pass valid credientials." - } + }, + "description" : "Create or verify authentication ticket.", + "protected" : 1 }, "GET" : { - "description" : "Dummy. Useful for formaters which want to priovde a login page.", + "parameters" : { + "additionalProperties" : 0 + }, "permissions" : { "user" : "world" }, - "method" : "GET", "name" : "get_ticket", - "parameters" : { - "additionalProperties" : 0 - }, + "description" : "Dummy. Useful for formaters which want to priovde a login page.", "returns" : { "type" : "null" - } + }, + "method" : "GET" } }, "text" : "ticket", - "leaf" : 1 + "leaf" : 1, + "path" : "/access/ticket" }, { - "text" : "password", - "leaf" : 1, - "path" : "/access/password", "info" : { "PUT" : { - "protected" : 1, + "returns" : { + "type" : "null" + }, + "method" : "PUT", "permissions" : { "description" : "Each user is allowed to change his own password. A user can change the password of another user if he has 'Realm.AllocateUser' (on the realm of user ) and 'User.Modify' permission on /access/groups/ on a group where user is member of.", "check" : [ @@ -22704,92 +22704,136 @@ var pveapi = [ ] ] }, - "description" : "Change user password.", - "returns" : { - "type" : "null" - }, "parameters" : { "properties" : { "password" : { - "type" : "string", "maxLength" : 64, + "type" : "string", "description" : "The new password.", "minLength" : 5 }, "userid" : { - "description" : "User ID", - "maxLength" : 64, "format" : "pve-userid", + "maxLength" : 64, + "description" : "User ID", "type" : "string" } }, "additionalProperties" : 0 }, "name" : "change_passsword", - "method" : "PUT" + "description" : "Change user password.", + "protected" : 1 + } + }, + "text" : "password", + "leaf" : 1, + "path" : "/access/password" + } + ] + }, + { + "info" : { + "GET" : { + "description" : "Pool index.", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all", + "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/." + }, + "returns" : { + "type" : "array", + "links" : [ + { + "rel" : "child", + "href" : "{poolid}" + } + ], + "items" : { + "properties" : { + "poolid" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "method" : "GET" + }, + "POST" : { + "name" : "create_pool", + "permissions" : { + "check" : [ + "perm", + "/pool/{poolid}", + [ + "Pool.Allocate" + ] + ] + }, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "poolid" : { + "format" : "pve-poolid", + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + } } + }, + "protected" : 1, + "description" : "Create new pool.", + "method" : "POST", + "returns" : { + "type" : "null" } } - ] - }, - { + }, "children" : [ { + "leaf" : 1, "path" : "/pools/{poolid}", "info" : { - "GET" : { - "name" : "read_pool", - "method" : "GET", + "PUT" : { + "method" : "PUT", + "returns" : { + "type" : "null" + }, "parameters" : { "additionalProperties" : 0, "properties" : { - "poolid" : { + "storage" : { "type" : "string", - "format" : "pve-poolid" - } - } - }, - "returns" : { - "type" : "object", - "properties" : { - "members" : { - "items" : { - "type" : "object", - "additionalProperties" : 1, - "properties" : { - "storage" : { - "type" : "string", - "optional" : 1 - }, - "type" : { - "enum" : [ - "qemu", - "lxc", - "openvz", - "storage" - ], - "type" : "string" - }, - "vmid" : { - "type" : "integer", - "optional" : 1 - }, - "node" : { - "type" : "string" - }, - "id" : { - "type" : "string" - } - } - }, - "type" : "array" + "optional" : 1, + "description" : "List of storage IDs.", + "format" : "pve-storage-id-list" + }, + "vms" : { + "format" : "pve-vmid-list", + "type" : "string", + "optional" : 1, + "description" : "List of virtual machines." + }, + "delete" : { + "description" : "Remove vms/storage (instead of adding it).", + "optional" : 1, + "type" : "boolean" + }, + "poolid" : { + "format" : "pve-poolid", + "type" : "string" }, "comment" : { "type" : "string", "optional" : 1 } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ @@ -22798,41 +22842,54 @@ var pveapi = [ [ "Pool.Allocate" ] - ] + ], + "description" : "You also need the right to modify permissions on any object you add/delete." }, - "description" : "Get pool configuration." + "name" : "update_pool", + "description" : "Update pool data.", + "protected" : 1 }, "DELETE" : { + "returns" : { + "type" : "null" + }, + "method" : "DELETE", + "description" : "Delete pool.", + "protected" : 1, + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "poolid" : { + "format" : "pve-poolid", + "type" : "string" + } + } + }, + "name" : "delete_pool", "permissions" : { + "description" : "You can only delete empty pools (no members).", "check" : [ "perm", "/pool/{poolid}", [ "Pool.Allocate" ] - ], - "description" : "You can only delete empty pools (no members)." - }, - "description" : "Delete pool.", - "protected" : 1, + ] + } + }, + "GET" : { + "description" : "Get pool configuration.", + "name" : "read_pool", "parameters" : { "properties" : { "poolid" : { - "format" : "pve-poolid", - "type" : "string" + "type" : "string", + "format" : "pve-poolid" } }, "additionalProperties" : 0 }, - "returns" : { - "type" : "null" - }, - "name" : "delete_pool", - "method" : "DELETE" - }, - "PUT" : { "permissions" : { - "description" : "You also need the right to modify permissions on any object you add/delete.", "check" : [ "perm", "/pool/{poolid}", @@ -22841,145 +22898,88 @@ var pveapi = [ ] ] }, - "description" : "Update pool data.", - "protected" : 1, - "parameters" : { + "method" : "GET", + "returns" : { "properties" : { - "storage" : { - "format" : "pve-storage-id-list", - "type" : "string", - "description" : "List of storage IDs.", - "optional" : 1 - }, - "delete" : { - "type" : "boolean", - "optional" : 1, - "description" : "Remove vms/storage (instead of adding it)." - }, - "vms" : { - "description" : "List of virtual machines.", - "optional" : 1, - "format" : "pve-vmid-list", - "type" : "string" + "members" : { + "type" : "array", + "items" : { + "additionalProperties" : 1, + "type" : "object", + "properties" : { + "vmid" : { + "optional" : 1, + "type" : "integer" + }, + "storage" : { + "type" : "string", + "optional" : 1 + }, + "id" : { + "type" : "string" + }, + "node" : { + "type" : "string" + }, + "type" : { + "type" : "string", + "enum" : [ + "qemu", + "lxc", + "openvz", + "storage" + ] + } + } + } }, "comment" : { "optional" : 1, "type" : "string" - }, - "poolid" : { - "format" : "pve-poolid", - "type" : "string" } }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "null" - }, - "name" : "update_pool", - "method" : "PUT" - } - }, - "text" : "{poolid}", - "leaf" : 1 - } - ], - "path" : "/pools", - "info" : { - "GET" : { - "description" : "Pool index.", - "permissions" : { - "user" : "all", - "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/." - }, - "parameters" : { - "additionalProperties" : 0 - }, - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "poolid" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{poolid}", - "rel" : "child" - } - ] - }, - "name" : "index", - "method" : "GET" - }, - "POST" : { - "returns" : { - "type" : "null" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "poolid" : { - "type" : "string", - "format" : "pve-poolid" - }, - "comment" : { - "type" : "string", - "optional" : 1 + "additionalProperties" : 0, + "type" : "object" } } }, - "name" : "create_pool", - "method" : "POST", - "protected" : 1, - "description" : "Create new pool.", - "permissions" : { - "check" : [ - "perm", - "/pool/{poolid}", - [ - "Pool.Allocate" - ] - ] - } + "text" : "{poolid}" } - }, + ], "text" : "pools", - "leaf" : 0 + "leaf" : 0, + "path" : "/pools" }, { + "leaf" : 1, "path" : "/version", "info" : { "GET" : { - "parameters" : { - "additionalProperties" : 0 - }, "returns" : { "type" : "object", "properties" : { - "release" : { - "type" : "string" - }, "version" : { "type" : "string" }, "repoid" : { "type" : "string" + }, + "release" : { + "type" : "string" } } }, "method" : "GET", - "name" : "version", + "description" : "API version details. The result also includes the global datacenter confguration.", "permissions" : { "user" : "all" }, - "description" : "API version details. The result also includes the global datacenter confguration." + "parameters" : { + "additionalProperties" : 0 + }, + "name" : "version" } }, - "leaf" : 1, "text" : "version" } ] diff --git a/pct.1-synopsis.adoc b/pct.1-synopsis.adoc index 4b517d7..1c0a182 100644 --- a/pct.1-synopsis.adoc +++ b/pct.1-synopsis.adoc @@ -388,7 +388,8 @@ Owner group name or id. `-perms` `string` :: -File permissions to use. +File permissions to use (octal by default, prefix with '0x' for +hexadecimal). `-user` `string` :: @@ -419,7 +420,8 @@ container. `-perms` `string` :: -File permissions to use. +File permissions to use (octal by default, prefix with '0x' for +hexadecimal). `-user` `string` :: diff --git a/pvesm.1-synopsis.adoc b/pvesm.1-synopsis.adoc index f4b17cc..7c9e04f 100644 --- a/pvesm.1-synopsis.adoc +++ b/pvesm.1-synopsis.adoc @@ -109,7 +109,7 @@ Wipe throughput (cstream -t parameter value). Server IP or DNS name. -`-server[n]` `string` :: +`-server2` `string` :: Backup volfile server IP or DNS name. + @@ -384,7 +384,7 @@ Wipe throughput (cstream -t parameter value). Server IP or DNS name. -`-server[n]` `string` :: +`-server2` `string` :: Backup volfile server IP or DNS name. + diff --git a/qm.1-synopsis.adoc b/qm.1-synopsis.adoc index 8995cb4..c19292f 100644 --- a/qm.1-synopsis.adoc +++ b/qm.1-synopsis.adoc @@ -331,7 +331,7 @@ Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning -`-smbios[n]` `[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]` :: +`-smbios1` `[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]` :: Specify SMBIOS type 1 fields. @@ -958,7 +958,7 @@ running VMs. Using zero disables auto-ballooning Ignore locks - only root is allowed to use this option. -`-smbios[n]` `[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]` :: +`-smbios1` `[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]` :: Specify SMBIOS type 1 fields. diff --git a/qm.conf.5-opts.adoc b/qm.conf.5-opts.adoc index 58ab887..8f509f0 100644 --- a/qm.conf.5-opts.adoc +++ b/qm.conf.5-opts.adoc @@ -241,7 +241,7 @@ Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning -`smbios[n]`: `[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]` :: +`smbios1`: `[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]` :: Specify SMBIOS type 1 fields. -- 2.39.2