X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=api-viewer%2Fapidata.js;h=1d4f7a32e9ad3c0ce3d35d6a7506bcfa45a92208;hb=de786b48df593f1026b48d33a132f149bb893614;hp=a8916dd57e78d8fd92244d3027108505b4e58956;hpb=5d9c884c7b3f4980abbd4cbe91ea588a03266485;p=pve-docs.git diff --git a/api-viewer/apidata.js b/api-viewer/apidata.js index a8916dd..1d4f7a3 100644 --- a/api-viewer/apidata.js +++ b/api-viewer/apidata.js @@ -1,4 +1,4 @@ -var pveapi = [ +const apiSchema = [ { "children" : [ { @@ -6,6 +6,7 @@ var pveapi = [ { "info" : { "DELETE" : { + "allowtoken" : 1, "description" : "Mark replication job for removal.", "method" : "DELETE", "name" : "delete", @@ -49,6 +50,7 @@ var pveapi = [ } }, "GET" : { + "allowtoken" : 1, "description" : "Read replication job configuration.", "method" : "GET", "name" : "read", @@ -72,6 +74,7 @@ var pveapi = [ } }, "PUT" : { + "allowtoken" : 1, "description" : "Update replication job configuration.", "method" : "PUT", "name" : "update", @@ -130,12 +133,19 @@ var pveapi = [ }, "schedule" : { "default" : "*/15", - "description" : "Storage replication schedule. The format is a subset of `systemd` calender events.", + "description" : "Storage replication schedule. The format is a subset of `systemd` calendar events.", "format" : "pve-calendar-event", "maxLength" : 128, "optional" : 1, "type" : "string", "typetext" : "" + }, + "source" : { + "description" : "For internal use, to detect if the guest was stolen.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" } }, "type" : "object" @@ -162,6 +172,7 @@ var pveapi = [ ], "info" : { "GET" : { + "allowtoken" : 1, "description" : "List replication jobs.", "method" : "GET", "name" : "index", @@ -187,6 +198,7 @@ var pveapi = [ } }, "POST" : { + "allowtoken" : 1, "description" : "Create a new replication job", "method" : "POST", "name" : "create", @@ -230,13 +242,20 @@ var pveapi = [ }, "schedule" : { "default" : "*/15", - "description" : "Storage replication schedule. The format is a subset of `systemd` calender events.", + "description" : "Storage replication schedule. The format is a subset of `systemd` calendar events.", "format" : "pve-calendar-event", "maxLength" : 128, "optional" : 1, "type" : "string", "typetext" : "" }, + "source" : { + "description" : "For internal use, to detect if the guest was stolen.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "target" : { "description" : "Target node.", "format" : "pve-node", @@ -273,370 +292,24 @@ var pveapi = [ "path" : "/cluster/replication", "text" : "replication" }, - { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Corosync node list.", - "method" : "GET", - "name" : "nodes", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "node" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{node}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/cluster/config/nodes", - "text" : "nodes" - }, - { - "info" : { - "GET" : { - "description" : "Get corosync totem protocol settings.", - "method" : "GET", - "name" : "totem", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "properties" : {}, - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/cluster/config/totem", - "text" : "totem" - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/cluster/config", - "text" : "config" - }, { "children" : [ { "children" : [ { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete rule.", - "method" : "DELETE", - "name" : "delete_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Get single rule data.", - "method" : "GET", - "name" : "get_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "proxyto" : null, - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Modify rule data.", - "method" : "PUT", - "name" : "update_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "moveto" : { - "description" : "Move rule to new position . Other arguments are ignored.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 1, - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/cluster/firewall/groups/{group}/{pos}", - "text" : "{pos}" - } - ], "info" : { "DELETE" : { - "description" : "Delete security group.", + "allowtoken" : 1, + "description" : "Remove Metric server.", "method" : "DELETE", - "name" : "delete_security_group", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "id" : { + "format" : "pve-configid", + "type" : "string", + "typetext" : "" } } }, @@ -655,18 +328,17 @@ var pveapi = [ } }, "GET" : { - "description" : "List rules.", + "allowtoken" : 1, + "description" : "Read metric server configuration.", "method" : "GET", - "name" : "get_rules", + "name" : "read", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "id" : { + "format" : "pve-configid", + "type" : "string", + "typetext" : "" } } }, @@ -679,136 +351,136 @@ var pveapi = [ ] ] }, - "proxyto" : null, "returns" : { - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{pos}", - "rel" : "child" - } - ], - "type" : "array" + "type" : "object" } }, "POST" : { - "description" : "Create new rule.", + "allowtoken" : 1, + "description" : "Create a new external metric server config", "method" : "POST", - "name" : "create_rule", + "name" : "create", "parameters" : { "additionalProperties" : 0, "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", + "api-path-prefix" : { + "description" : "An API path prefix inserted between ':/' and '/api2/'. Can be useful if the InfluxDB service runs behind a reverse proxy.", "optional" : 1, "type" : "string", "typetext" : "" }, - "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.", - "format" : "pve-fw-addr-spec", + "bucket" : { + "description" : "The InfluxDB bucket/db. Only necessary when using the http v2 api.", "optional" : 1, "type" : "string", "typetext" : "" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "disable" : { + "description" : "Flag to disable the plugin.", "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "id" : { + "description" : "The ID of the entry.", + "format" : "pve-configid", "type" : "string", "typetext" : "" }, - "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.", - "format" : "pve-fw-dport-spec", + "influxdbproto" : { + "default" : "udp", + "enum" : [ + "udp", + "http", + "https" + ], "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "string" }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, + "max-body-size" : { + "default" : 25000000, + "description" : "InfluxDB max-body-size in bytes. Requests are batched up to this size.", + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - N)" }, - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "mtu" : { + "default" : 1500, + "description" : "MTU for metrics transmission over UDP", + "maximum" : 65536, + "minimum" : 512, + "optional" : 1, + "type" : "integer", + "typetext" : " (512 - 65536)" }, - "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, - "minLength" : 2, + "organization" : { + "description" : "The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.", "optional" : 1, "type" : "string", "typetext" : "" }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, + "path" : { + "description" : "root graphite path (ex: proxmox.mycluster.mykey)", + "format" : "graphite-path", "optional" : 1, "type" : "string", "typetext" : "" }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, + "port" : { + "description" : "server network port", + "maximum" : 65536, + "minimum" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - 65536)" }, "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", + "description" : "Protocol to send graphite data. TCP or UDP (default)", + "enum" : [ + "udp", + "tcp" + ], "optional" : 1, + "type" : "string" + }, + "server" : { + "description" : "server dns name or IP address", + "format" : "address", "type" : "string", "typetext" : "" }, - "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.", - "format" : "pve-fw-addr-spec", + "timeout" : { + "default" : 1, + "description" : "graphite TCP socket timeout (default=1)", + "minimum" : 0, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (0 - N)" }, - "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.", - "format" : "pve-fw-sport-spec", + "token" : { + "description" : "The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use 'user:password' instead.", "optional" : 1, "type" : "string", "typetext" : "" }, "type" : { - "description" : "Rule type.", + "description" : "Plugin type.", "enum" : [ - "in", - "out", - "group" + "graphite", + "influxdb" ], - "optional" : 0, + "format" : "pve-configid", "type" : "string" + }, + "verify-certificate" : { + "default" : 1, + "description" : "Set to 0 to disable certificate verification for https endpoints.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } - } + }, + "type" : "object" }, "permissions" : { "check" : [ @@ -820,209 +492,26 @@ var pveapi = [ ] }, "protected" : 1, - "proxyto" : null, "returns" : { "type" : "null" } - } - }, - "leaf" : 0, - "path" : "/cluster/firewall/groups/{group}", - "text" : "{group}" - } - ], - "info" : { - "GET" : { - "description" : "List security groups.", - "method" : "GET", - "name" : "list_security_groups", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{group}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create new security group.", - "method" : "POST", - "name" : "create_security_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "group" : { - "description" : "Security Group name.", - "maxLength" : 18, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "rename" : { - "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.", - "maxLength" : 18, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/cluster/firewall/groups", - "text" : "groups" - }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete rule.", - "method" : "DELETE", - "name" : "delete_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Get single rule data.", - "method" : "GET", - "name" : "get_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "proxyto" : null, - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } }, "PUT" : { - "description" : "Modify rule data.", + "allowtoken" : 1, + "description" : "Update metric server configuration.", "method" : "PUT", - "name" : "update_rule", + "name" : "update", "parameters" : { "additionalProperties" : 0, "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, + "api-path-prefix" : { + "description" : "An API path prefix inserted between ':/' and '/api2/'. Can be useful if the InfluxDB service runs behind a reverse proxy.", "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "type" : "string", + "typetext" : "" }, - "comment" : { - "description" : "Descriptive comment.", + "bucket" : { + "description" : "The InfluxDB bucket/db. Only necessary when using the http v2 api.", "optional" : 1, "type" : "string", "typetext" : "" @@ -1030,13 +519,7 @@ var pveapi = [ "delete" : { "description" : "A list of settings you want to delete.", "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", + "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" @@ -1048,82 +531,103 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "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.", - "format" : "pve-fw-dport-spec", + "disable" : { + "description" : "Flag to disable the plugin.", "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "id" : { + "description" : "The ID of the entry.", + "format" : "pve-configid", "type" : "string", "typetext" : "" }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, + "influxdbproto" : { + "default" : "udp", + "enum" : [ + "udp", + "http", + "https" + ], + "optional" : 1, + "type" : "string" + }, + "max-body-size" : { + "default" : 25000000, + "description" : "InfluxDB max-body-size in bytes. Requests are batched up to this size.", + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - N)" }, - "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, - "minLength" : 2, + "mtu" : { + "default" : 1500, + "description" : "MTU for metrics transmission over UDP", + "maximum" : 65536, + "minimum" : 512, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (512 - 65536)" }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, + "organization" : { + "description" : "The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.", "optional" : 1, "type" : "string", "typetext" : "" }, - "moveto" : { - "description" : "Move rule to new position . Other arguments are ignored.", - "minimum" : 0, + "path" : { + "description" : "root graphite path (ex: proxmox.mycluster.mykey)", + "format" : "graphite-path", "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" + "type" : "string", + "typetext" : "" }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, + "port" : { + "description" : "server network port", + "maximum" : 65536, + "minimum" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - 65536)" }, "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", + "description" : "Protocol to send graphite data. TCP or UDP (default)", + "enum" : [ + "udp", + "tcp" + ], "optional" : 1, + "type" : "string" + }, + "server" : { + "description" : "server dns name or IP address", + "format" : "address", "type" : "string", "typetext" : "" }, - "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.", - "format" : "pve-fw-addr-spec", + "timeout" : { + "default" : 1, + "description" : "graphite TCP socket timeout (default=1)", + "minimum" : 0, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (0 - N)" }, - "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.", - "format" : "pve-fw-sport-spec", + "token" : { + "description" : "The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use 'user:password' instead.", "optional" : 1, "type" : "string", "typetext" : "" }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], + "verify-certificate" : { + "default" : 1, + "description" : "Set to 0 to disable certificate verification for https endpoints.", "optional" : 1, - "type" : "string" + "type" : "boolean", + "typetext" : "" } - } + }, + "type" : "object" }, "permissions" : { "check" : [ @@ -1135,22 +639,22 @@ var pveapi = [ ] }, "protected" : 1, - "proxyto" : null, "returns" : { "type" : "null" } } }, "leaf" : 1, - "path" : "/cluster/firewall/rules/{pos}", - "text" : "{pos}" + "path" : "/cluster/metrics/server/{id}", + "text" : "{id}" } ], "info" : { "GET" : { - "description" : "List rules.", + "allowtoken" : 1, + "description" : "List configured metric servers.", "method" : "GET", - "name" : "get_rules", + "name" : "server_index", "parameters" : { "additionalProperties" : 0 }, @@ -1163,439 +667,238 @@ var pveapi = [ ] ] }, - "proxyto" : null, "returns" : { "items" : { "properties" : { - "pos" : { + "disable" : { + "description" : "Flag to disable the plugin.", + "type" : "boolean" + }, + "id" : { + "description" : "The ID of the entry.", + "type" : "string" + }, + "port" : { + "description" : "Server network port", "type" : "integer" + }, + "server" : { + "description" : "Server dns name or IP address", + "type" : "string" + }, + "type" : { + "description" : "Plugin type.", + "type" : "string" } }, "type" : "object" }, "links" : [ { - "href" : "{pos}", + "href" : "{id}", "rel" : "child" } ], "type" : "array" } + } + }, + "leaf" : 0, + "path" : "/cluster/metrics/server", + "text" : "server" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Metrics index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" }, - "POST" : { - "description" : "Create new rule.", - "method" : "POST", - "name" : "create_rule", + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/metrics", + "text" : "metrics" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Return the version of the cluster join API available on this node.", + "method" : "GET", + "name" : "join_api_version", "parameters" : { - "additionalProperties" : 0, - "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - } - } + "additionalProperties" : 0 }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] }, - "protected" : 1, - "proxyto" : null, "returns" : { - "type" : "null" + "description" : "Cluster Join API version, currently 1", + "minimum" : 0, + "type" : "integer" } } }, - "leaf" : 0, - "path" : "/cluster/firewall/rules", - "text" : "rules" + "leaf" : 1, + "path" : "/cluster/config/apiversion", + "text" : "apiversion" }, { "children" : [ { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Remove IP or Network from IPSet.", - "method" : "DELETE", - "name" : "remove_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Removes a node from the cluster configuration.", + "method" : "DELETE", + "name" : "delnode", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Adds a node to the cluster configuration. This call is for internal use.", + "method" : "POST", + "name" : "addnode", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "apiversion" : { + "description" : "The JOIN_API_VERSION of the new node.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "force" : { + "description" : "Do not throw error if node already exists.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "link[n]" : { + "description" : "Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)", + "format" : { + "address" : { + "default_key" : 1, + "description" : "Hostname (or IP) of this corosync link address.", + "format" : "address", + "format_description" : "IP", + "type" : "string" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "priority" : { + "default" : 0, + "description" : "The priority for the link when knet is used in 'passive' mode (default). Lower value means higher priority. Only valid for cluster create, ignored on node add.", + "maximum" : 255, + "minimum" : 0, "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "type" : "integer" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[address=] [,priority=]" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "new_node_ip" : { + "description" : "IP Address of node to add. Used as fallback if no links are given.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read IP or Network settings from IPSet.", - "method" : "GET", - "name" : "read_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update IP or Network settings", - "method" : "PUT", - "name" : "update_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } - } + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/cluster/firewall/ipset/{name}/{cidr}", - "text" : "{cidr}" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete IPSet", - "method" : "DELETE", - "name" : "delete_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "votes" : { + "description" : "Number of votes for this node", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, "protected" : 1, "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "List IPSet content", - "method" : "GET", - "name" : "get_ipset", - "parameters" : { - "additionalProperties" : 0, "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "corosync_authkey" : { "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{cidr}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Add IP or Network to IPSet.", - "method" : "POST", - "name" : "create_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "corosync_conf" : { "type" : "string" }, - "nomatch" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "warnings" : { + "items" : { + "type" : "string" + }, + "type" : "array" } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" + }, + "type" : "object" } } }, - "leaf" : 0, - "path" : "/cluster/firewall/ipset/{name}", - "text" : "{name}" + "leaf" : 1, + "path" : "/cluster/config/nodes/{node}", + "text" : "{node}" } ], "info" : { "GET" : { - "description" : "List IPSets", + "allowtoken" : 1, + "description" : "Corosync node list.", "method" : "GET", - "name" : "ipset_index", + "name" : "nodes", "parameters" : { "additionalProperties" : 0 }, @@ -1611,21 +914,7 @@ var pveapi = [ "returns" : { "items" : { "properties" : { - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "node" : { "type" : "string" } }, @@ -1633,46 +922,35 @@ var pveapi = [ }, "links" : [ { - "href" : "{name}", + "href" : "{node}", "rel" : "child" } ], "type" : "array" } - }, - "POST" : { - "description" : "Create new IPSet", - "method" : "POST", - "name" : "create_ipset", + } + }, + "leaf" : 0, + "path" : "/cluster/config/nodes", + "text" : "nodes" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get information needed to join this cluster over the connected node.", + "method" : "GET", + "name" : "join_info", "parameters" : { "additionalProperties" : 0, "properties" : { - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "node" : { + "default" : "current connected node", + "description" : "The node for which the joinee gets the nodeinfo. ", + "format" : "pve-node", "optional" : 1, "type" : "string", "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "rename" : { - "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, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" } } }, @@ -1681,157 +959,169 @@ var pveapi = [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] }, - "protected" : 1, "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/cluster/firewall/ipset", - "text" : "ipset" - }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Remove IP or Network alias.", - "method" : "DELETE", - "name" : "remove_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" + "additionalProperties" : 0, + "properties" : { + "config_digest" : { + "type" : "string" + }, + "nodelist" : { + "items" : { + "additionalProperties" : 1, + "properties" : { + "name" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string" + }, + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "pve_addr" : { + "format" : "ip", + "type" : "string" + }, + "pve_fp" : { + "description" : "Certificate SHA 256 fingerprint.", + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" + }, + "quorum_votes" : { + "minimum" : 0, + "type" : "integer" + }, + "ring0_addr" : { + "description" : "Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)", + "format" : { + "address" : { + "default_key" : 1, + "description" : "Hostname (or IP) of this corosync link address.", + "format" : "address", + "format_description" : "IP", + "type" : "string" + }, + "priority" : { + "default" : 0, + "description" : "The priority for the link when knet is used in 'passive' mode (default). Lower value means higher priority. Only valid for cluster create, ignored on node add.", + "maximum" : 255, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + } + }, + "optional" : 1, + "type" : "string" + } }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } + "type" : "object" + }, + "type" : "array" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "preferred_node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string" }, - "protected" : 1, - "returns" : { - "type" : "null" + "totem" : { + "type" : "object" } }, - "GET" : { - "description" : "Read alias.", - "method" : "GET", - "name" : "read_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } + "type" : "object" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Joins this node into an existing cluster. If no links are given, default to IP resolved by node's hostname on single link (fallback fails for clusters with multiple links).", + "method" : "POST", + "name" : "join", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + "force" : { + "description" : "Do not throw error if node already exists.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update IP or Network alias.", - "method" : "PUT", - "name" : "update_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "hostname" : { + "description" : "Hostname (or IP) of an existing cluster member.", + "type" : "string", + "typetext" : "" + }, + "link[n]" : { + "description" : "Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)", + "format" : { + "address" : { + "default_key" : 1, + "description" : "Hostname (or IP) of this corosync link address.", + "format" : "address", + "format_description" : "IP", "type" : "string" }, - "rename" : { - "description" : "Rename an existing alias.", - "maxLength" : 64, - "minLength" : 2, + "priority" : { + "default" : 0, + "description" : "The priority for the link when knet is used in 'passive' mode (default). Lower value means higher priority. Only valid for cluster create, ignored on node add.", + "maximum" : 255, + "minimum" : 0, "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "type" : "integer" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[address=] [,priority=]" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "protected" : 1, - "returns" : { - "type" : "null" + "password" : { + "description" : "Superuser (root) password of peer node.", + "maxLength" : 128, + "type" : "string", + "typetext" : "" + }, + "votes" : { + "description" : "Number of votes for this node", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, - "leaf" : 1, - "path" : "/cluster/firewall/aliases/{name}", - "text" : "{name}" + "protected" : 1, + "returns" : { + "type" : "string" + } } - ], + }, + "leaf" : 1, + "path" : "/cluster/config/join", + "text" : "join" + }, + { "info" : { "GET" : { - "description" : "List aliases", + "allowtoken" : 1, + "description" : "Get corosync totem protocol settings.", "method" : "GET", - "name" : "get_aliases", + "name" : "totem", "parameters" : { "additionalProperties" : 0 }, @@ -1845,255 +1135,24 @@ var pveapi = [ ] }, "returns" : { - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "name" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create IP or Network Alias.", - "method" : "POST", - "name" : "create_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/cluster/firewall/aliases", - "text" : "aliases" - }, - { - "info" : { - "GET" : { - "description" : "Get Firewall options.", - "method" : "GET", - "name" : "get_options", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "properties" : { - "enable" : { - "description" : "Enable or disable the firewall cluster wide.", - "minimum" : 0, - "optional" : 1, - "type" : "integer" - }, - "policy_in" : { - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - }, - "policy_out" : { - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - } - }, "type" : "object" } - }, - "PUT" : { - "description" : "Set Firewall options.", - "method" : "PUT", - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "enable" : { - "description" : "Enable or disable the firewall cluster wide.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "policy_in" : { - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - }, - "policy_out" : { - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } } }, "leaf" : 1, - "path" : "/cluster/firewall/options", - "text" : "options" + "path" : "/cluster/config/totem", + "text" : "totem" }, { "info" : { "GET" : { - "description" : "List available macros", + "allowtoken" : 1, + "description" : "Get QDevice status", "method" : "GET", - "name" : "get_macros", + "name" : "status", "parameters" : { "additionalProperties" : 0 }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : { - "descr" : { - "description" : "More verbose description (if available).", - "type" : "string" - }, - "macro" : { - "description" : "Macro name.", - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/cluster/firewall/macros", - "text" : "macros" - }, - { - "info" : { - "GET" : { - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "method" : "GET", - "name" : "refs", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "description" : "Only list references of specified type.", - "enum" : [ - "alias", - "ipset" - ], - "optional" : 1, - "type" : "string" - } - } - }, "permissions" : { "check" : [ "perm", @@ -2103,40 +1162,20 @@ var pveapi = [ ] ] }, + "protected" : 1, "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "ref" : { - "type" : "string" - }, - "type" : { - "enum" : [ - "alias", - "ipset" - ], - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" + "type" : "object" } } }, "leaf" : 1, - "path" : "/cluster/firewall/refs", - "text" : "refs" + "path" : "/cluster/config/qdevice", + "text" : "qdevice" } ], "info" : { "GET" : { + "allowtoken" : 1, "description" : "Directory index.", "method" : "GET", "name" : "index", @@ -2144,7 +1183,13 @@ var pveapi = [ "additionalProperties" : 0 }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] }, "returns" : { "items" : { @@ -2159,587 +1204,70 @@ var pveapi = [ ], "type" : "array" } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Generate new cluster configuration. If no links given, default to local IP address as link0.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "clustername" : { + "description" : "The name of the cluster.", + "format" : "pve-node", + "maxLength" : 15, + "type" : "string", + "typetext" : "" + }, + "link[n]" : { + "description" : "Address and priority information of a single corosync link. (up to 8 links supported; link0..link7)", + "format" : { + "address" : { + "default_key" : 1, + "description" : "Hostname (or IP) of this corosync link address.", + "format" : "address", + "format_description" : "IP", + "type" : "string" + }, + "priority" : { + "default" : 0, + "description" : "The priority for the link when knet is used in 'passive' mode (default). Lower value means higher priority. Only valid for cluster create, ignored on node add.", + "maximum" : 255, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[address=] [,priority=]" + }, + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "votes" : { + "description" : "Number of votes for this node.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "protected" : 1, + "returns" : { + "type" : "string" + } } }, "leaf" : 0, - "path" : "/cluster/firewall", - "text" : "firewall" - }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete vzdump backup job definition.", - "method" : "DELETE", - "name" : "delete_job", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "The job ID.", - "maxLength" : 50, - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read vzdump backup job definition.", - "method" : "GET", - "name" : "read_job", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "The job ID.", - "maxLength" : 50, - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update vzdump backup job definition.", - "method" : "PUT", - "name" : "update_job", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "all" : { - "default" : 0, - "description" : "Backup all known guest systems on this host.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "bwlimit" : { - "default" : 0, - "description" : "Limit I/O bandwidth (KBytes per second).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "compress" : { - "default" : "0", - "description" : "Compress dump file.", - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "optional" : 1, - "type" : "string" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dow" : { - "description" : "Day of week selection.", - "format" : "pve-day-of-week-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dumpdir" : { - "description" : "Store resulting files to specified directory.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enabled" : { - "default" : "1", - "description" : "Enable or disable the job.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "exclude" : { - "description" : "Exclude specified guest systems (assumes --all)", - "format" : "pve-vmid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "exclude-path" : { - "description" : "Exclude certain files/directories (shell globs).", - "format" : "string-alist", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "id" : { - "description" : "The job ID.", - "maxLength" : 50, - "type" : "string", - "typetext" : "" - }, - "ionice" : { - "default" : 7, - "description" : "Set CFQ ionice priority.", - "maximum" : 8, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 8)" - }, - "lockwait" : { - "default" : 180, - "description" : "Maximal time to wait for the global lock (minutes).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "mailnotification" : { - "default" : "always", - "description" : "Specify when to send an email", - "enum" : [ - "always", - "failure" - ], - "optional" : 1, - "type" : "string" - }, - "mailto" : { - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "format" : "string-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "maxfiles" : { - "default" : 1, - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "mode" : { - "default" : "snapshot", - "description" : "Backup mode.", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "Only run if executed on this node.", - "format" : "pve-node", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "pigz" : { - "default" : 0, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", - "optional" : 1, - "type" : "integer", - "typetext" : "" - }, - "quiet" : { - "default" : 0, - "description" : "Be quiet.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "remove" : { - "default" : 1, - "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "script" : { - "description" : "Use specified hook script.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "size" : { - "default" : 1024, - "description" : "Unused, will be removed in a future release.", - "minimum" : 500, - "optional" : 1, - "type" : "integer", - "typetext" : " (500 - N)" - }, - "starttime" : { - "description" : "Job Start time.", - "pattern" : "\\d{1,2}:\\d{1,2}", - "type" : "string", - "typetext" : "HH:MM" - }, - "stdexcludes" : { - "default" : 1, - "description" : "Exclude temporary files and logs.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stop" : { - "default" : 0, - "description" : "Stop runnig backup jobs on this host.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stopwait" : { - "default" : 10, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "storage" : { - "description" : "Store resulting file to this storage.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "tmpdir" : { - "description" : "Store temporary files to specified directory.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The ID of the guest system you want to backup.", - "format" : "pve-vmid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/cluster/backup/{id}", - "text" : "{id}" - } - ], - "info" : { - "GET" : { - "description" : "List vzdump backup schedule.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create new vzdump backup job.", - "method" : "POST", - "name" : "create_job", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "all" : { - "default" : 0, - "description" : "Backup all known guest systems on this host.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "bwlimit" : { - "default" : 0, - "description" : "Limit I/O bandwidth (KBytes per second).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "compress" : { - "default" : "0", - "description" : "Compress dump file.", - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "optional" : 1, - "type" : "string" - }, - "dow" : { - "default" : "mon,tue,wed,thu,fri,sat,sun", - "description" : "Day of week selection.", - "format" : "pve-day-of-week-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dumpdir" : { - "description" : "Store resulting files to specified directory.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enabled" : { - "default" : "1", - "description" : "Enable or disable the job.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "exclude" : { - "description" : "Exclude specified guest systems (assumes --all)", - "format" : "pve-vmid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "exclude-path" : { - "description" : "Exclude certain files/directories (shell globs).", - "format" : "string-alist", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ionice" : { - "default" : 7, - "description" : "Set CFQ ionice priority.", - "maximum" : 8, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 8)" - }, - "lockwait" : { - "default" : 180, - "description" : "Maximal time to wait for the global lock (minutes).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "mailnotification" : { - "default" : "always", - "description" : "Specify when to send an email", - "enum" : [ - "always", - "failure" - ], - "optional" : 1, - "type" : "string" - }, - "mailto" : { - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "format" : "string-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "maxfiles" : { - "default" : 1, - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "mode" : { - "default" : "snapshot", - "description" : "Backup mode.", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "Only run if executed on this node.", - "format" : "pve-node", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "pigz" : { - "default" : 0, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", - "optional" : 1, - "type" : "integer", - "typetext" : "" - }, - "quiet" : { - "default" : 0, - "description" : "Be quiet.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "remove" : { - "default" : 1, - "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "script" : { - "description" : "Use specified hook script.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "size" : { - "default" : 1024, - "description" : "Unused, will be removed in a future release.", - "minimum" : 500, - "optional" : 1, - "type" : "integer", - "typetext" : " (500 - N)" - }, - "starttime" : { - "description" : "Job Start time.", - "pattern" : "\\d{1,2}:\\d{1,2}", - "type" : "string", - "typetext" : "HH:MM" - }, - "stdexcludes" : { - "default" : 1, - "description" : "Exclude temporary files and logs.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stop" : { - "default" : 0, - "description" : "Stop runnig backup jobs on this host.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stopwait" : { - "default" : 10, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "storage" : { - "description" : "Store resulting file to this storage.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "tmpdir" : { - "description" : "Store temporary files to specified directory.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The ID of the guest system you want to backup.", - "format" : "pve-vmid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ], - "description" : "The 'tmpdir', 'dumpdir' and 'script' parameters are additionally restricted to the 'root@pam' user." - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/cluster/backup", - "text" : "backup" + "path" : "/cluster/config", + "text" : "config" }, { "children" : [ @@ -2749,24 +1277,34 @@ var pveapi = [ "children" : [ { "info" : { - "POST" : { - "description" : "Request resource migration (online) to another node.", - "method" : "POST", - "name" : "migrate", + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete rule.", + "method" : "DELETE", + "name" : "delete_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "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", "typetext" : "" }, - "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).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string", - "typetext" : ":" + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, @@ -2775,40 +1313,37 @@ var pveapi = [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, + "proxyto" : null, "returns" : { "type" : "null" } - } - }, - "leaf" : 1, - "path" : "/cluster/ha/resources/{sid}/migrate", - "text" : "migrate" - }, - { - "info" : { - "POST" : { - "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.", - "method" : "POST", - "name" : "relocate", + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get single rule data.", + "method" : "GET", + "name" : "get_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" }, - "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).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string", - "typetext" : ":" + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, @@ -2817,34 +1352,274 @@ var pveapi = [ "perm", "/", [ - "Sys.Console" + "Sys.Audit" ] ] }, - "protected" : 1, + "proxyto" : null, "returns" : { - "type" : "null" + "properties" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "icmp-type" : { + "optional" : 1, + "type" : "string" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "log" : { + "description" : "Log level for firewall rule", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "optional" : 1, + "type" : "string" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" } - } - }, - "leaf" : 1, - "path" : "/cluster/ha/resources/{sid}/relocate", - "text" : "relocate" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete resource configuration.", + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Modify rule data.", + "method" : "PUT", + "name" : "update_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "moveto" : { + "description" : "Move rule to new position . Other arguments are ignored.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/firewall/groups/{group}/{pos}", + "text" : "{pos}" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete security group.", "method" : "DELETE", - "name" : "delete", + "name" : "delete_security_group", "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).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string", - "typetext" : ":" + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" } } }, @@ -2853,7 +1628,7 @@ var pveapi = [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, @@ -2863,17 +1638,19 @@ var pveapi = [ } }, "GET" : { - "description" : "Read resource configuration.", + "allowtoken" : 1, + "description" : "List rules.", "method" : "GET", - "name" : "read", + "name" : "get_rules", "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).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string", - "typetext" : ":" + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" } } }, @@ -2886,26 +1663,51 @@ var pveapi = [ ] ] }, - "returns" : {} + "proxyto" : null, + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "type" : "array" + } }, - "PUT" : { - "description" : "Update resource configuration.", - "method" : "PUT", - "name" : "update", + "POST" : { + "allowtoken" : 1, + "description" : "Create new rule.", + "method" : "POST", + "name" : "create_rule", "parameters" : { "additionalProperties" : 0, "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, "comment" : { - "description" : "Description.", - "maxLength" : 4096, + "description" : "Descriptive comment.", "optional" : 1, "type" : "string", "typetext" : "" }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "maxLength" : 4096, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, "optional" : 1, "type" : "string", "typetext" : "" @@ -2917,103 +1719,158 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", + "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.", + "format" : "pve-fw-dport-spec", "optional" : 1, "type" : "string", "typetext" : "" }, - "max_relocate" : { - "default" : 1, - "description" : "Maximal number of service relocate tries when a service failes to start.", + "enable" : { + "description" : "Flag to enable/disable a rule.", "minimum" : 0, "optional" : 1, "type" : "integer", "typetext" : " (0 - N)" }, - "max_restart" : { - "default" : 1, - "description" : "Maximal number of tries to restart the service on a node after its start failed.", + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", "minimum" : 0, "optional" : 1, "type" : "integer", "typetext" : " (0 - N)" }, - "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).", - "format" : "pve-ha-resource-or-vm-id", + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, "type" : "string", - "typetext" : ":" + "typetext" : "" }, - "state" : { - "default" : "started", - "description" : "Requested resource state.", - "enum" : [ - "started", - "stopped", - "enabled", - "disabled" - ], + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", "optional" : 1, "type" : "string", - "verbose_description" : "Requested resource state. The CRM reads this state and acts accordingly.\nPlease note that `enabled` is just an alias for `started`.\n\n`started`;;\n\nThe CRM tries to start the resource. Service state is\nset to `started` after successful start. On node failures, or when start\nfails, it tries to recover the resource. If everything fails, service\nstate it set to `error`.\n\n`stopped`;;\n\nThe CRM tries to keep the resource in `stopped` state, but it\nstill tries to relocate the resources on node failures.\n\n`disabled`;;\n\nThe CRM tries to put the resource in `stopped` state, but does not try\nto relocate the resources on node failures. The main purpose of this\nstate is error recovery, because it is the only way to move a resource out\nof the `error` state.\n\n" + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 0, + "type" : "string" } - }, - "type" : "object" + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, + "proxyto" : null, "returns" : { "type" : "null" } } }, "leaf" : 0, - "path" : "/cluster/ha/resources/{sid}", - "text" : "{sid}" + "path" : "/cluster/firewall/groups/{group}", + "text" : "{group}" } ], "info" : { "GET" : { - "description" : "List HA resources.", + "allowtoken" : 1, + "description" : "List security groups.", "method" : "GET", - "name" : "index", + "name" : "list_security_groups", "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "description" : "Only list resources of specific type", - "enum" : [ - "ct", - "vm" - ], - "optional" : 1, - "type" : "string" - } - } + "additionalProperties" : 0 }, "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + "user" : "all" }, "returns" : { "items" : { "properties" : { - "sid" : { + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "type" : "string" } }, @@ -3021,7 +1878,7 @@ var pveapi = [ }, "links" : [ { - "href" : "{sid}", + "href" : "{group}", "rel" : "child" } ], @@ -3029,79 +1886,48 @@ var pveapi = [ } }, "POST" : { - "description" : "Create a new HA resource.", + "allowtoken" : 1, + "description" : "Create new security group.", "method" : "POST", - "name" : "create", + "name" : "create_security_group", "parameters" : { "additionalProperties" : 0, "properties" : { "comment" : { - "description" : "Description.", - "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" }, - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", + "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", "typetext" : "" }, - "max_relocate" : { - "default" : 1, - "description" : "Maximal number of service relocate tries when a service failes to start.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "max_restart" : { - "default" : 1, - "description" : "Maximal number of tries to restart the service on a node after its start failed.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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).", - "format" : "pve-ha-resource-or-vm-id", - "type" : "string", - "typetext" : ":" - }, - "state" : { - "default" : "started", - "description" : "Requested resource state.", - "enum" : [ - "started", - "stopped", - "enabled", - "disabled" - ], - "optional" : 1, - "type" : "string", - "verbose_description" : "Requested resource state. The CRM reads this state and acts accordingly.\nPlease note that `enabled` is just an alias for `started`.\n\n`started`;;\n\nThe CRM tries to start the resource. Service state is\nset to `started` after successful start. On node failures, or when start\nfails, it tries to recover the resource. If everything fails, service\nstate it set to `error`.\n\n`stopped`;;\n\nThe CRM tries to keep the resource in `stopped` state, but it\nstill tries to relocate the resources on node failures.\n\n`disabled`;;\n\nThe CRM tries to put the resource in `stopped` state, but does not try\nto relocate the resources on node failures. The main purpose of this\nstate is error recovery, because it is the only way to move a resource out\nof the `error` state.\n\n" + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" }, - "type" : { - "description" : "Resource type.", - "enum" : [ - "ct", - "vm" - ], + "rename" : { + "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.", + "maxLength" : 18, + "minLength" : 2, "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "type" : "string" } - }, - "type" : "object" + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, @@ -3112,25 +1938,34 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/cluster/ha/resources", - "text" : "resources" + "path" : "/cluster/firewall/groups", + "text" : "groups" }, { "children" : [ { "info" : { "DELETE" : { - "description" : "Delete ha group configuration.", + "allowtoken" : 1, + "description" : "Delete rule.", "method" : "DELETE", - "name" : "delete", + "name" : "delete_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", + "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", "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, @@ -3139,27 +1974,30 @@ var pveapi = [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, + "proxyto" : null, "returns" : { "type" : "null" } }, "GET" : { - "description" : "Read ha group configuration.", + "allowtoken" : 1, + "description" : "Get single rule data.", "method" : "GET", - "name" : "read", + "name" : "get_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", - "type" : "string", - "typetext" : "" + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, @@ -3172,26 +2010,115 @@ var pveapi = [ ] ] }, - "returns" : {} - }, - "PUT" : { - "description" : "Update ha group configuration.", - "method" : "PUT", - "name" : "update", - "parameters" : { - "additionalProperties" : 0, + "proxyto" : null, + "returns" : { "properties" : { + "action" : { + "type" : "string" + }, "comment" : { - "description" : "Description.", - "maxLength" : 4096, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "string" }, - "delete" : { - "description" : "A list of settings you want to delete.", + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "icmp-type" : { + "optional" : 1, + "type" : "string" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "log" : { + "description" : "Log level for firewall rule", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "optional" : 1, + "type" : "string" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Modify rule data.", + "method" : "PUT", + "name" : "update_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", "format" : "pve-configid-list", - "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, "optional" : 1, "type" : "string", "typetext" : "" @@ -3203,63 +2130,134 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, "type" : "string", "typetext" : "" }, - "nodes" : { - "description" : "List of cluster node names with optional priority.", - "format" : "pve-ha-group-node-list", + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", "optional" : 1, "type" : "string", - "typetext" : "[:]{,[:]}*", - "verbose_description" : "List of cluster node members, where a priority can be given to each node. A resource bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only." + "typetext" : "" }, - "nofailback" : { - "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.", + "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, + "minLength" : 2, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string", + "typetext" : "" }, - "restricted" : { - "default" : 0, - "description" : "Resources bound to restricted groups may only run on nodes defined by the group.", + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], "optional" : 1, - "type" : "boolean", - "typetext" : "", - "verbose_description" : "Resources bound to restricted groups may only run on nodes defined by the group. The resource will be placed in the stopped state if no group node member is online. Resources on unrestricted groups may run on any cluster node 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 only one member." + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "moveto" : { + "description" : "Move rule to new position . Other arguments are ignored.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" } - }, - "type" : "object" + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, + "proxyto" : null, "returns" : { "type" : "null" } } }, "leaf" : 1, - "path" : "/cluster/ha/groups/{group}", - "text" : "{group}" + "path" : "/cluster/firewall/rules/{pos}", + "text" : "{pos}" } ], "info" : { "GET" : { - "description" : "Get HA groups.", + "allowtoken" : 1, + "description" : "List rules.", "method" : "GET", - "name" : "index", + "name" : "get_rules", "parameters" : { "additionalProperties" : 0 }, @@ -3272,18 +2270,19 @@ var pveapi = [ ] ] }, + "proxyto" : null, "returns" : { "items" : { "properties" : { - "group" : { - "type" : "string" + "pos" : { + "type" : "integer" } }, "type" : "object" }, "links" : [ { - "href" : "{group}", + "href" : "{pos}", "rel" : "child" } ], @@ -3291,115 +2290,351 @@ var pveapi = [ } }, "POST" : { - "description" : "Create a new HA group.", + "allowtoken" : 1, + "description" : "Create new rule.", "method" : "POST", - "name" : "create", + "name" : "create_rule", "parameters" : { "additionalProperties" : 0, "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, "comment" : { - "description" : "Description.", - "maxLength" : 4096, + "description" : "Descriptive comment.", "optional" : 1, "type" : "string", "typetext" : "" }, - "group" : { - "description" : "The HA group identifier.", - "format" : "pve-configid", + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, "type" : "string", "typetext" : "" }, - "nodes" : { - "description" : "List of cluster node names with optional priority.", - "format" : "pve-ha-group-node-list", - "optional" : 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", - "typetext" : "[:]{,[:]}*", - "verbose_description" : "List of cluster node members, where a priority can be given to each node. A resource bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only." + "typetext" : "" }, - "nofailback" : { - "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.", + "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.", + "format" : "pve-fw-dport-spec", "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string", + "typetext" : "" }, - "restricted" : { - "default" : 0, - "description" : "Resources bound to restricted groups may only run on nodes defined by the group.", + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, "optional" : 1, - "type" : "boolean", - "typetext" : "", - "verbose_description" : "Resources bound to restricted groups may only run on nodes defined by the group. The resource will be placed in the stopped state if no group node member is online. Resources on unrestricted groups may run on any cluster node 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 only one member." + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" }, "type" : { - "description" : "Group type.", + "description" : "Rule type.", "enum" : [ + "in", + "out", "group" ], - "optional" : 1, + "optional" : 0, "type" : "string" } - }, - "type" : "object" + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, + "proxyto" : null, "returns" : { "type" : "null" } } }, "leaf" : 0, - "path" : "/cluster/ha/groups", - "text" : "groups" + "path" : "/cluster/firewall/rules", + "text" : "rules" }, { "children" : [ { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove IP or Network from IPSet.", + "method" : "DELETE", + "name" : "remove_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read IP or Network settings from IPSet.", + "method" : "GET", + "name" : "read_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update IP or Network settings", + "method" : "PUT", + "name" : "update_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/firewall/ipset/{name}/{cidr}", + "text" : "{cidr}" + } + ], "info" : { - "GET" : { - "description" : "Get HA manger status.", - "method" : "GET", - "name" : "status", + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete IPSet", + "method" : "DELETE", + "name" : "delete_ipset", "parameters" : { - "additionalProperties" : 0 + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] }, + "protected" : 1, "returns" : { - "type" : "array" + "type" : "null" } - } - }, - "leaf" : 1, - "path" : "/cluster/ha/status/current", - "text" : "current" - }, - { - "info" : { + }, "GET" : { - "description" : "Get full HA manger status, including LRM status.", + "allowtoken" : 1, + "description" : "List IPSet content", "method" : "GET", - "name" : "manager_status", + "name" : "get_ipset", "parameters" : { - "additionalProperties" : 0 + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } }, "permissions" : { "check" : [ @@ -3411,29 +2646,129 @@ var pveapi = [ ] }, "returns" : { - "type" : "object" + "items" : { + "properties" : { + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{cidr}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Add IP or Network to IPSet.", + "method" : "POST", + "name" : "create_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" } } }, - "leaf" : 1, - "path" : "/cluster/ha/status/manager_status", - "text" : "manager_status" + "leaf" : 0, + "path" : "/cluster/firewall/ipset/{name}", + "text" : "{name}" } ], "info" : { "GET" : { - "description" : "Directory index.", + "allowtoken" : 1, + "description" : "List IPSets", "method" : "GET", - "name" : "index", + "name" : "ipset_index", "parameters" : { "additionalProperties" : 0 }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] }, "returns" : { "items" : { - "properties" : {}, + "properties" : { + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + }, "type" : "object" }, "links" : [ @@ -3444,2314 +2779,11925 @@ var pveapi = [ ], "type" : "array" } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new IPSet", + "method" : "POST", + "name" : "create_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "rename" : { + "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, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } } }, "leaf" : 0, - "path" : "/cluster/ha/status", - "text" : "status" - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "string" + "path" : "/cluster/firewall/ipset", + "text" : "ipset" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove IP or Network alias.", + "method" : "DELETE", + "name" : "remove_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read alias.", + "method" : "GET", + "name" : "read_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update IP or Network alias.", + "method" : "PUT", + "name" : "update_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "rename" : { + "description" : "Rename an existing alias.", + "maxLength" : 64, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "type" : "object" - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/cluster/ha", - "text" : "ha" - }, - { - "info" : { - "GET" : { - "description" : "Read cluster log", - "method" : "GET", - "name" : "log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "max" : { - "description" : "Maximum number of entries.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + "leaf" : 1, + "path" : "/cluster/firewall/aliases/{name}", + "text" : "{name}" } - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/cluster/log", - "text" : "log" - }, - { - "info" : { - "GET" : { - "description" : "Resources index (cluster wide).", - "method" : "GET", - "name" : "resources", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "enum" : [ - "vm", - "storage", - "node" + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List aliases", + "method" : "GET", + "name" : "get_aliases", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } ], - "optional" : 1, - "type" : "string" + "type" : "array" } - } - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/cluster/resources", - "text" : "resources" - }, - { - "info" : { - "GET" : { - "description" : "List recent tasks (cluster wide).", - "method" : "GET", - "name" : "tasks", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : { - "upid" : { - "type" : "string" + "POST" : { + "allowtoken" : 1, + "description" : "Create IP or Network Alias.", + "method" : "POST", + "name" : "create_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } } }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/cluster/tasks", - "text" : "tasks" - }, - { - "info" : { - "GET" : { - "description" : "Get datacenter options.", - "method" : "GET", - "name" : "get_options", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } }, - "returns" : { - "properties" : {}, - "type" : "object" - } + "leaf" : 0, + "path" : "/cluster/firewall/aliases", + "text" : "aliases" }, - "PUT" : { - "description" : "Set datacenter options.", - "method" : "PUT", - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "console" : { - "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).", - "enum" : [ - "applet", - "vv", - "html5" - ], - "optional" : 1, - "type" : "string" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "email_from" : { - "description" : "Specify email address to send notification from (default is root@$hostname)", - "format" : "email-opt", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "fencing" : { - "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", - "enum" : [ - "watchdog", - "hardware", - "both" - ], - "optional" : 1, - "type" : "string" + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get Firewall options.", + "method" : "GET", + "name" : "get_options", + "parameters" : { + "additionalProperties" : 0 }, - "http_proxy" : { - "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')", - "optional" : 1, - "pattern" : "http://.*", - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] }, - "keyboard" : { - "description" : "Default keybord layout for vnc server.", - "enum" : [ - "de", - "de-ch", - "da", - "en-gb", - "en-us", - "es", - "fi", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "hu", - "is", - "it", - "ja", - "lt", - "mk", - "nl", - "no", - "pl", - "pt", - "pt-br", - "sv", - "sl", - "tr" - ], - "optional" : 1, - "type" : "string" + "returns" : { + "properties" : { + "ebtables" : { + "default" : 1, + "description" : "Enable ebtables rules cluster wide.", + "optional" : 1, + "type" : "boolean" + }, + "enable" : { + "description" : "Enable or disable the firewall cluster wide.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "log_ratelimit" : { + "description" : "Log ratelimiting settings", + "format" : { + "burst" : { + "default" : 5, + "description" : "Initial burst of packages which will always get logged before the rate is applied", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "enable" : { + "default" : "1", + "default_key" : 1, + "description" : "Enable or disable log rate limiting", + "type" : "boolean" + }, + "rate" : { + "default" : "1/second", + "description" : "Frequency with which the burst bucket gets refilled", + "format_description" : "rate", + "optional" : 1, + "pattern" : "[1-9][0-9]*\\/(second|minute|hour|day)", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set Firewall options.", + "method" : "PUT", + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "ebtables" : { + "default" : 1, + "description" : "Enable ebtables rules cluster wide.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "enable" : { + "description" : "Enable or disable the firewall cluster wide.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "log_ratelimit" : { + "description" : "Log ratelimiting settings", + "format" : { + "burst" : { + "default" : 5, + "description" : "Initial burst of packages which will always get logged before the rate is applied", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "enable" : { + "default" : "1", + "default_key" : 1, + "description" : "Enable or disable log rate limiting", + "type" : "boolean" + }, + "rate" : { + "default" : "1/second", + "description" : "Frequency with which the burst bucket gets refilled", + "format_description" : "rate", + "optional" : 1, + "pattern" : "[1-9][0-9]*\\/(second|minute|hour|day)", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[enable=]<1|0> [,burst=] [,rate=]" + }, + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + } + } }, - "language" : { - "description" : "Default GUI language.", - "enum" : [ - "en", - "de" - ], - "optional" : 1, - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] }, - "mac_prefix" : { - "description" : "Prefix for autogenerated MAC addresses.", - "optional" : 1, - "pattern" : "(?^i:[a-f0-9]{2}(?::[a-f0-9]{2}){0,2}:?)", - "type" : "string" + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/firewall/options", + "text" : "options" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List available macros", + "method" : "GET", + "name" : "get_macros", + "parameters" : { + "additionalProperties" : 0 }, - "max_workers" : { - "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "permissions" : { + "user" : "all" }, - "migration" : { - "description" : "For cluster wide migration settings.", - "format" : { - "network" : { - "description" : "CIDR of the (sub) network that is used for migration.", - "format" : "CIDR", - "format_description" : "CIDR", - "optional" : 1, - "type" : "string" + "returns" : { + "items" : { + "properties" : { + "descr" : { + "description" : "More verbose description (if available).", + "type" : "string" + }, + "macro" : { + "description" : "Macro name.", + "type" : "string" + } }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/firewall/macros", + "text" : "macros" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", + "method" : "GET", + "name" : "refs", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "type" : { - "default" : "secure", - "default_key" : 1, - "description" : "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.", + "description" : "Only list references of specified type.", "enum" : [ - "secure", - "insecure" + "alias", + "ipset" ], + "optional" : 1, "type" : "string" } - }, - "optional" : 1, - "type" : "string", - "typetext" : "[type=] [,network=]" + } }, - "migration_unsecure" : { - "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration. Deprecated, use the 'migration' property instead!", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "ref" : { + "type" : "string" + }, + "type" : { + "enum" : [ + "alias", + "ipset" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } + "leaf" : 1, + "path" : "/cluster/firewall/refs", + "text" : "refs" } - }, - "leaf" : 1, - "path" : "/cluster/options", - "text" : "options" - }, - { + ], "info" : { "GET" : { - "description" : "Get cluster status informations.", + "allowtoken" : 1, + "description" : "Directory index.", "method" : "GET", - "name" : "get_status", + "name" : "index", "parameters" : { "additionalProperties" : 0 }, "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + "user" : "all" }, - "protected" : 1, "returns" : { "items" : { - "properties" : { - "type" : { - "type" : "string" - } - }, + "properties" : {}, "type" : "object" }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], "type" : "array" } } }, - "leaf" : 1, - "path" : "/cluster/status", - "text" : "status" + "leaf" : 0, + "path" : "/cluster/firewall", + "text" : "firewall" }, - { - "info" : { - "GET" : { - "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.", - "method" : "GET", - "name" : "nextid", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "description" : "The next free VMID.", - "type" : "integer" - } - } - }, - "leaf" : 1, - "path" : "/cluster/nextid", - "text" : "nextid" - } - ], - "info" : { - "GET" : { - "description" : "Cluster index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/cluster", - "text" : "cluster" - }, - { - "children" : [ { "children" : [ { "children" : [ { - "children" : [ - { - "children" : [ - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete rule.", - "method" : "DELETE", - "name" : "delete_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Get single rule data.", - "method" : "GET", - "name" : "get_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : null, - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Modify rule data.", - "method" : "PUT", - "name" : "update_rule", - "parameters" : { - "additionalProperties" : 0, + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Returns included guests and the backup status of their disks. Optimized to be used in ExtJS tree views.", + "method" : "GET", + "name" : "get_volume_backup_included", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "The job ID.", + "maxLength" : 50, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "description" : "Root node of the tree object. Children represent guests, grandchildren represent volumes of that guest.", + "properties" : { + "children" : { + "items" : { + "properties" : { + "children" : { + "description" : "The volumes of the guest with the information if they will be included in backups.", + "items" : { "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "id" : { + "description" : "Configuration key of the volume.", "type" : "string" }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "moveto" : { - "description" : "Move rule to new position . Other arguments are ignored.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" + "included" : { + "description" : "Whether the volume is included in the backup or not.", + "type" : "boolean" }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 1, + "name" : { + "description" : "Name of the volume.", "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "reason" : { + "description" : "The reason why the volume is included (or excluded).", + "type" : "string" } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}", - "text" : "{pos}" - } - ], - "info" : { - "GET" : { - "description" : "List rules.", - "method" : "GET", - "name" : "get_rules", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : null, - "returns" : { - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } + }, + "type" : "object" }, - "type" : "object" + "optional" : 1, + "type" : "array" }, - "links" : [ - { - "href" : "{pos}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create new rule.", - "method" : "POST", - "name" : "create_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + "id" : { + "description" : "VMID of the guest.", + "type" : "integer" + }, + "name" : { + "description" : "Name of the guest", + "optional" : 1, + "type" : "string" + }, + "type" : { + "description" : "Type of the guest, VM, CT or unknown for removed but not purged guests.", + "enum" : [ + "qemu", + "lxc", + "unknown" + ], + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules", - "text" : "rules" + "type" : "object" + }, + "type" : "array" + } }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Remove IP or Network alias.", - "method" : "DELETE", - "name" : "remove_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/cluster/backup/{id}/included_volumes", + "text" : "included_volumes" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete vzdump backup job definition.", + "method" : "DELETE", + "name" : "delete_job", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "The job ID.", + "maxLength" : 50, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read vzdump backup job definition.", + "method" : "GET", + "name" : "read_job", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "The job ID.", + "maxLength" : 50, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update vzdump backup job definition.", + "method" : "PUT", + "name" : "update_job", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "all" : { + "default" : 0, + "description" : "Backup all known guest systems on this host.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bwlimit" : { + "default" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "comment" : { + "description" : "Description for the Job.", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "compress" : { + "default" : "0", + "description" : "Compress dump file.", + "enum" : [ + "0", + "1", + "gzip", + "lzo", + "zstd" + ], + "optional" : 1, + "type" : "string" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dow" : { + "description" : "Day of week selection.", + "format" : "pve-day-of-week-list", + "optional" : 1, + "requires" : "starttime", + "type" : "string", + "typetext" : "" + }, + "dumpdir" : { + "description" : "Store resulting files to specified directory.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enabled" : { + "default" : "1", + "description" : "Enable or disable the job.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "exclude" : { + "description" : "Exclude specified guest systems (assumes --all)", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "exclude-path" : { + "description" : "Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory.", + "format" : "string-alist", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "id" : { + "description" : "The job ID.", + "maxLength" : 50, + "type" : "string", + "typetext" : "" + }, + "ionice" : { + "default" : 7, + "description" : "Set CFQ ionice priority.", + "maximum" : 8, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 8)" + }, + "lockwait" : { + "default" : 180, + "description" : "Maximal time to wait for the global lock (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "mailnotification" : { + "default" : "always", + "description" : "Specify when to send an email", + "enum" : [ + "always", + "failure" + ], + "optional" : 1, + "type" : "string" + }, + "mailto" : { + "description" : "Comma-separated list of email addresses or users that should receive email notifications.", + "format" : "email-or-username-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "maxfiles" : { + "description" : "Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "mode" : { + "default" : "snapshot", + "description" : "Backup mode.", + "enum" : [ + "snapshot", + "suspend", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "Only run if executed on this node.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "notes-template" : { + "description" : "Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future.", + "optional" : 1, + "requires" : "storage", + "type" : "string", + "typetext" : "" + }, + "pigz" : { + "default" : 0, + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "pool" : { + "description" : "Backup all known guest systems included in the specified pool.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "protected" : { + "description" : "If true, mark backup(s) as protected.", + "optional" : 1, + "requires" : "storage", + "type" : "boolean", + "typetext" : "" + }, + "prune-backups" : { + "default" : "keep-all=1", + "description" : "Use these retention options instead of those from the storage configuration.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "quiet" : { + "default" : 0, + "description" : "Be quiet.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "remove" : { + "default" : 1, + "description" : "Prune older backups according to 'prune-backups'.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "repeat-missed" : { + "default" : 0, + "description" : "If true, the job will be run as soon as possible if it was missed while the scheduler was not running.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "schedule" : { + "description" : "Backup schedule. The format is a subset of `systemd` calendar events.", + "format" : "pve-calendar-event", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "script" : { + "description" : "Use specified hook script.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "starttime" : { + "description" : "Job Start time.", + "optional" : 1, + "pattern" : "\\d{1,2}:\\d{1,2}", + "type" : "string", + "typetext" : "HH:MM" + }, + "stdexcludes" : { + "default" : 1, + "description" : "Exclude temporary files and logs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stop" : { + "default" : 0, + "description" : "Stop running backup jobs on this host.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stopwait" : { + "default" : 10, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "storage" : { + "description" : "Store resulting file to this storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tmpdir" : { + "description" : "Store temporary files to specified directory.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The ID of the guest system you want to backup.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "zstd" : { + "default" : 1, + "description" : "Zstd threads. N=0 uses half of the available cores, N>0 uses N as thread count.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ], + "description" : "The 'tmpdir', 'dumpdir' and 'script' parameters are additionally restricted to the 'root@pam' user." + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/backup/{id}", + "text" : "{id}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List vzdump backup schedule.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "id" : { + "description" : "The job ID.", + "maxLength" : 50, + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new vzdump backup job.", + "method" : "POST", + "name" : "create_job", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "all" : { + "default" : 0, + "description" : "Backup all known guest systems on this host.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bwlimit" : { + "default" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "comment" : { + "description" : "Description for the Job.", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "compress" : { + "default" : "0", + "description" : "Compress dump file.", + "enum" : [ + "0", + "1", + "gzip", + "lzo", + "zstd" + ], + "optional" : 1, + "type" : "string" + }, + "dow" : { + "default" : "mon,tue,wed,thu,fri,sat,sun", + "description" : "Day of week selection.", + "format" : "pve-day-of-week-list", + "optional" : 1, + "requires" : "starttime", + "type" : "string", + "typetext" : "" + }, + "dumpdir" : { + "description" : "Store resulting files to specified directory.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enabled" : { + "default" : "1", + "description" : "Enable or disable the job.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "exclude" : { + "description" : "Exclude specified guest systems (assumes --all)", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "exclude-path" : { + "description" : "Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory.", + "format" : "string-alist", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "id" : { + "description" : "Job ID (will be autogenerated).", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ionice" : { + "default" : 7, + "description" : "Set CFQ ionice priority.", + "maximum" : 8, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 8)" + }, + "lockwait" : { + "default" : 180, + "description" : "Maximal time to wait for the global lock (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "mailnotification" : { + "default" : "always", + "description" : "Specify when to send an email", + "enum" : [ + "always", + "failure" + ], + "optional" : 1, + "type" : "string" + }, + "mailto" : { + "description" : "Comma-separated list of email addresses or users that should receive email notifications.", + "format" : "email-or-username-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "maxfiles" : { + "description" : "Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "mode" : { + "default" : "snapshot", + "description" : "Backup mode.", + "enum" : [ + "snapshot", + "suspend", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "Only run if executed on this node.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "notes-template" : { + "description" : "Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future.", + "optional" : 1, + "requires" : "storage", + "type" : "string", + "typetext" : "" + }, + "pigz" : { + "default" : 0, + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "pool" : { + "description" : "Backup all known guest systems included in the specified pool.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "protected" : { + "description" : "If true, mark backup(s) as protected.", + "optional" : 1, + "requires" : "storage", + "type" : "boolean", + "typetext" : "" + }, + "prune-backups" : { + "default" : "keep-all=1", + "description" : "Use these retention options instead of those from the storage configuration.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "quiet" : { + "default" : 0, + "description" : "Be quiet.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "remove" : { + "default" : 1, + "description" : "Prune older backups according to 'prune-backups'.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "repeat-missed" : { + "default" : 0, + "description" : "If true, the job will be run as soon as possible if it was missed while the scheduler was not running.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "schedule" : { + "description" : "Backup schedule. The format is a subset of `systemd` calendar events.", + "format" : "pve-calendar-event", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "script" : { + "description" : "Use specified hook script.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "starttime" : { + "description" : "Job Start time.", + "optional" : 1, + "pattern" : "\\d{1,2}:\\d{1,2}", + "type" : "string", + "typetext" : "HH:MM" + }, + "stdexcludes" : { + "default" : 1, + "description" : "Exclude temporary files and logs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stop" : { + "default" : 0, + "description" : "Stop running backup jobs on this host.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stopwait" : { + "default" : 10, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "storage" : { + "description" : "Store resulting file to this storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tmpdir" : { + "description" : "Store temporary files to specified directory.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The ID of the guest system you want to backup.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "zstd" : { + "default" : 1, + "description" : "Zstd threads. N=0 uses half of the available cores, N>0 uses N as thread count.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ], + "description" : "The 'tmpdir', 'dumpdir' and 'script' parameters are additionally restricted to the 'root@pam' user." + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/backup", + "text" : "backup" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Shows all guests which are not covered by any backup job.", + "method" : "GET", + "name" : "get_guests_not_in_backup", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "description" : "Contains the guest objects.", + "items" : { + "properties" : { + "name" : { + "description" : "Name of the guest", + "optional" : 1, + "type" : "string" + }, + "type" : { + "description" : "Type of the guest.", + "enum" : [ + "qemu", + "lxc" + ], + "type" : "string" + }, + "vmid" : { + "description" : "VMID of the guest.", + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/backup-info/not-backed-up", + "text" : "not-backed-up" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Index for backup info related endpoints", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "returns" : { + "description" : "Directory index.", + "items" : { + "properties" : { + "subdir" : { + "description" : "API sub-directory endpoint", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/backup-info", + "text" : "backup-info" + }, + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Request resource migration (online) to another node.", + "method" : "POST", + "name" : "migrate", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "Target node.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ha/resources/{sid}/migrate", + "text" : "migrate" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.", + "method" : "POST", + "name" : "relocate", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "Target node.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ha/resources/{sid}/relocate", + "text" : "relocate" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete resource configuration.", + "method" : "DELETE", + "name" : "delete", + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read resource configuration.", + "method" : "GET", + "name" : "read", + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "properties" : { + "comment" : { + "description" : "Description.", + "optional" : 1, + "type" : "string" + }, + "digest" : { + "description" : "Can be used to prevent concurrent modifications.", + "type" : "string" + }, + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string" + }, + "max_relocate" : { + "description" : "Maximal number of service relocate tries when a service failes to start.", + "optional" : 1, + "type" : "integer" + }, + "max_restart" : { + "description" : "Maximal number of tries to restart the service on a node after its start failed.", + "optional" : 1, + "type" : "integer" + }, + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + }, + "state" : { + "description" : "Requested resource state.", + "enum" : [ + "started", + "stopped", + "enabled", + "disabled", + "ignored" + ], + "optional" : 1, + "type" : "string" + }, + "type" : { + "description" : "The type of the resources.", + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update resource configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Description.", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "max_relocate" : { + "default" : 1, + "description" : "Maximal number of service relocate tries when a service failes to start.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "max_restart" : { + "default" : 1, + "description" : "Maximal number of tries to restart the service on a node after its start failed.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + }, + "state" : { + "default" : "started", + "description" : "Requested resource state.", + "enum" : [ + "started", + "stopped", + "enabled", + "disabled", + "ignored" + ], + "optional" : 1, + "type" : "string", + "verbose_description" : "Requested resource state. The CRM reads this state and acts accordingly.\nPlease note that `enabled` is just an alias for `started`.\n\n`started`;;\n\nThe CRM tries to start the resource. Service state is\nset to `started` after successful start. On node failures, or when start\nfails, it tries to recover the resource. If everything fails, service\nstate it set to `error`.\n\n`stopped`;;\n\nThe CRM tries to keep the resource in `stopped` state, but it\nstill tries to relocate the resources on node failures.\n\n`disabled`;;\n\nThe CRM tries to put the resource in `stopped` state, but does not try\nto relocate the resources on node failures. The main purpose of this\nstate is error recovery, because it is the only way to move a resource out\nof the `error` state.\n\n`ignored`;;\n\nThe resource gets removed from the manager status and so the CRM and the LRM do\nnot touch the resource anymore. All {pve} API calls affecting this resource\nwill be executed, directly bypassing the HA stack. CRM commands will be thrown\naway while there source is in this state. The resource will not get relocated\non node failures.\n\n" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ha/resources/{sid}", + "text" : "{sid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List HA resources.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "description" : "Only list resources of specific type", + "enum" : [ + "ct", + "vm" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "sid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{sid}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new HA resource.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Description.", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "max_relocate" : { + "default" : 1, + "description" : "Maximal number of service relocate tries when a service failes to start.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "max_restart" : { + "default" : 1, + "description" : "Maximal number of tries to restart the service on a node after its start failed.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "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).", + "format" : "pve-ha-resource-or-vm-id", + "type" : "string", + "typetext" : ":" + }, + "state" : { + "default" : "started", + "description" : "Requested resource state.", + "enum" : [ + "started", + "stopped", + "enabled", + "disabled", + "ignored" + ], + "optional" : 1, + "type" : "string", + "verbose_description" : "Requested resource state. The CRM reads this state and acts accordingly.\nPlease note that `enabled` is just an alias for `started`.\n\n`started`;;\n\nThe CRM tries to start the resource. Service state is\nset to `started` after successful start. On node failures, or when start\nfails, it tries to recover the resource. If everything fails, service\nstate it set to `error`.\n\n`stopped`;;\n\nThe CRM tries to keep the resource in `stopped` state, but it\nstill tries to relocate the resources on node failures.\n\n`disabled`;;\n\nThe CRM tries to put the resource in `stopped` state, but does not try\nto relocate the resources on node failures. The main purpose of this\nstate is error recovery, because it is the only way to move a resource out\nof the `error` state.\n\n`ignored`;;\n\nThe resource gets removed from the manager status and so the CRM and the LRM do\nnot touch the resource anymore. All {pve} API calls affecting this resource\nwill be executed, directly bypassing the HA stack. CRM commands will be thrown\naway while there source is in this state. The resource will not get relocated\non node failures.\n\n" + }, + "type" : { + "description" : "Resource type.", + "enum" : [ + "ct", + "vm" + ], + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ha/resources", + "text" : "resources" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete ha group configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read ha group configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : {} + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update ha group configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Description.", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names with optional priority.", + "format" : "pve-ha-group-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "[:]{,[:]}*", + "verbose_description" : "List of cluster node members, where a priority can be given to each node. A resource bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only." + }, + "nofailback" : { + "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, + "type" : "boolean", + "typetext" : "" + }, + "restricted" : { + "default" : 0, + "description" : "Resources bound to restricted groups may only run on nodes defined by the group.", + "optional" : 1, + "type" : "boolean", + "typetext" : "", + "verbose_description" : "Resources bound to restricted groups may only run on nodes defined by the group. The resource will be placed in the stopped state if no group node member is online. Resources on unrestricted groups may run on any cluster node 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 only one member." + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ha/groups/{group}", + "text" : "{group}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get HA groups.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "group" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{group}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new HA group.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Description.", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group" : { + "description" : "The HA group identifier.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names with optional priority.", + "format" : "pve-ha-group-node-list", + "optional" : 0, + "type" : "string", + "typetext" : "[:]{,[:]}*", + "verbose_description" : "List of cluster node members, where a priority can be given to each node. A resource bound to a group will run on the available nodes with the highest priority. If there are more nodes in the highest priority class, the services will get distributed to those nodes. The priorities have a relative meaning only." + }, + "nofailback" : { + "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, + "type" : "boolean", + "typetext" : "" + }, + "restricted" : { + "default" : 0, + "description" : "Resources bound to restricted groups may only run on nodes defined by the group.", + "optional" : 1, + "type" : "boolean", + "typetext" : "", + "verbose_description" : "Resources bound to restricted groups may only run on nodes defined by the group. The resource will be placed in the stopped state if no group node member is online. Resources on unrestricted groups may run on any cluster node 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 only one member." + }, + "type" : { + "description" : "Group type.", + "enum" : [ + "group" + ], + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ha/groups", + "text" : "groups" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get HA manger status.", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ha/status/current", + "text" : "current" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get full HA manger status, including LRM status.", + "method" : "GET", + "name" : "manager_status", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ha/status/manager_status", + "text" : "manager_status" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ha/status", + "text" : "status" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ha", + "text" : "ha" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete ACME plugin configuration.", + "method" : "DELETE", + "name" : "delete_plugin", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Unique identifier for ACME plugin instance.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get ACME plugin configuration.", + "method" : "GET", + "name" : "get_plugin_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "Unique identifier for ACME plugin instance.", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update ACME plugin configuration.", + "method" : "PUT", + "name" : "update_plugin", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "api" : { + "description" : "API plugin name", + "enum" : [ + "1984hosting", + "acmedns", + "acmeproxy", + "active24", + "ad", + "ali", + "anx", + "arvan", + "aurora", + "autodns", + "aws", + "azion", + "azure", + "cf", + "clouddns", + "cloudns", + "cn", + "conoha", + "constellix", + "cx", + "cyon", + "da", + "ddnss", + "desec", + "df", + "dgon", + "dnsimple", + "do", + "doapi", + "domeneshop", + "dp", + "dpi", + "dreamhost", + "duckdns", + "durabledns", + "dyn", + "dynu", + "dynv6", + "easydns", + "edgedns", + "euserv", + "exoscale", + "freedns", + "gandi_livedns", + "gcloud", + "gd", + "gdnsdk", + "he", + "hetzner", + "hexonet", + "hostingde", + "huaweicloud", + "infoblox", + "infomaniak", + "internetbs", + "inwx", + "ionos", + "ispconfig", + "jd", + "joker", + "kappernet", + "kas", + "kinghost", + "knot", + "leaseweb", + "lexicon", + "linode", + "linode_v4", + "loopia", + "lua", + "maradns", + "me", + "miab", + "misaka", + "myapi", + "mydevil", + "mydnsjp", + "namecheap", + "namecom", + "namesilo", + "nederhost", + "neodigit", + "netcup", + "netlify", + "nic", + "njalla", + "nm", + "nsd", + "nsone", + "nsupdate", + "nw", + "oci", + "one", + "online", + "openprovider", + "openstack", + "opnsense", + "ovh", + "pdns", + "pleskxml", + "pointhq", + "porkbun", + "rackcorp", + "rackspace", + "rcode0", + "regru", + "scaleway", + "schlundtech", + "selectel", + "servercow", + "simply", + "tele3", + "transip", + "ultra", + "unoeuro", + "variomedia", + "veesp", + "vscale", + "vultr", + "websupport", + "world4you", + "yandex", + "zilore", + "zone", + "zonomi" + ], + "optional" : 1, + "type" : "string" + }, + "data" : { + "description" : "DNS plugin data. (base64 encoded)", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "disable" : { + "description" : "Flag to disable the config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "id" : { + "description" : "ACME Plugin ID name", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "validation-delay" : { + "default" : 30, + "description" : "Extra delay in seconds to wait before requesting validation. Allows to cope with a long TTL of DNS records.", + "maximum" : 172800, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 172800)" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/acme/plugins/{id}", + "text" : "{id}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "ACME plugin index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "description" : "Only list ACME plugins of a specific type", + "enum" : [ + "dns", + "standalone" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : { + "plugin" : { + "description" : "Unique identifier for ACME plugin instance.", + "format" : "pve-configid", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{plugin}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Add ACME plugin configuration.", + "method" : "POST", + "name" : "add_plugin", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "api" : { + "description" : "API plugin name", + "enum" : [ + "1984hosting", + "acmedns", + "acmeproxy", + "active24", + "ad", + "ali", + "anx", + "arvan", + "aurora", + "autodns", + "aws", + "azion", + "azure", + "cf", + "clouddns", + "cloudns", + "cn", + "conoha", + "constellix", + "cx", + "cyon", + "da", + "ddnss", + "desec", + "df", + "dgon", + "dnsimple", + "do", + "doapi", + "domeneshop", + "dp", + "dpi", + "dreamhost", + "duckdns", + "durabledns", + "dyn", + "dynu", + "dynv6", + "easydns", + "edgedns", + "euserv", + "exoscale", + "freedns", + "gandi_livedns", + "gcloud", + "gd", + "gdnsdk", + "he", + "hetzner", + "hexonet", + "hostingde", + "huaweicloud", + "infoblox", + "infomaniak", + "internetbs", + "inwx", + "ionos", + "ispconfig", + "jd", + "joker", + "kappernet", + "kas", + "kinghost", + "knot", + "leaseweb", + "lexicon", + "linode", + "linode_v4", + "loopia", + "lua", + "maradns", + "me", + "miab", + "misaka", + "myapi", + "mydevil", + "mydnsjp", + "namecheap", + "namecom", + "namesilo", + "nederhost", + "neodigit", + "netcup", + "netlify", + "nic", + "njalla", + "nm", + "nsd", + "nsone", + "nsupdate", + "nw", + "oci", + "one", + "online", + "openprovider", + "openstack", + "opnsense", + "ovh", + "pdns", + "pleskxml", + "pointhq", + "porkbun", + "rackcorp", + "rackspace", + "rcode0", + "regru", + "scaleway", + "schlundtech", + "selectel", + "servercow", + "simply", + "tele3", + "transip", + "ultra", + "unoeuro", + "variomedia", + "veesp", + "vscale", + "vultr", + "websupport", + "world4you", + "yandex", + "zilore", + "zone", + "zonomi" + ], + "optional" : 1, + "type" : "string" + }, + "data" : { + "description" : "DNS plugin data. (base64 encoded)", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "disable" : { + "description" : "Flag to disable the config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "id" : { + "description" : "ACME Plugin ID name", + "format" : "pve-configid", + "type" : "string", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "ACME challenge type.", + "enum" : [ + "dns", + "standalone" + ], + "type" : "string" + }, + "validation-delay" : { + "default" : 30, + "description" : "Extra delay in seconds to wait before requesting validation. Allows to cope with a long TTL of DNS records.", + "maximum" : 172800, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 172800)" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/acme/plugins", + "text" : "plugins" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Deactivate existing ACME account at CA.", + "method" : "DELETE", + "name" : "deactivate_account", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "default" : "default", + "description" : "ACME account config file name.", + "format" : "pve-configid", + "format_description" : "name", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "type" : "string" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Return existing ACME account information.", + "method" : "GET", + "name" : "get_account", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "default" : "default", + "description" : "ACME account config file name.", + "format" : "pve-configid", + "format_description" : "name", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "account" : { + "optional" : 1, + "renderer" : "yaml", + "type" : "object" + }, + "directory" : { + "description" : "URL of ACME CA directory endpoint.", + "optional" : 1, + "pattern" : "^https?://.*", + "type" : "string" + }, + "location" : { + "optional" : 1, + "type" : "string" + }, + "tos" : { + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update existing ACME account information with CA. Note: not specifying any new account information triggers a refresh.", + "method" : "PUT", + "name" : "update_account", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "contact" : { + "description" : "Contact email addresses.", + "format" : "email-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "default" : "default", + "description" : "ACME account config file name.", + "format" : "pve-configid", + "format_description" : "name", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/cluster/acme/account/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "ACMEAccount index.", + "method" : "GET", + "name" : "account_index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Register a new ACME account with CA.", + "method" : "POST", + "name" : "register_account", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "contact" : { + "description" : "Contact email addresses.", + "format" : "email-list", + "type" : "string", + "typetext" : "" + }, + "directory" : { + "default" : "https://acme-v02.api.letsencrypt.org/directory", + "description" : "URL of ACME CA directory endpoint.", + "optional" : 1, + "pattern" : "^https?://.*", + "type" : "string" + }, + "name" : { + "default" : "default", + "description" : "ACME account config file name.", + "format" : "pve-configid", + "format_description" : "name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tos_url" : { + "description" : "URL of CA TermsOfService - setting this indicates agreement.", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/cluster/acme/account", + "text" : "account" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Retrieve ACME TermsOfService URL from CA.", + "method" : "GET", + "name" : "get_tos", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "directory" : { + "default" : "https://acme-v02.api.letsencrypt.org/directory", + "description" : "URL of ACME CA directory endpoint.", + "optional" : 1, + "pattern" : "^https?://.*", + "type" : "string" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "description" : "ACME TermsOfService URL.", + "optional" : 1, + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/cluster/acme/tos", + "text" : "tos" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get named known ACME directory endpoints.", + "method" : "GET", + "name" : "get_directories", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "type" : "string" + }, + "url" : { + "description" : "URL of ACME CA directory endpoint.", + "pattern" : "^https?://.*", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/acme/directories", + "text" : "directories" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get schema of ACME challenge types.", + "method" : "GET", + "name" : "challengeschema", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "type" : "string" + }, + "name" : { + "description" : "Human readable name, falls back to id", + "type" : "string" + }, + "schema" : { + "type" : "object" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/acme/challenge-schema", + "text" : "challenge-schema" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "ACMEAccount index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/acme", + "text" : "acme" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get ceph metadata.", + "method" : "GET", + "name" : "metadata", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "scope" : { + "default" : "all", + "enum" : [ + "all", + "versions" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ceph/metadata", + "text" : "metadata" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get ceph status.", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ceph/status", + "text" : "status" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get the status of a specific ceph flag.", + "method" : "GET", + "name" : "get_flag", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "flag" : { + "description" : "The name of the flag name to get.", + "enum" : [ + "nobackfill", + "nodeep-scrub", + "nodown", + "noin", + "noout", + "norebalance", + "norecover", + "noscrub", + "notieragent", + "noup", + "pause" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "boolean" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set or clear (unset) a specific ceph flag", + "method" : "PUT", + "name" : "update_flag", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "flag" : { + "description" : "The ceph flag to update", + "enum" : [ + "nobackfill", + "nodeep-scrub", + "nodown", + "noin", + "noout", + "norebalance", + "norecover", + "noscrub", + "notieragent", + "noup", + "pause" + ], + "type" : "string" + }, + "value" : { + "description" : "The new value of the flag", + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ceph/flags/{flag}", + "text" : "{flag}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "get the status of all ceph flags", + "method" : "GET", + "name" : "get_all_flags", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "additionalProperties" : 1, + "properties" : { + "name" : { + "description" : "Flag name.", + "enum" : [ + "nobackfill", + "nodeep-scrub", + "nodown", + "noin", + "noout", + "norebalance", + "norecover", + "noscrub", + "notieragent", + "noup", + "pause" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set/Unset multiple ceph flags at once.", + "method" : "PUT", + "name" : "set_flags", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "nobackfill" : { + "description" : "Backfilling of PGs is suspended.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "nodeep-scrub" : { + "description" : "Deep Scrubbing is disabled.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "nodown" : { + "description" : "OSD failure reports are being ignored, such that the monitors will not mark OSDs down.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "noin" : { + "description" : "OSDs that were previously marked out will not be marked back in when they start.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "noout" : { + "description" : "OSDs will not automatically be marked out after the configured interval.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "norebalance" : { + "description" : "Rebalancing of PGs is suspended.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "norecover" : { + "description" : "Recovery of PGs is suspended.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "noscrub" : { + "description" : "Scrubbing is disabled.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "notieragent" : { + "description" : "Cache tiering activity is suspended.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "noup" : { + "description" : "OSDs are not allowed to start.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "pause" : { + "description" : "Pauses read and writes.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ceph/flags", + "text" : "flags" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Cluster ceph index.", + "method" : "GET", + "name" : "cephindex", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ceph", + "text" : "ceph" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Returns a list of future schedule runtimes.", + "method" : "GET", + "name" : "schedule-analyze", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "iterations" : { + "default" : 10, + "description" : "Number of event-iteration to simulate and return.", + "maximum" : 100, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 100)" + }, + "schedule" : { + "description" : "Job schedule. The format is a subset of `systemd` calendar events.", + "format" : "pve-calendar-event", + "maxLength" : 128, + "type" : "string", + "typetext" : "" + }, + "starttime" : { + "description" : "UNIX timestamp to start the calculation from. Defaults to the current time.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "description" : "An array of the next events since .", + "items" : { + "properties" : { + "timestamp" : { + "description" : "UNIX timestamp for the run.", + "type" : "integer" + }, + "utc" : { + "description" : "UTC timestamp for the run.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/jobs/schedule-analyze", + "text" : "schedule-analyze" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Index for jobs related endpoints.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "description" : "Directory index.", + "items" : { + "properties" : { + "subdir" : { + "description" : "API sub-directory endpoint", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/jobs", + "text" : "jobs" + }, + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete sdn subnet object configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "subnet" : { + "description" : "The SDN subnet object identifier.", + "format" : "pve-sdn-subnet-id", + "type" : "string", + "typetext" : "" + }, + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets/{vnet}/subnets", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read sdn subnet configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "subnet" : { + "description" : "The SDN subnet object identifier.", + "format" : "pve-sdn-subnet-id", + "type" : "string", + "typetext" : "" + }, + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets/{vnet}/subnets/{subnet}", + [ + "SDN.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update sdn subnet object configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "dnszoneprefix" : { + "description" : "dns domain zone prefix ex: 'adm' -> .adm.mydomain.com", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "gateway" : { + "description" : "Subnet Gateway: Will be assign on vnet for layer3 zones", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "snat" : { + "description" : "enable masquerade for this subnet if pve-firewall", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "subnet" : { + "description" : "The SDN subnet object identifier.", + "format" : "pve-sdn-subnet-id", + "type" : "string", + "typetext" : "" + }, + "vnet" : { + "description" : "associated vnet", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets/{vnet}/subnets", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/sdn/vnets/{vnet}/subnets/{subnet}", + "text" : "{subnet}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN subnets index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/sdn/subnets/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{subnet}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new sdn subnet object.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dnszoneprefix" : { + "description" : "dns domain zone prefix ex: 'adm' -> .adm.mydomain.com", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "gateway" : { + "description" : "Subnet Gateway: Will be assign on vnet for layer3 zones", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "snat" : { + "description" : "enable masquerade for this subnet if pve-firewall", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "subnet" : { + "description" : "The SDN subnet object identifier.", + "format" : "pve-sdn-subnet-id", + "type" : "string", + "typetext" : "" + }, + "type" : { + "enum" : [ + "subnet" + ], + "type" : "string" + }, + "vnet" : { + "description" : "associated vnet", + "optional" : 0, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets/{vnet}/subnets", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/vnets/{vnet}/subnets", + "text" : "subnets" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete sdn vnet object configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read sdn vnet configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets/{vnet}", + [ + "SDN.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update sdn vnet object configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "alias" : { + "description" : "alias name of the vnet", + "maxLength" : 256, + "optional" : 1, + "pattern" : "(?^i:[\\(\\)-_.\\w\\d\\s]{0,256})", + "type" : "string" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "tag" : { + "description" : "vlan or vxlan id", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "vlanaware" : { + "description" : "Allow vm VLANs to pass through this vnet.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + }, + "zone" : { + "description" : "zone id", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/vnets/{vnet}", + "text" : "{vnet}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN vnets index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/sdn/vnets/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{vnet}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new sdn vnet object.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "alias" : { + "description" : "alias name of the vnet", + "maxLength" : 256, + "optional" : 1, + "pattern" : "(?^i:[\\(\\)-_.\\w\\d\\s]{0,256})", + "type" : "string" + }, + "tag" : { + "description" : "vlan or vxlan id", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "type" : { + "description" : "Type", + "enum" : [ + "vnet" + ], + "optional" : 1, + "type" : "string" + }, + "vlanaware" : { + "description" : "Allow vm VLANs to pass through this vnet.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vnet" : { + "description" : "The SDN vnet object identifier.", + "format" : "pve-sdn-vnet-id", + "type" : "string", + "typetext" : "" + }, + "zone" : { + "description" : "zone id", + "optional" : 0, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/vnets", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/vnets", + "text" : "vnets" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete sdn zone object configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/zones", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read sdn zone configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/zones/{zone}", + [ + "SDN.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update sdn zone object configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "advertise-subnets" : { + "description" : "Advertise evpn subnets if you have silent hosts", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bridge" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bridge-disable-mac-learning" : { + "description" : "Disable auto mac learning.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "controller" : { + "description" : "Frr router name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "disable-arp-nd-suppression" : { + "description" : "Disable ipv4 arp && ipv6 neighbour discovery suppression", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "dns" : { + "description" : "dns api server", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dnszone" : { + "description" : "dns domain zone ex: mydomain.com", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dp-id" : { + "description" : "Faucet dataplane id", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "exitnodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "exitnodes-local-routing" : { + "description" : "Allow exitnodes to connect to evpn guests", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "exitnodes-primary" : { + "description" : "Force traffic to this exitnode first.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ipam" : { + "description" : "use a specific ipam", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mac" : { + "description" : "Anycast logical router mac address", + "format" : "mac-addr", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mtu" : { + "description" : "MTU", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "peers" : { + "description" : "peers address list.", + "format" : "ip-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "reversedns" : { + "description" : "reverse dns api server", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "rt-import" : { + "description" : "Route-Target import", + "format" : "pve-sdn-bgp-rt-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tag" : { + "description" : "Service-VLAN Tag", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vlan-protocol" : { + "default" : "802.1q", + "enum" : [ + "802.1q", + "802.1ad" + ], + "optional" : 1, + "type" : "string" + }, + "vrf-vxlan" : { + "description" : "l3vni.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/zones", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/sdn/zones/{zone}", + "text" : "{zone}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN zones index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "type" : { + "description" : "Only list SDN zones of specific type", + "enum" : [ + "evpn", + "faucet", + "qinq", + "simple", + "vlan", + "vxlan" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/sdn/zones/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "dns" : { + "optional" : 1, + "type" : "string" + }, + "dnszone" : { + "optional" : 1, + "type" : "string" + }, + "ipam" : { + "optional" : 1, + "type" : "string" + }, + "mtu" : { + "optional" : 1, + "type" : "integer" + }, + "nodes" : { + "optional" : 1, + "type" : "string" + }, + "pending" : { + "optional" : 1 + }, + "reversedns" : { + "optional" : 1, + "type" : "string" + }, + "state" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "zone" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{zone}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new sdn zone object.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "advertise-subnets" : { + "description" : "Advertise evpn subnets if you have silent hosts", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bridge" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bridge-disable-mac-learning" : { + "description" : "Disable auto mac learning.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "controller" : { + "description" : "Frr router name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "disable-arp-nd-suppression" : { + "description" : "Disable ipv4 arp && ipv6 neighbour discovery suppression", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "dns" : { + "description" : "dns api server", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dnszone" : { + "description" : "dns domain zone ex: mydomain.com", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dp-id" : { + "description" : "Faucet dataplane id", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "exitnodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "exitnodes-local-routing" : { + "description" : "Allow exitnodes to connect to evpn guests", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "exitnodes-primary" : { + "description" : "Force traffic to this exitnode first.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ipam" : { + "description" : "use a specific ipam", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mac" : { + "description" : "Anycast logical router mac address", + "format" : "mac-addr", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mtu" : { + "description" : "MTU", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "peers" : { + "description" : "peers address list.", + "format" : "ip-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "reversedns" : { + "description" : "reverse dns api server", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "rt-import" : { + "description" : "Route-Target import", + "format" : "pve-sdn-bgp-rt-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tag" : { + "description" : "Service-VLAN Tag", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "type" : { + "description" : "Plugin type.", + "enum" : [ + "evpn", + "faucet", + "qinq", + "simple", + "vlan", + "vxlan" + ], + "format" : "pve-configid", + "type" : "string" + }, + "vlan-protocol" : { + "default" : "802.1q", + "enum" : [ + "802.1q", + "802.1ad" + ], + "optional" : 1, + "type" : "string" + }, + "vrf-vxlan" : { + "description" : "l3vni.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/zones", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/zones", + "text" : "zones" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete sdn controller object configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "controller" : { + "description" : "The SDN controller object identifier.", + "format" : "pve-sdn-controller-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/controllers", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read sdn controller configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "controller" : { + "description" : "The SDN controller object identifier.", + "format" : "pve-sdn-controller-id", + "type" : "string", + "typetext" : "" + }, + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/controllers/{controller}", + [ + "SDN.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update sdn controller object configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "asn" : { + "description" : "autonomous system number", + "maximum" : 4294967296, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 4294967296)" + }, + "bgp-multipath-as-path-relax" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "controller" : { + "description" : "The SDN controller object identifier.", + "format" : "pve-sdn-controller-id", + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "ebgp" : { + "description" : "Enable ebgp. (remote-as external)", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ebgp-multihop" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "loopback" : { + "description" : "source loopback interface.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "peers" : { + "description" : "peers address list.", + "format" : "ip-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/controllers", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/sdn/controllers/{controller}", + "text" : "{controller}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN controllers index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "pending" : { + "description" : "Display pending config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "running" : { + "description" : "Display running config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "type" : { + "description" : "Only list sdn controllers of specific type", + "enum" : [ + "bgp", + "evpn", + "faucet" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/sdn/controllers/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "controller" : { + "type" : "string" + }, + "pending" : { + "optional" : 1 + }, + "state" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{controller}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new sdn controller object.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "asn" : { + "description" : "autonomous system number", + "maximum" : 4294967296, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 4294967296)" + }, + "bgp-multipath-as-path-relax" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "controller" : { + "description" : "The SDN controller object identifier.", + "format" : "pve-sdn-controller-id", + "type" : "string", + "typetext" : "" + }, + "ebgp" : { + "description" : "Enable ebgp. (remote-as external)", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ebgp-multihop" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "loopback" : { + "description" : "source loopback interface.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "peers" : { + "description" : "peers address list.", + "format" : "ip-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Plugin type.", + "enum" : [ + "bgp", + "evpn", + "faucet" + ], + "format" : "pve-configid", + "type" : "string" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/controllers", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/controllers", + "text" : "controllers" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete sdn ipam object configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ipam" : { + "description" : "The SDN ipam object identifier.", + "format" : "pve-sdn-ipam-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/ipams", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read sdn ipam configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ipam" : { + "description" : "The SDN ipam object identifier.", + "format" : "pve-sdn-ipam-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/ipams/{ipam}", + [ + "SDN.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update sdn ipam object configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "ipam" : { + "description" : "The SDN ipam object identifier.", + "format" : "pve-sdn-ipam-id", + "type" : "string", + "typetext" : "" + }, + "section" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "token" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "url" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/ipams", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/sdn/ipams/{ipam}", + "text" : "{ipam}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN ipams index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "description" : "Only list sdn ipams of specific type", + "enum" : [ + "netbox", + "phpipam", + "pve" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/sdn/ipams/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "ipam" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{ipam}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new sdn ipam object.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "ipam" : { + "description" : "The SDN ipam object identifier.", + "format" : "pve-sdn-ipam-id", + "type" : "string", + "typetext" : "" + }, + "section" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "token" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Plugin type.", + "enum" : [ + "netbox", + "phpipam", + "pve" + ], + "format" : "pve-configid", + "type" : "string" + }, + "url" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/ipams", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/ipams", + "text" : "ipams" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete sdn dns object configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dns" : { + "description" : "The SDN dns object identifier.", + "format" : "pve-sdn-dns-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/dns", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read sdn dns configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dns" : { + "description" : "The SDN dns object identifier.", + "format" : "pve-sdn-dns-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/dns/{dns}", + [ + "SDN.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update sdn dns object configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "dns" : { + "description" : "The SDN dns object identifier.", + "format" : "pve-sdn-dns-id", + "type" : "string", + "typetext" : "" + }, + "key" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "reversemaskv6" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "ttl" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "url" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/dns", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/sdn/dns/{dns}", + "text" : "{dns}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN dns index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "description" : "Only list sdn dns of specific type", + "enum" : [ + "powerdns" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/sdn/dns/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "dns" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{dns}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new sdn dns object.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dns" : { + "description" : "The SDN dns object identifier.", + "format" : "pve-sdn-dns-id", + "type" : "string", + "typetext" : "" + }, + "key" : { + "optional" : 0, + "type" : "string", + "typetext" : "" + }, + "reversemaskv6" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "reversev6mask" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "ttl" : { + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "type" : { + "description" : "Plugin type.", + "enum" : [ + "powerdns" + ], + "format" : "pve-configid", + "type" : "string" + }, + "url" : { + "optional" : 0, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/sdn/dns", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn/dns", + "text" : "dns" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "SDN.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Apply sdn controller changes && reload.", + "method" : "PUT", + "name" : "reload", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/sdn", + [ + "SDN.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/cluster/sdn", + "text" : "sdn" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read cluster log", + "method" : "GET", + "name" : "log", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "max" : { + "description" : "Maximum number of entries.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/log", + "text" : "log" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Resources index (cluster wide).", + "method" : "GET", + "name" : "resources", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "enum" : [ + "vm", + "storage", + "node", + "sdn" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "content" : { + "description" : "Allowed storage content types (when type == storage).", + "format" : "pve-storage-content-list", + "optional" : 1, + "type" : "string" + }, + "cpu" : { + "description" : "CPU utilization (when type in node,qemu,lxc).", + "optional" : 1, + "renderer" : "fraction_as_percentage", + "type" : "number" + }, + "disk" : { + "description" : "Used disk space in bytes (when type in storage), used root image spave for VMs (type in qemu,lxc).", + "optional" : 1, + "renderer" : "bytes", + "type" : "string" + }, + "hastate" : { + "description" : "HA service status (for HA managed VMs).", + "optional" : 1, + "type" : "string" + }, + "id" : { + "type" : "string" + }, + "level" : { + "description" : "Support level (when type == node).", + "optional" : 1, + "type" : "string" + }, + "maxcpu" : { + "description" : "Number of available CPUs (when type in node,qemu,lxc).", + "optional" : 1, + "type" : "number" + }, + "maxdisk" : { + "description" : "Storage size in bytes (when type in storage), root image size for VMs (type in qemu,lxc).", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxmem" : { + "description" : "Number of available memory in bytes (when type in node,qemu,lxc).", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "mem" : { + "description" : "Used memory in bytes (when type in node,qemu,lxc).", + "optional" : 1, + "renderer" : "bytes", + "type" : "string" + }, + "name" : { + "description" : "Name of the resource.", + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "The cluster node name (when type in node,storage,qemu,lxc).", + "format" : "pve-node", + "optional" : 1, + "type" : "string" + }, + "plugintype" : { + "description" : "More specific type, if available.", + "optional" : 1, + "type" : "string" + }, + "pool" : { + "description" : "The pool name (when type in pool,qemu,lxc).", + "optional" : 1, + "type" : "string" + }, + "status" : { + "description" : "Resource type dependent status.", + "optional" : 1, + "type" : "string" + }, + "storage" : { + "description" : "The storage identifier (when type == storage).", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string" + }, + "type" : { + "description" : "Resource type.", + "enum" : [ + "node", + "storage", + "pool", + "qemu", + "lxc", + "openvz", + "sdn" + ], + "type" : "string" + }, + "uptime" : { + "description" : "Node uptime in seconds (when type in node,qemu,lxc).", + "optional" : 1, + "renderer" : "duration", + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/resources", + "text" : "resources" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List recent tasks (cluster wide).", + "method" : "GET", + "name" : "tasks", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "upid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/tasks", + "text" : "tasks" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get datacenter options.", + "method" : "GET", + "name" : "get_options", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set datacenter options.", + "method" : "PUT", + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "bwlimit" : { + "description" : "Set bandwidth/io limits various operations.", + "format" : { + "clone" : { + "description" : "bandwidth limit in KiB/s for cloning disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "default" : { + "description" : "default bandwidth limit in KiB/s", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "migration" : { + "description" : "bandwidth limit in KiB/s for migrating guests (including moving local disks)", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "move" : { + "description" : "bandwidth limit in KiB/s for moving disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "restore" : { + "description" : "bandwidth limit in KiB/s for restoring guests from backups", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[clone=] [,default=] [,migration=] [,move=] [,restore=]" + }, + "console" : { + "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC; deprecated and maps to html5), an external virt-viewer comtatible application (SPICE), an HTML5 based vnc viewer (noVNC), or an HTML5 based console client (xtermjs). If the selected viewer is not available (e.g. SPICE not activated for the VM), the fallback is noVNC.", + "enum" : [ + "applet", + "vv", + "html5", + "xtermjs" + ], + "optional" : 1, + "type" : "string" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "description" : { + "description" : "Datacenter description. Shown in the web-interface datacenter notes panel. This is saved as comment inside the configuration file.", + "maxLength" : 65536, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "email_from" : { + "description" : "Specify email address to send notification from (default is root@$hostname)", + "format" : "email-opt", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fencing" : { + "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", + "enum" : [ + "watchdog", + "hardware", + "both" + ], + "optional" : 1, + "type" : "string" + }, + "ha" : { + "description" : "Cluster wide HA settings.", + "format" : { + "shutdown_policy" : { + "default" : "conditional", + "description" : "The policy for HA services on node shutdown. 'freeze' disables auto-recovery, 'failover' ensures recovery, 'conditional' recovers on poweroff and freezes on reboot. 'migrate' will migrate running services to other nodes, if possible. With 'freeze' or 'failover', HA Services will always get stopped first on shutdown.", + "enum" : [ + "freeze", + "failover", + "conditional", + "migrate" + ], + "type" : "string", + "verbose_description" : "Describes the policy for handling HA services on poweroff or reboot of a node. Freeze will always freeze services which are still located on the node on shutdown, those services won't be recovered by the HA manager. Failover will not mark the services as frozen and thus the services will get recovered to other nodes, if the shutdown node does not come up again quickly (< 1min). 'conditional' chooses automatically depending on the type of shutdown, i.e., on a reboot the service will be frozen but on a poweroff the service will stay as is, and thus get recovered after about 2 minutes. Migrate will try to move all running services to another node when a reboot or shutdown was triggered. The poweroff process will only continue once no running services are located on the node anymore. If the node comes up again, the service will be moved back to the previously powered-off node, at least if no other migration, reloaction or recovery took place." + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "shutdown_policy=" + }, + "http_proxy" : { + "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')", + "optional" : 1, + "pattern" : "http://.*", + "type" : "string" + }, + "keyboard" : { + "description" : "Default keybord layout for vnc server.", + "enum" : [ + "de", + "de-ch", + "da", + "en-gb", + "en-us", + "es", + "fi", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "hu", + "is", + "it", + "ja", + "lt", + "mk", + "nl", + "no", + "pl", + "pt", + "pt-br", + "sv", + "sl", + "tr" + ], + "optional" : 1, + "type" : "string" + }, + "language" : { + "description" : "Default GUI language.", + "enum" : [ + "ca", + "da", + "de", + "en", + "es", + "eu", + "fa", + "fr", + "he", + "it", + "ja", + "nb", + "nn", + "pl", + "pt_BR", + "ru", + "sl", + "sv", + "tr", + "zh_CN", + "zh_TW" + ], + "optional" : 1, + "type" : "string" + }, + "mac_prefix" : { + "description" : "Prefix for autogenerated MAC addresses.", + "format" : "mac-prefix", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "max_workers" : { + "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "migration" : { + "description" : "For cluster wide migration settings.", + "format" : { + "network" : { + "description" : "CIDR of the (sub) network that is used for migration.", + "format" : "CIDR", + "format_description" : "CIDR", + "optional" : 1, + "type" : "string" + }, + "type" : { + "default" : "secure", + "default_key" : 1, + "description" : "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.", + "enum" : [ + "secure", + "insecure" + ], + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[type=] [,network=]" + }, + "migration_unsecure" : { + "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration. Deprecated, use the 'migration' property instead!", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "next-id" : { + "description" : "Control the range for the free VMID auto-selection pool.", + "format" : { + "lower" : { + "default" : 100, + "description" : "Lower, inclusive boundary for free next-id API range.", + "max" : 999999999, + "min" : 100, + "optional" : 1, + "type" : "integer" + }, + "upper" : { + "default" : 1000000, + "description" : "Upper, exclusive boundary for free next-id API range.", + "max" : 1000000000, + "min" : 100, + "optional" : 1, + "type" : "integer" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[lower=] [,upper=]" + }, + "u2f" : { + "description" : "u2f", + "format" : { + "appid" : { + "description" : "U2F AppId URL override. Defaults to the origin.", + "format_description" : "APPID", + "optional" : 1, + "type" : "string" + }, + "origin" : { + "description" : "U2F Origin override. Mostly useful for single nodes with a single URL.", + "format_description" : "URL", + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[appid=] [,origin=]" + }, + "webauthn" : { + "description" : "webauthn configuration", + "format" : { + "id" : { + "description" : "Relying part ID. Must be the domain name without protocol, port or location. Changing this *will* break existing credentials.", + "format_description" : "DOMAINNAME", + "optional" : 1, + "type" : "string" + }, + "origin" : { + "description" : "Site origin. Must be a `https://` URL (or `http://localhost`). Should contain the address users type in their browsers to access the web interface. Changing this *may* break existing credentials.", + "format_description" : "URL", + "optional" : 1, + "type" : "string" + }, + "rp" : { + "description" : "Relying party name. Any text identifier. Changing this *may* break existing credentials.", + "format_description" : "RELYING_PARTY", + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[id=] [,origin=] [,rp=]" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/options", + "text" : "options" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get cluster status information.", + "method" : "GET", + "name" : "get_status", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "string" + }, + "ip" : { + "description" : "[node] IP of the resolved nodename.", + "optional" : 1, + "type" : "string" + }, + "level" : { + "description" : "[node] Proxmox VE Subscription level, indicates if eligible for enterprise support as well as access to the stable Proxmox VE Enterprise Repository.", + "optional" : 1, + "type" : "string" + }, + "local" : { + "description" : "[node] Indicates if this is the responding node.", + "optional" : 1, + "type" : "boolean" + }, + "name" : { + "type" : "string" + }, + "nodeid" : { + "description" : "[node] ID of the node from the corosync configuration.", + "optional" : 1, + "type" : "integer" + }, + "nodes" : { + "description" : "[cluster] Nodes count, including offline nodes.", + "optional" : 1, + "type" : "integer" + }, + "online" : { + "description" : "[node] Indicates if the node is online or offline.", + "optional" : 1, + "type" : "boolean" + }, + "quorate" : { + "description" : "[cluster] Indicates if there is a majority of nodes online to make decisions", + "optional" : 1, + "type" : "boolean" + }, + "type" : { + "description" : "Indicates the type, either cluster or node. The type defines the object properties e.g. quorate available for type cluster.", + "enum" : [ + "cluster", + "node" + ], + "type" : "string" + }, + "version" : { + "description" : "[cluster] Current version of the corosync configuration file.", + "optional" : 1, + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/status", + "text" : "status" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get next free VMID. Pass a VMID to assert that its free (at time of check).", + "method" : "GET", + "name" : "nextid", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "description" : "The next free VMID.", + "type" : "integer" + } + } + }, + "leaf" : 1, + "path" : "/cluster/nextid", + "text" : "nextid" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Cluster index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster", + "text" : "cluster" + }, + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete rule.", + "method" : "DELETE", + "name" : "delete_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get single rule data.", + "method" : "GET", + "name" : "get_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : null, + "returns" : { + "properties" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "icmp-type" : { + "optional" : 1, + "type" : "string" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "log" : { + "description" : "Log level for firewall rule", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "optional" : 1, + "type" : "string" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Modify rule data.", + "method" : "PUT", + "name" : "update_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "moveto" : { + "description" : "Move rule to new position . Other arguments are ignored.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}", + "text" : "{pos}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List rules.", + "method" : "GET", + "name" : "get_rules", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : null, + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new rule.", + "method" : "POST", + "name" : "create_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 0, + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules", + "text" : "rules" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove IP or Network alias.", + "method" : "DELETE", + "name" : "remove_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read alias.", + "method" : "GET", + "name" : "read_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update IP or Network alias.", + "method" : "PUT", + "name" : "update_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "rename" : { + "description" : "Rename an existing alias.", + "maxLength" : 64, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List aliases", + "method" : "GET", + "name" : "get_aliases", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create IP or Network Alias.", + "method" : "POST", + "name" : "create_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases", + "text" : "aliases" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove IP or Network from IPSet.", + "method" : "DELETE", + "name" : "remove_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read IP or Network settings from IPSet.", + "method" : "GET", + "name" : "read_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update IP or Network settings", + "method" : "PUT", + "name" : "update_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}", + "text" : "{cidr}" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete IPSet", + "method" : "DELETE", + "name" : "delete_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "List IPSet content", + "method" : "GET", + "name" : "get_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{cidr}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Add IP or Network to IPSet.", + "method" : "POST", + "name" : "create_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", "typetext" : " (1 - N)" } } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List IPSets", + "method" : "GET", + "name" : "ipset_index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new IPSet", + "method" : "POST", + "name" : "create_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "rename" : { + "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, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset", + "text" : "ipset" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get VM firewall options.", + "method" : "GET", + "name" : "get_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "dhcp" : { + "default" : 0, + "description" : "Enable DHCP.", + "optional" : 1, + "type" : "boolean" + }, + "enable" : { + "default" : 0, + "description" : "Enable/disable firewall rules.", + "optional" : 1, + "type" : "boolean" + }, + "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, + "type" : "boolean" + }, + "log_level_in" : { + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macfilter" : { + "default" : 1, + "description" : "Enable/disable MAC address filter.", + "optional" : 1, + "type" : "boolean" + }, + "ndp" : { + "default" : 0, + "description" : "Enable NDP (Neighbor Discovery Protocol).", + "optional" : 1, + "type" : "boolean" + }, + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "radv" : { + "description" : "Allow sending Router Advertisement.", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set Firewall options.", + "method" : "PUT", + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dhcp" : { + "default" : 0, + "description" : "Enable DHCP.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "enable" : { + "default" : 0, + "description" : "Enable/disable firewall rules.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "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, + "type" : "boolean", + "typetext" : "" + }, + "log_level_in" : { + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macfilter" : { + "default" : 1, + "description" : "Enable/disable MAC address filter.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ndp" : { + "default" : 0, + "description" : "Enable NDP (Neighbor Discovery Protocol).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "radv" : { + "description" : "Allow sending Router Advertisement.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/options", + "text" : "options" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read firewall log", + "method" : "GET", + "name" : "log", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/log", + "text" : "log" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", + "method" : "GET", + "name" : "refs", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Only list references of specified type.", + "enum" : [ + "alias", + "ipset" + ], + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "type" : { + "enum" : [ + "alias", + "ipset" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs", + "text" : "refs" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/firewall", + "text" : "firewall" + }, + { + "children" : [ + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute fsfreeze-freeze.", + "method" : "POST", + "name" : "fsfreeze-freeze", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/fsfreeze-freeze", + "text" : "fsfreeze-freeze" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute fsfreeze-status.", + "method" : "POST", + "name" : "fsfreeze-status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/fsfreeze-status", + "text" : "fsfreeze-status" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute fsfreeze-thaw.", + "method" : "POST", + "name" : "fsfreeze-thaw", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/fsfreeze-thaw", + "text" : "fsfreeze-thaw" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute fstrim.", + "method" : "POST", + "name" : "fstrim", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/fstrim", + "text" : "fstrim" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-fsinfo.", + "method" : "GET", + "name" : "get-fsinfo", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-fsinfo", + "text" : "get-fsinfo" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-host-name.", + "method" : "GET", + "name" : "get-host-name", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-host-name", + "text" : "get-host-name" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-memory-block-info.", + "method" : "GET", + "name" : "get-memory-block-info", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-memory-block-info", + "text" : "get-memory-block-info" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-memory-blocks.", + "method" : "GET", + "name" : "get-memory-blocks", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-memory-blocks", + "text" : "get-memory-blocks" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-osinfo.", + "method" : "GET", + "name" : "get-osinfo", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-osinfo", + "text" : "get-osinfo" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-time.", + "method" : "GET", + "name" : "get-time", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-time", + "text" : "get-time" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-timezone.", + "method" : "GET", + "name" : "get-timezone", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-timezone", + "text" : "get-timezone" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-users.", + "method" : "GET", + "name" : "get-users", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-users", + "text" : "get-users" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute get-vcpus.", + "method" : "GET", + "name" : "get-vcpus", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/get-vcpus", + "text" : "get-vcpus" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute info.", + "method" : "GET", + "name" : "info", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/info", + "text" : "info" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Execute network-get-interfaces.", + "method" : "GET", + "name" : "network-get-interfaces", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/network-get-interfaces", + "text" : "network-get-interfaces" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute ping.", + "method" : "POST", + "name" : "ping", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/ping", + "text" : "ping" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute shutdown.", + "method" : "POST", + "name" : "shutdown", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/shutdown", + "text" : "shutdown" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute suspend-disk.", + "method" : "POST", + "name" : "suspend-disk", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/suspend-disk", + "text" : "suspend-disk" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute suspend-hybrid.", + "method" : "POST", + "name" : "suspend-hybrid", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/suspend-hybrid", + "text" : "suspend-hybrid" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute suspend-ram.", + "method" : "POST", + "name" : "suspend-ram", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/suspend-ram", + "text" : "suspend-ram" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Sets the password for the given user to the given password", + "method" : "POST", + "name" : "set-user-password", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "crypted" : { + "default" : 0, + "description" : "set to 1 if the password has already been passed through crypt()", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "The new password.", + "maxLength" : 1024, + "minLength" : 5, + "type" : "string", + "typetext" : "" + }, + "username" : { + "description" : "The user to set the password for.", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/set-user-password", + "text" : "set-user-password" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Executes the given command in the vm via the guest-agent and returns an object with the pid.", + "method" : "POST", + "name" : "exec", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "command" : { + "description" : "The command as a list of program + arguments", + "format" : "string-alist", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "input-data" : { + "description" : "Data to pass as 'input-data' to the guest. Usually treated as STDIN to 'command'.", + "maxLength" : 65536, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "pid" : { + "description" : "The PID of the process started by the guest-agent.", + "type" : "integer" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/exec", + "text" : "exec" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Gets the status of the given pid started by the guest-agent", + "method" : "GET", + "name" : "exec-status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pid" : { + "description" : "The PID to query", + "type" : "integer", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "err-data" : { + "description" : "stderr of the process", + "optional" : 1, + "type" : "string" + }, + "err-truncated" : { + "description" : "true if stderr was not fully captured", + "optional" : 1, + "type" : "boolean" + }, + "exitcode" : { + "description" : "process exit code if it was normally terminated.", + "optional" : 1, + "type" : "integer" + }, + "exited" : { + "description" : "Tells if the given command has exited yet.", + "type" : "boolean" + }, + "out-data" : { + "description" : "stdout of the process", + "optional" : 1, + "type" : "string" + }, + "out-truncated" : { + "description" : "true if stdout was not fully captured", + "optional" : 1, + "type" : "boolean" + }, + "signal" : { + "description" : "signal number or exception code if the process was abnormally terminated.", + "optional" : 1, + "type" : "integer" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/exec-status", + "text" : "exec-status" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Reads the given file via guest agent. Is limited to 16777216 bytes.", + "method" : "GET", + "name" : "file-read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "file" : { + "description" : "The path to the file", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a `content` property.", + "properties" : { + "content" : { + "description" : "The content of the file, maximum 16777216", + "type" : "string" + }, + "truncated" : { + "description" : "If set to 1, the output is truncated and not complete", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/file-read", + "text" : "file-read" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Writes the given file via guest agent.", + "method" : "POST", + "name" : "file-write", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "content" : { + "description" : "The content to write into the file.", + "maxLength" : 61440, + "type" : "string", + "typetext" : "" + }, + "encode" : { + "default" : 1, + "description" : "If set, the content will be encoded as base64 (required by QEMU).Otherwise the content needs to be encoded beforehand - defaults to true.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "file" : { + "description" : "The path to the file.", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/agent/file-write", + "text" : "file-write" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Qemu Agent command index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 1, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "description" : "Returns the list of Qemu Agent commands", + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Execute Qemu Guest Agent commands.", + "method" : "POST", + "name" : "agent", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "command" : { + "description" : "The QGA command.", + "enum" : [ + "fsfreeze-freeze", + "fsfreeze-status", + "fsfreeze-thaw", + "fstrim", + "get-fsinfo", + "get-host-name", + "get-memory-block-info", + "get-memory-blocks", + "get-osinfo", + "get-time", + "get-timezone", + "get-users", + "get-vcpus", + "info", + "network-get-interfaces", + "ping", + "shutdown", + "suspend-disk", + "suspend-hybrid", + "suspend-ram" + ], + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "Returns an object with a single `result` property.", + "type" : "object" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/agent", + "text" : "agent" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read VM RRD statistics (returns PNG)", + "method" : "GET", + "name" : "rrd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" + }, + "ds" : { + "description" : "The list of datasources you want to display.", + "format" : "pve-configid-list", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/rrd", + "text" : "rrd" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read VM RRD statistics", + "method" : "GET", + "name" : "rrddata", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/rrddata", + "text" : "rrddata" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get the virtual machine configuration with pending configuration changes applied. Set the 'current' parameter to get the current configuration instead.", + "method" : "GET", + "name" : "vm_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "current" : { + "default" : 0, + "description" : "Get current values (instead of pending values).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapshot" : { + "description" : "Fetch config values from given snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "description" : "The VM configuration.", + "properties" : { + "acpi" : { + "default" : 1, + "description" : "Enable/disable ACPI.", + "optional" : 1, + "type" : "boolean" + }, + "agent" : { + "description" : "Enable/disable communication with the Qemu Guest Agent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable communication with a Qemu Guest Agent (QGA) running in the VM.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after moving a disk or migrating the VM.", + "optional" : 1, + "type" : "boolean" + }, + "type" : { + "default" : "virtio", + "description" : "Select the agent type", + "enum" : [ + "virtio", + "isa" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "arch" : { + "description" : "Virtual processor architecture. Defaults to the host.", + "enum" : [ + "x86_64", + "aarch64" + ], + "optional" : 1, + "type" : "string" + }, + "args" : { + "description" : "Arbitrary arguments passed to kvm.", + "optional" : 1, + "type" : "string", + "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n" + }, + "audio0" : { + "description" : "Configure a audio device, useful in combination with QXL/Spice.", + "format" : { + "device" : { + "description" : "Configure an audio device.", + "enum" : [ + "ich9-intel-hda", + "intel-hda", + "AC97" + ], + "type" : "string" + }, + "driver" : { + "default" : "spice", + "description" : "Driver backend for the audio device.", + "enum" : [ + "spice", + "none" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "autostart" : { + "default" : 0, + "description" : "Automatic restart after crash (currently ignored).", + "optional" : 1, + "type" : "boolean" + }, + "balloon" : { + "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "bios" : { + "default" : "seabios", + "description" : "Select BIOS implementation.", + "enum" : [ + "seabios", + "ovmf" + ], + "optional" : 1, + "type" : "string" + }, + "boot" : { + "description" : "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated.", + "format" : "pve-qm-boot", + "optional" : 1, + "type" : "string" + }, + "bootdisk" : { + "description" : "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead.", + "format" : "pve-qm-bootdisk", + "optional" : 1, + "pattern" : "(ide|sata|scsi|virtio)\\d+", + "type" : "string" + }, + "cdrom" : { + "description" : "This is an alias for option -ide2", + "format" : "pve-qm-ide", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "cicustom" : { + "description" : "cloud-init: Specify custom files to replace the automatically generated ones at start.", + "format" : "pve-qm-cicustom", + "optional" : 1, + "type" : "string" + }, + "cipassword" : { + "description" : "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.", + "optional" : 1, + "type" : "string" + }, + "citype" : { + "description" : "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.", + "enum" : [ + "configdrive2", + "nocloud", + "opennebula" + ], + "optional" : 1, + "type" : "string" + }, + "ciuser" : { + "description" : "cloud-init: User name to change ssh keys and password for instead of the image's configured default user.", + "optional" : 1, + "type" : "string" + }, + "cores" : { + "default" : 1, + "description" : "The number of cores per socket.", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cpu" : { + "description" : "Emulated CPU type.", + "format" : "pve-vm-cpu-conf", + "optional" : 1, + "type" : "string" + }, + "cpulimit" : { + "default" : 0, + "description" : "Limit of CPU usage.", + "maximum" : 128, + "minimum" : 0, + "optional" : 1, + "type" : "number", + "verbose_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." + }, + "cpuunits" : { + "default" : "cgroup v1: 1024, cgroup v2: 100", + "description" : "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2.", + "maximum" : 262144, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "verbose_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." + }, + "description" : { + "description" : "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, + "optional" : 1, + "type" : "string" + }, + "digest" : { + "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", + "type" : "string" + }, + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars.", + "format" : { + "efitype" : { + "default" : "2m", + "description" : "Size and type of the OVMF EFI vars. '4m' is newer and recommended, and required for Secure Boot. For backwards compatibility, '2m' is used if not otherwise specified.", + "enum" : [ + "2m", + "4m" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "pre-enrolled-keys" : { + "default" : 0, + "description" : "Use am EFI vars template with distribution-specific and Microsoft Standard keys enrolled, if used with 'efitype=4m'. Note that this will enable Secure Boot by default, though it can still be turned off from within the VM.", + "optional" : 1, + "type" : "boolean" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string" + }, + "freeze" : { + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "optional" : 1, + "type" : "boolean" + }, + "hookscript" : { + "description" : "Script that will be executed during various steps in the vms lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string" + }, + "hostpci[n]" : { + "description" : "Map host PCI devices into guest.", + "format" : "pve-qm-hostpci", + "optional" : 1, + "type" : "string", + "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "hotplug" : { + "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. Using '1' as value is an alias for the default `network,disk,usb`.", + "format" : "pve-hotplug-features", + "optional" : 1, + "type" : "string" + }, + "hugepages" : { + "description" : "Enable/disable hugepages memory.", + "enum" : [ + "any", + "2", + "1024" + ], + "optional" : 1, + "type" : "string" + }, + "ide[n]" : { + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], + "optional" : 1, + "type" : "string" + }, + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_rd_length" : { + "alias" : "bps_rd_max_length" + }, + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_wr_length" : { + "alias" : "bps_wr_max_length" + }, + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "optional" : 1, + "type" : "string" + }, + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" + }, + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" + }, + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_length" : { + "alias" : "iops_wr_max_length" + }, + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "media" : { + "default" : "disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], + "optional" : 1, + "type" : "string" + }, + "model" : { + "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", + "format" : "urlencoded", + "format_description" : "model", + "maxLength" : 120, + "optional" : 1, + "type" : "string" + }, + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "optional" : 1, + "type" : "integer" + }, + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, + "optional" : 1, + "type" : "string" + }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", + "optional" : 1, + "type" : "boolean" + }, + "trans" : { + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + }, + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "ipconfig[n]" : { + "description" : "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string" + }, + "ivshmem" : { + "description" : "Inter-VM shared memory. Useful for direct communication between VMs, or to the host.", + "format" : { + "name" : { + "description" : "The name of the file. Will be prefixed with 'pve-shm-'. Default is the VMID. Will be deleted when the VM is stopped.", + "format_description" : "string", + "optional" : 1, + "pattern" : "[a-zA-Z0-9\\-]+", + "type" : "string" + }, + "size" : { + "description" : "The size of the file in MB.", + "minimum" : 1, + "type" : "integer" + } + }, + "optional" : 1, + "type" : "string" + }, + "keephugepages" : { + "default" : 0, + "description" : "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts.", + "optional" : 1, + "type" : "boolean" + }, + "keyboard" : { + "default" : null, + "description" : "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS.", + "enum" : [ + "de", + "de-ch", + "da", + "en-gb", + "en-us", + "es", + "fi", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "hu", + "is", + "it", + "ja", + "lt", + "mk", + "nl", + "no", + "pl", + "pt", + "pt-br", + "sv", + "sl", + "tr" + ], + "optional" : 1, + "type" : "string" + }, + "kvm" : { + "default" : 1, + "description" : "Enable/disable KVM hardware virtualization.", + "optional" : 1, + "type" : "boolean" + }, + "localtime" : { + "description" : "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS.", + "optional" : 1, + "type" : "boolean" + }, + "lock" : { + "description" : "Lock/unlock the VM.", + "enum" : [ + "backup", + "clone", + "create", + "migrate", + "rollback", + "snapshot", + "snapshot-delete", + "suspending", + "suspended" + ], + "optional" : 1, + "type" : "string" + }, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|q35|pc-q35-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|virt(?:-\\d+(\\.\\d+)+)?(\\+pve\\d+)?)", + "type" : "string" + }, + "memory" : { + "default" : 512, + "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", + "minimum" : 16, + "optional" : 1, + "type" : "integer" + }, + "migrate_downtime" : { + "default" : 0.1, + "description" : "Set maximum tolerated downtime (in seconds) for migrations.", + "minimum" : 0, + "optional" : 1, + "type" : "number" + }, + "migrate_speed" : { + "default" : 0, + "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "name" : { + "description" : "Set a name for the VM. Only used on the configuration web interface.", + "format" : "dns-name", + "optional" : 1, + "type" : "string" + }, + "nameserver" : { + "description" : "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "format" : "address-list", + "optional" : 1, + "type" : "string" + }, + "net[n]" : { + "description" : "Specify network devices.", + "format" : { + "bridge" : { + "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n", + "format" : "pve-bridge-id", + "format_description" : "bridge", + "optional" : 1, + "type" : "string" + }, + "e1000" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000-82540em" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000-82544gc" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000-82545em" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000e" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "firewall" : { + "description" : "Whether this interface should be protected by the firewall.", + "optional" : 1, + "type" : "boolean" + }, + "i82551" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "i82557b" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "i82559er" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "link_down" : { + "description" : "Whether this interface should be disconnected (like pulling the plug).", + "optional" : 1, + "type" : "boolean" + }, + "macaddr" : { + "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.", + "format" : "mac-addr", + "format_description" : "XX:XX:XX:XX:XX:XX", + "optional" : 1, + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." + }, + "model" : { + "default_key" : 1, + "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.", + "enum" : [ + "e1000", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em", + "e1000e", + "i82551", + "i82557b", + "i82559er", + "ne2k_isa", + "ne2k_pci", + "pcnet", + "rtl8139", + "virtio", + "vmxnet3" + ], + "type" : "string" + }, + "mtu" : { + "description" : "Force MTU, for VirtIO only. Set to '1' to use the bridge MTU", + "maximum" : 65520, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "ne2k_isa" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "ne2k_pci" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "pcnet" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "queues" : { + "description" : "Number of packet queues to be used on the device.", + "maximum" : 16, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "rate" : { + "description" : "Rate limit in mbps (megabytes per second) as floating point number.", + "minimum" : 0, + "optional" : 1, + "type" : "number" + }, + "rtl8139" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "tag" : { + "description" : "VLAN tag to apply to packets on this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "trunks" : { + "description" : "VLAN trunks to pass through this interface.", + "format_description" : "vlanid[;vlanid...]", + "optional" : 1, + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "virtio" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "vmxnet3" : { + "alias" : "macaddr", + "keyAlias" : "model" + } + }, + "optional" : 1, + "type" : "string" + }, + "numa" : { + "default" : 0, + "description" : "Enable/disable NUMA.", + "optional" : 1, + "type" : "boolean" + }, + "numa[n]" : { + "description" : "NUMA topology.", + "format" : { + "cpus" : { + "description" : "CPUs accessing this NUMA node.", + "format_description" : "id[-id];...", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "hostnodes" : { + "description" : "Host NUMA nodes to use.", + "format_description" : "id[-id];...", + "optional" : 1, + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "memory" : { + "description" : "Amount of memory this NUMA node provides.", + "optional" : 1, + "type" : "number" + }, + "policy" : { + "description" : "NUMA allocation policy.", + "enum" : [ + "preferred", + "bind", + "interleave" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "onboot" : { + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup.", + "optional" : 1, + "type" : "boolean" + }, + "ostype" : { + "description" : "Specify guest operating system.", + "enum" : [ + "other", + "wxp", + "w2k", + "w2k3", + "w2k8", + "wvista", + "win7", + "win8", + "win10", + "win11", + "l24", + "l26", + "solaris" + ], + "optional" : 1, + "type" : "string", + "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 5.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n" + }, + "parallel[n]" : { + "description" : "Map host parallel devices (n is 0 to 2).", + "optional" : 1, + "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", + "type" : "string", + "verbose_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\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "protection" : { + "default" : 0, + "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.", + "optional" : 1, + "type" : "boolean" + }, + "reboot" : { + "default" : 1, + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "optional" : 1, + "type" : "boolean" + }, + "rng0" : { + "description" : "Configure a VirtIO-based Random Number Generator.", + "format" : { + "max_bytes" : { + "default" : 1024, + "description" : "Maximum bytes of entropy allowed to get injected into the guest every 'period' milliseconds. Prefer a lower value when using '/dev/random' as source. Use `0` to disable limiting (potentially dangerous!).", + "optional" : 1, + "type" : "integer" + }, + "period" : { + "default" : 1000, + "description" : "Every 'period' milliseconds the entropy-injection quota is reset, allowing the guest to retrieve another 'max_bytes' of entropy.", + "optional" : 1, + "type" : "integer" + }, + "source" : { + "default_key" : 1, + "description" : "The file on the host to gather entropy from. In most cases '/dev/urandom' should be preferred over '/dev/random' to avoid entropy-starvation issues on the host. Using urandom does *not* decrease security in any meaningful way, as it's still seeded from real entropy, and the bytes provided will most likely be mixed with real entropy on the guest as well. '/dev/hwrng' can be used to pass through a hardware RNG from the host.", + "enum" : [ + "/dev/urandom", + "/dev/random", + "/dev/hwrng" + ], + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "sata[n]" : { + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], + "optional" : 1, + "type" : "string" + }, + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_rd_length" : { + "alias" : "bps_rd_max_length" + }, + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_wr_length" : { + "alias" : "bps_wr_max_length" + }, + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "optional" : 1, + "type" : "string" + }, + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" + }, + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" + }, + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_length" : { + "alias" : "iops_wr_max_length" + }, + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "media" : { + "default" : "disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], + "optional" : 1, + "type" : "string" + }, + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "optional" : 1, + "type" : "integer" + }, + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, + "optional" : 1, + "type" : "string" + }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", + "optional" : 1, + "type" : "boolean" + }, + "trans" : { + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + }, + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "scsi[n]" : { + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30).", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], + "optional" : 1, + "type" : "string" + }, + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_rd_length" : { + "alias" : "bps_rd_max_length" + }, + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_wr_length" : { + "alias" : "bps_wr_max_length" + }, + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "optional" : 1, + "type" : "string" + }, + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" + }, + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" + }, + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read alias.", - "method" : "GET", - "name" : "read_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update IP or Network alias.", - "method" : "PUT", - "name" : "update_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "rename" : { - "description" : "Rename an existing alias.", - "maxLength" : 64, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "iops_wr_length" : { + "alias" : "iops_wr_max_length" }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}", - "text" : "{name}" - } - ], - "info" : { - "GET" : { - "description" : "List aliases", - "method" : "GET", - "name" : "get_aliases", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "name" : { - "type" : "string" - } + "optional" : 1, + "type" : "integer" }, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create IP or Network Alias.", - "method" : "POST", - "name" : "create_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR", - "type" : "string", - "typetext" : "" + "iothread" : { + "description" : "Whether to use iothreads for this drive", + "optional" : 1, + "type" : "boolean" }, - "comment" : { + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "number" }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "media" : { + "default" : "disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], + "optional" : 1, "type" : "string" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "queues" : { + "description" : "Number of queues.", + "minimum" : 2, + "optional" : 1, + "type" : "integer" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases", - "text" : "aliases" - }, - { - "children" : [ - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Remove IP or Network from IPSet.", - "method" : "DELETE", - "name" : "remove_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read IP or Network settings from IPSet.", - "method" : "GET", - "name" : "read_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update IP or Network settings", - "method" : "PUT", - "name" : "update_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}", - "text" : "{cidr}" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete IPSet", - "method" : "DELETE", - "name" : "delete_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "ro" : { + "description" : "Whether the drive is read-only.", + "optional" : 1, + "type" : "boolean" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "scsiblock" : { + "default" : 0, + "description" : "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host", + "optional" : 1, + "type" : "boolean" }, - "protected" : 1, - "returns" : { - "type" : "null" + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "optional" : 1, + "type" : "integer" + }, + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, + "optional" : 1, + "type" : "string" + }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", + "optional" : 1, + "type" : "boolean" + }, + "trans" : { + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + }, + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } }, - "GET" : { - "description" : "List IPSet content", - "method" : "GET", - "name" : "get_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "optional" : 1, + "type" : "string" + }, + "scsihw" : { + "default" : "lsi", + "description" : "SCSI controller model", + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], + "optional" : 1, + "type" : "string" + }, + "searchdomain" : { + "description" : "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "optional" : 1, + "type" : "string" + }, + "serial[n]" : { + "description" : "Create a serial device inside the VM (n is 0 to 3)", + "optional" : 1, + "pattern" : "(/dev/.+|socket)", + "type" : "string", + "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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 -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "shares" : { + "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. Auto-ballooning is done by pvestatd.", + "maximum" : 50000, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", + "format" : "pve-qm-smbios1", + "maxLength" : 512, + "optional" : 1, + "type" : "string" + }, + "smp" : { + "default" : 1, + "description" : "The number of CPUs. Please use option -sockets instead.", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "sockets" : { + "default" : 1, + "description" : "The number of CPU sockets.", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "spice_enhancements" : { + "description" : "Configure additional enhancements for SPICE.", + "format" : { + "foldersharing" : { + "default" : "0", + "description" : "Enable folder sharing via SPICE. Needs Spice-WebDAV daemon installed in the VM.", + "optional" : 1, + "type" : "boolean" }, - "returns" : { - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{cidr}", - "rel" : "child" - } + "videostreaming" : { + "default" : "off", + "description" : "Enable video streaming. Uses compression for detected video streams.", + "enum" : [ + "off", + "all", + "filter" ], - "type" : "array" + "optional" : 1, + "type" : "string" } }, - "POST" : { - "description" : "Add IP or Network to IPSet.", - "method" : "POST", - "name" : "create_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "optional" : 1, + "type" : "string" + }, + "sshkeys" : { + "description" : "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).", + "format" : "urlencoded", + "optional" : 1, + "type" : "string" + }, + "startdate" : { + "default" : "now", + "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})?)", + "type" : "string", + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + }, + "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.", + "format" : "pve-startup-order", + "optional" : 1, + "type" : "string", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "tablet" : { + "default" : 1, + "description" : "Enable/disable the USB tablet device.", + "optional" : 1, + "type" : "boolean", + "verbose_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 (`qm set --vga qxl`)." + }, + "tags" : { + "description" : "Tags of the VM. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string" + }, + "tdf" : { + "default" : 0, + "description" : "Enable/disable time drift fix.", + "optional" : 1, + "type" : "boolean" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean" + }, + "tpmstate0" : { + "description" : "Configure a Disk for storing TPM state. The format is fixed to 'raw'.", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "returns" : { - "type" : "null" + "version" : { + "default" : "v2.0", + "description" : "The TPM interface version. v2.0 is newer and should be preferred. Note that this cannot be changed later on.", + "enum" : [ + "v1.2", + "v2.0" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" } - } + }, + "optional" : 1, + "type" : "string" }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}", - "text" : "{name}" - } - ], - "info" : { - "GET" : { - "description" : "List IPSets", - "method" : "GET", - "name" : "ipset_index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "unused[n]" : { + "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "volume" : { + "alias" : "file" } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + }, + "optional" : 1, + "type" : "string" }, - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } + "usb[n]" : { + "description" : "Configure an USB device (n is 0 to 4).", + "format" : { + "host" : { + "default_key" : 1, + "description" : "The Host USB device or port or the value 'spice'. 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\nmachines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n", + "format" : "pve-qm-usb-device", + "format_description" : "HOSTUSBDEVICE|spice", + "type" : "string" }, - "type" : "object" + "usb3" : { + "default" : 0, + "description" : "Specifies whether if given host option is a USB3 device or port.", + "optional" : 1, + "type" : "boolean" + } }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" + "optional" : 1, + "type" : "string" + }, + "vcpus" : { + "default" : 0, + "description" : "Number of hotplugged vcpus.", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "vga" : { + "description" : "Configure the VGA hardware.", + "format" : { + "memory" : { + "description" : "Sets the VGA memory (in MiB). Has no effect with serial display.", + "maximum" : 512, + "minimum" : 4, + "optional" : 1, + "type" : "integer" + }, + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", + "enum" : [ + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "none", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "virtio-gl", + "vmware" + ], + "optional" : 1, + "type" : "string" } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create new IPSet", - "method" : "POST", - "name" : "create_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { + }, + "optional" : 1, + "type" : "string", + "verbose_description" : "Configure the VGA Hardware. If you want to use high resolution modes (>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal." + }, + "virtio[n]" : { + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "string" + }, + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer" }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "bps_rd_length" : { + "alias" : "bps_rd_max_length" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "rename" : { - "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, - "minLength" : 2, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" + "type" : "integer" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset", - "text" : "ipset" - }, - { - "info" : { - "GET" : { - "description" : "Get VM firewall options.", - "method" : "GET", - "name" : "get_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "bps_wr_length" : { + "alias" : "bps_wr_max_length" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "properties" : { - "dhcp" : { - "description" : "Enable DHCP.", "optional" : 1, - "type" : "boolean" + "type" : "integer" }, - "enable" : { - "description" : "Enable/disable firewall rules.", + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], "optional" : 1, - "type" : "boolean" + "type" : "string" }, - "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.", + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", "optional" : 1, "type" : "boolean" }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "ignore", + "on" ], "optional" : 1, "type" : "string" }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], "optional" : 1, "type" : "string" }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "type" : "boolean" + "type" : "integer" }, - "ndp" : { - "description" : "Enable NDP.", + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "boolean" + "type" : "integer" }, - "policy_in" : { - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string" + "type" : "integer" }, - "policy_out" : { - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string" + "type" : "integer" }, - "radv" : { - "description" : "Allow sending Router Advertisement.", + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "boolean" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Set Firewall options.", - "method" : "PUT", - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer" }, - "dhcp" : { - "description" : "Enable DHCP.", + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "integer" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer" }, - "enable" : { - "description" : "Enable/disable firewall rules.", + "iops_wr_length" : { + "alias" : "iops_wr_max_length" + }, + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "integer" }, - "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.", + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "integer" }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], + "iothread" : { + "description" : "Whether to use iothreads for this drive", "optional" : 1, - "type" : "string" + "type" : "boolean" }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string" + "type" : "number" }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "number" }, - "ndp" : { - "description" : "Enable NDP.", + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "number" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "policy_in" : { - "description" : "Input policy.", + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "media" : { + "default" : "disk", + "description" : "The drive's media type.", "enum" : [ - "ACCEPT", - "REJECT", - "DROP" + "cdrom", + "disk" ], "optional" : 1, "type" : "string" }, - "policy_out" : { - "description" : "Output policy.", + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", "enum" : [ - "ACCEPT", - "REJECT", - "DROP" + "ignore", + "report", + "stop" ], "optional" : 1, "type" : "string" }, - "radv" : { - "description" : "Allow sending Router Advertisement.", + "ro" : { + "description" : "Whether the drive is read-only.", "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "boolean" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/options", - "text" : "options" - }, - { - "info" : { - "GET" : { - "description" : "Read firewall log", - "method" : "GET", - "name" : "log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "limit" : { - "minimum" : 0, + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" + "type" : "integer" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, + "optional" : 1, + "type" : "string" }, - "start" : { - "minimum" : 0, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/log", - "text" : "log" - }, - { - "info" : { - "GET" : { - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "method" : "GET", - "name" : "refs", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" }, - "type" : { - "description" : "Only list references of specified type.", + "trans" : { + "description" : "Force disk geometry bios translation mode.", "enum" : [ - "alias", - "ipset" + "none", + "lba", + "auto" ], "optional" : 1, "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "type" : { - "enum" : [ - "alias", - "ipset" - ], - "type" : "string" - } + "volume" : { + "alias" : "file" }, - "type" : "object" + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + } }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs", - "text" : "refs" - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/firewall", - "text" : "firewall" - }, - { - "info" : { - "GET" : { - "description" : "Read VM RRD statistics (returns PNG)", - "method" : "GET", - "name" : "rrd", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], "optional" : 1, "type" : "string" }, - "ds" : { - "description" : "The list of datasources you want to display.", - "format" : "pve-configid-list", - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "protected" : 1, - "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/rrd", - "text" : "rrd" - }, - { - "info" : { - "GET" : { - "description" : "Read VM RRD statistics", - "method" : "GET", - "name" : "rrddata", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], + "vmgenid" : { + "default" : "1 (autogenerated)", + "description" : "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly.", + "format_description" : "UUID", "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "pattern" : "(?:[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}|[01])", "type" : "string", - "typetext" : "" + "verbose_description" : "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file." }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], + "vmstatestorage" : { + "description" : "Default storage for VM state volumes/files.", + "format" : "pve-storage-id", + "optional" : 1, "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "protected" : 1, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/rrddata", - "text" : "rrddata" - }, - { - "info" : { - "GET" : { - "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).", - "method" : "GET", - "name" : "vm_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "current" : { - "default" : 0, - "description" : "Get current values (instead of pending values).", + "watchdog" : { + "description" : "Create a virtual hardware watchdog device.", + "format" : "pve-qm-watchdog", "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "properties" : { - "digest" : { - "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", - "type" : "string" + "verbose_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" : "object" } }, "POST" : { + "allowtoken" : 1, "description" : "Set virtual machine options (asynchrounous API).", "method" : "POST", "name" : "update_vm_async", @@ -5766,11 +14712,43 @@ var pveapi = [ "typetext" : "" }, "agent" : { - "default" : 0, - "description" : "Enable/disable Qemu GuestAgent.", + "description" : "Enable/disable communication with the Qemu Guest Agent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable communication with a Qemu Guest Agent (QGA) running in the VM.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after moving a disk or migrating the VM.", + "optional" : 1, + "type" : "boolean" + }, + "type" : { + "default" : "virtio", + "description" : "Select the agent type", + "enum" : [ + "virtio", + "isa" + ], + "optional" : 1, + "type" : "string" + } + }, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string", + "typetext" : "[enabled=]<1|0> [,fstrim_cloned_disks=<1|0>] [,type=]" + }, + "arch" : { + "description" : "Virtual processor architecture. Defaults to the host.", + "enum" : [ + "x86_64", + "aarch64" + ], + "optional" : 1, + "type" : "string" }, "args" : { "description" : "Arbitrary arguments passed to kvm.", @@ -5779,6 +14757,33 @@ var pveapi = [ "typetext" : "", "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n" }, + "audio0" : { + "description" : "Configure a audio device, useful in combination with QXL/Spice.", + "format" : { + "device" : { + "description" : "Configure an audio device.", + "enum" : [ + "ich9-intel-hda", + "intel-hda", + "AC97" + ], + "type" : "string" + }, + "driver" : { + "default" : "spice", + "description" : "Driver backend for the audio device.", + "enum" : [ + "spice", + "none" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "device= [,driver=]" + }, "autostart" : { "default" : 0, "description" : "Automatic restart after crash (currently ignored).", @@ -5812,14 +14817,14 @@ var pveapi = [ "type" : "string" }, "boot" : { - "default" : "cdn", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", + "description" : "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated.", + "format" : "pve-qm-boot", "optional" : 1, - "pattern" : "[acdn]{1,4}", - "type" : "string" + "type" : "string", + "typetext" : "[[legacy=]<[acdn]{1,4}>] [,order=]" }, "bootdisk" : { - "description" : "Enable booting from specified disk.", + "description" : "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead.", "format" : "pve-qm-bootdisk", "optional" : 1, "pattern" : "(ide|sata|scsi|virtio)\\d+", @@ -5832,6 +14837,35 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "cicustom" : { + "description" : "cloud-init: Specify custom files to replace the automatically generated ones at start.", + "format" : "pve-qm-cicustom", + "optional" : 1, + "type" : "string", + "typetext" : "[meta=] [,network=] [,user=] [,vendor=]" + }, + "cipassword" : { + "description" : "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "citype" : { + "description" : "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.", + "enum" : [ + "configdrive2", + "nocloud", + "opennebula" + ], + "optional" : 1, + "type" : "string" + }, + "ciuser" : { + "description" : "cloud-init: User name to change ssh keys and password for instead of the image's configured default user.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "cores" : { "default" : 1, "description" : "The number of cores per socket.", @@ -5842,54 +14876,10 @@ var pveapi = [ }, "cpu" : { "description" : "Emulated CPU type.", - "format" : { - "cputype" : { - "default" : "kvm64", - "default_key" : 1, - "description" : "Emulated CPU type.", - "enum" : [ - "486", - "athlon", - "Broadwell", - "Broadwell-noTSX", - "Conroe", - "core2duo", - "coreduo", - "Haswell", - "Haswell-noTSX", - "host", - "IvyBridge", - "kvm32", - "kvm64", - "Nehalem", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "Penryn", - "pentium", - "pentium2", - "pentium3", - "phenom", - "qemu32", - "qemu64", - "SandyBridge", - "Skylake-Client", - "Westmere" - ], - "type" : "string" - }, - "hidden" : { - "default" : 0, - "description" : "Do not identify as a KVM virtual machine.", - "optional" : 1, - "type" : "boolean" - } - }, + "format" : "pve-vm-cpu-conf", "optional" : 1, "type" : "string", - "typetext" : "[cputype=] [,hidden=<1|0>]" + "typetext" : "[[cputype=]] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>] [,hv-vendor-id=] [,phys-bits=<8-64|host>] [,reported-model=]" }, "cpulimit" : { "default" : 0, @@ -5902,14 +14892,14 @@ var pveapi = [ "verbose_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." }, "cpuunits" : { - "default" : 1024, - "description" : "CPU weight for a VM.", - "maximum" : 500000, - "minimum" : 0, + "default" : "cgroup v1: 1024, cgroup v2: 100", + "description" : "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2.", + "maximum" : 262144, + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - 500000)", - "verbose_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." + "typetext" : " (1 - 262144)", + "verbose_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." }, "delete" : { "description" : "A list of settings you want to delete.", @@ -5919,7 +14909,8 @@ var pveapi = [ "typetext" : "" }, "description" : { - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", + "description" : "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, "optional" : 1, "type" : "string", "typetext" : "" @@ -5931,6 +14922,68 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "efitype" : { + "default" : "2m", + "description" : "Size and type of the OVMF EFI vars. '4m' is newer and recommended, and required for Secure Boot. For backwards compatibility, '2m' is used if not otherwise specified.", + "enum" : [ + "2m", + "4m" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, + "pre-enrolled-keys" : { + "default" : 0, + "description" : "Use am EFI vars template with distribution-specific and Microsoft Standard keys enrolled, if used with 'efitype=4m'. Note that this will enable Secure Boot by default, though it can still be turned off from within the VM.", + "optional" : 1, + "type" : "boolean" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,efitype=<2m|4m>] [,format=] [,import-from=] [,pre-enrolled-keys=<1|0>] [,size=]" + }, "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, @@ -5944,17 +14997,24 @@ var pveapi = [ "type" : "boolean", "typetext" : "" }, + "hookscript" : { + "description" : "Script that will be executed during various steps in the vms lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "hostpci[n]" : { "description" : "Map host PCI devices into guest.", "format" : "pve-qm-hostpci", "optional" : 1, "type" : "string", - "typetext" : "[host=] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=] [,x-vga=<1|0>]", - "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer \npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + "typetext" : "[host=] [,device-id=] [,legacy-igd=<1|0>] [,mdev=] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=] [,sub-device-id=] [,sub-vendor-id=] [,vendor-id=] [,x-vga=<1|0>]", + "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" }, "hotplug" : { "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'.", + "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. Using '1' as value is an alias for the default `network,disk,usb`.", "format" : "pve-hotplug-features", "optional" : 1, "type" : "string", @@ -5971,13 +15031,14 @@ var pveapi = [ "type" : "string" }, "ide[n]" : { - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -6089,6 +15150,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -6235,6 +15303,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -6243,7 +15318,12 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, "type" : "boolean" }, @@ -6270,15 +15350,56 @@ var pveapi = [ ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" + }, + "ipconfig[n]" : { + "description" : "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string", + "typetext" : "[gw=] [,gw6=] [,ip=] [,ip6=]" + }, + "ivshmem" : { + "description" : "Inter-VM shared memory. Useful for direct communication between VMs, or to the host.", + "format" : { + "name" : { + "description" : "The name of the file. Will be prefixed with 'pve-shm-'. Default is the VMID. Will be deleted when the VM is stopped.", + "format_description" : "string", + "optional" : 1, + "pattern" : "[a-zA-Z0-9\\-]+", + "type" : "string" + }, + "size" : { + "description" : "The size of the file in MB.", + "minimum" : 1, + "type" : "integer" } }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "size= [,name=]" + }, + "keephugepages" : { + "default" : 0, + "description" : "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, "keyboard" : { - "default" : "en-us", - "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.", + "default" : null, + "description" : "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS.", "enum" : [ "de", "de-ch", @@ -6317,7 +15438,7 @@ var pveapi = [ "typetext" : "" }, "localtime" : { - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "description" : "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS.", "optional" : 1, "type" : "boolean", "typetext" : "" @@ -6325,19 +15446,24 @@ var pveapi = [ "lock" : { "description" : "Lock/unlock the VM.", "enum" : [ - "migrate", "backup", + "clone", + "create", + "migrate", + "rollback", "snapshot", - "rollback" + "snapshot-delete", + "suspending", + "suspended" ], "optional" : 1, "type" : "string" }, "machine" : { - "description" : "Specific the Qemu machine type.", + "description" : "Specifies the Qemu machine type.", "maxLength" : 40, "optional" : 1, - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", + "pattern" : "(pc|pc(-i440fx)?-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|q35|pc-q35-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|virt(?:-\\d+(\\.\\d+)+)?(\\+pve\\d+)?)", "type" : "string" }, "memory" : { @@ -6371,11 +15497,19 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "nameserver" : { + "description" : "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "format" : "address-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "net[n]" : { "description" : "Specify network devices.", "format" : { "bridge" : { "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n", + "format" : "pve-bridge-id", "format_description" : "bridge", "optional" : 1, "type" : "string" @@ -6396,6 +15530,10 @@ var pveapi = [ "alias" : "macaddr", "keyAlias" : "model" }, + "e1000e" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, "firewall" : { "description" : "Whether this interface should be protected by the firewall.", "optional" : 1, @@ -6420,31 +15558,40 @@ var pveapi = [ }, "macaddr" : { "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.", + "format" : "mac-addr", "format_description" : "XX:XX:XX:XX:XX:XX", "optional" : 1, - "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})", - "type" : "string" + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." }, "model" : { "default_key" : 1, "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.", "enum" : [ - "rtl8139", - "ne2k_pci", "e1000", - "pcnet", - "virtio", - "ne2k_isa", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em", + "e1000e", "i82551", "i82557b", "i82559er", - "vmxnet3", - "e1000-82540em", - "e1000-82544gc", - "e1000-82545em" + "ne2k_isa", + "ne2k_pci", + "pcnet", + "rtl8139", + "virtio", + "vmxnet3" ], "type" : "string" }, + "mtu" : { + "description" : "Force MTU, for VirtIO only. Set to '1' to use the bridge MTU", + "maximum" : 65520, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, "ne2k_isa" : { "alias" : "macaddr", "keyAlias" : "model" @@ -6499,7 +15646,7 @@ var pveapi = [ }, "optional" : 1, "type" : "string", - "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" + "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,mtu=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" }, "node" : { "description" : "The cluster node name.", @@ -6569,20 +15716,21 @@ var pveapi = [ "win7", "win8", "win10", + "win11", "l24", "l26", "solaris" ], "optional" : 1, "type" : "string", - "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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" + "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 5.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n" }, "parallel[n]" : { "description" : "Map host parallel devices (n is 0 to 2).", "optional" : 1, "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", "type" : "string", - "verbose_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\nCAUTION: Experimental! User reported problems with this option.\n" + "verbose_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\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" }, "protection" : { "default" : 0, @@ -6605,14 +15753,45 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "rng0" : { + "description" : "Configure a VirtIO-based Random Number Generator.", + "format" : { + "max_bytes" : { + "default" : 1024, + "description" : "Maximum bytes of entropy allowed to get injected into the guest every 'period' milliseconds. Prefer a lower value when using '/dev/random' as source. Use `0` to disable limiting (potentially dangerous!).", + "optional" : 1, + "type" : "integer" + }, + "period" : { + "default" : 1000, + "description" : "Every 'period' milliseconds the entropy-injection quota is reset, allowing the guest to retrieve another 'max_bytes' of entropy.", + "optional" : 1, + "type" : "integer" + }, + "source" : { + "default_key" : 1, + "description" : "The file on the host to gather entropy from. In most cases '/dev/urandom' should be preferred over '/dev/random' to avoid entropy-starvation issues on the host. Using urandom does *not* decrease security in any meaningful way, as it's still seeded from real entropy, and the bytes provided will most likely be mixed with real entropy on the guest as well. '/dev/hwrng' can be used to pass through a hardware RNG from the host.", + "enum" : [ + "/dev/urandom", + "/dev/random", + "/dev/hwrng" + ], + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[source=] [,max_bytes=] [,period=]" + }, "sata[n]" : { - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -6724,6 +15903,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -6862,6 +16048,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -6870,7 +16063,12 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, "type" : "boolean" }, @@ -6897,20 +16095,28 @@ var pveapi = [ ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" }, "scsi[n]" : { - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -7022,6 +16228,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -7158,6 +16371,11 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "ro" : { + "description" : "Whether the drive is read-only.", + "optional" : 1, + "type" : "boolean" + }, "scsiblock" : { "default" : 0, "description" : "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host", @@ -7177,6 +16395,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -7185,7 +16410,12 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, "type" : "boolean" }, @@ -7212,11 +16442,18 @@ var pveapi = [ ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,queues=] [,replicate=<1|0>] [,rerror=] [,scsiblock=<1|0>] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,queues=] [,replicate=<1|0>] [,rerror=] [,ro=<1|0>] [,scsiblock=<1|0>] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" }, "scsihw" : { "default" : "lsi", @@ -7232,16 +16469,22 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "searchdomain" : { + "description" : "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "serial[n]" : { "description" : "Create a serial device inside the VM (n is 0 to 3)", "optional" : 1, "pattern" : "(/dev/.+|socket)", "type" : "string", - "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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\nCAUTION: Experimental! User reported problems with this option.\n" + "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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 -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" }, "shares" : { "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", + "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. Auto-ballooning is done by pvestatd.", "maximum" : 50000, "minimum" : 0, "optional" : 1, @@ -7257,10 +16500,10 @@ var pveapi = [ "smbios1" : { "description" : "Specify SMBIOS type 1 fields.", "format" : "pve-qm-smbios1", - "maxLength" : 256, + "maxLength" : 512, "optional" : 1, "type" : "string", - "typetext" : "[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" + "typetext" : "[base64=<1|0>] [,family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" }, "smp" : { "default" : 1, @@ -7278,9 +16521,41 @@ var pveapi = [ "type" : "integer", "typetext" : " (1 - N)" }, + "spice_enhancements" : { + "description" : "Configure additional enhancements for SPICE.", + "format" : { + "foldersharing" : { + "default" : "0", + "description" : "Enable folder sharing via SPICE. Needs Spice-WebDAV daemon installed in the VM.", + "optional" : 1, + "type" : "boolean" + }, + "videostreaming" : { + "default" : "off", + "description" : "Enable video streaming. Uses compression for detected video streams.", + "enum" : [ + "off", + "all", + "filter" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[foldersharing=<1|0>] [,videostreaming=]" + }, + "sshkeys" : { + "description" : "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).", + "format" : "urlencoded", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "startdate" : { "default" : "now", - "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'.", + "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})?)", "type" : "string", @@ -7299,7 +16574,14 @@ var pveapi = [ "optional" : 1, "type" : "boolean", "typetext" : "", - "verbose_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)." + "verbose_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 (`qm set --vga qxl`)." + }, + "tags" : { + "description" : "Tags of the VM. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string", + "typetext" : "" }, "tdf" : { "default" : 0, @@ -7315,26 +16597,79 @@ var pveapi = [ "type" : "boolean", "typetext" : "" }, + "tpmstate0" : { + "description" : "Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "version" : { + "default" : "v2.0", + "description" : "The TPM interface version. v2.0 is newer and should be preferred. Note that this cannot be changed later on.", + "enum" : [ + "v1.2", + "v2.0" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,import-from=] [,size=] [,version=]" + }, "unused[n]" : { "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", - "format" : "pve-volume-id", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, "optional" : 1, "type" : "string", - "typetext" : "" + "typetext" : "[file=]" }, "usb[n]" : { "description" : "Configure an USB device (n is 0 to 4).", "format" : { "host" : { "default_key" : 1, - "description" : "The Host USB device or port or the value 'spice'. 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", + "description" : "The Host USB device or port or the value 'spice'. 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\nmachines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n", "format" : "pve-qm-usb-device", "format_description" : "HOSTUSBDEVICE|spice", "type" : "string" }, "usb3" : { "default" : 0, - "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).", + "description" : "Specifies whether if given host option is a USB3 device or port.", "optional" : 1, "type" : "boolean" } @@ -7352,32 +16687,53 @@ var pveapi = [ "typetext" : " (1 - N)" }, "vga" : { - "description" : "Select the VGA type.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ], + "description" : "Configure the VGA hardware.", + "format" : { + "memory" : { + "description" : "Sets the VGA memory (in MiB). Has no effect with serial display.", + "maximum" : 512, + "minimum" : 4, + "optional" : 1, + "type" : "integer" + }, + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", + "enum" : [ + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "none", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "virtio-gl", + "vmware" + ], + "optional" : 1, + "type" : "string" + } + }, "optional" : 1, "type" : "string", - "verbose_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." + "typetext" : "[[type=]] [,memory=]", + "verbose_description" : "Configure the VGA Hardware. If you want to use high resolution modes (>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal." }, "virtio[n]" : { - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -7489,6 +16845,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -7619,6 +16982,11 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "ro" : { + "description" : "Whether the drive is read-only.", + "optional" : 1, + "type" : "boolean" + }, "secs" : { "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, @@ -7632,6 +17000,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -7640,7 +17015,7 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", "optional" : 1, "type" : "boolean" }, @@ -7671,7 +17046,16 @@ var pveapi = [ }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,ro=<1|0>] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + }, + "vmgenid" : { + "default" : "1 (autogenerated)", + "description" : "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly.", + "format_description" : "UUID", + "optional" : 1, + "pattern" : "(?:[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}|[01])", + "type" : "string", + "verbose_description" : "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file." }, "vmid" : { "description" : "The (unique) ID of the VM.", @@ -7680,6 +17064,13 @@ var pveapi = [ "type" : "integer", "typetext" : " (1 - N)" }, + "vmstatestorage" : { + "description" : "Default storage for VM state volumes/files.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "watchdog" : { "description" : "Create a virtual hardware watchdog device.", "format" : "pve-qm-watchdog", @@ -7701,7 +17092,8 @@ var pveapi = [ "VM.Config.Memory", "VM.Config.Network", "VM.Config.HWType", - "VM.Config.Options" + "VM.Config.Options", + "VM.Config.Cloudinit" ], "any", 1 @@ -7715,6 +17107,7 @@ var pveapi = [ } }, "PUT" : { + "allowtoken" : 1, "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.", "method" : "PUT", "name" : "update_vm", @@ -7729,11 +17122,43 @@ var pveapi = [ "typetext" : "" }, "agent" : { - "default" : 0, - "description" : "Enable/disable Qemu GuestAgent.", + "description" : "Enable/disable communication with the Qemu Guest Agent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable communication with a Qemu Guest Agent (QGA) running in the VM.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after moving a disk or migrating the VM.", + "optional" : 1, + "type" : "boolean" + }, + "type" : { + "default" : "virtio", + "description" : "Select the agent type", + "enum" : [ + "virtio", + "isa" + ], + "optional" : 1, + "type" : "string" + } + }, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string", + "typetext" : "[enabled=]<1|0> [,fstrim_cloned_disks=<1|0>] [,type=]" + }, + "arch" : { + "description" : "Virtual processor architecture. Defaults to the host.", + "enum" : [ + "x86_64", + "aarch64" + ], + "optional" : 1, + "type" : "string" }, "args" : { "description" : "Arbitrary arguments passed to kvm.", @@ -7742,6 +17167,33 @@ var pveapi = [ "typetext" : "", "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n" }, + "audio0" : { + "description" : "Configure a audio device, useful in combination with QXL/Spice.", + "format" : { + "device" : { + "description" : "Configure an audio device.", + "enum" : [ + "ich9-intel-hda", + "intel-hda", + "AC97" + ], + "type" : "string" + }, + "driver" : { + "default" : "spice", + "description" : "Driver backend for the audio device.", + "enum" : [ + "spice", + "none" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "device= [,driver=]" + }, "autostart" : { "default" : 0, "description" : "Automatic restart after crash (currently ignored).", @@ -7767,14 +17219,14 @@ var pveapi = [ "type" : "string" }, "boot" : { - "default" : "cdn", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", + "description" : "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated.", + "format" : "pve-qm-boot", "optional" : 1, - "pattern" : "[acdn]{1,4}", - "type" : "string" + "type" : "string", + "typetext" : "[[legacy=]<[acdn]{1,4}>] [,order=]" }, "bootdisk" : { - "description" : "Enable booting from specified disk.", + "description" : "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead.", "format" : "pve-qm-bootdisk", "optional" : 1, "pattern" : "(ide|sata|scsi|virtio)\\d+", @@ -7787,6 +17239,35 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "cicustom" : { + "description" : "cloud-init: Specify custom files to replace the automatically generated ones at start.", + "format" : "pve-qm-cicustom", + "optional" : 1, + "type" : "string", + "typetext" : "[meta=] [,network=] [,user=] [,vendor=]" + }, + "cipassword" : { + "description" : "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "citype" : { + "description" : "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.", + "enum" : [ + "configdrive2", + "nocloud", + "opennebula" + ], + "optional" : 1, + "type" : "string" + }, + "ciuser" : { + "description" : "cloud-init: User name to change ssh keys and password for instead of the image's configured default user.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "cores" : { "default" : 1, "description" : "The number of cores per socket.", @@ -7797,94 +17278,113 @@ var pveapi = [ }, "cpu" : { "description" : "Emulated CPU type.", + "format" : "pve-vm-cpu-conf", + "optional" : 1, + "type" : "string", + "typetext" : "[[cputype=]] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>] [,hv-vendor-id=] [,phys-bits=<8-64|host>] [,reported-model=]" + }, + "cpulimit" : { + "default" : 0, + "description" : "Limit of CPU usage.", + "maximum" : 128, + "minimum" : 0, + "optional" : 1, + "type" : "number", + "typetext" : " (0 - 128)", + "verbose_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." + }, + "cpuunits" : { + "default" : "cgroup v1: 1024, cgroup v2: 100", + "description" : "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2.", + "maximum" : 262144, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 262144)", + "verbose_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." + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "description" : { + "description" : "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { - "cputype" : { - "default" : "kvm64", + "efitype" : { + "default" : "2m", + "description" : "Size and type of the OVMF EFI vars. '4m' is newer and recommended, and required for Secure Boot. For backwards compatibility, '2m' is used if not otherwise specified.", + "enum" : [ + "2m", + "4m" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { "default_key" : 1, - "description" : "Emulated CPU type.", + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", "enum" : [ - "486", - "athlon", - "Broadwell", - "Broadwell-noTSX", - "Conroe", - "core2duo", - "coreduo", - "Haswell", - "Haswell-noTSX", - "host", - "IvyBridge", - "kvm32", - "kvm64", - "Nehalem", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "Penryn", - "pentium", - "pentium2", - "pentium3", - "phenom", - "qemu32", - "qemu64", - "SandyBridge", - "Skylake-Client", - "Westmere" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], + "optional" : 1, + "type" : "string" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, "type" : "string" }, - "hidden" : { + "pre-enrolled-keys" : { "default" : 0, - "description" : "Do not identify as a KVM virtual machine.", + "description" : "Use am EFI vars template with distribution-specific and Microsoft Standard keys enrolled, if used with 'efitype=4m'. Note that this will enable Secure Boot by default, though it can still be turned off from within the VM.", "optional" : 1, "type" : "boolean" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" } }, "optional" : 1, "type" : "string", - "typetext" : "[cputype=] [,hidden=<1|0>]" - }, - "cpulimit" : { - "default" : 0, - "description" : "Limit of CPU usage.", - "maximum" : 128, - "minimum" : 0, - "optional" : 1, - "type" : "number", - "typetext" : " (0 - 128)", - "verbose_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." - }, - "cpuunits" : { - "default" : 1024, - "description" : "CPU weight for a VM.", - "maximum" : 500000, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 500000)", - "verbose_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." - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "description" : { - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" + "typetext" : "[file=] [,efitype=<2m|4m>] [,format=] [,import-from=] [,pre-enrolled-keys=<1|0>] [,size=]" }, "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.", @@ -7899,17 +17399,24 @@ var pveapi = [ "type" : "boolean", "typetext" : "" }, + "hookscript" : { + "description" : "Script that will be executed during various steps in the vms lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "hostpci[n]" : { "description" : "Map host PCI devices into guest.", "format" : "pve-qm-hostpci", "optional" : 1, "type" : "string", - "typetext" : "[host=] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=] [,x-vga=<1|0>]", - "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer \npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + "typetext" : "[host=] [,device-id=] [,legacy-igd=<1|0>] [,mdev=] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=] [,sub-device-id=] [,sub-vendor-id=] [,vendor-id=] [,x-vga=<1|0>]", + "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" }, "hotplug" : { "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'.", + "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. Using '1' as value is an alias for the default `network,disk,usb`.", "format" : "pve-hotplug-features", "optional" : 1, "type" : "string", @@ -7926,13 +17433,14 @@ var pveapi = [ "type" : "string" }, "ide[n]" : { - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -8044,6 +17552,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -8190,6 +17705,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -8198,7 +17720,12 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, "type" : "boolean" }, @@ -8225,15 +17752,56 @@ var pveapi = [ ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" + }, + "ipconfig[n]" : { + "description" : "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string", + "typetext" : "[gw=] [,gw6=] [,ip=] [,ip6=]" + }, + "ivshmem" : { + "description" : "Inter-VM shared memory. Useful for direct communication between VMs, or to the host.", + "format" : { + "name" : { + "description" : "The name of the file. Will be prefixed with 'pve-shm-'. Default is the VMID. Will be deleted when the VM is stopped.", + "format_description" : "string", + "optional" : 1, + "pattern" : "[a-zA-Z0-9\\-]+", + "type" : "string" + }, + "size" : { + "description" : "The size of the file in MB.", + "minimum" : 1, + "type" : "integer" } }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "size= [,name=]" + }, + "keephugepages" : { + "default" : 0, + "description" : "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, "keyboard" : { - "default" : "en-us", - "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.", + "default" : null, + "description" : "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS.", "enum" : [ "de", "de-ch", @@ -8272,7 +17840,7 @@ var pveapi = [ "typetext" : "" }, "localtime" : { - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "description" : "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS.", "optional" : 1, "type" : "boolean", "typetext" : "" @@ -8280,19 +17848,24 @@ var pveapi = [ "lock" : { "description" : "Lock/unlock the VM.", "enum" : [ - "migrate", "backup", + "clone", + "create", + "migrate", + "rollback", "snapshot", - "rollback" + "snapshot-delete", + "suspending", + "suspended" ], "optional" : 1, "type" : "string" }, "machine" : { - "description" : "Specific the Qemu machine type.", + "description" : "Specifies the Qemu machine type.", "maxLength" : 40, "optional" : 1, - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", + "pattern" : "(pc|pc(-i440fx)?-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|q35|pc-q35-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|virt(?:-\\d+(\\.\\d+)+)?(\\+pve\\d+)?)", "type" : "string" }, "memory" : { @@ -8326,11 +17899,19 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "nameserver" : { + "description" : "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "format" : "address-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "net[n]" : { "description" : "Specify network devices.", "format" : { "bridge" : { "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n", + "format" : "pve-bridge-id", "format_description" : "bridge", "optional" : 1, "type" : "string" @@ -8351,6 +17932,10 @@ var pveapi = [ "alias" : "macaddr", "keyAlias" : "model" }, + "e1000e" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, "firewall" : { "description" : "Whether this interface should be protected by the firewall.", "optional" : 1, @@ -8375,31 +17960,40 @@ var pveapi = [ }, "macaddr" : { "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.", + "format" : "mac-addr", "format_description" : "XX:XX:XX:XX:XX:XX", "optional" : 1, - "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})", - "type" : "string" + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." }, "model" : { "default_key" : 1, "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.", "enum" : [ - "rtl8139", - "ne2k_pci", "e1000", - "pcnet", - "virtio", - "ne2k_isa", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em", + "e1000e", "i82551", "i82557b", "i82559er", - "vmxnet3", - "e1000-82540em", - "e1000-82544gc", - "e1000-82545em" + "ne2k_isa", + "ne2k_pci", + "pcnet", + "rtl8139", + "virtio", + "vmxnet3" ], "type" : "string" }, + "mtu" : { + "description" : "Force MTU, for VirtIO only. Set to '1' to use the bridge MTU", + "maximum" : 65520, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, "ne2k_isa" : { "alias" : "macaddr", "keyAlias" : "model" @@ -8429,145 +18023,502 @@ var pveapi = [ "alias" : "macaddr", "keyAlias" : "model" }, - "tag" : { - "description" : "VLAN tag to apply to packets on this interface.", - "maximum" : 4094, - "minimum" : 1, + "tag" : { + "description" : "VLAN tag to apply to packets on this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "trunks" : { + "description" : "VLAN trunks to pass through this interface.", + "format_description" : "vlanid[;vlanid...]", + "optional" : 1, + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "virtio" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "vmxnet3" : { + "alias" : "macaddr", + "keyAlias" : "model" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,mtu=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "numa" : { + "default" : 0, + "description" : "Enable/disable NUMA.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "numa[n]" : { + "description" : "NUMA topology.", + "format" : { + "cpus" : { + "description" : "CPUs accessing this NUMA node.", + "format_description" : "id[-id];...", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "hostnodes" : { + "description" : "Host NUMA nodes to use.", + "format_description" : "id[-id];...", + "optional" : 1, + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "memory" : { + "description" : "Amount of memory this NUMA node provides.", + "optional" : 1, + "type" : "number" + }, + "policy" : { + "description" : "NUMA allocation policy.", + "enum" : [ + "preferred", + "bind", + "interleave" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "cpus= [,hostnodes=] [,memory=] [,policy=]" + }, + "onboot" : { + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ostype" : { + "description" : "Specify guest operating system.", + "enum" : [ + "other", + "wxp", + "w2k", + "w2k3", + "w2k8", + "wvista", + "win7", + "win8", + "win10", + "win11", + "l24", + "l26", + "solaris" + ], + "optional" : 1, + "type" : "string", + "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 5.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n" + }, + "parallel[n]" : { + "description" : "Map host parallel devices (n is 0 to 2).", + "optional" : 1, + "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", + "type" : "string", + "verbose_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\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "protection" : { + "default" : 0, + "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "reboot" : { + "default" : 1, + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "revert" : { + "description" : "Revert a pending change.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "rng0" : { + "description" : "Configure a VirtIO-based Random Number Generator.", + "format" : { + "max_bytes" : { + "default" : 1024, + "description" : "Maximum bytes of entropy allowed to get injected into the guest every 'period' milliseconds. Prefer a lower value when using '/dev/random' as source. Use `0` to disable limiting (potentially dangerous!).", + "optional" : 1, + "type" : "integer" + }, + "period" : { + "default" : 1000, + "description" : "Every 'period' milliseconds the entropy-injection quota is reset, allowing the guest to retrieve another 'max_bytes' of entropy.", + "optional" : 1, + "type" : "integer" + }, + "source" : { + "default_key" : 1, + "description" : "The file on the host to gather entropy from. In most cases '/dev/urandom' should be preferred over '/dev/random' to avoid entropy-starvation issues on the host. Using urandom does *not* decrease security in any meaningful way, as it's still seeded from real entropy, and the bytes provided will most likely be mixed with real entropy on the guest as well. '/dev/hwrng' can be used to pass through a hardware RNG from the host.", + "enum" : [ + "/dev/urandom", + "/dev/random", + "/dev/hwrng" + ], + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[source=] [,max_bytes=] [,period=]" + }, + "sata[n]" : { + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], + "optional" : 1, + "type" : "string" + }, + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_rd_length" : { + "alias" : "bps_rd_max_length" + }, + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_wr_length" : { + "alias" : "bps_wr_max_length" + }, + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "optional" : 1, + "type" : "string" + }, + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" + }, + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_length" : { + "alias" : "iops_wr_max_length" + }, + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "media" : { + "default" : "disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], + "optional" : 1, + "type" : "string" + }, + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, "type" : "integer" }, - "trunks" : { - "description" : "VLAN trunks to pass through this interface.", - "format_description" : "vlanid[;vlanid...]", + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", "type" : "string" }, - "virtio" : { - "alias" : "macaddr", - "keyAlias" : "model" + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" }, - "vmxnet3" : { - "alias" : "macaddr", - "keyAlias" : "model" - } - }, - "optional" : 1, - "type" : "string", - "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "numa" : { - "default" : 0, - "description" : "Enable/disable NUMA.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "numa[n]" : { - "description" : "NUMA topology.", - "format" : { - "cpus" : { - "description" : "CPUs accessing this NUMA node.", - "format_description" : "id[-id];...", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, "type" : "string" }, - "hostnodes" : { - "description" : "Host NUMA nodes to use.", - "format_description" : "id[-id];...", + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "type" : "string" + "type" : "boolean" }, - "memory" : { - "description" : "Amount of memory this NUMA node provides.", + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, - "type" : "number" + "type" : "boolean" }, - "policy" : { - "description" : "NUMA allocation policy.", + "trans" : { + "description" : "Force disk geometry bios translation mode.", "enum" : [ - "preferred", - "bind", - "interleave" + "none", + "lba", + "auto" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + }, + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } }, "optional" : 1, "type" : "string", - "typetext" : "cpus= [,hostnodes=] [,memory=] [,policy=]" - }, - "onboot" : { - "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "ostype" : { - "description" : "Specify guest operating system.", - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "win10", - "l24", - "l26", - "solaris" - ], - "optional" : 1, - "type" : "string", - "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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" - }, - "parallel[n]" : { - "description" : "Map host parallel devices (n is 0 to 2).", - "optional" : 1, - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "type" : "string", - "verbose_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\nCAUTION: Experimental! User reported problems with this option.\n" - }, - "protection" : { - "default" : 0, - "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "reboot" : { - "default" : 1, - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "revert" : { - "description" : "Revert a pending change.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" }, - "sata[n]" : { - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", + "scsi[n]" : { + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -8679,6 +18630,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -8742,6 +18700,11 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "iothread" : { + "description" : "Whether to use iothreads for this drive", + "optional" : 1, + "type" : "boolean" + }, "mbps" : { "description" : "Maximum r/w speed in megabytes per second.", "format_description" : "mbps", @@ -8788,6 +18751,12 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "queues" : { + "description" : "Number of queues.", + "minimum" : 2, + "optional" : 1, + "type" : "integer" + }, "replicate" : { "default" : 1, "description" : "Whether the drive should considered for replication jobs.", @@ -8804,6 +18773,17 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "ro" : { + "description" : "Whether the drive is read-only.", + "optional" : 1, + "type" : "boolean" + }, + "scsiblock" : { + "default" : 0, + "description" : "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host", + "optional" : 1, + "type" : "boolean" + }, "secs" : { "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, @@ -8817,6 +18797,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -8825,7 +18812,12 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, "type" : "boolean" }, @@ -8852,20 +18844,298 @@ var pveapi = [ ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,queues=] [,replicate=<1|0>] [,rerror=] [,ro=<1|0>] [,scsiblock=<1|0>] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" }, - "scsi[n]" : { - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", + "scsihw" : { + "default" : "lsi", + "description" : "SCSI controller model", + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], + "optional" : 1, + "type" : "string" + }, + "searchdomain" : { + "description" : "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "serial[n]" : { + "description" : "Create a serial device inside the VM (n is 0 to 3)", + "optional" : 1, + "pattern" : "(/dev/.+|socket)", + "type" : "string", + "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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 -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "shares" : { + "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. Auto-ballooning is done by pvestatd.", + "maximum" : 50000, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 50000)" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", + "format" : "pve-qm-smbios1", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "[base64=<1|0>] [,family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" + }, + "smp" : { + "default" : 1, + "description" : "The number of CPUs. Please use option -sockets instead.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "sockets" : { + "default" : 1, + "description" : "The number of CPU sockets.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "spice_enhancements" : { + "description" : "Configure additional enhancements for SPICE.", + "format" : { + "foldersharing" : { + "default" : "0", + "description" : "Enable folder sharing via SPICE. Needs Spice-WebDAV daemon installed in the VM.", + "optional" : 1, + "type" : "boolean" + }, + "videostreaming" : { + "default" : "off", + "description" : "Enable video streaming. Uses compression for detected video streams.", + "enum" : [ + "off", + "all", + "filter" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[foldersharing=<1|0>] [,videostreaming=]" + }, + "sshkeys" : { + "description" : "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).", + "format" : "urlencoded", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "startdate" : { + "default" : "now", + "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})?)", + "type" : "string", + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + }, + "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.", + "format" : "pve-startup-order", + "optional" : 1, + "type" : "string", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "tablet" : { + "default" : 1, + "description" : "Enable/disable the USB tablet device.", + "optional" : 1, + "type" : "boolean", + "typetext" : "", + "verbose_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 (`qm set --vga qxl`)." + }, + "tags" : { + "description" : "Tags of the VM. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tdf" : { + "default" : 0, + "description" : "Enable/disable time drift fix.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "tpmstate0" : { + "description" : "Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "version" : { + "default" : "v2.0", + "description" : "The TPM interface version. v2.0 is newer and should be preferred. Note that this cannot be changed later on.", + "enum" : [ + "v1.2", + "v2.0" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,import-from=] [,size=] [,version=]" + }, + "unused[n]" : { + "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=]" + }, + "usb[n]" : { + "description" : "Configure an USB device (n is 0 to 4).", + "format" : { + "host" : { + "default_key" : 1, + "description" : "The Host USB device or port or the value 'spice'. 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\nmachines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n", + "format" : "pve-qm-usb-device", + "format_description" : "HOSTUSBDEVICE|spice", + "type" : "string" + }, + "usb3" : { + "default" : 0, + "description" : "Specifies whether if given host option is a USB3 device or port.", + "optional" : 1, + "type" : "boolean" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[host=] [,usb3=<1|0>]" + }, + "vcpus" : { + "default" : 0, + "description" : "Number of hotplugged vcpus.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "vga" : { + "description" : "Configure the VGA hardware.", + "format" : { + "memory" : { + "description" : "Sets the VGA memory (in MiB). Has no effect with serial display.", + "maximum" : 512, + "minimum" : 4, + "optional" : 1, + "type" : "integer" + }, + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", + "enum" : [ + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "none", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "virtio-gl", + "vmware" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[[type=]] [,memory=]", + "verbose_description" : "Configure the VGA Hardware. If you want to use high resolution modes (>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal." + }, + "virtio[n]" : { + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -8977,6 +19247,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -9091,12 +19368,6 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "queues" : { - "description" : "Number of queues.", - "minimum" : 2, - "optional" : 1, - "type" : "integer" - }, "replicate" : { "default" : 1, "description" : "Whether the drive should considered for replication jobs.", @@ -9113,9 +19384,8 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "scsiblock" : { - "default" : 0, - "description" : "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host", + "ro" : { + "description" : "Whether the drive is read-only.", "optional" : 1, "type" : "boolean" }, @@ -9132,6 +19402,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -9140,7 +19417,7 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", "optional" : 1, "type" : "boolean" }, @@ -9171,514 +19448,1098 @@ var pveapi = [ }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,queues=] [,replicate=<1|0>] [,rerror=] [,scsiblock=<1|0>] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,ro=<1|0>] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + }, + "vmgenid" : { + "default" : "1 (autogenerated)", + "description" : "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly.", + "format_description" : "UUID", + "optional" : 1, + "pattern" : "(?:[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}|[01])", + "type" : "string", + "verbose_description" : "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file." + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "vmstatestorage" : { + "description" : "Default storage for VM state volumes/files.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "watchdog" : { + "description" : "Create a virtual hardware watchdog device.", + "format" : "pve-qm-watchdog", + "optional" : 1, + "type" : "string", + "typetext" : "[[model=]] [,action=]", + "verbose_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)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk", + "VM.Config.CDROM", + "VM.Config.CPU", + "VM.Config.Memory", + "VM.Config.Network", + "VM.Config.HWType", + "VM.Config.Options", + "VM.Config.Cloudinit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/config", + "text" : "config" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get the virtual machine configuration with both current and pending values.", + "method" : "GET", + "name" : "vm_pending", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "delete" : { + "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.", + "maximum" : 2, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "key" : { + "description" : "Configuration option name.", + "type" : "string" + }, + "pending" : { + "description" : "Pending value.", + "optional" : 1, + "type" : "string" + }, + "value" : { + "description" : "Current value.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/pending", + "text" : "pending" + }, + { + "info" : { + "PUT" : { + "allowtoken" : 1, + "description" : "Unlink/delete disk images.", + "method" : "PUT", + "name" : "unlink", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "idlist" : { + "description" : "A list of disk IDs you want to delete.", + "format" : "pve-configid-list", + "type" : "string", + "typetext" : "" }, - "scsihw" : { - "default" : "lsi", - "description" : "SCSI controller model", - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ], - "optional" : 1, - "type" : "string" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "serial[n]" : { - "description" : "Create a serial device inside the VM (n is 0 to 3)", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/unlink", + "text" : "unlink" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Creates a TCP VNC proxy connections.", + "method" : "POST", + "name" : "vncproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "generate-password" : { + "default" : 0, + "description" : "Generates a random password to be used as ticket instead of the API ticket.", "optional" : 1, - "pattern" : "(/dev/.+|socket)", + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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\nCAUTION: Experimental! User reported problems with this option.\n" + "typetext" : "" }, - "shares" : { - "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", - "maximum" : 50000, - "minimum" : 0, - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "typetext" : " (0 - 50000)" + "typetext" : " (1 - N)" }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", + "websocket" : { + "description" : "starts websockify instead of vncproxy", "optional" : 1, "type" : "boolean", "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "cert" : { + "type" : "string" }, - "smbios1" : { - "description" : "Specify SMBIOS type 1 fields.", - "format" : "pve-qm-smbios1", - "maxLength" : 256, + "password" : { + "description" : "Returned if requested with 'generate-password' param. Consists of printable ASCII characters ('!' .. '~').", "optional" : 1, + "type" : "string" + }, + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/vncproxy", + "text" : "vncproxy" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Creates a TCP proxy connections.", + "method" : "POST", + "name" : "termproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "typetext" : "[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" + "typetext" : "" }, - "smp" : { - "default" : 1, - "description" : "The number of CPUs. Please use option -sockets instead.", - "minimum" : 1, + "serial" : { + "description" : "opens a serial terminal (defaults to display)", + "enum" : [ + "serial0", + "serial1", + "serial2", + "serial3" + ], "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "type" : "string" }, - "sockets" : { - "default" : 1, - "description" : "The number of CPU sockets.", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, - "optional" : 1, "type" : "integer", "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" }, - "startdate" : { - "default" : "now", - "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})?)", - "type" : "string", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + "ticket" : { + "type" : "string" }, - "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.", - "format" : "pve-startup-order", - "optional" : 1, - "type" : "string", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + "upid" : { + "type" : "string" }, - "tablet" : { - "default" : 1, - "description" : "Enable/disable the USB tablet device.", - "optional" : 1, - "type" : "boolean", - "typetext" : "", - "verbose_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)." + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/termproxy", + "text" : "termproxy" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Opens a weksocket for VNC traffic.", + "method" : "GET", + "name" : "vncwebsocket", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "tdf" : { - "default" : 0, - "description" : "Enable/disable time drift fix.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "port" : { + "description" : "Port number returned by previous vncproxy call.", + "maximum" : 5999, + "minimum" : 5900, + "type" : "integer", + "typetext" : " (5900 - 5999)" }, - "template" : { - "default" : 0, - "description" : "Enable/disable Template.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "unused[n]" : { - "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", - "format" : "pve-volume-id", - "optional" : 1, + "vncticket" : { + "description" : "Ticket from previous call to vncproxy.", + "maxLength" : 512, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ], + "description" : "You also need to pass a valid ticket (vncticket)." + }, + "returns" : { + "properties" : { + "port" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket", + "text" : "vncwebsocket" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Returns a SPICE configuration to connect to the VM.", + "method" : "POST", + "name" : "spiceproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" }, - "usb[n]" : { - "description" : "Configure an USB device (n is 0 to 4).", - "format" : { - "host" : { - "default_key" : 1, - "description" : "The Host USB device or port or the value 'spice'. 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", - "format" : "pve-qm-usb-device", - "format_description" : "HOSTUSBDEVICE|spice", - "type" : "string" - }, - "usb3" : { - "default" : 0, - "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).", - "optional" : 1, - "type" : "boolean" - } - }, + "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 reasonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", + "format" : "address", "optional" : 1, "type" : "string", - "typetext" : "[host=] [,usb3=<1|0>]" + "typetext" : "" }, - "vcpus" : { - "default" : 0, - "description" : "Number of hotplugged vcpus.", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, - "optional" : 1, "type" : "integer", "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "additionalProperties" : 1, + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", + "properties" : { + "host" : { + "type" : "string" }, - "vga" : { - "description" : "Select the VGA type.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ], - "optional" : 1, - "type" : "string", - "verbose_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." + "password" : { + "type" : "string" }, - "virtio[n]" : { - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", - "format" : { - "aio" : { - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ], - "optional" : 1, - "type" : "string" - }, - "backup" : { - "description" : "Whether the drive should be included when making backups.", - "optional" : 1, - "type" : "boolean" - }, - "bps" : { - "description" : "Maximum r/w speed in bytes per second.", - "format_description" : "bps", - "optional" : 1, - "type" : "integer" - }, - "bps_max_length" : { - "description" : "Maximum length of I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "bps_rd" : { - "description" : "Maximum read speed in bytes per second.", - "format_description" : "bps", - "optional" : 1, - "type" : "integer" - }, - "bps_rd_length" : { - "alias" : "bps_rd_max_length" + "proxy" : { + "type" : "string" + }, + "tls-port" : { + "type" : "integer" + }, + "type" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy", + "text" : "spiceproxy" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get virtual machine status.", + "method" : "GET", + "name" : "vm_status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "bps_rd_max_length" : { - "description" : "Maximum length of read I/O bursts in seconds.", - "format_description" : "seconds", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "agent" : { + "description" : "Qemu GuestAgent enabled in config.", "optional" : 1, - "type" : "integer" + "type" : "boolean" }, - "bps_wr" : { - "description" : "Maximum write speed in bytes per second.", - "format_description" : "bps", + "cpus" : { + "description" : "Maximum usable CPUs.", "optional" : 1, - "type" : "integer" + "type" : "number" }, - "bps_wr_length" : { - "alias" : "bps_wr_max_length" + "ha" : { + "description" : "HA manager service status.", + "type" : "object" }, - "bps_wr_max_length" : { - "description" : "Maximum length of write I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, + "lock" : { + "description" : "The current config lock, if any.", "optional" : 1, - "type" : "integer" - }, - "cache" : { - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], + "type" : "string" + }, + "maxdisk" : { + "description" : "Root disk size in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxmem" : { + "description" : "Maximum memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "name" : { + "description" : "VM name.", "optional" : 1, "type" : "string" }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "pid" : { + "description" : "PID of running qemu process.", "optional" : 1, "type" : "integer" }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "qmpstatus" : { + "description" : "Qemu QMP agent status.", "optional" : 1, - "type" : "boolean" + "type" : "string" }, - "discard" : { - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ], + "running-machine" : { + "description" : "The currently running machine type (if running).", "optional" : 1, "type" : "string" }, - "file" : { - "default_key" : 1, - "description" : "The drive's backing volume.", - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", + "running-qemu" : { + "description" : "The currently running QEMU version (if running).", + "optional" : 1, "type" : "string" }, - "format" : { - "description" : "The drive's backing file's data format.", + "spice" : { + "description" : "Qemu VGA configuration supports spice.", + "optional" : 1, + "type" : "boolean" + }, + "status" : { + "description" : "Qemu process status.", "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "stopped", + "running" ], - "optional" : 1, "type" : "string" }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", + "tags" : { + "description" : "The current configured tags, if any", "optional" : 1, - "type" : "integer" + "type" : "string" }, - "iops" : { - "description" : "Maximum r/w I/O in operations per second.", - "format_description" : "iops", + "uptime" : { + "description" : "Uptime.", "optional" : 1, + "renderer" : "duration", "type" : "integer" }, - "iops_max" : { - "description" : "Maximum unthrottled r/w I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/current", + "text" : "current" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Start virtual machine.", + "method" : "POST", + "name" : "vm_start", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force-cpu" : { + "description" : "Override QEMU's -cpu argument with the given string.", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "iops_max_length" : { - "description" : "Maximum length of I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, "optional" : 1, - "type" : "integer" + "pattern" : "(pc|pc(-i440fx)?-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|q35|pc-q35-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|virt(?:-\\d+(\\.\\d+)+)?(\\+pve\\d+)?)", + "type" : "string" }, - "iops_rd" : { - "description" : "Maximum read I/O in operations per second.", - "format_description" : "iops", + "migratedfrom" : { + "description" : "The cluster node name.", + "format" : "pve-node", "optional" : 1, - "type" : "integer" + "type" : "string", + "typetext" : "" }, - "iops_rd_length" : { - "alias" : "iops_rd_max_length" + "migration_network" : { + "description" : "CIDR of the (sub) network that is used for migration.", + "format" : "CIDR", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool in operations per second.", - "format_description" : "iops", + "migration_type" : { + "description" : "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.", + "enum" : [ + "secure", + "insecure" + ], "optional" : 1, - "type" : "integer" + "type" : "string" }, - "iops_rd_max_length" : { - "description" : "Maximum length of read I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "integer" + "type" : "boolean", + "typetext" : "" }, - "iops_wr" : { - "description" : "Maximum write I/O in operations per second.", - "format_description" : "iops", + "stateuri" : { + "description" : "Some command save/restore state from this location.", + "maxLength" : 128, "optional" : 1, - "type" : "integer" + "type" : "string", + "typetext" : "" }, - "iops_wr_length" : { - "alias" : "iops_wr_max_length" + "targetstorage" : { + "description" : "Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.", + "format" : "storage-pair-list", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "iops_wr_max" : { - "description" : "Maximum unthrottled write I/O pool in operations per second.", - "format_description" : "iops", + "timeout" : { + "default" : "max(30, vm memory in GiB)", + "description" : "Wait maximal timeout seconds.", + "minimum" : 0, "optional" : 1, - "type" : "integer" + "type" : "integer", + "typetext" : " (0 - N)" }, - "iops_wr_max_length" : { - "description" : "Maximum length of write I/O bursts in seconds.", - "format_description" : "seconds", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/start", + "text" : "start" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "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", + "method" : "POST", + "name" : "vm_stop", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "keepActive" : { + "default" : 0, + "description" : "Do not deactivate storage volumes.", "optional" : 1, - "type" : "integer" + "type" : "boolean", + "typetext" : "" }, - "iothread" : { - "description" : "Whether to use iothreads for this drive", + "migratedfrom" : { + "description" : "The cluster node name.", + "format" : "pve-node", "optional" : 1, - "type" : "boolean" + "type" : "string", + "typetext" : "" }, - "mbps" : { - "description" : "Maximum r/w speed in megabytes per second.", - "format_description" : "mbps", + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "number" + "type" : "boolean", + "typetext" : "" }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool in megabytes per second.", - "format_description" : "mbps", + "timeout" : { + "description" : "Wait maximal timeout seconds.", + "minimum" : 0, "optional" : 1, - "type" : "number" + "type" : "integer", + "typetext" : " (0 - N)" }, - "mbps_rd" : { - "description" : "Maximum read speed in megabytes per second.", - "format_description" : "mbps", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/stop", + "text" : "stop" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Reset virtual machine.", + "method" : "POST", + "name" : "vm_reset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "number" + "type" : "boolean", + "typetext" : "" }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool in megabytes per second.", - "format_description" : "mbps", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/reset", + "text" : "reset" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "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.", + "method" : "POST", + "name" : "vm_shutdown", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "forceStop" : { + "default" : 0, + "description" : "Make sure the VM stops.", "optional" : 1, - "type" : "number" + "type" : "boolean", + "typetext" : "" }, - "mbps_wr" : { - "description" : "Maximum write speed in megabytes per second.", - "format_description" : "mbps", + "keepActive" : { + "default" : 0, + "description" : "Do not deactivate storage volumes.", "optional" : 1, - "type" : "number" + "type" : "boolean", + "typetext" : "" }, - "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool in megabytes per second.", - "format_description" : "mbps", + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "number" + "type" : "boolean", + "typetext" : "" }, - "media" : { - "default" : "disk", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], + "timeout" : { + "description" : "Wait maximal timeout seconds.", + "minimum" : 0, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (0 - N)" }, - "replicate" : { - "default" : 1, - "description" : "Whether the drive should considered for replication jobs.", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown", + "text" : "shutdown" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Reboot the VM by shutting it down, and starting it again. Applies pending changes.", + "method" : "POST", + "name" : "vm_reboot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeout" : { + "description" : "Wait maximal timeout seconds for the shutdown.", + "minimum" : 0, "optional" : 1, - "type" : "boolean" + "type" : "integer", + "typetext" : " (0 - N)" }, - "rerror" : { - "description" : "Read error action.", - "enum" : [ - "ignore", - "report", - "stop" - ], + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/reboot", + "text" : "reboot" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Suspend virtual machine.", + "method" : "POST", + "name" : "vm_suspend", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "string" + "type" : "boolean", + "typetext" : "" }, - "secs" : { - "description" : "Force the drive's physical geometry to have a specific sector count.", + "statestorage" : { + "description" : "The storage for the VM state", + "format" : "pve-storage-id", "optional" : 1, - "type" : "integer" + "requires" : "todisk", + "type" : "string", + "typetext" : "" }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "format_description" : "serial", - "maxLength" : 60, + "todisk" : { + "default" : 0, + "description" : "If set, suspends the VM to disk. Will be resumed on next VM start.", "optional" : 1, - "type" : "string" + "type" : "boolean", + "typetext" : "" }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size", - "format_description" : "DiskSize", + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ], + "description" : "You need 'VM.PowerMgmt' on /vms/{vmid}, and if you have set 'todisk', you need also 'VM.Config.Disk' on /vms/{vmid} and 'Datastore.AllocateSpace' on the storage for the vmstate." + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/suspend", + "text" : "suspend" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Resume virtual machine.", + "method" : "POST", + "name" : "vm_resume", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "nocheck" : { "optional" : 1, - "type" : "string" + "type" : "boolean", + "typetext" : "" }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "trans" : { - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ], + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "string" - }, - "volume" : { - "alias" : "file" + "type" : "boolean", + "typetext" : "" }, - "werror" : { - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } - }, - "optional" : 1, - "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + } }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] }, - "watchdog" : { - "description" : "Create a virtual hardware watchdog device.", - "format" : "pve-qm-watchdog", - "optional" : 1, - "type" : "string", - "typetext" : "[[model=]] [,action=]", - "verbose_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)" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk", - "VM.Config.CDROM", - "VM.Config.CPU", - "VM.Config.Memory", - "VM.Config.Network", - "VM.Config.HWType", - "VM.Config.Options" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/status/resume", + "text" : "resume" } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/config", - "text" : "config" - }, - { + ], "info" : { "GET" : { - "description" : "Get virtual machine configuration, including pending changes.", + "allowtoken" : 1, + "description" : "Directory index", "method" : "GET", - "name" : "vm_pending", + "name" : "vmcmdidx", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -9698,68 +20559,44 @@ var pveapi = [ } }, "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "user" : "all" }, "proxyto" : "node", "returns" : { "items" : { "properties" : { - "delete" : { - "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.", - "maximum" : 2, - "minimum" : 0, - "optional" : 1, - "type" : "integer" - }, - "key" : { - "description" : "Configuration option name.", - "type" : "string" - }, - "pending" : { - "description" : "Pending value.", - "optional" : 1, - "type" : "string" - }, - "value" : { - "description" : "Current value.", - "optional" : 1, + "subdir" : { "type" : "string" } }, "type" : "object" }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], "type" : "array" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/pending", - "text" : "pending" + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/status", + "text" : "status" }, { "info" : { "PUT" : { - "description" : "Unlink/delete disk images.", + "allowtoken" : 1, + "description" : "Send key event to virtual machine.", "method" : "PUT", - "name" : "unlink", + "name" : "vm_sendkey", "parameters" : { "additionalProperties" : 0, "properties" : { - "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", - "typetext" : "" - }, - "idlist" : { - "description" : "A list of disk IDs you want to delete.", - "format" : "pve-configid-list", + "key" : { + "description" : "The key (qemu monitor encoding).", "type" : "string", "typetext" : "" }, @@ -9769,6 +20606,12 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, "vmid" : { "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", @@ -9783,7 +20626,7 @@ var pveapi = [ "perm", "/vms/{vmid}", [ - "VM.Config.Disk" + "VM.Console" ] ] }, @@ -9795,36 +20638,48 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/unlink", - "text" : "unlink" + "path" : "/nodes/{node}/qemu/{vmid}/sendkey", + "text" : "sendkey" }, { "info" : { - "POST" : { - "description" : "Creates a TCP VNC proxy connections.", - "method" : "POST", - "name" : "vncproxy", + "GET" : { + "allowtoken" : 1, + "description" : "Check if feature for virtual machine is available.", + "method" : "GET", + "name" : "vm_feature", "parameters" : { "additionalProperties" : 0, "properties" : { + "feature" : { + "description" : "Feature to check.", + "enum" : [ + "snapshot", + "clone", + "copy" + ], + "type" : "string" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "vmid" : { "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", "minimum" : 1, "type" : "integer", "typetext" : " (1 - N)" - }, - "websocket" : { - "description" : "starts websockify instead of vncproxy", - "optional" : 1, - "type" : "boolean", - "typetext" : "" } } }, @@ -9833,58 +20688,885 @@ var pveapi = [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Audit" ] ] }, "protected" : 1, + "proxyto" : "node", "returns" : { + "properties" : { + "hasFeature" : { + "type" : "boolean" + }, + "nodes" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/feature", + "text" : "feature" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Create a copy of virtual machine/template.", + "method" : "POST", + "name" : "clone_vm", + "parameters" : { "additionalProperties" : 0, "properties" : { - "cert" : { - "type" : "string" + "bwlimit" : { + "default" : "clone limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "port" : { - "type" : "integer" + "description" : { + "description" : "Description for the new VM.", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "ticket" : { + "format" : { + "description" : "Target format for file storage. Only valid for full clone.", + "enum" : [ + "raw", + "qcow2", + "vmdk" + ], + "optional" : 1, "type" : "string" }, - "upid" : { - "type" : "string" + "full" : { + "description" : "Create a full copy of all disks. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "user" : { - "type" : "string" + "name" : { + "description" : "Set a name for the new VM.", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "newid" : { + "description" : "VMID for the clone.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pool" : { + "description" : "Add the new VM to the specified pool.", + "format" : "pve-poolid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "Target storage for full clone.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "target" : { + "description" : "Target node. Only allowed if the original VM is on shared storage.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } + }, + "permissions" : { + "check" : [ + "and", + [ + "perm", + "/vms/{vmid}", + [ + "VM.Clone" + ] + ], + [ + "or", + [ + "perm", + "/vms/{newid}", + [ + "VM.Allocate" + ] + ], + [ + "perm", + "/pool/{pool}", + [ + "VM.Allocate" + ], + "require_param", + "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", + "returns" : { + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/vncproxy", - "text" : "vncproxy" + "path" : "/nodes/{node}/qemu/{vmid}/clone", + "text" : "clone" }, { "info" : { - "GET" : { - "description" : "Opens a weksocket for VNC traffic.", - "method" : "GET", - "name" : "vncwebsocket", + "POST" : { + "allowtoken" : 1, + "description" : "Move volume to different storage or to a different VM.", + "method" : "POST", + "name" : "move_vm_disk", "parameters" : { "additionalProperties" : 0, "properties" : { + "bwlimit" : { + "default" : "move limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "delete" : { + "default" : 0, + "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1\"\n\t\t .\" digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "disk" : { + "description" : "The disk you want to move.", + "enum" : [ + "ide0", + "ide1", + "ide2", + "ide3", + "scsi0", + "scsi1", + "scsi2", + "scsi3", + "scsi4", + "scsi5", + "scsi6", + "scsi7", + "scsi8", + "scsi9", + "scsi10", + "scsi11", + "scsi12", + "scsi13", + "scsi14", + "scsi15", + "scsi16", + "scsi17", + "scsi18", + "scsi19", + "scsi20", + "scsi21", + "scsi22", + "scsi23", + "scsi24", + "scsi25", + "scsi26", + "scsi27", + "scsi28", + "scsi29", + "scsi30", + "virtio0", + "virtio1", + "virtio2", + "virtio3", + "virtio4", + "virtio5", + "virtio6", + "virtio7", + "virtio8", + "virtio9", + "virtio10", + "virtio11", + "virtio12", + "virtio13", + "virtio14", + "virtio15", + "sata0", + "sata1", + "sata2", + "sata3", + "sata4", + "sata5", + "efidisk0", + "tpmstate0", + "unused0", + "unused1", + "unused2", + "unused3", + "unused4", + "unused5", + "unused6", + "unused7", + "unused8", + "unused9", + "unused10", + "unused11", + "unused12", + "unused13", + "unused14", + "unused15", + "unused16", + "unused17", + "unused18", + "unused19", + "unused20", + "unused21", + "unused22", + "unused23", + "unused24", + "unused25", + "unused26", + "unused27", + "unused28", + "unused29", + "unused30", + "unused31", + "unused32", + "unused33", + "unused34", + "unused35", + "unused36", + "unused37", + "unused38", + "unused39", + "unused40", + "unused41", + "unused42", + "unused43", + "unused44", + "unused45", + "unused46", + "unused47", + "unused48", + "unused49", + "unused50", + "unused51", + "unused52", + "unused53", + "unused54", + "unused55", + "unused56", + "unused57", + "unused58", + "unused59", + "unused60", + "unused61", + "unused62", + "unused63", + "unused64", + "unused65", + "unused66", + "unused67", + "unused68", + "unused69", + "unused70", + "unused71", + "unused72", + "unused73", + "unused74", + "unused75", + "unused76", + "unused77", + "unused78", + "unused79", + "unused80", + "unused81", + "unused82", + "unused83", + "unused84", + "unused85", + "unused86", + "unused87", + "unused88", + "unused89", + "unused90", + "unused91", + "unused92", + "unused93", + "unused94", + "unused95", + "unused96", + "unused97", + "unused98", + "unused99", + "unused100", + "unused101", + "unused102", + "unused103", + "unused104", + "unused105", + "unused106", + "unused107", + "unused108", + "unused109", + "unused110", + "unused111", + "unused112", + "unused113", + "unused114", + "unused115", + "unused116", + "unused117", + "unused118", + "unused119", + "unused120", + "unused121", + "unused122", + "unused123", + "unused124", + "unused125", + "unused126", + "unused127", + "unused128", + "unused129", + "unused130", + "unused131", + "unused132", + "unused133", + "unused134", + "unused135", + "unused136", + "unused137", + "unused138", + "unused139", + "unused140", + "unused141", + "unused142", + "unused143", + "unused144", + "unused145", + "unused146", + "unused147", + "unused148", + "unused149", + "unused150", + "unused151", + "unused152", + "unused153", + "unused154", + "unused155", + "unused156", + "unused157", + "unused158", + "unused159", + "unused160", + "unused161", + "unused162", + "unused163", + "unused164", + "unused165", + "unused166", + "unused167", + "unused168", + "unused169", + "unused170", + "unused171", + "unused172", + "unused173", + "unused174", + "unused175", + "unused176", + "unused177", + "unused178", + "unused179", + "unused180", + "unused181", + "unused182", + "unused183", + "unused184", + "unused185", + "unused186", + "unused187", + "unused188", + "unused189", + "unused190", + "unused191", + "unused192", + "unused193", + "unused194", + "unused195", + "unused196", + "unused197", + "unused198", + "unused199", + "unused200", + "unused201", + "unused202", + "unused203", + "unused204", + "unused205", + "unused206", + "unused207", + "unused208", + "unused209", + "unused210", + "unused211", + "unused212", + "unused213", + "unused214", + "unused215", + "unused216", + "unused217", + "unused218", + "unused219", + "unused220", + "unused221", + "unused222", + "unused223", + "unused224", + "unused225", + "unused226", + "unused227", + "unused228", + "unused229", + "unused230", + "unused231", + "unused232", + "unused233", + "unused234", + "unused235", + "unused236", + "unused237", + "unused238", + "unused239", + "unused240", + "unused241", + "unused242", + "unused243", + "unused244", + "unused245", + "unused246", + "unused247", + "unused248", + "unused249", + "unused250", + "unused251", + "unused252", + "unused253", + "unused254", + "unused255" + ], + "type" : "string" + }, + "format" : { + "description" : "Target Format.", + "enum" : [ + "raw", + "qcow2", + "vmdk" + ], + "optional" : 1, + "type" : "string" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "port" : { - "description" : "Port number returned by previous vncproxy call.", - "maximum" : 5999, - "minimum" : 5900, + "storage" : { + "description" : "Target storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "target-digest" : { + "description" : "Prevent changes if the current config file of the target VM has a\"\n\t\t .\" different SHA1 digest. This can be used to detect concurrent modifications.", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "target-disk" : { + "description" : "The config key the disk will be moved to on the target VM (for example, ide0 or scsi1). Default is the source disk key.", + "enum" : [ + "ide0", + "ide1", + "ide2", + "ide3", + "scsi0", + "scsi1", + "scsi2", + "scsi3", + "scsi4", + "scsi5", + "scsi6", + "scsi7", + "scsi8", + "scsi9", + "scsi10", + "scsi11", + "scsi12", + "scsi13", + "scsi14", + "scsi15", + "scsi16", + "scsi17", + "scsi18", + "scsi19", + "scsi20", + "scsi21", + "scsi22", + "scsi23", + "scsi24", + "scsi25", + "scsi26", + "scsi27", + "scsi28", + "scsi29", + "scsi30", + "virtio0", + "virtio1", + "virtio2", + "virtio3", + "virtio4", + "virtio5", + "virtio6", + "virtio7", + "virtio8", + "virtio9", + "virtio10", + "virtio11", + "virtio12", + "virtio13", + "virtio14", + "virtio15", + "sata0", + "sata1", + "sata2", + "sata3", + "sata4", + "sata5", + "efidisk0", + "tpmstate0", + "unused0", + "unused1", + "unused2", + "unused3", + "unused4", + "unused5", + "unused6", + "unused7", + "unused8", + "unused9", + "unused10", + "unused11", + "unused12", + "unused13", + "unused14", + "unused15", + "unused16", + "unused17", + "unused18", + "unused19", + "unused20", + "unused21", + "unused22", + "unused23", + "unused24", + "unused25", + "unused26", + "unused27", + "unused28", + "unused29", + "unused30", + "unused31", + "unused32", + "unused33", + "unused34", + "unused35", + "unused36", + "unused37", + "unused38", + "unused39", + "unused40", + "unused41", + "unused42", + "unused43", + "unused44", + "unused45", + "unused46", + "unused47", + "unused48", + "unused49", + "unused50", + "unused51", + "unused52", + "unused53", + "unused54", + "unused55", + "unused56", + "unused57", + "unused58", + "unused59", + "unused60", + "unused61", + "unused62", + "unused63", + "unused64", + "unused65", + "unused66", + "unused67", + "unused68", + "unused69", + "unused70", + "unused71", + "unused72", + "unused73", + "unused74", + "unused75", + "unused76", + "unused77", + "unused78", + "unused79", + "unused80", + "unused81", + "unused82", + "unused83", + "unused84", + "unused85", + "unused86", + "unused87", + "unused88", + "unused89", + "unused90", + "unused91", + "unused92", + "unused93", + "unused94", + "unused95", + "unused96", + "unused97", + "unused98", + "unused99", + "unused100", + "unused101", + "unused102", + "unused103", + "unused104", + "unused105", + "unused106", + "unused107", + "unused108", + "unused109", + "unused110", + "unused111", + "unused112", + "unused113", + "unused114", + "unused115", + "unused116", + "unused117", + "unused118", + "unused119", + "unused120", + "unused121", + "unused122", + "unused123", + "unused124", + "unused125", + "unused126", + "unused127", + "unused128", + "unused129", + "unused130", + "unused131", + "unused132", + "unused133", + "unused134", + "unused135", + "unused136", + "unused137", + "unused138", + "unused139", + "unused140", + "unused141", + "unused142", + "unused143", + "unused144", + "unused145", + "unused146", + "unused147", + "unused148", + "unused149", + "unused150", + "unused151", + "unused152", + "unused153", + "unused154", + "unused155", + "unused156", + "unused157", + "unused158", + "unused159", + "unused160", + "unused161", + "unused162", + "unused163", + "unused164", + "unused165", + "unused166", + "unused167", + "unused168", + "unused169", + "unused170", + "unused171", + "unused172", + "unused173", + "unused174", + "unused175", + "unused176", + "unused177", + "unused178", + "unused179", + "unused180", + "unused181", + "unused182", + "unused183", + "unused184", + "unused185", + "unused186", + "unused187", + "unused188", + "unused189", + "unused190", + "unused191", + "unused192", + "unused193", + "unused194", + "unused195", + "unused196", + "unused197", + "unused198", + "unused199", + "unused200", + "unused201", + "unused202", + "unused203", + "unused204", + "unused205", + "unused206", + "unused207", + "unused208", + "unused209", + "unused210", + "unused211", + "unused212", + "unused213", + "unused214", + "unused215", + "unused216", + "unused217", + "unused218", + "unused219", + "unused220", + "unused221", + "unused222", + "unused223", + "unused224", + "unused225", + "unused226", + "unused227", + "unused228", + "unused229", + "unused230", + "unused231", + "unused232", + "unused233", + "unused234", + "unused235", + "unused236", + "unused237", + "unused238", + "unused239", + "unused240", + "unused241", + "unused242", + "unused243", + "unused244", + "unused245", + "unused246", + "unused247", + "unused248", + "unused249", + "unused250", + "unused251", + "unused252", + "unused253", + "unused254", + "unused255" + ], + "optional" : 1, + "type" : "string" + }, + "target-vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, "type" : "integer", - "typetext" : " (5900 - 5999)" + "typetext" : " (1 - N)" }, "vmid" : { "description" : "The (unique) ID of the VM.", @@ -9892,12 +21574,6 @@ var pveapi = [ "minimum" : 1, "type" : "integer", "typetext" : " (1 - N)" - }, - "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", - "maxLength" : 512, - "type" : "string", - "typetext" : "" } } }, @@ -9906,31 +21582,30 @@ var pveapi = [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Config.Disk" ] ], - "description" : "You also need to pass a valid ticket (vncticket)." + "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage. To move a disk to another VM, you need the permissions on the target VM as well." }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "properties" : { - "port" : { - "type" : "string" - } - }, - "type" : "object" + "description" : "the task ID.", + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket", - "text" : "vncwebsocket" + "path" : "/nodes/{node}/qemu/{vmid}/move_disk", + "text" : "move_disk" }, { "info" : { - "POST" : { - "description" : "Returns a SPICE configuration to connect to the VM.", - "method" : "POST", - "name" : "spiceproxy", + "GET" : { + "allowtoken" : 1, + "description" : "Get preconditions for migration.", + "method" : "GET", + "name" : "migrate_vm_precondition", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -9940,9 +21615,9 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "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).", - "format" : "address", + "target" : { + "description" : "Target node.", + "format" : "pve-node", "optional" : 1, "type" : "string", "typetext" : "" @@ -9961,484 +21636,153 @@ var pveapi = [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Migrate" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "additionalProperties" : 1, - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", "properties" : { - "host" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "proxy" : { - "type" : "string" - }, - "tls-port" : { - "type" : "integer" + "allowed_nodes" : { + "description" : "List nodes allowed for offline migration, only passed if VM is offline", + "optional" : 1, + "type" : "array" }, - "type" : { - "type" : "string" - } - } - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy", - "text" : "spiceproxy" - }, - { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Get virtual machine status.", - "method" : "GET", - "name" : "vm_status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "local_disks" : { + "description" : "List local disks including CD-Rom, unsused and not referenced disks", + "type" : "array" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "local_resources" : { + "description" : "List local resources e.g. pci, usb", + "type" : "array" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { + "not_allowed_nodes" : { + "description" : "List not allowed nodes with additional informations, only passed if VM is offline", + "optional" : 1, "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/current", - "text" : "current" - }, - { - "info" : { - "POST" : { - "description" : "Start virtual machine.", - "method" : "POST", - "name" : "vm_start", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "machine" : { - "description" : "Specific the Qemu machine type.", - "maxLength" : 40, - "optional" : 1, - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "type" : "string" - }, - "migratedfrom" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "migration_network" : { - "description" : "CIDR of the (sub) network that is used for migration.", - "format" : "CIDR", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "migration_type" : { - "description" : "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.", - "enum" : [ - "secure", - "insecure" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stateuri" : { - "description" : "Some command save/restore state from this location.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "targetstorage" : { - "description" : "Target storage for the migration. (Can be '1' to use the same storage id as on the source node.)", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" + "running" : { + "type" : "boolean" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/start", - "text" : "start" + }, + "type" : "object" + } }, - { - "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", - "method" : "POST", - "name" : "vm_stop", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "keepActive" : { - "default" : 0, - "description" : "Do not deactivate storage volumes.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "migratedfrom" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "timeout" : { - "description" : "Wait maximal timeout seconds.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + "POST" : { + "allowtoken" : 1, + "description" : "Migrate virtual machine. Creates a new migration task.", + "method" : "POST", + "name" : "migrate_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "bwlimit" : { + "default" : "migrate limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/stop", - "text" : "stop" - }, - { - "info" : { - "POST" : { - "description" : "Reset virtual machine.", - "method" : "POST", - "name" : "vm_reset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "force" : { + "description" : "Allow to migrate VMs which use local devices. Only root may use this option.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + "migration_network" : { + "description" : "CIDR of the (sub) network that is used for migration.", + "format" : "CIDR", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { + "migration_type" : { + "description" : "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.", + "enum" : [ + "secure", + "insecure" + ], + "optional" : 1, "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/reset", - "text" : "reset" - }, - { - "info" : { - "POST" : { - "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.", - "method" : "POST", - "name" : "vm_shutdown", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "forceStop" : { - "default" : 0, - "description" : "Make sure the VM stops.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "keepActive" : { - "default" : 0, - "description" : "Do not deactivate storage volumes.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "timeout" : { - "description" : "Wait maximal timeout seconds.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown", - "text" : "shutdown" - }, - { - "info" : { - "POST" : { - "description" : "Suspend virtual machine.", - "method" : "POST", - "name" : "vm_suspend", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + "online" : { + "description" : "Use online/live migration if VM is running. Ignored if VM is stopped.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/suspend", - "text" : "suspend" - }, - { - "info" : { - "POST" : { - "description" : "Resume virtual machine.", - "method" : "POST", - "name" : "vm_resume", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "nocheck" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "target" : { + "description" : "Target node.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + "targetstorage" : { + "description" : "Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.", + "format" : "storage-pair-list", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "with-local-disks" : { + "description" : "Enable live storage migration for local disk", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/resume", - "text" : "resume" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Migrate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } } - ], + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/migrate", + "text" : "migrate" + }, + { "info" : { - "GET" : { - "description" : "Directory index", - "method" : "GET", - "name" : "vmcmdidx", + "POST" : { + "allowtoken" : 1, + "description" : "Execute Qemu monitor commands.", + "method" : "POST", + "name" : "monitor", "parameters" : { "additionalProperties" : 0, "properties" : { + "command" : { + "description" : "The monitor command.", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", @@ -10455,52 +21799,119 @@ var pveapi = [ } }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Monitor" + ] + ], + "description" : "Sys.Modify is required for (sub)commands which are not read-only ('info *' and 'help')" }, + "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ], - "type" : "array" + "type" : "string" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/status", - "text" : "status" + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/monitor", + "text" : "monitor" }, { "info" : { "PUT" : { - "description" : "Send key event to virtual machine.", + "allowtoken" : 1, + "description" : "Extend volume size.", "method" : "PUT", - "name" : "vm_sendkey", + "name" : "resize_vm", "parameters" : { "additionalProperties" : 0, "properties" : { - "key" : { - "description" : "The key (qemu monitor encoding).", + "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", "typetext" : "" }, + "disk" : { + "description" : "The disk you want to resize.", + "enum" : [ + "ide0", + "ide1", + "ide2", + "ide3", + "scsi0", + "scsi1", + "scsi2", + "scsi3", + "scsi4", + "scsi5", + "scsi6", + "scsi7", + "scsi8", + "scsi9", + "scsi10", + "scsi11", + "scsi12", + "scsi13", + "scsi14", + "scsi15", + "scsi16", + "scsi17", + "scsi18", + "scsi19", + "scsi20", + "scsi21", + "scsi22", + "scsi23", + "scsi24", + "scsi25", + "scsi26", + "scsi27", + "scsi28", + "scsi29", + "scsi30", + "virtio0", + "virtio1", + "virtio2", + "virtio3", + "virtio4", + "virtio5", + "virtio6", + "virtio7", + "virtio8", + "virtio9", + "virtio10", + "virtio11", + "virtio12", + "virtio13", + "virtio14", + "virtio15", + "sata0", + "sata1", + "sata2", + "sata3", + "sata4", + "sata5", + "efidisk0", + "tpmstate0" + ], + "type" : "string" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, + "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" + }, "skiplock" : { "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, @@ -10521,7 +21932,7 @@ var pveapi = [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Config.Disk" ] ] }, @@ -10533,41 +21944,297 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/sendkey", - "text" : "sendkey" + "path" : "/nodes/{node}/qemu/{vmid}/resize", + "text" : "resize" }, { + "children" : [ + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get snapshot configuration", + "method" : "GET", + "name" : "get_snapshot_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot", + "VM.Snapshot.Rollback", + "VM.Audit" + ], + "any", + 1 + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update snapshot metadata.", + "method" : "PUT", + "name" : "update_snapshot_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "description" : { + "description" : "A textual description or comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config", + "text" : "config" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Rollback VM state to specified snapshot.", + "method" : "POST", + "name" : "rollback", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot", + "VM.Snapshot.Rollback" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback", + "text" : "rollback" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete a VM snapshot.", + "method" : "DELETE", + "name" : "delsnapshot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "description" : "For removal from config file, even if removing disk snapshots fails.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "", + "method" : "GET", + "name" : "snapshot_cmd_idx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{cmd}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}", + "text" : "{snapname}" + } + ], "info" : { "GET" : { - "description" : "Check if feature for virtual machine is available.", + "allowtoken" : 1, + "description" : "List all snapshots.", "method" : "GET", - "name" : "vm_feature", + "name" : "snapshot_list", "parameters" : { "additionalProperties" : 0, "properties" : { - "feature" : { - "description" : "Feature to check.", - "enum" : [ - "snapshot", - "clone", - "copy" - ], - "type" : "string" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, "vmid" : { "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", @@ -10589,105 +22256,68 @@ var pveapi = [ "protected" : 1, "proxyto" : "node", "returns" : { - "properties" : { - "hasFeature" : { - "type" : "boolean" - }, - "nodes" : { - "items" : { + "items" : { + "properties" : { + "description" : { + "description" : "Snapshot description.", "type" : "string" }, - "type" : "array" - } - }, - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/feature", - "text" : "feature" - }, - { - "info" : { - "POST" : { - "description" : "Create a copy of virtual machine/template.", - "method" : "POST", - "name" : "clone_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "description" : { - "description" : "Description for the new VM.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "format" : { - "description" : "Target format for file storage.", - "enum" : [ - "raw", - "qcow2", - "vmdk" - ], - "optional" : 1, - "requires" : "full", - "type" : "string" - }, - "full" : { - "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.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "name" : { + "description" : "Snapshot identifier. Value 'current' identifies the current VM.", + "type" : "string" + }, + "parent" : { + "description" : "Parent snapshot identifier.", + "optional" : 1, + "type" : "string" + }, + "snaptime" : { + "description" : "Snapshot creation time", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" + }, + "vmstate" : { + "description" : "Snapshot includes RAM.", + "optional" : 1, + "type" : "boolean" + } }, - "name" : { - "description" : "Set a name for the new VM.", - "format" : "dns-name", + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Snapshot a VM.", + "method" : "POST", + "name" : "snapshot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "description" : { + "description" : "A textual description or comment.", "optional" : 1, "type" : "string", "typetext" : "" }, - "newid" : { - "description" : "VMID for the clone.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "pool" : { - "description" : "Add the new VM to the specified pool.", - "format" : "pve-poolid", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, "snapname" : { "description" : "The name of the snapshot.", "format" : "pve-configid", "maxLength" : 40, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "Target storage for full clone.", - "format" : "pve-storage-id", - "optional" : 1, - "requires" : "full", - "type" : "string", - "typetext" : "" - }, - "target" : { - "description" : "Target node. Only allowed if the original VM is on shared storage.", - "format" : "pve-node", - "optional" : 1, "type" : "string", "typetext" : "" }, @@ -10697,77 +22327,48 @@ var pveapi = [ "minimum" : 1, "type" : "integer", "typetext" : " (1 - N)" + }, + "vmstate" : { + "description" : "Save the vmstate", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, "permissions" : { "check" : [ - "and", - [ - "perm", - "/vms/{vmid}", - [ - "VM.Clone" - ] - ], + "perm", + "/vms/{vmid}", [ - "or", - [ - "perm", - "/vms/{newid}", - [ - "VM.Allocate" - ] - ], - [ - "perm", - "/pool/{pool}", - [ - "VM.Allocate" - ], - "require_param", - "pool" - ] + "VM.Snapshot" ] - ], - "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", "returns" : { + "description" : "the task ID.", "type" : "string" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/clone", - "text" : "clone" + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot", + "text" : "snapshot" }, { "info" : { "POST" : { - "description" : "Move volume to different storage.", + "allowtoken" : 1, + "description" : "Create a Template.", "method" : "POST", - "name" : "move_vm_disk", + "name" : "template", "parameters" : { "additionalProperties" : 0, "properties" : { - "delete" : { - "default" : 0, - "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "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", - "typetext" : "" - }, "disk" : { - "description" : "The disk you want to move.", + "description" : "If you want to convert only 1 disk to base image.", "enum" : [ "ide0", "ide1", @@ -10787,6 +22388,23 @@ var pveapi = [ "scsi11", "scsi12", "scsi13", + "scsi14", + "scsi15", + "scsi16", + "scsi17", + "scsi18", + "scsi19", + "scsi20", + "scsi21", + "scsi22", + "scsi23", + "scsi24", + "scsi25", + "scsi26", + "scsi27", + "scsi28", + "scsi29", + "scsi30", "virtio0", "virtio1", "virtio2", @@ -10809,16 +22427,8 @@ var pveapi = [ "sata3", "sata4", "sata5", - "efidisk0" - ], - "type" : "string" - }, - "format" : { - "description" : "Target Format.", - "enum" : [ - "raw", - "qcow2", - "vmdk" + "efidisk0", + "tpmstate0" ], "optional" : 1, "type" : "string" @@ -10829,12 +22439,6 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "storage" : { - "description" : "Target storage.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, "vmid" : { "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", @@ -10844,1169 +22448,1410 @@ var pveapi = [ } } }, - "permissions" : { - "check" : [ - "and", - [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ] - ], - [ - "perm", - "/storage/{storage}", - [ - "Datastore.AllocateSpace" - ] - ] + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ], + "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/template", + "text" : "template" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get automatically generated cloudinit config.", + "method" : "GET", + "name" : "cloudinit_generated_config_dump", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Config type.", + "enum" : [ + "user", + "network", + "meta" + ], + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/cloudinit/dump", + "text" : "dump" + } + ], + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/cloudinit", + "text" : "cloudinit" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy the VM and all used/owned volumes. Removes any VM specific permissions and firewall rules", + "method" : "DELETE", + "name" : "destroy_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "destroy-unreferenced-disks" : { + "default" : 0, + "description" : "If set, destroy additionally all disks not referenced in the config but with a matching VMID from all enabled storages.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "purge" : { + "description" : "Remove VMID from configurations, like backup & replication jobs and HA.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Directory index", + "method" : "GET", + "name" : "vmdiridx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}", + "text" : "{vmid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Virtual machine index (per node).", + "method" : "GET", + "name" : "vmlist", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "full" : { + "description" : "Determine the full status of active VMs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "Only list VMs where you have VM.Audit permissons on /vms/.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "cpus" : { + "description" : "Maximum usable CPUs.", + "optional" : 1, + "type" : "number" + }, + "lock" : { + "description" : "The current config lock, if any.", + "optional" : 1, + "type" : "string" + }, + "maxdisk" : { + "description" : "Root disk size in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxmem" : { + "description" : "Maximum memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "name" : { + "description" : "VM name.", + "optional" : 1, + "type" : "string" + }, + "pid" : { + "description" : "PID of running qemu process.", + "optional" : 1, + "type" : "integer" + }, + "qmpstatus" : { + "description" : "Qemu QMP agent status.", + "optional" : 1, + "type" : "string" + }, + "running-machine" : { + "description" : "The currently running machine type (if running).", + "optional" : 1, + "type" : "string" + }, + "running-qemu" : { + "description" : "The currently running QEMU version (if running).", + "optional" : 1, + "type" : "string" + }, + "status" : { + "description" : "Qemu process status.", + "enum" : [ + "stopped", + "running" + ], + "type" : "string" + }, + "tags" : { + "description" : "The current configured tags, if any", + "optional" : 1, + "type" : "string" + }, + "uptime" : { + "description" : "Uptime.", + "optional" : 1, + "renderer" : "duration", + "type" : "integer" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{vmid}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create or restore a virtual machine.", + "method" : "POST", + "name" : "create_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "acpi" : { + "default" : 1, + "description" : "Enable/disable ACPI.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "agent" : { + "description" : "Enable/disable communication with the Qemu Guest Agent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable communication with a Qemu Guest Agent (QGA) running in the VM.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after moving a disk or migrating the VM.", + "optional" : 1, + "type" : "boolean" + }, + "type" : { + "default" : "virtio", + "description" : "Select the agent type", + "enum" : [ + "virtio", + "isa" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[enabled=]<1|0> [,fstrim_cloned_disks=<1|0>] [,type=]" + }, + "arch" : { + "description" : "Virtual processor architecture. Defaults to the host.", + "enum" : [ + "x86_64", + "aarch64" + ], + "optional" : 1, + "type" : "string" + }, + "archive" : { + "description" : "The backup archive. Either the file system path to a .tar or .vma file (use '-' to pipe data from stdin) or a proxmox storage backup volume identifier.", + "maxLength" : 255, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "args" : { + "description" : "Arbitrary arguments passed to kvm.", + "optional" : 1, + "type" : "string", + "typetext" : "", + "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n" + }, + "audio0" : { + "description" : "Configure a audio device, useful in combination with QXL/Spice.", + "format" : { + "device" : { + "description" : "Configure an audio device.", + "enum" : [ + "ich9-intel-hda", + "intel-hda", + "AC97" + ], + "type" : "string" + }, + "driver" : { + "default" : "spice", + "description" : "Driver backend for the audio device.", + "enum" : [ + "spice", + "none" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "device= [,driver=]" + }, + "autostart" : { + "default" : 0, + "description" : "Automatic restart after crash (currently ignored).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "balloon" : { + "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "bios" : { + "default" : "seabios", + "description" : "Select BIOS implementation.", + "enum" : [ + "seabios", + "ovmf" + ], + "optional" : 1, + "type" : "string" + }, + "boot" : { + "description" : "Specify guest boot order. Use the 'order=' sub-property as usage with no key or 'legacy=' is deprecated.", + "format" : "pve-qm-boot", + "optional" : 1, + "type" : "string", + "typetext" : "[[legacy=]<[acdn]{1,4}>] [,order=]" + }, + "bootdisk" : { + "description" : "Enable booting from specified disk. Deprecated: Use 'boot: order=foo;bar' instead.", + "format" : "pve-qm-bootdisk", + "optional" : 1, + "pattern" : "(ide|sata|scsi|virtio)\\d+", + "type" : "string" + }, + "bwlimit" : { + "default" : "restore limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "cdrom" : { + "description" : "This is an alias for option -ide2", + "format" : "pve-qm-ide", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "cicustom" : { + "description" : "cloud-init: Specify custom files to replace the automatically generated ones at start.", + "format" : "pve-qm-cicustom", + "optional" : 1, + "type" : "string", + "typetext" : "[meta=] [,network=] [,user=] [,vendor=]" + }, + "cipassword" : { + "description" : "cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "citype" : { + "description" : "Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.", + "enum" : [ + "configdrive2", + "nocloud", + "opennebula" + ], + "optional" : 1, + "type" : "string" + }, + "ciuser" : { + "description" : "cloud-init: User name to change ssh keys and password for instead of the image's configured default user.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "cores" : { + "default" : 1, + "description" : "The number of cores per socket.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "cpu" : { + "description" : "Emulated CPU type.", + "format" : "pve-vm-cpu-conf", + "optional" : 1, + "type" : "string", + "typetext" : "[[cputype=]] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>] [,hv-vendor-id=] [,phys-bits=<8-64|host>] [,reported-model=]" + }, + "cpulimit" : { + "default" : 0, + "description" : "Limit of CPU usage.", + "maximum" : 128, + "minimum" : 0, + "optional" : 1, + "type" : "number", + "typetext" : " (0 - 128)", + "verbose_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." + }, + "cpuunits" : { + "default" : "cgroup v1: 1024, cgroup v2: 100", + "description" : "CPU weight for a VM, will be clamped to [1, 10000] in cgroup v2.", + "maximum" : 262144, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 262144)", + "verbose_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." + }, + "description" : { + "description" : "Description for the VM. Shown in the web-interface VM's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and that the default EFI vars are copied to the volume instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "efitype" : { + "default" : "2m", + "description" : "Size and type of the OVMF EFI vars. '4m' is newer and recommended, and required for Secure Boot. For backwards compatibility, '2m' is used if not otherwise specified.", + "enum" : [ + "2m", + "4m" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], - "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage." + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/move_disk", - "text" : "move_disk" - }, - { - "info" : { - "POST" : { - "description" : "Migrate virtual machine. Creates a new migration task.", - "method" : "POST", - "name" : "migrate_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "force" : { - "description" : "Allow to migrate VMs which use local devices. Only root may use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "migration_network" : { - "description" : "CIDR of the (sub) network that is used for migration.", - "format" : "CIDR", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "migration_type" : { - "description" : "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance.", - "enum" : [ - "secure", - "insecure" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "online" : { - "description" : "Use online/live migration.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "target" : { - "description" : "Target node.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "targetstorage" : { - "description" : "Default target storage.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "with-local-disks" : { - "description" : "Enable live storage migration for local disk", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } - } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Migrate" - ] - ] + "pre-enrolled-keys" : { + "default" : 0, + "description" : "Use am EFI vars template with distribution-specific and Microsoft Standard keys enrolled, if used with 'efitype=4m'. Note that this will enable Secure Boot by default, though it can still be turned off from within the VM.", + "optional" : 1, + "type" : "boolean" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, "type" : "string" + }, + "volume" : { + "alias" : "file" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,efitype=<2m|4m>] [,format=] [,import-from=] [,pre-enrolled-keys=<1|0>] [,size=]" }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/migrate", - "text" : "migrate" - }, - { - "info" : { - "POST" : { - "description" : "Execute Qemu monitor commands.", - "method" : "POST", - "name" : "monitor", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "command" : { - "description" : "The monitor command.", - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "force" : { + "description" : "Allow to overwrite existing VM.", + "optional" : 1, + "requires" : "archive", + "type" : "boolean", + "typetext" : "" + }, + "freeze" : { + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "hookscript" : { + "description" : "Script that will be executed during various steps in the vms lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "hostpci[n]" : { + "description" : "Map host PCI devices into guest.", + "format" : "pve-qm-hostpci", + "optional" : 1, + "type" : "string", + "typetext" : "[host=] [,device-id=] [,legacy-igd=<1|0>] [,mdev=] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=] [,sub-device-id=] [,sub-vendor-id=] [,vendor-id=] [,x-vga=<1|0>]", + "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer\npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "hotplug" : { + "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. Using '1' as value is an alias for the default `network,disk,usb`.", + "format" : "pve-hotplug-features", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "hugepages" : { + "description" : "Enable/disable hugepages memory.", + "enum" : [ + "any", + "2", + "1024" + ], + "optional" : 1, + "type" : "string" + }, + "ide[n]" : { + "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Monitor" - ] + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_rd_length" : { + "alias" : "bps_rd_max_length" + }, + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_wr_length" : { + "alias" : "bps_wr_max_length" + }, + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" ], - "description" : "Sys.Modify is required for (sub)commands which are not read-only ('info *' and 'help')" + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" + }, + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/monitor", - "text" : "monitor" - }, - { - "info" : { - "POST" : { - "description" : "Execute Qemu Guest Agent commands.", - "method" : "POST", - "name" : "agent", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "command" : { - "description" : "The QGA command.", - "enum" : [ - "ping", - "get-time", - "info", - "fsfreeze-status", - "fsfreeze-freeze", - "fsfreeze-thaw", - "fstrim", - "network-get-interfaces", - "get-vcpus", - "get-fsinfo", - "get-memory-blocks", - "get-memory-block-info", - "suspend-hybrid", - "suspend-ram", - "suspend-disk", - "shutdown" - ], - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Monitor" - ] - ] + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_length" : { + "alias" : "iops_wr_max_length" + }, + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "Returns an object with a single `result` property. The type of that\nproperty depends on the executed command.", - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/agent", - "text" : "agent" - }, - { - "info" : { - "PUT" : { - "description" : "Extend volume size.", - "method" : "PUT", - "name" : "resize_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "disk" : { - "description" : "The disk you want to resize.", - "enum" : [ - "ide0", - "ide1", - "ide2", - "ide3", - "scsi0", - "scsi1", - "scsi2", - "scsi3", - "scsi4", - "scsi5", - "scsi6", - "scsi7", - "scsi8", - "scsi9", - "scsi10", - "scsi11", - "scsi12", - "scsi13", - "virtio0", - "virtio1", - "virtio2", - "virtio3", - "virtio4", - "virtio5", - "virtio6", - "virtio7", - "virtio8", - "virtio9", - "virtio10", - "virtio11", - "virtio12", - "virtio13", - "virtio14", - "virtio15", - "sata0", - "sata1", - "sata2", - "sata3", - "sata4", - "sata5", - "efidisk0" - ], - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "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" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ] - ] + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/resize", - "text" : "resize" - }, - { - "children" : [ - { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Get snapshot configuration", - "method" : "GET", - "name" : "get_snapshot_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update snapshot metadata.", - "method" : "PUT", - "name" : "update_snapshot_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "description" : { - "description" : "A textual description or comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config", - "text" : "config" - }, - { - "info" : { - "POST" : { - "description" : "Rollback VM state to specified snapshot.", - "method" : "POST", - "name" : "rollback", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback", - "text" : "rollback" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete a VM snapshot.", - "method" : "DELETE", - "name" : "delsnapshot", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "force" : { - "description" : "For removal from config file, even if removing disk snapshots fails.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", - "type" : "string" - } - }, - "GET" : { - "description" : "", - "method" : "GET", - "name" : "snapshot_cmd_idx", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{cmd}", - "rel" : "child" - } - ], - "type" : "array" - } - } + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}", - "text" : "{snapname}" - } - ], - "info" : { - "GET" : { - "description" : "List all snapshots.", - "method" : "GET", - "name" : "snapshot_list", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "media" : { + "default" : "disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "model" : { + "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", + "format" : "urlencoded", + "format_description" : "model", + "maxLength" : 120, + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" ], - "type" : "array" - } - }, - "POST" : { - "description" : "Snapshot a VM.", - "method" : "POST", - "name" : "snapshot", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "description" : { - "description" : "A textual description or comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "vmstate" : { - "description" : "Save the vmstate", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } - } + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "optional" : 1, + "type" : "integer" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, + "optional" : 1, "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot", - "text" : "snapshot" - }, - { - "info" : { - "POST" : { - "description" : "Create a Template.", - "method" : "POST", - "name" : "template", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "disk" : { - "description" : "If you want to convert only 1 disk to base image.", - "enum" : [ - "ide0", - "ide1", - "ide2", - "ide3", - "scsi0", - "scsi1", - "scsi2", - "scsi3", - "scsi4", - "scsi5", - "scsi6", - "scsi7", - "scsi8", - "scsi9", - "scsi10", - "scsi11", - "scsi12", - "scsi13", - "virtio0", - "virtio1", - "virtio2", - "virtio3", - "virtio4", - "virtio5", - "virtio6", - "virtio7", - "virtio8", - "virtio9", - "virtio10", - "virtio11", - "virtio12", - "virtio13", - "virtio14", - "virtio15", - "sata0", - "sata1", - "sata2", - "sata3", - "sata4", - "sata5", - "efidisk0" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", + "optional" : 1, + "type" : "boolean" + }, + "trans" : { + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" ], - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/template", - "text" : "template" - } - ], - "info" : { - "DELETE" : { - "description" : "Destroy the vm (also delete all used/owned volumes).", - "method" : "DELETE", - "name" : "destroy_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "volume" : { + "alias" : "file" }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ] + "ipconfig[n]" : { + "description" : "cloud-init: Specify IP addresses and gateways for the corresponding interface.\n\nIP addresses use CIDR notation, gateways are optional but need an IP of the same type specified.\n\nThe special string 'dhcp' can be used for IP addresses to use DHCP, in which case no explicit\ngateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration. This requires\ncloud-init 19.4 or newer.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using\ndhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string", + "typetext" : "[gw=] [,gw6=] [,ip=] [,ip6=]" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - }, - "GET" : { - "description" : "Directory index", - "method" : "GET", - "name" : "vmdiridx", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "ivshmem" : { + "description" : "Inter-VM shared memory. Useful for direct communication between VMs, or to the host.", + "format" : { + "name" : { + "description" : "The name of the file. Will be prefixed with 'pve-shm-'. Default is the VMID. Will be deleted when the VM is stopped.", + "format_description" : "string", + "optional" : 1, + "pattern" : "[a-zA-Z0-9\\-]+", + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", + "size" : { + "description" : "The size of the file in MB.", "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "type" : "integer" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "size= [,name=]" }, - "permissions" : { - "user" : "all" + "keephugepages" : { + "default" : 0, + "description" : "Use together with hugepages. If enabled, hugepages will not not be deleted after VM shutdown and can be used for subsequent starts.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } + "keyboard" : { + "default" : null, + "description" : "Keyboard layout for VNC server. This option is generally not required and is often better handled from within the guest OS.", + "enum" : [ + "de", + "de-ch", + "da", + "en-gb", + "en-us", + "es", + "fi", + "fr", + "fr-be", + "fr-ca", + "fr-ch", + "hu", + "is", + "it", + "ja", + "lt", + "mk", + "nl", + "no", + "pl", + "pt", + "pt-br", + "sv", + "sl", + "tr" ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}", - "text" : "{vmid}" - } - ], - "info" : { - "GET" : { - "description" : "Virtual machine index (per node).", - "method" : "GET", - "name" : "vmlist", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "full" : { - "description" : "Determine the full status of active VMs.", + "optional" : 1, + "type" : "string" + }, + "kvm" : { + "default" : 1, + "description" : "Enable/disable KVM hardware virtualization.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "description" : "Only list VMs where you have VM.Audit permissons on /vms/.", - "user" : "all" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{vmid}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create or restore a virtual machine.", - "method" : "POST", - "name" : "create_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "acpi" : { - "default" : 1, - "description" : "Enable/disable ACPI.", + "live-restore" : { + "description" : "Start the VM immediately from the backup and restore in background. PBS only.", "optional" : 1, + "requires" : "archive", "type" : "boolean", "typetext" : "" }, - "agent" : { - "default" : 0, - "description" : "Enable/disable Qemu GuestAgent.", + "localtime" : { + "description" : "Set the real time clock (RTC) to local time. This is enabled by default if the `ostype` indicates a Microsoft Windows OS.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "archive" : { - "description" : "The backup file.", - "maxLength" : 255, + "lock" : { + "description" : "Lock/unlock the VM.", + "enum" : [ + "backup", + "clone", + "create", + "migrate", + "rollback", + "snapshot", + "snapshot-delete", + "suspending", + "suspended" + ], + "optional" : 1, + "type" : "string" + }, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|q35|pc-q35-\\d+(\\.\\d+)+(\\+pve\\d+)?(\\.pxe)?|virt(?:-\\d+(\\.\\d+)+)?(\\+pve\\d+)?)", + "type" : "string" + }, + "memory" : { + "default" : 512, + "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - N)" + }, + "migrate_downtime" : { + "default" : 0.1, + "description" : "Set maximum tolerated downtime (in seconds) for migrations.", + "minimum" : 0, + "optional" : 1, + "type" : "number", + "typetext" : " (0 - N)" + }, + "migrate_speed" : { + "default" : 0, + "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "name" : { + "description" : "Set a name for the VM. Only used on the configuration web interface.", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "nameserver" : { + "description" : "cloud-init: Sets DNS server IP address for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", + "format" : "address-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "net[n]" : { + "description" : "Specify network devices.", + "format" : { + "bridge" : { + "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n", + "format" : "pve-bridge-id", + "format_description" : "bridge", + "optional" : 1, + "type" : "string" + }, + "e1000" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000-82540em" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000-82544gc" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000-82545em" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "e1000e" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "firewall" : { + "description" : "Whether this interface should be protected by the firewall.", + "optional" : 1, + "type" : "boolean" + }, + "i82551" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "i82557b" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "i82559er" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "link_down" : { + "description" : "Whether this interface should be disconnected (like pulling the plug).", + "optional" : 1, + "type" : "boolean" + }, + "macaddr" : { + "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.", + "format" : "mac-addr", + "format_description" : "XX:XX:XX:XX:XX:XX", + "optional" : 1, + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." + }, + "model" : { + "default_key" : 1, + "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.", + "enum" : [ + "e1000", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em", + "e1000e", + "i82551", + "i82557b", + "i82559er", + "ne2k_isa", + "ne2k_pci", + "pcnet", + "rtl8139", + "virtio", + "vmxnet3" + ], + "type" : "string" + }, + "mtu" : { + "description" : "Force MTU, for VirtIO only. Set to '1' to use the bridge MTU", + "maximum" : 65520, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "ne2k_isa" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "ne2k_pci" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "pcnet" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "queues" : { + "description" : "Number of packet queues to be used on the device.", + "maximum" : 16, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "rate" : { + "description" : "Rate limit in mbps (megabytes per second) as floating point number.", + "minimum" : 0, + "optional" : 1, + "type" : "number" + }, + "rtl8139" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "tag" : { + "description" : "VLAN tag to apply to packets on this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "trunks" : { + "description" : "VLAN trunks to pass through this interface.", + "format_description" : "vlanid[;vlanid...]", + "optional" : 1, + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "virtio" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "vmxnet3" : { + "alias" : "macaddr", + "keyAlias" : "model" + } + }, "optional" : 1, "type" : "string", - "typetext" : "" + "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,mtu=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" }, - "args" : { - "description" : "Arbitrary arguments passed to kvm.", - "optional" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "typetext" : "", - "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n" + "typetext" : "" }, - "autostart" : { + "numa" : { "default" : 0, - "description" : "Automatic restart after crash (currently ignored).", + "description" : "Enable/disable NUMA.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "balloon" : { - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "bios" : { - "default" : "seabios", - "description" : "Select BIOS implementation.", - "enum" : [ - "seabios", - "ovmf" - ], - "optional" : 1, - "type" : "string" - }, - "boot" : { - "default" : "cdn", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", - "optional" : 1, - "pattern" : "[acdn]{1,4}", - "type" : "string" - }, - "bootdisk" : { - "description" : "Enable booting from specified disk.", - "format" : "pve-qm-bootdisk", - "optional" : 1, - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "type" : "string" - }, - "cdrom" : { - "description" : "This is an alias for option -ide2", - "format" : "pve-qm-ide", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "cores" : { - "default" : 1, - "description" : "The number of cores per socket.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "cpu" : { - "description" : "Emulated CPU type.", + "numa[n]" : { + "description" : "NUMA topology.", "format" : { - "cputype" : { - "default" : "kvm64", - "default_key" : 1, - "description" : "Emulated CPU type.", - "enum" : [ - "486", - "athlon", - "Broadwell", - "Broadwell-noTSX", - "Conroe", - "core2duo", - "coreduo", - "Haswell", - "Haswell-noTSX", - "host", - "IvyBridge", - "kvm32", - "kvm64", - "Nehalem", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "Penryn", - "pentium", - "pentium2", - "pentium3", - "phenom", - "qemu32", - "qemu64", - "SandyBridge", - "Skylake-Client", - "Westmere" - ], + "cpus" : { + "description" : "CPUs accessing this NUMA node.", + "format_description" : "id[-id];...", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", "type" : "string" }, - "hidden" : { - "default" : 0, - "description" : "Do not identify as a KVM virtual machine.", + "hostnodes" : { + "description" : "Host NUMA nodes to use.", + "format_description" : "id[-id];...", "optional" : 1, - "type" : "boolean" + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "memory" : { + "description" : "Amount of memory this NUMA node provides.", + "optional" : 1, + "type" : "number" + }, + "policy" : { + "description" : "NUMA allocation policy.", + "enum" : [ + "preferred", + "bind", + "interleave" + ], + "optional" : 1, + "type" : "string" } }, "optional" : 1, "type" : "string", - "typetext" : "[cputype=] [,hidden=<1|0>]" + "typetext" : "cpus= [,hostnodes=] [,memory=] [,policy=]" }, - "cpulimit" : { + "onboot" : { "default" : 0, - "description" : "Limit of CPU usage.", - "maximum" : 128, - "minimum" : 0, + "description" : "Specifies whether a VM will be started during system bootup.", "optional" : 1, - "type" : "number", - "typetext" : " (0 - 128)", - "verbose_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" : "boolean", + "typetext" : "" }, - "cpuunits" : { - "default" : 1024, - "description" : "CPU weight for a VM.", - "maximum" : 500000, - "minimum" : 0, + "ostype" : { + "description" : "Specify guest operating system.", + "enum" : [ + "other", + "wxp", + "w2k", + "w2k3", + "w2k8", + "wvista", + "win7", + "win8", + "win10", + "win11", + "l24", + "l26", + "solaris" + ], "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 500000)", - "verbose_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." + "type" : "string", + "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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/2012r2\nwin10;; Microsoft Windows 10/2016/2019\nwin11;; Microsoft Windows 11/2022\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6 - 5.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n" }, - "description" : { - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", + "parallel[n]" : { + "description" : "Map host parallel devices (n is 0 to 2).", + "optional" : 1, + "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", + "type" : "string", + "verbose_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\nmachines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" + }, + "pool" : { + "description" : "Add the VM to the specified pool.", + "format" : "pve-poolid", "optional" : 1, "type" : "string", "typetext" : "" }, - "force" : { - "description" : "Allow to overwrite existing VM.", + "protection" : { + "default" : 0, + "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.", "optional" : 1, - "requires" : "archive", "type" : "boolean", "typetext" : "" }, - "freeze" : { - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "reboot" : { + "default" : 1, + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "hostpci[n]" : { - "description" : "Map host PCI devices into guest.", - "format" : "pve-qm-hostpci", - "optional" : 1, - "type" : "string", - "typetext" : "[host=] [,pcie=<1|0>] [,rombar=<1|0>] [,romfile=] [,x-vga=<1|0>]", - "verbose_description" : "Map host PCI devices into guest.\n\nNOTE: This option allows direct access to host hardware. So it is no longer \npossible to migrate such machines - use with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" - }, - "hotplug" : { - "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", + "rng0" : { + "description" : "Configure a VirtIO-based Random Number Generator.", + "format" : { + "max_bytes" : { + "default" : 1024, + "description" : "Maximum bytes of entropy allowed to get injected into the guest every 'period' milliseconds. Prefer a lower value when using '/dev/random' as source. Use `0` to disable limiting (potentially dangerous!).", + "optional" : 1, + "type" : "integer" + }, + "period" : { + "default" : 1000, + "description" : "Every 'period' milliseconds the entropy-injection quota is reset, allowing the guest to retrieve another 'max_bytes' of entropy.", + "optional" : 1, + "type" : "integer" + }, + "source" : { + "default_key" : 1, + "description" : "The file on the host to gather entropy from. In most cases '/dev/urandom' should be preferred over '/dev/random' to avoid entropy-starvation issues on the host. Using urandom does *not* decrease security in any meaningful way, as it's still seeded from real entropy, and the bytes provided will most likely be mixed with real entropy on the guest as well. '/dev/hwrng' can be used to pass through a hardware RNG from the host.", + "enum" : [ + "/dev/urandom", + "/dev/random", + "/dev/hwrng" + ], + "type" : "string" + } + }, "optional" : 1, "type" : "string", - "typetext" : "" - }, - "hugepages" : { - "description" : "Enable/disable hugepages memory.", - "enum" : [ - "any", - "2", - "1024" - ], - "optional" : 1, - "type" : "string" + "typetext" : "[source=] [,max_bytes=] [,period=]" }, - "ide[n]" : { - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", + "sata[n]" : { + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -12118,6 +23963,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -12227,14 +24079,342 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "model" : { - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", + "optional" : 1, + "type" : "integer" + }, + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", "format" : "urlencoded", - "format_description" : "model", - "maxLength" : 120, + "format_description" : "serial", + "maxLength" : 60, + "optional" : 1, + "type" : "string" + }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", + "optional" : 1, + "type" : "boolean" + }, + "trans" : { + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ], + "optional" : 1, + "type" : "string" + }, + "volume" : { + "alias" : "file" + }, + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" + }, + "scsi[n]" : { + "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 30). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads", + "io_uring" + ], + "optional" : 1, + "type" : "string" + }, + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" + }, + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_rd_length" : { + "alias" : "bps_rd_max_length" + }, + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" + }, + "bps_wr_length" : { + "alias" : "bps_wr_max_length" + }, + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "optional" : 1, + "type" : "string" + }, + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" + }, + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" + }, + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string" + }, + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" + }, + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" + }, + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" + }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" + }, + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_length" : { + "alias" : "iops_wr_max_length" + }, + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" + }, + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "iothread" : { + "description" : "Whether to use iothreads for this drive", + "optional" : 1, + "type" : "boolean" + }, + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "media" : { + "default" : "disk", + "description" : "The drive's media type.", + "enum" : [ + "cdrom", + "disk" + ], "optional" : 1, "type" : "string" }, + "queues" : { + "description" : "Number of queues.", + "minimum" : 2, + "optional" : 1, + "type" : "integer" + }, "replicate" : { "default" : 1, "description" : "Whether the drive should considered for replication jobs.", @@ -12251,6 +24431,17 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "ro" : { + "description" : "Whether the drive is read-only.", + "optional" : 1, + "type" : "boolean" + }, + "scsiblock" : { + "default" : 0, + "description" : "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host", + "optional" : 1, + "type" : "boolean" + }, "secs" : { "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, @@ -12264,6 +24455,13 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" + }, "size" : { "description" : "Disk size. This is purely informational and has no effect.", "format" : "disk-size", @@ -12272,7 +24470,12 @@ var pveapi = [ "type" : "string" }, "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", + "optional" : 1, + "type" : "boolean" + }, + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, "type" : "boolean" }, @@ -12299,349 +24502,313 @@ var pveapi = [ ], "optional" : 1, "type" : "string" + }, + "wwn" : { + "description" : "The drive's worldwide name, encoded as 16 bytes hex string, prefixed by '0x'.", + "format_description" : "wwn", + "optional" : 1, + "pattern" : "(?^:^(0x)[0-9a-fA-F]{16})", + "type" : "string" } }, "optional" : 1, "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,queues=] [,replicate=<1|0>] [,rerror=] [,ro=<1|0>] [,scsiblock=<1|0>] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=] [,wwn=]" }, - "keyboard" : { - "default" : "en-us", - "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.", + "scsihw" : { + "default" : "lsi", + "description" : "SCSI controller model", "enum" : [ - "de", - "de-ch", - "da", - "en-gb", - "en-us", - "es", - "fi", - "fr", - "fr-be", - "fr-ca", - "fr-ch", - "hu", - "is", - "it", - "ja", - "lt", - "mk", - "nl", - "no", - "pl", - "pt", - "pt-br", - "sv", - "sl", - "tr" + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" ], "optional" : 1, "type" : "string" }, - "kvm" : { - "default" : 1, - "description" : "Enable/disable KVM hardware virtualization.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "lock" : { - "description" : "Lock/unlock the VM.", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], + "searchdomain" : { + "description" : "cloud-init: Sets DNS search domains for a container. Create will automatically use the setting from the host if neither searchdomain nor nameserver are set.", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "machine" : { - "description" : "Specific the Qemu machine type.", - "maxLength" : 40, + "serial[n]" : { + "description" : "Create a serial device inside the VM (n is 0 to 3)", "optional" : 1, - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "type" : "string" + "pattern" : "(/dev/.+|socket)", + "type" : "string", + "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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 -\nuse with special care.\n\nCAUTION: Experimental! User reported problems with this option.\n" }, - "memory" : { - "default" : 512, - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", - "minimum" : 16, + "shares" : { + "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. Auto-ballooning is done by pvestatd.", + "maximum" : 50000, + "minimum" : 0, "optional" : 1, "type" : "integer", - "typetext" : " (16 - N)" + "typetext" : " (0 - 50000)" }, - "migrate_downtime" : { - "default" : 0.1, - "description" : "Set maximum tolerated downtime (in seconds) for migrations.", - "minimum" : 0, + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", + "format" : "pve-qm-smbios1", + "maxLength" : 512, "optional" : 1, - "type" : "number", - "typetext" : " (0 - N)" + "type" : "string", + "typetext" : "[base64=<1|0>] [,family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" }, - "migrate_speed" : { - "default" : 0, - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", - "minimum" : 0, + "smp" : { + "default" : 1, + "description" : "The number of CPUs. Please use option -sockets instead.", + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - N)" }, - "name" : { - "description" : "Set a name for the VM. Only used on the configuration web interface.", - "format" : "dns-name", + "sockets" : { + "default" : 1, + "description" : "The number of CPU sockets.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" }, - "net[n]" : { - "description" : "Specify network devices.", + "spice_enhancements" : { + "description" : "Configure additional enhancements for SPICE.", "format" : { - "bridge" : { - "description" : "Bridge to attach the network device to. The Proxmox VE standard bridge\nis called 'vmbr0'.\n\nIf you do not specify a bridge, we create a kvm user (NATed) network\ndevice, which provides DHCP and DNS services. The following addresses\nare used:\n\n 10.0.2.2 Gateway\n 10.0.2.3 DNS Server\n 10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n", - "format_description" : "bridge", - "optional" : 1, - "type" : "string" - }, - "e1000" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "e1000-82540em" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "e1000-82544gc" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "e1000-82545em" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "firewall" : { - "description" : "Whether this interface should be protected by the firewall.", - "optional" : 1, - "type" : "boolean" - }, - "i82551" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "i82557b" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "i82559er" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "link_down" : { - "description" : "Whether this interface should be disconnected (like pulling the plug).", + "foldersharing" : { + "default" : "0", + "description" : "Enable folder sharing via SPICE. Needs Spice-WebDAV daemon installed in the VM.", "optional" : 1, "type" : "boolean" }, - "macaddr" : { - "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.", - "format_description" : "XX:XX:XX:XX:XX:XX", - "optional" : 1, - "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})", - "type" : "string" - }, - "model" : { - "default_key" : 1, - "description" : "Network Card Model. The 'virtio' model provides the best performance with very low CPU overhead. If your guest does not support this driver, it is usually best to use 'e1000'.", + "videostreaming" : { + "default" : "off", + "description" : "Enable video streaming. Uses compression for detected video streams.", "enum" : [ - "rtl8139", - "ne2k_pci", - "e1000", - "pcnet", - "virtio", - "ne2k_isa", - "i82551", - "i82557b", - "i82559er", - "vmxnet3", - "e1000-82540em", - "e1000-82544gc", - "e1000-82545em" + "off", + "all", + "filter" ], - "type" : "string" - }, - "ne2k_isa" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "ne2k_pci" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "pcnet" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "queues" : { - "description" : "Number of packet queues to be used on the device.", - "maximum" : 16, - "minimum" : 0, - "optional" : 1, - "type" : "integer" - }, - "rate" : { - "description" : "Rate limit in mbps (megabytes per second) as floating point number.", - "minimum" : 0, - "optional" : 1, - "type" : "number" - }, - "rtl8139" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "tag" : { - "description" : "VLAN tag to apply to packets on this interface.", - "maximum" : 4094, - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "trunks" : { - "description" : "VLAN trunks to pass through this interface.", - "format_description" : "vlanid[;vlanid...]", "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", "type" : "string" - }, - "virtio" : { - "alias" : "macaddr", - "keyAlias" : "model" - }, - "vmxnet3" : { - "alias" : "macaddr", - "keyAlias" : "model" } }, "optional" : 1, "type" : "string", - "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" + "typetext" : "[foldersharing=<1|0>] [,videostreaming=]" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "sshkeys" : { + "description" : "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).", + "format" : "urlencoded", + "optional" : 1, "type" : "string", "typetext" : "" }, - "numa" : { + "start" : { "default" : 0, - "description" : "Enable/disable NUMA.", + "description" : "Start VM after it was created successfully.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "numa[n]" : { - "description" : "NUMA topology.", + "startdate" : { + "default" : "now", + "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})?)", + "type" : "string", + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + }, + "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.", + "format" : "pve-startup-order", + "optional" : 1, + "type" : "string", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "storage" : { + "description" : "Default storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tablet" : { + "default" : 1, + "description" : "Enable/disable the USB tablet device.", + "optional" : 1, + "type" : "boolean", + "typetext" : "", + "verbose_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 (`qm set --vga qxl`)." + }, + "tags" : { + "description" : "Tags of the VM. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tdf" : { + "default" : 0, + "description" : "Enable/disable time drift fix.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "tpmstate0" : { + "description" : "Configure a Disk for storing TPM state. The format is fixed to 'raw'. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Note that SIZE_IN_GiB is ignored here and 4 MiB will be used instead. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { - "cpus" : { - "description" : "CPUs accessing this NUMA node.", - "format_description" : "id[-id];...", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", "type" : "string" }, - "hostnodes" : { - "description" : "Host NUMA nodes to use.", - "format_description" : "id[-id];...", + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", "type" : "string" }, - "memory" : { - "description" : "Amount of memory this NUMA node provides.", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", "optional" : 1, - "type" : "number" + "type" : "string" }, - "policy" : { - "description" : "NUMA allocation policy.", + "version" : { + "default" : "v2.0", + "description" : "The TPM interface version. v2.0 is newer and should be preferred. Note that this cannot be changed later on.", "enum" : [ - "preferred", - "bind", - "interleave" + "v1.2", + "v2.0" ], "optional" : 1, "type" : "string" + }, + "volume" : { + "alias" : "file" } }, "optional" : 1, "type" : "string", - "typetext" : "cpus= [,hostnodes=] [,memory=] [,policy=]" + "typetext" : "[file=] [,import-from=] [,size=] [,version=]" }, - "onboot" : { - "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup.", + "unique" : { + "description" : "Assign a unique random ethernet address.", "optional" : 1, + "requires" : "archive", "type" : "boolean", "typetext" : "" }, - "ostype" : { - "description" : "Specify guest operating system.", - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "win10", - "l24", - "l26", - "solaris" - ], - "optional" : 1, - "type" : "string", - "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\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" - }, - "parallel[n]" : { - "description" : "Map host parallel devices (n is 0 to 2).", + "unused[n]" : { + "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" + }, + "volume" : { + "alias" : "file" + } + }, "optional" : 1, - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", "type" : "string", - "verbose_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\nCAUTION: Experimental! User reported problems with this option.\n" + "typetext" : "[file=]" }, - "pool" : { - "description" : "Add the VM to the specified pool.", - "format" : "pve-poolid", + "usb[n]" : { + "description" : "Configure an USB device (n is 0 to 4).", + "format" : { + "host" : { + "default_key" : 1, + "description" : "The Host USB device or port or the value 'spice'. 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\nmachines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n", + "format" : "pve-qm-usb-device", + "format_description" : "HOSTUSBDEVICE|spice", + "type" : "string" + }, + "usb3" : { + "default" : 0, + "description" : "Specifies whether if given host option is a USB3 device or port.", + "optional" : 1, + "type" : "boolean" + } + }, "optional" : 1, "type" : "string", - "typetext" : "" + "typetext" : "[host=] [,usb3=<1|0>]" }, - "protection" : { + "vcpus" : { "default" : 0, - "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.", + "description" : "Number of hotplugged vcpus.", + "minimum" : 1, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" }, - "reboot" : { - "default" : 1, - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "vga" : { + "description" : "Configure the VGA hardware.", + "format" : { + "memory" : { + "description" : "Sets the VGA memory (in MiB). Has no effect with serial display.", + "maximum" : 512, + "minimum" : 4, + "optional" : 1, + "type" : "integer" + }, + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", + "enum" : [ + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "none", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "virtio-gl", + "vmware" + ], + "optional" : 1, + "type" : "string" + } + }, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string", + "typetext" : "[[type=]] [,memory=]", + "verbose_description" : "Configure the VGA Hardware. If you want to use high resolution modes (>= 1280x1024x16) you may need to increase the vga memory option. Since QEMU 2.9 the default VGA display type is 'std' for all OS types besides some Windows versions (XP and older) which use 'cirrus'. The 'qxl' option enables the SPICE display server. For win* OS you can select how many independent displays you want, Linux guests can add displays them self.\nYou can also run without any graphic card, using a serial device as terminal." }, - "sata[n]" : { - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", + "virtio[n]" : { + "description" : "Use volume as VIRTIO hard disk (n is 0 to 15). Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume. Use STORAGE_ID:0 and the 'import-from' parameter to import from an existing volume.", "format" : { "aio" : { "description" : "AIO type to use.", "enum" : [ "native", - "threads" + "threads", + "io_uring" ], "optional" : 1, "type" : "string" @@ -12753,6 +24920,13 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "import-from" : { + "description" : "Create a new disk, importing from this source (volume ID or absolute path). When an absolute path is specified, it's up to you to ensure that the source is not actively used by another process during the import!", + "format" : "pve-volume-id-or-absolute-path", + "format_description" : "source volume", + "optional" : 1, + "type" : "string" + }, "iops" : { "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", @@ -12816,6 +24990,11 @@ var pveapi = [ "optional" : 1, "type" : "integer" }, + "iothread" : { + "description" : "Whether to use iothreads for this drive", + "optional" : 1, + "type" : "boolean" + }, "mbps" : { "description" : "Maximum r/w speed in megabytes per second.", "format_description" : "mbps", @@ -12872,886 +25051,4288 @@ var pveapi = [ "description" : "Read error action.", "enum" : [ "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string" - }, - "secs" : { - "description" : "Force the drive's physical geometry to have a specific sector count.", - "optional" : 1, - "type" : "integer" - }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "format_description" : "serial", - "maxLength" : 60, - "optional" : 1, - "type" : "string" - }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, - "type" : "string" - }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean" - }, - "trans" : { - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ], - "optional" : 1, - "type" : "string" - }, - "volume" : { - "alias" : "file" - }, - "werror" : { - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string" - } - }, - "optional" : 1, - "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" - }, - "scsi[n]" : { - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", - "format" : { - "aio" : { - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ], - "optional" : 1, - "type" : "string" - }, - "backup" : { - "description" : "Whether the drive should be included when making backups.", - "optional" : 1, - "type" : "boolean" - }, - "bps" : { - "description" : "Maximum r/w speed in bytes per second.", - "format_description" : "bps", + "report", + "stop" + ], "optional" : 1, - "type" : "integer" + "type" : "string" }, - "bps_max_length" : { - "description" : "Maximum length of I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, + "ro" : { + "description" : "Whether the drive is read-only.", "optional" : 1, - "type" : "integer" + "type" : "boolean" }, - "bps_rd" : { - "description" : "Maximum read speed in bytes per second.", - "format_description" : "bps", + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, "type" : "integer" }, - "bps_rd_length" : { - "alias" : "bps_rd_max_length" - }, - "bps_rd_max_length" : { - "description" : "Maximum length of read I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, "optional" : 1, - "type" : "integer" + "type" : "string" }, - "bps_wr" : { - "description" : "Maximum write speed in bytes per second.", - "format_description" : "bps", + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, - "type" : "integer" + "type" : "boolean", + "verbose_description" : "Mark this locally-managed volume as available on all nodes.\n\nWARNING: This option does not share the volume automatically, it assumes it is shared already!" }, - "bps_wr_length" : { - "alias" : "bps_wr_max_length" + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" }, - "bps_wr_max_length" : { - "description" : "Maximum length of write I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, + "snapshot" : { + "description" : "Controls qemu's snapshot mode feature. If activated, changes made to the disk are temporary and will be discarded when the VM is shutdown.", "optional" : 1, - "type" : "integer" + "type" : "boolean" }, - "cache" : { - "description" : "The drive's cache mode", + "trans" : { + "description" : "Force disk geometry bios translation mode.", "enum" : [ "none", - "writethrough", - "writeback", - "unsafe", - "directsync" + "lba", + "auto" ], "optional" : 1, "type" : "string" }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1, - "type" : "integer" - }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "optional" : 1, - "type" : "boolean" + "volume" : { + "alias" : "file" }, - "discard" : { - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "werror" : { + "description" : "Write error action.", "enum" : [ + "enospc", "ignore", - "on" + "report", + "stop" ], "optional" : 1, "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,import-from=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,ro=<1|0>] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" + }, + "vmgenid" : { + "default" : "1 (autogenerated)", + "description" : "Set VM Generation ID. Use '1' to autogenerate on create or update, pass '0' to disable explicitly.", + "format_description" : "UUID", + "optional" : 1, + "pattern" : "(?:[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}|[01])", + "type" : "string", + "verbose_description" : "The VM generation ID (vmgenid) device exposes a 128-bit integer value identifier to the guest OS. This allows to notify the guest operating system when the virtual machine is executed with a different configuration (e.g. snapshot execution or creation from a template). The guest operating system notices the change, and is then able to react as appropriate by marking its copies of distributed databases as dirty, re-initializing its random number generator, etc.\nNote that auto-creation only works when done through API/CLI create or update methods, but not when manually editing the config file." + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "vmstatestorage" : { + "description" : "Default storage for VM state volumes/files.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "watchdog" : { + "description" : "Create a virtual hardware watchdog device.", + "format" : "pve-qm-watchdog", + "optional" : 1, + "type" : "string", + "typetext" : "[[model=]] [,action=]", + "verbose_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)" + } + } + }, + "permissions" : { + "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" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu", + "text" : "qemu" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get container configuration.", + "method" : "GET", + "name" : "vm_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "current" : { + "default" : 0, + "description" : "Get current values (instead of pending values).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapshot" : { + "description" : "Fetch config values from given snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "file" : { - "default_key" : 1, - "description" : "The drive's backing volume.", - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "arch" : { + "default" : "amd64", + "description" : "OS architecture type.", + "enum" : [ + "amd64", + "i386", + "arm64", + "armhf" + ], + "optional" : 1, + "type" : "string" + }, + "cmode" : { + "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).", + "enum" : [ + "shell", + "console", + "tty" + ], + "optional" : 1, + "type" : "string" + }, + "console" : { + "default" : 1, + "description" : "Attach a console device (/dev/console) to the container.", + "optional" : 1, + "type" : "boolean" + }, + "cores" : { + "description" : "The number of cores assigned to the container. A container can use all available cores by default.", + "maximum" : 8192, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "cpulimit" : { + "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.", + "maximum" : 8192, + "minimum" : 0, + "optional" : 1, + "type" : "number" + }, + "cpuunits" : { + "default" : 1024, + "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.", + "maximum" : 500000, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "debug" : { + "default" : 0, + "description" : "Try to be more verbose. For now this only enables debug log-level on start.", + "optional" : 1, + "type" : "boolean" + }, + "description" : { + "description" : "Description for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, + "optional" : 1, + "type" : "string" + }, + "digest" : { + "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", + "type" : "string" + }, + "features" : { + "description" : "Allow containers access to advanced features.", + "format" : { + "force_rw_sys" : { + "default" : 0, + "description" : "Mount /sys in unprivileged containers as `rw` instead of `mixed`. This can break networking under newer (>= v245) systemd-network use.", + "optional" : 1, + "type" : "boolean" + }, + "fuse" : { + "default" : 0, + "description" : "Allow using 'fuse' file systems in a container. Note that interactions between fuse and the freezer cgroup can potentially cause I/O deadlocks.", + "optional" : 1, + "type" : "boolean" + }, + "keyctl" : { + "default" : 0, + "description" : "For unprivileged containers only: Allow the use of the keyctl() system call. This is required to use docker inside a container. By default unprivileged containers will see this system call as non-existent. This is mostly a workaround for systemd-networkd, as it will treat it as a fatal error when some keyctl() operations are denied by the kernel due to lacking permissions. Essentially, you can choose between running systemd-networkd or docker.", + "optional" : 1, + "type" : "boolean" + }, + "mknod" : { + "default" : 0, + "description" : "Allow unprivileged containers to use mknod() to add certain device nodes. This requires a kernel with seccomp trap to user space support (5.3 or newer). This is experimental.", + "optional" : 1, + "type" : "boolean" + }, + "mount" : { + "description" : "Allow mounting file systems of specific types. This should be a list of file system types as used with the mount command. Note that this can have negative effects on the container's security. With access to a loop device, mounting a file can circumvent the mknod permission of the devices cgroup, mounting an NFS file system can block the host's I/O completely and prevent it from rebooting, etc.", + "format_description" : "fstype;fstype;...", + "optional" : 1, + "pattern" : "(?^:[a-zA-Z0-9_; ]+)", + "type" : "string" + }, + "nesting" : { + "default" : 0, + "description" : "Allow nesting. Best used with unprivileged containers with additional id mapping. Note that this will expose procfs and sysfs contents of the host to the guest.", + "optional" : 1, + "type" : "boolean" + } + }, + "optional" : 1, + "type" : "string" + }, + "hookscript" : { + "description" : "Script that will be exectued during various steps in the containers lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string" + }, + "hostname" : { + "description" : "Set a host name for the container.", + "format" : "dns-name", + "maxLength" : 255, + "optional" : 1, + "type" : "string" + }, + "lock" : { + "description" : "Lock/unlock the VM.", + "enum" : [ + "backup", + "create", + "destroyed", + "disk", + "fstrim", + "migrate", + "mounted", + "rollback", + "snapshot", + "snapshot-delete" + ], + "optional" : 1, + "type" : "string" + }, + "lxc" : { + "description" : "Array of lxc low-level configurations ([[key1, value1], [key2, value2] ...]).", + "items" : { + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "optional" : 1, + "type" : "array" + }, + "memory" : { + "default" : 512, + "description" : "Amount of RAM for the VM in MB.", + "minimum" : 16, + "optional" : 1, + "type" : "integer" + }, + "mp[n]" : { + "description" : "Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.", + "format" : { + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean" + }, + "backup" : { + "description" : "Whether to include the mount point in backups.", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Whether to include the mount point in backups (only used for volume mount points)." + }, + "mountoptions" : { + "description" : "Extra mount options for rootfs/mps.", + "format_description" : "opt[;opt...]", + "optional" : 1, + "pattern" : "(?^:(?^:(noatime|lazytime|nodev|nosuid|noexec))(;(?^:(noatime|lazytime|nodev|nosuid|noexec)))*)", + "type" : "string" + }, + "mp" : { + "description" : "Path to the mount point as seen from inside the container (must not contain symlinks).", + "format" : "pve-lxc-mp-string", + "format_description" : "Path", + "type" : "string", + "verbose_description" : "Path to the mount point as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons." + }, + "quota" : { + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "optional" : 1, + "type" : "boolean" + }, + "replicate" : { + "default" : 1, + "description" : "Will include this volume to a storage replica job.", + "optional" : 1, + "type" : "boolean" + }, + "ro" : { + "description" : "Read-only mount point", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "default" : 0, + "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Volume size (read only value).", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "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.", + "format" : "lxc-ip-with-ll-iface-list", + "optional" : 1, + "type" : "string" + }, + "net[n]" : { + "description" : "Specifies network interfaces for the container.", + "format" : { + "bridge" : { + "description" : "Bridge to attach the network device to.", + "format_description" : "bridge", + "optional" : 1, + "pattern" : "[-_.\\w\\d]+", + "type" : "string" + }, + "firewall" : { + "description" : "Controls whether this interface's firewall rules should be used.", + "optional" : 1, + "type" : "boolean" + }, + "gw" : { + "description" : "Default gateway for IPv4 traffic.", + "format" : "ipv4", + "format_description" : "GatewayIPv4", + "optional" : 1, + "type" : "string" + }, + "gw6" : { + "description" : "Default gateway for IPv6 traffic.", + "format" : "ipv6", + "format_description" : "GatewayIPv6", + "optional" : 1, + "type" : "string" + }, + "hwaddr" : { + "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)", + "format" : "mac-addr", + "format_description" : "XX:XX:XX:XX:XX:XX", + "optional" : 1, + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." + }, + "ip" : { + "description" : "IPv4 address in CIDR format.", + "format" : "pve-ipv4-config", + "format_description" : "(IPv4/CIDR|dhcp|manual)", + "optional" : 1, + "type" : "string" + }, + "ip6" : { + "description" : "IPv6 address in CIDR format.", + "format" : "pve-ipv6-config", + "format_description" : "(IPv6/CIDR|auto|dhcp|manual)", + "optional" : 1, + "type" : "string" + }, + "mtu" : { + "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", + "minimum" : 64, + "optional" : 1, + "type" : "integer" + }, + "name" : { + "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", + "format_description" : "string", + "pattern" : "[-_.\\w\\d]+", + "type" : "string" + }, + "rate" : { + "description" : "Apply rate limiting to the interface", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "tag" : { + "description" : "VLAN tag for this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "trunks" : { + "description" : "VLAN ids to pass through the interface", + "format_description" : "vlanid[;vlanid...]", + "optional" : 1, + "pattern" : "(?^:\\d+(?:;\\d+)*)", + "type" : "string" + }, + "type" : { + "description" : "Network interface type.", + "enum" : [ + "veth" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "onboot" : { + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup.", + "optional" : 1, + "type" : "boolean" + }, + "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", + "devuan", + "ubuntu", + "centos", + "fedora", + "opensuse", + "archlinux", + "alpine", + "gentoo", + "nixos", + "unmanaged" + ], + "optional" : 1, + "type" : "string" + }, + "protection" : { + "default" : 0, + "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", + "optional" : 1, + "type" : "boolean" + }, + "rootfs" : { + "description" : "Use volume as container root.", + "format" : { + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean" + }, + "mountoptions" : { + "description" : "Extra mount options for rootfs/mps.", + "format_description" : "opt[;opt...]", + "optional" : 1, + "pattern" : "(?^:(?^:(noatime|lazytime|nodev|nosuid|noexec))(;(?^:(noatime|lazytime|nodev|nosuid|noexec)))*)", + "type" : "string" + }, + "quota" : { + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "optional" : 1, + "type" : "boolean" + }, + "replicate" : { + "default" : 1, + "description" : "Will include this volume to a storage replica job.", + "optional" : 1, + "type" : "boolean" + }, + "ro" : { + "description" : "Read-only mount point", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "default" : 0, + "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Volume size (read only value).", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "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.", + "format" : "dns-name-list", + "optional" : 1, + "type" : "string" + }, + "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.", + "format" : "pve-startup-order", + "optional" : 1, + "type" : "string", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "swap" : { + "default" : 512, + "description" : "Amount of SWAP for the VM in MB.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "tags" : { + "description" : "Tags of the Container. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean" + }, + "timezone" : { + "description" : "Time zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab", + "format" : "pve-ct-timezone", + "optional" : 1, + "type" : "string" + }, + "tty" : { + "default" : 2, + "description" : "Specify the number of tty available to the container", + "maximum" : 6, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "unprivileged" : { + "default" : 0, + "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", + "optional" : 1, + "type" : "boolean" + }, + "unused[n]" : { + "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", + "format" : { + "volume" : { + "default_key" : 1, + "description" : "The volume that is not used currently.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set container options.", + "method" : "PUT", + "name" : "update_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "arch" : { + "default" : "amd64", + "description" : "OS architecture type.", + "enum" : [ + "amd64", + "i386", + "arm64", + "armhf" + ], + "optional" : 1, + "type" : "string" + }, + "cmode" : { + "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).", + "enum" : [ + "shell", + "console", + "tty" + ], + "optional" : 1, + "type" : "string" + }, + "console" : { + "default" : 1, + "description" : "Attach a console device (/dev/console) to the container.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cores" : { + "description" : "The number of cores assigned to the container. A container can use all available cores by default.", + "maximum" : 8192, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 8192)" + }, + "cpulimit" : { + "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.", + "maximum" : 8192, + "minimum" : 0, + "optional" : 1, + "type" : "number", + "typetext" : " (0 - 8192)" + }, + "cpuunits" : { + "default" : 1024, + "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.", + "maximum" : 500000, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 500000)" + }, + "debug" : { + "default" : 0, + "description" : "Try to be more verbose. For now this only enables debug log-level on start.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "description" : { + "description" : "Description for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "features" : { + "description" : "Allow containers access to advanced features.", + "format" : { + "force_rw_sys" : { + "default" : 0, + "description" : "Mount /sys in unprivileged containers as `rw` instead of `mixed`. This can break networking under newer (>= v245) systemd-network use.", + "optional" : 1, + "type" : "boolean" + }, + "fuse" : { + "default" : 0, + "description" : "Allow using 'fuse' file systems in a container. Note that interactions between fuse and the freezer cgroup can potentially cause I/O deadlocks.", + "optional" : 1, + "type" : "boolean" + }, + "keyctl" : { + "default" : 0, + "description" : "For unprivileged containers only: Allow the use of the keyctl() system call. This is required to use docker inside a container. By default unprivileged containers will see this system call as non-existent. This is mostly a workaround for systemd-networkd, as it will treat it as a fatal error when some keyctl() operations are denied by the kernel due to lacking permissions. Essentially, you can choose between running systemd-networkd or docker.", + "optional" : 1, + "type" : "boolean" + }, + "mknod" : { + "default" : 0, + "description" : "Allow unprivileged containers to use mknod() to add certain device nodes. This requires a kernel with seccomp trap to user space support (5.3 or newer). This is experimental.", + "optional" : 1, + "type" : "boolean" + }, + "mount" : { + "description" : "Allow mounting file systems of specific types. This should be a list of file system types as used with the mount command. Note that this can have negative effects on the container's security. With access to a loop device, mounting a file can circumvent the mknod permission of the devices cgroup, mounting an NFS file system can block the host's I/O completely and prevent it from rebooting, etc.", + "format_description" : "fstype;fstype;...", + "optional" : 1, + "pattern" : "(?^:[a-zA-Z0-9_; ]+)", + "type" : "string" + }, + "nesting" : { + "default" : 0, + "description" : "Allow nesting. Best used with unprivileged containers with additional id mapping. Note that this will expose procfs and sysfs contents of the host to the guest.", + "optional" : 1, + "type" : "boolean" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[force_rw_sys=<1|0>] [,fuse=<1|0>] [,keyctl=<1|0>] [,mknod=<1|0>] [,mount=] [,nesting=<1|0>]" + }, + "hookscript" : { + "description" : "Script that will be exectued during various steps in the containers lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "hostname" : { + "description" : "Set a host name for the container.", + "format" : "dns-name", + "maxLength" : 255, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "lock" : { + "description" : "Lock/unlock the VM.", + "enum" : [ + "backup", + "create", + "destroyed", + "disk", + "fstrim", + "migrate", + "mounted", + "rollback", + "snapshot", + "snapshot-delete" + ], + "optional" : 1, + "type" : "string" + }, + "memory" : { + "default" : 512, + "description" : "Amount of RAM for the VM in MB.", + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - N)" + }, + "mp[n]" : { + "description" : "Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.", + "format" : { + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean" + }, + "backup" : { + "description" : "Whether to include the mount point in backups.", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Whether to include the mount point in backups (only used for volume mount points)." + }, + "mountoptions" : { + "description" : "Extra mount options for rootfs/mps.", + "format_description" : "opt[;opt...]", + "optional" : 1, + "pattern" : "(?^:(?^:(noatime|lazytime|nodev|nosuid|noexec))(;(?^:(noatime|lazytime|nodev|nosuid|noexec)))*)", + "type" : "string" + }, + "mp" : { + "description" : "Path to the mount point as seen from inside the container (must not contain symlinks).", + "format" : "pve-lxc-mp-string", + "format_description" : "Path", + "type" : "string", + "verbose_description" : "Path to the mount point as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons." + }, + "quota" : { + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "optional" : 1, + "type" : "boolean" + }, + "replicate" : { + "default" : 1, + "description" : "Will include this volume to a storage replica job.", + "optional" : 1, + "type" : "boolean" + }, + "ro" : { + "description" : "Read-only mount point", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "default" : 0, + "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Volume size (read only value).", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[volume=] ,mp= [,acl=<1|0>] [,backup=<1|0>] [,mountoptions=] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" + }, + "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.", + "format" : "lxc-ip-with-ll-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "net[n]" : { + "description" : "Specifies network interfaces for the container.", + "format" : { + "bridge" : { + "description" : "Bridge to attach the network device to.", + "format_description" : "bridge", + "optional" : 1, + "pattern" : "[-_.\\w\\d]+", + "type" : "string" + }, + "firewall" : { + "description" : "Controls whether this interface's firewall rules should be used.", + "optional" : 1, + "type" : "boolean" + }, + "gw" : { + "description" : "Default gateway for IPv4 traffic.", + "format" : "ipv4", + "format_description" : "GatewayIPv4", + "optional" : 1, + "type" : "string" + }, + "gw6" : { + "description" : "Default gateway for IPv6 traffic.", + "format" : "ipv6", + "format_description" : "GatewayIPv6", + "optional" : 1, + "type" : "string" + }, + "hwaddr" : { + "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)", + "format" : "mac-addr", + "format_description" : "XX:XX:XX:XX:XX:XX", + "optional" : 1, + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." + }, + "ip" : { + "description" : "IPv4 address in CIDR format.", + "format" : "pve-ipv4-config", + "format_description" : "(IPv4/CIDR|dhcp|manual)", + "optional" : 1, + "type" : "string" + }, + "ip6" : { + "description" : "IPv6 address in CIDR format.", + "format" : "pve-ipv6-config", + "format_description" : "(IPv6/CIDR|auto|dhcp|manual)", + "optional" : 1, + "type" : "string" + }, + "mtu" : { + "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", + "minimum" : 64, + "optional" : 1, + "type" : "integer" + }, + "name" : { + "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", + "format_description" : "string", + "pattern" : "[-_.\\w\\d]+", + "type" : "string" + }, + "rate" : { + "description" : "Apply rate limiting to the interface", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "tag" : { + "description" : "VLAN tag for this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "trunks" : { + "description" : "VLAN ids to pass through the interface", + "format_description" : "vlanid[;vlanid...]", + "optional" : 1, + "pattern" : "(?^:\\d+(?:;\\d+)*)", + "type" : "string" + }, + "type" : { + "description" : "Network interface type.", + "enum" : [ + "veth" + ], + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "name= [,bridge=] [,firewall=<1|0>] [,gw=] [,gw6=] [,hwaddr=] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=] [,rate=] [,tag=] [,trunks=] [,type=]" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "onboot" : { + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "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", + "devuan", + "ubuntu", + "centos", + "fedora", + "opensuse", + "archlinux", + "alpine", + "gentoo", + "nixos", + "unmanaged" + ], + "optional" : 1, + "type" : "string" + }, + "protection" : { + "default" : 0, + "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "revert" : { + "description" : "Revert a pending change.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "rootfs" : { + "description" : "Use volume as container root.", + "format" : { + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean" + }, + "mountoptions" : { + "description" : "Extra mount options for rootfs/mps.", + "format_description" : "opt[;opt...]", + "optional" : 1, + "pattern" : "(?^:(?^:(noatime|lazytime|nodev|nosuid|noexec))(;(?^:(noatime|lazytime|nodev|nosuid|noexec)))*)", + "type" : "string" + }, + "quota" : { + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "optional" : 1, + "type" : "boolean" + }, + "replicate" : { + "default" : 1, + "description" : "Will include this volume to a storage replica job.", + "optional" : 1, + "type" : "boolean" + }, + "ro" : { + "description" : "Read-only mount point", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "default" : 0, + "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Volume size (read only value).", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[volume=] [,acl=<1|0>] [,mountoptions=] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" + }, + "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.", + "format" : "dns-name-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-startup-order", + "optional" : 1, + "type" : "string", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "swap" : { + "default" : 512, + "description" : "Amount of SWAP for the VM in MB.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "tags" : { + "description" : "Tags of the Container. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "timezone" : { + "description" : "Time zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab", + "format" : "pve-ct-timezone", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tty" : { + "default" : 2, + "description" : "Specify the number of tty available to the container", + "maximum" : 6, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 6)" + }, + "unprivileged" : { + "default" : 0, + "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "unused[n]" : { + "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", + "format" : { + "volume" : { + "default_key" : 1, + "description" : "The volume that is not used currently.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[volume=]" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "format" : { - "description" : "The drive's backing file's data format.", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk", + "VM.Config.CPU", + "VM.Config.Memory", + "VM.Config.Network", + "VM.Config.Options" + ], + "any", + 1 ], - "optional" : 1, - "type" : "string" - }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", - "optional" : 1, - "type" : "integer" - }, - "iops" : { - "description" : "Maximum r/w I/O in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_max" : { - "description" : "Maximum unthrottled r/w I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_max_length" : { - "description" : "Maximum length of I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "iops_rd" : { - "description" : "Maximum read I/O in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_rd_length" : { - "alias" : "iops_rd_max_length" - }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_rd_max_length" : { - "description" : "Maximum length of read I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "iops_wr" : { - "description" : "Maximum write I/O in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_wr_length" : { - "alias" : "iops_wr_max_length" + "description" : "non-volume mount points in rootfs and mp[n] are restricted to root@pam" }, - "iops_wr_max" : { - "description" : "Maximum unthrottled write I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/config", + "text" : "config" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get virtual machine status.", + "method" : "GET", + "name" : "vm_status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "cpus" : { + "description" : "Maximum usable CPUs.", + "optional" : 1, + "type" : "number" + }, + "ha" : { + "description" : "HA manager service status.", + "type" : "object" + }, + "lock" : { + "description" : "The current config lock, if any.", + "optional" : 1, + "type" : "string" + }, + "maxdisk" : { + "description" : "Root disk size in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxmem" : { + "description" : "Maximum memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxswap" : { + "description" : "Maximum SWAP memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "name" : { + "description" : "Container name.", + "optional" : 1, + "type" : "string" + }, + "status" : { + "description" : "LXC Container status.", + "enum" : [ + "stopped", + "running" + ], + "type" : "string" + }, + "tags" : { + "description" : "The current configured tags, if any.", + "optional" : 1, + "type" : "string" + }, + "uptime" : { + "description" : "Uptime.", + "optional" : 1, + "renderer" : "duration", + "type" : "integer" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer" + } + }, + "type" : "object" + } + } }, - "iops_wr_max_length" : { - "description" : "Maximum length of write I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/current", + "text" : "current" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Start the container.", + "method" : "POST", + "name" : "vm_start", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "debug" : { + "default" : 0, + "description" : "If set, enables very verbose debug log-level on start.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "iothread" : { - "description" : "Whether to use iothreads for this drive", - "optional" : 1, - "type" : "boolean" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/start", + "text" : "start" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Stop the container. This will abruptly stop all processes running in the container.", + "method" : "POST", + "name" : "vm_stop", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "mbps" : { - "description" : "Maximum r/w speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/stop", + "text" : "stop" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.", + "method" : "POST", + "name" : "vm_shutdown", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "forceStop" : { + "default" : 0, + "description" : "Make sure the Container stops.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeout" : { + "default" : 60, + "description" : "Wait maximal timeout seconds.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", + "text" : "shutdown" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Suspend the container. This is experimental.", + "method" : "POST", + "name" : "vm_suspend", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "mbps_rd" : { - "description" : "Maximum read speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", + "text" : "suspend" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Resume the container.", + "method" : "POST", + "name" : "vm_resume", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/resume", + "text" : "resume" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Reboot the container by shutting it down, and starting it again. Applies pending changes.", + "method" : "POST", + "name" : "vm_reboot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeout" : { + "description" : "Wait maximal timeout seconds for the shutdown.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "mbps_wr" : { - "description" : "Maximum write speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/reboot", + "text" : "reboot" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index", + "method" : "GET", + "name" : "vmcmdidx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "permissions" : { + "user" : "all" }, - "media" : { - "default" : "disk", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } ], - "optional" : 1, - "type" : "string" + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/status", + "text" : "status" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Rollback LXC state to specified snapshot.", + "method" : "POST", + "name" : "rollback", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot", + "VM.Snapshot.Rollback" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback", + "text" : "rollback" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get snapshot configuration", + "method" : "GET", + "name" : "get_snapshot_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot", + "VM.Snapshot.Rollback", + "VM.Audit" + ], + "any", + 1 + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update snapshot metadata.", + "method" : "PUT", + "name" : "update_snapshot_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "description" : { + "description" : "A textual description or comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config", + "text" : "config" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete a LXC snapshot.", + "method" : "DELETE", + "name" : "delsnapshot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "description" : "For removal from config file, even if removing disk snapshots fails.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "", + "method" : "GET", + "name" : "snapshot_cmd_idx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{cmd}", + "rel" : "child" + } + ], + "type" : "array" + } + } }, - "queues" : { - "description" : "Number of queues.", - "minimum" : 2, - "optional" : 1, - "type" : "integer" + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", + "text" : "{snapname}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List all snapshots.", + "method" : "GET", + "name" : "list", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "replicate" : { - "default" : 1, - "description" : "Whether the drive should considered for replication jobs.", - "optional" : 1, - "type" : "boolean" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "rerror" : { - "description" : "Read error action.", - "enum" : [ - "ignore", - "report", - "stop" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "description" : { + "description" : "Snapshot description.", + "type" : "string" + }, + "name" : { + "description" : "Snapshot identifier. Value 'current' identifies the current VM.", + "type" : "string" + }, + "parent" : { + "description" : "Parent snapshot identifier.", + "optional" : 1, + "type" : "string" + }, + "snaptime" : { + "description" : "Snapshot creation time", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } ], - "optional" : 1, - "type" : "string" - }, - "scsiblock" : { - "default" : 0, - "description" : "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host", - "optional" : 1, - "type" : "boolean" - }, - "secs" : { - "description" : "Force the drive's physical geometry to have a specific sector count.", - "optional" : 1, - "type" : "integer" + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Snapshot a container.", + "method" : "POST", + "name" : "snapshot", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "description" : { + "description" : "A textual description or comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "format_description" : "serial", - "maxLength" : 60, - "optional" : 1, - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot", + "text" : "snapshot" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete rule.", + "method" : "DELETE", + "name" : "delete_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get single rule data.", + "method" : "GET", + "name" : "get_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : null, + "returns" : { + "properties" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "icmp-type" : { + "optional" : 1, + "type" : "string" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "log" : { + "description" : "Log level for firewall rule", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "optional" : 1, + "type" : "string" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Modify rule data.", + "method" : "PUT", + "name" : "update_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "moveto" : { + "description" : "Move rule to new position . Other arguments are ignored.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}", + "text" : "{pos}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List rules.", + "method" : "GET", + "name" : "get_rules", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : null, + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new rule.", + "method" : "POST", + "name" : "create_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 0, + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + } }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean" + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", + "text" : "rules" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove IP or Network alias.", + "method" : "DELETE", + "name" : "remove_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read alias.", + "method" : "GET", + "name" : "read_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update IP or Network alias.", + "method" : "PUT", + "name" : "update_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "rename" : { + "description" : "Rename an existing alias.", + "maxLength" : 64, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List aliases", + "method" : "GET", + "name" : "get_aliases", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create IP or Network Alias.", + "method" : "POST", + "name" : "create_alias", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDR", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } }, - "trans" : { - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ], - "optional" : 1, - "type" : "string" + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases", + "text" : "aliases" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove IP or Network from IPSet.", + "method" : "DELETE", + "name" : "remove_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read IP or Network settings from IPSet.", + "method" : "GET", + "name" : "read_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update IP or Network settings", + "method" : "PUT", + "name" : "update_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}", + "text" : "{cidr}" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete IPSet", + "method" : "DELETE", + "name" : "delete_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "List IPSet content", + "method" : "GET", + "name" : "get_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "cidr" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{cidr}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Add IP or Network to IPSet.", + "method" : "POST", + "name" : "create_ip", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", + "type" : "string", + "typetext" : "" + }, + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "nomatch" : { + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List IPSets", + "method" : "GET", + "name" : "ipset_index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "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" : 0, + "type" : "string" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new IPSet", + "method" : "POST", + "name" : "create_ipset", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "rename" : { + "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, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } }, - "volume" : { - "alias" : "file" + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", + "text" : "ipset" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get VM firewall options.", + "method" : "GET", + "name" : "get_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "dhcp" : { + "default" : 0, + "description" : "Enable DHCP.", + "optional" : 1, + "type" : "boolean" + }, + "enable" : { + "default" : 0, + "description" : "Enable/disable firewall rules.", + "optional" : 1, + "type" : "boolean" + }, + "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, + "type" : "boolean" + }, + "log_level_in" : { + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macfilter" : { + "default" : 1, + "description" : "Enable/disable MAC address filter.", + "optional" : 1, + "type" : "boolean" + }, + "ndp" : { + "default" : 0, + "description" : "Enable NDP (Neighbor Discovery Protocol).", + "optional" : 1, + "type" : "boolean" + }, + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "radv" : { + "description" : "Allow sending Router Advertisement.", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set Firewall options.", + "method" : "PUT", + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dhcp" : { + "default" : 0, + "description" : "Enable DHCP.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "enable" : { + "default" : 0, + "description" : "Enable/disable firewall rules.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "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, + "type" : "boolean", + "typetext" : "" + }, + "log_level_in" : { + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macfilter" : { + "default" : 1, + "description" : "Enable/disable MAC address filter.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ndp" : { + "default" : 0, + "description" : "Enable NDP (Neighbor Discovery Protocol).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" + }, + "radv" : { + "description" : "Allow sending Router Advertisement.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } }, - "werror" : { - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string" - } + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/options", + "text" : "options" }, - "optional" : 1, - "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,queues=] [,replicate=<1|0>] [,rerror=] [,scsiblock=<1|0>] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" - }, - "scsihw" : { - "default" : "lsi", - "description" : "SCSI controller model", - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ], - "optional" : 1, - "type" : "string" - }, - "serial[n]" : { - "description" : "Create a serial device inside the VM (n is 0 to 3)", - "optional" : 1, - "pattern" : "(/dev/.+|socket)", - "type" : "string", - "verbose_description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a\nhost serial device (i.e. /dev/ttyS0), or create a unix socket on the\nhost 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\nCAUTION: Experimental! User reported problems with this option.\n" - }, - "shares" : { - "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", - "maximum" : 50000, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 50000)" - }, - "smbios1" : { - "description" : "Specify SMBIOS type 1 fields.", - "format" : "pve-qm-smbios1", - "maxLength" : 256, - "optional" : 1, - "type" : "string", - "typetext" : "[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" - }, - "smp" : { - "default" : 1, - "description" : "The number of CPUs. Please use option -sockets instead.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "sockets" : { - "default" : 1, - "description" : "The number of CPU sockets.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "startdate" : { - "default" : "now", - "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})?)", - "type" : "string", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" - }, - "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.", - "format" : "pve-startup-order", - "optional" : 1, - "type" : "string", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " - }, - "storage" : { - "description" : "Default storage.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "tablet" : { - "default" : 1, - "description" : "Enable/disable the USB tablet device.", - "optional" : 1, - "type" : "boolean", - "typetext" : "", - "verbose_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)." - }, - "tdf" : { - "default" : 0, - "description" : "Enable/disable time drift fix.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "template" : { - "default" : 0, - "description" : "Enable/disable Template.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "unique" : { - "description" : "Assign a unique random ethernet address.", - "optional" : 1, - "requires" : "archive", - "type" : "boolean", - "typetext" : "" - }, - "unused[n]" : { - "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", - "format" : "pve-volume-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "usb[n]" : { - "description" : "Configure an USB device (n is 0 to 4).", - "format" : { - "host" : { - "default_key" : 1, - "description" : "The Host USB device or port or the value 'spice'. 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", - "format" : "pve-qm-usb-device", - "format_description" : "HOSTUSBDEVICE|spice", - "type" : "string" + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read firewall log", + "method" : "GET", + "name" : "log", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } }, - "usb3" : { - "default" : 0, - "description" : "Specifies whether if given host option is a USB3 device or port (this does currently not work reliably with spice redirection and is then ignored).", - "optional" : 1, - "type" : "boolean" - } + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/log", + "text" : "log" }, - "optional" : 1, - "type" : "string", - "typetext" : "[host=] [,usb3=<1|0>]" - }, - "vcpus" : { - "default" : 0, - "description" : "Number of hotplugged vcpus.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "vga" : { - "description" : "Select the VGA type.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ], - "optional" : 1, - "type" : "string", - "verbose_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." - }, - "virtio[n]" : { - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", - "format" : { - "aio" : { - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ], - "optional" : 1, - "type" : "string" - }, - "backup" : { - "description" : "Whether the drive should be included when making backups.", - "optional" : 1, - "type" : "boolean" - }, - "bps" : { - "description" : "Maximum r/w speed in bytes per second.", - "format_description" : "bps", - "optional" : 1, - "type" : "integer" - }, - "bps_max_length" : { - "description" : "Maximum length of I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "bps_rd" : { - "description" : "Maximum read speed in bytes per second.", - "format_description" : "bps", - "optional" : 1, - "type" : "integer" - }, - "bps_rd_length" : { - "alias" : "bps_rd_max_length" - }, - "bps_rd_max_length" : { - "description" : "Maximum length of read I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "bps_wr" : { - "description" : "Maximum write speed in bytes per second.", - "format_description" : "bps", - "optional" : 1, - "type" : "integer" - }, - "bps_wr_length" : { - "alias" : "bps_wr_max_length" - }, - "bps_wr_max_length" : { - "description" : "Maximum length of write I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "cache" : { - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "optional" : 1, - "type" : "string" - }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1, - "type" : "integer" - }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "optional" : 1, - "type" : "boolean" - }, - "discard" : { - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ], - "optional" : 1, - "type" : "string" - }, - "file" : { - "default_key" : 1, - "description" : "The drive's backing volume.", - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "type" : "string" - }, - "format" : { - "description" : "The drive's backing file's data format.", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "optional" : 1, - "type" : "string" - }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", - "optional" : 1, - "type" : "integer" - }, - "iops" : { - "description" : "Maximum r/w I/O in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_max" : { - "description" : "Maximum unthrottled r/w I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_max_length" : { - "description" : "Maximum length of I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "iops_rd" : { - "description" : "Maximum read I/O in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_rd_length" : { - "alias" : "iops_rd_max_length" - }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_rd_max_length" : { - "description" : "Maximum length of read I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "iops_wr" : { - "description" : "Maximum write I/O in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_wr_length" : { - "alias" : "iops_wr_max_length" - }, - "iops_wr_max" : { - "description" : "Maximum unthrottled write I/O pool in operations per second.", - "format_description" : "iops", - "optional" : 1, - "type" : "integer" - }, - "iops_wr_max_length" : { - "description" : "Maximum length of write I/O bursts in seconds.", - "format_description" : "seconds", - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "iothread" : { - "description" : "Whether to use iothreads for this drive", - "optional" : 1, - "type" : "boolean" - }, - "mbps" : { - "description" : "Maximum r/w speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "mbps_rd" : { - "description" : "Maximum read speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", + "method" : "GET", + "name" : "refs", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Only list references of specified type.", + "enum" : [ + "alias", + "ipset" + ], + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "type" : { + "enum" : [ + "alias", + "ipset" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } }, - "mbps_wr" : { - "description" : "Maximum write speed in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs", + "text" : "refs" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool in megabytes per second.", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" + "permissions" : { + "user" : "all" }, - "media" : { - "default" : "disk", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } ], - "optional" : 1, - "type" : "string" - }, - "replicate" : { - "default" : 1, - "description" : "Whether the drive should considered for replication jobs.", - "optional" : 1, - "type" : "boolean" + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall", + "text" : "firewall" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read VM RRD statistics (returns PNG)", + "method" : "GET", + "name" : "rrd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" + }, + "ds" : { + "description" : "The list of datasources you want to display.", + "format" : "pve-configid-list", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "rerror" : { - "description" : "Read error action.", - "enum" : [ - "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "secs" : { - "description" : "Force the drive's physical geometry to have a specific sector count.", - "optional" : 1, - "type" : "integer" + "protected" : 1, + "returns" : { + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/rrd", + "text" : "rrd" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read VM RRD statistics", + "method" : "GET", + "name" : "rrddata", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "format_description" : "serial", - "maxLength" : 60, - "optional" : 1, - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, - "type" : "string" + "protected" : 1, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/rrddata", + "text" : "rrddata" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Creates a TCP VNC proxy connections.", + "method" : "POST", + "name" : "vncproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "height" : { + "description" : "sets the height of the console in pixels.", + "maximum" : 2160, + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - 2160)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "websocket" : { + "description" : "use websocket instead of standard VNC.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "width" : { + "description" : "sets the width of the console in pixels.", + "maximum" : 4096, + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - 4096)" + } + } }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] }, - "trans" : { - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ], - "optional" : 1, - "type" : "string" + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "cert" : { + "type" : "string" + }, + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/vncproxy", + "text" : "vncproxy" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Creates a TCP proxy connection.", + "method" : "POST", + "name" : "termproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "volume" : { - "alias" : "file" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] }, - "werror" : { - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string" + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } } - }, - "optional" : 1, - "type" : "string", - "typetext" : "[file=] [,aio=] [,backup=<1|0>] [,bps=] [,bps_max_length=] [,bps_rd=] [,bps_rd_max_length=] [,bps_wr=] [,bps_wr_max_length=] [,cache=] [,cyls=] [,detect_zeroes=<1|0>] [,discard=] [,format=] [,heads=] [,iops=] [,iops_max=] [,iops_max_length=] [,iops_rd=] [,iops_rd_max=] [,iops_rd_max_length=] [,iops_wr=] [,iops_wr_max=] [,iops_wr_max_length=] [,iothread=<1|0>] [,mbps=] [,mbps_max=] [,mbps_rd=] [,mbps_rd_max=] [,mbps_wr=] [,mbps_wr_max=] [,media=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + } }, - "watchdog" : { - "description" : "Create a virtual hardware watchdog device.", - "format" : "pve-qm-watchdog", - "optional" : 1, - "type" : "string", - "typetext" : "[[model=]] [,action=]", - "verbose_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)" - } - } - }, - "permissions" : { - "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" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/qemu", - "text" : "qemu" - }, - { - "children" : [ - { - "children" : [ + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/termproxy", + "text" : "termproxy" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Opens a weksocket for VNC traffic.", + "method" : "GET", + "name" : "vncwebsocket", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "port" : { + "description" : "Port number returned by previous vncproxy call.", + "maximum" : 5999, + "minimum" : 5900, + "type" : "integer", + "typetext" : " (5900 - 5999)" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "vncticket" : { + "description" : "Ticket from previous call to vncproxy.", + "maxLength" : 512, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ], + "description" : "You also need to pass a valid ticket (vncticket)." + }, + "returns" : { + "properties" : { + "port" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket", + "text" : "vncwebsocket" + }, { "info" : { - "GET" : { - "description" : "Get container configuration.", - "method" : "GET", - "name" : "vm_config", + "POST" : { + "allowtoken" : 1, + "description" : "Returns a SPICE configuration to connect to the CT.", + "method" : "POST", + "name" : "spiceproxy", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -13761,6 +29342,13 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "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 reasonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", + "format" : "address", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "vmid" : { "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", @@ -13775,293 +29363,648 @@ var pveapi = [ "perm", "/vms/{vmid}", [ - "VM.Audit" + "VM.Console" ] ] }, + "protected" : 1, "proxyto" : "node", "returns" : { + "additionalProperties" : 1, + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", "properties" : { - "digest" : { - "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", + "host" : { + "type" : "string" + }, + "password" : { + "type" : "string" + }, + "proxy" : { + "type" : "string" + }, + "tls-port" : { + "type" : "integer" + }, + "type" : { "type" : "string" } - }, - "type" : "object" + } } - }, - "PUT" : { - "description" : "Set container options.", - "method" : "PUT", - "name" : "update_vm", + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy", + "text" : "spiceproxy" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Migrate the container to another node. Creates a new migration task.", + "method" : "POST", + "name" : "migrate_vm", "parameters" : { "additionalProperties" : 0, "properties" : { - "arch" : { - "default" : "amd64", - "description" : "OS architecture type.", - "enum" : [ - "amd64", - "i386" - ], + "bwlimit" : { + "default" : "migrate limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", "optional" : 1, - "type" : "string" + "type" : "number", + "typetext" : " (0 - N)" }, - "cmode" : { - "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).", - "enum" : [ - "shell", - "console", - "tty" - ], - "optional" : 1, - "type" : "string" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "console" : { - "default" : 1, - "description" : "Attach a console device (/dev/console) to the container.", + "online" : { + "description" : "Use online/live migration.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "cores" : { - "description" : "The number of cores assigned to the container. A container can use all available cores by default.", - "maximum" : 128, - "minimum" : 1, + "restart" : { + "description" : "Use restart migration", "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 128)" + "type" : "boolean", + "typetext" : "" }, - "cpulimit" : { - "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.", - "maximum" : 128, - "minimum" : 0, + "target" : { + "description" : "Target node.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "target-storage" : { + "description" : "Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself.", + "format" : "storage-pair-list", "optional" : 1, - "type" : "number", - "typetext" : " (0 - 128)" + "type" : "string", + "typetext" : "" }, - "cpuunits" : { - "default" : 1024, - "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.", - "maximum" : 500000, - "minimum" : 0, + "timeout" : { + "default" : 180, + "description" : "Timeout in seconds for shutdown for restart migration", "optional" : 1, "type" : "integer", - "typetext" : " (0 - 500000)" + "typetext" : "" }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Migrate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/migrate", + "text" : "migrate" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Check if feature for virtual machine is available.", + "method" : "GET", + "name" : "vm_feature", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "feature" : { + "description" : "Feature to check.", + "enum" : [ + "snapshot", + "clone", + "copy" + ], + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" }, - "description" : { - "description" : "Container description. Only used on the configuration web interface.", + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, "optional" : 1, "type" : "string", "typetext" : "" }, - "digest" : { - "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.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "hasFeature" : { + "type" : "boolean" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/feature", + "text" : "feature" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Create a Template.", + "method" : "POST", + "name" : "template", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ], + "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/template", + "text" : "template" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Create a container clone/copy", + "method" : "POST", + "name" : "clone_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "bwlimit" : { + "default" : "clone limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", + "optional" : 1, + "type" : "number", + "typetext" : " (0 - N)" + }, + "description" : { + "description" : "Description for the new CT.", "optional" : 1, "type" : "string", "typetext" : "" }, + "full" : { + "description" : "Create a full copy of all disks. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, "hostname" : { - "description" : "Set a host name for the container.", + "description" : "Set a hostname for the new CT.", "format" : "dns-name", - "maxLength" : 255, "optional" : 1, "type" : "string", "typetext" : "" }, - "lock" : { - "description" : "Lock/unlock the VM.", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], + "newid" : { + "description" : "VMID for the clone.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pool" : { + "description" : "Add the new CT to the specified pool.", + "format" : "pve-poolid", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "memory" : { - "default" : 512, - "description" : "Amount of RAM for the VM in MB.", - "minimum" : 16, + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, "optional" : 1, - "type" : "integer", - "typetext" : " (16 - N)" + "type" : "string", + "typetext" : "" }, - "mp[n]" : { - "description" : "Use volume as container mount point.", - "format" : { - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "optional" : 1, - "type" : "boolean" - }, - "backup" : { - "description" : "Whether to include the mount point in backups.", - "optional" : 1, - "type" : "boolean", - "verbose_description" : "Whether to include the mount point in backups (only used for volume mount points)." - }, - "mp" : { - "description" : "Path to the mount point as seen from inside the container (must not contain symlinks).", - "format" : "pve-lxc-mp-string", - "format_description" : "Path", - "type" : "string", - "verbose_description" : "Path to the mount point as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons." - }, - "quota" : { - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "optional" : 1, - "type" : "boolean" - }, - "replicate" : { - "default" : 1, - "description" : "Will include this volume to a storage replica job.", - "optional" : 1, - "type" : "boolean" - }, - "ro" : { - "description" : "Read-only mount point", - "optional" : 1, - "type" : "boolean" - }, - "shared" : { - "default" : 0, - "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", - "optional" : 1, - "type" : "boolean", - "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" - }, - "size" : { - "description" : "Volume size (read only value).", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, - "type" : "string" - }, - "volume" : { - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "format" : "pve-lxc-mp-string", - "format_description" : "volume", - "type" : "string" - } - }, + "storage" : { + "description" : "Target storage for full clone.", + "format" : "pve-storage-id", "optional" : 1, "type" : "string", - "typetext" : "[volume=] ,mp= [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" + "typetext" : "" }, - "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.", - "format" : "address-list", + "target" : { + "description" : "Target node. Only allowed if the original VM is on shared storage.", + "format" : "pve-node", "optional" : 1, "type" : "string", "typetext" : "" }, - "net[n]" : { - "description" : "Specifies network interfaces for the container.", - "format" : { - "bridge" : { - "description" : "Bridge to attach the network device to.", - "format_description" : "bridge", - "optional" : 1, - "pattern" : "[-_.\\w\\d]+", - "type" : "string" - }, - "firewall" : { - "description" : "Controls whether this interface's firewall rules should be used.", - "optional" : 1, - "type" : "boolean" - }, - "gw" : { - "description" : "Default gateway for IPv4 traffic.", - "format" : "ipv4", - "format_description" : "GatewayIPv4", - "optional" : 1, - "type" : "string" - }, - "gw6" : { - "description" : "Default gateway for IPv6 traffic.", - "format" : "ipv6", - "format_description" : "GatewayIPv6", - "optional" : 1, - "type" : "string" - }, - "hwaddr" : { - "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)", - "format_description" : "XX:XX:XX:XX:XX:XX", - "optional" : 1, - "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", - "type" : "string" - }, - "ip" : { - "description" : "IPv4 address in CIDR format.", - "format" : "pve-ipv4-config", - "format_description" : "IPv4Format/CIDR", - "optional" : 1, - "type" : "string" - }, - "ip6" : { - "description" : "IPv6 address in CIDR format.", - "format" : "pve-ipv6-config", - "format_description" : "IPv6Format/CIDR", - "optional" : 1, - "type" : "string" - }, - "mtu" : { - "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", - "minimum" : 64, - "optional" : 1, - "type" : "integer" - }, - "name" : { - "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", - "format_description" : "string", - "pattern" : "[-_.\\w\\d]+", - "type" : "string" - }, - "rate" : { - "description" : "Apply rate limiting to the interface", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "tag" : { - "description" : "VLAN tag for this interface.", - "maximum" : 4094, - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "trunks" : { - "description" : "VLAN ids to pass through the interface", - "format_description" : "vlanid[;vlanid...]", - "optional" : 1, - "pattern" : "(?^:\\d+(?:;\\d+)*)", - "type" : "string" - }, - "type" : { - "description" : "Network interface type.", - "enum" : [ - "veth" - ], - "optional" : 1, - "type" : "string" - } - }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "and", + [ + "perm", + "/vms/{vmid}", + [ + "VM.Clone" + ] + ], + [ + "or", + [ + "perm", + "/vms/{newid}", + [ + "VM.Allocate" + ] + ], + [ + "perm", + "/pool/{pool}", + [ + "VM.Allocate" + ], + "require_param", + "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", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/clone", + "text" : "clone" + }, + { + "info" : { + "PUT" : { + "allowtoken" : 1, + "description" : "Resize a container mount point.", + "method" : "PUT", + "name" : "resize_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", - "typetext" : "name= [,bridge=] [,firewall=<1|0>] [,gw=] [,gw6=] [,hwaddr=] [,ip=] [,ip6=] [,mtu=] [,rate=] [,tag=] [,trunks=] [,type=]" + "typetext" : "" + }, + "disk" : { + "description" : "The disk you want to resize.", + "enum" : [ + "rootfs", + "mp0", + "mp1", + "mp2", + "mp3", + "mp4", + "mp5", + "mp6", + "mp7", + "mp8", + "mp9", + "mp10", + "mp11", + "mp12", + "mp13", + "mp14", + "mp15", + "mp16", + "mp17", + "mp18", + "mp19", + "mp20", + "mp21", + "mp22", + "mp23", + "mp24", + "mp25", + "mp26", + "mp27", + "mp28", + "mp29", + "mp30", + "mp31", + "mp32", + "mp33", + "mp34", + "mp35", + "mp36", + "mp37", + "mp38", + "mp39", + "mp40", + "mp41", + "mp42", + "mp43", + "mp44", + "mp45", + "mp46", + "mp47", + "mp48", + "mp49", + "mp50", + "mp51", + "mp52", + "mp53", + "mp54", + "mp55", + "mp56", + "mp57", + "mp58", + "mp59", + "mp60", + "mp61", + "mp62", + "mp63", + "mp64", + "mp65", + "mp66", + "mp67", + "mp68", + "mp69", + "mp70", + "mp71", + "mp72", + "mp73", + "mp74", + "mp75", + "mp76", + "mp77", + "mp78", + "mp79", + "mp80", + "mp81", + "mp82", + "mp83", + "mp84", + "mp85", + "mp86", + "mp87", + "mp88", + "mp89", + "mp90", + "mp91", + "mp92", + "mp93", + "mp94", + "mp95", + "mp96", + "mp97", + "mp98", + "mp99", + "mp100", + "mp101", + "mp102", + "mp103", + "mp104", + "mp105", + "mp106", + "mp107", + "mp108", + "mp109", + "mp110", + "mp111", + "mp112", + "mp113", + "mp114", + "mp115", + "mp116", + "mp117", + "mp118", + "mp119", + "mp120", + "mp121", + "mp122", + "mp123", + "mp124", + "mp125", + "mp126", + "mp127", + "mp128", + "mp129", + "mp130", + "mp131", + "mp132", + "mp133", + "mp134", + "mp135", + "mp136", + "mp137", + "mp138", + "mp139", + "mp140", + "mp141", + "mp142", + "mp143", + "mp144", + "mp145", + "mp146", + "mp147", + "mp148", + "mp149", + "mp150", + "mp151", + "mp152", + "mp153", + "mp154", + "mp155", + "mp156", + "mp157", + "mp158", + "mp159", + "mp160", + "mp161", + "mp162", + "mp163", + "mp164", + "mp165", + "mp166", + "mp167", + "mp168", + "mp169", + "mp170", + "mp171", + "mp172", + "mp173", + "mp174", + "mp175", + "mp176", + "mp177", + "mp178", + "mp179", + "mp180", + "mp181", + "mp182", + "mp183", + "mp184", + "mp185", + "mp186", + "mp187", + "mp188", + "mp189", + "mp190", + "mp191", + "mp192", + "mp193", + "mp194", + "mp195", + "mp196", + "mp197", + "mp198", + "mp199", + "mp200", + "mp201", + "mp202", + "mp203", + "mp204", + "mp205", + "mp206", + "mp207", + "mp208", + "mp209", + "mp210", + "mp211", + "mp212", + "mp213", + "mp214", + "mp215", + "mp216", + "mp217", + "mp218", + "mp219", + "mp220", + "mp221", + "mp222", + "mp223", + "mp224", + "mp225", + "mp226", + "mp227", + "mp228", + "mp229", + "mp230", + "mp231", + "mp232", + "mp233", + "mp234", + "mp235", + "mp236", + "mp237", + "mp238", + "mp239", + "mp240", + "mp241", + "mp242", + "mp243", + "mp244", + "mp245", + "mp246", + "mp247", + "mp248", + "mp249", + "mp250", + "mp251", + "mp252", + "mp253", + "mp254", + "mp255" + ], + "type" : "string" }, "node" : { "description" : "The cluster node name.", @@ -14069,135 +30012,1185 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "onboot" : { - "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "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" }, - "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", - "gentoo", - "unmanaged" - ], + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/resize", + "text" : "resize" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Move a rootfs-/mp-volume to a different storage or to a different container.", + "method" : "POST", + "name" : "move_volume", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "bwlimit" : { + "default" : "clone limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", "optional" : 1, - "type" : "string" + "type" : "number", + "typetext" : " (0 - N)" }, - "protection" : { + "delete" : { "default" : 0, - "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", + "description" : "Delete the original volume after successful copy. By default the original is kept as an unused volume entry.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "rootfs" : { - "description" : "Use volume as container root.", - "format" : { - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "optional" : 1, - "type" : "boolean" - }, - "quota" : { - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "optional" : 1, - "type" : "boolean" - }, - "replicate" : { - "default" : 1, - "description" : "Will include this volume to a storage replica job.", - "optional" : 1, - "type" : "boolean" - }, - "ro" : { - "description" : "Read-only mount point", - "optional" : 1, - "type" : "boolean" - }, - "shared" : { - "default" : 0, - "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", - "optional" : 1, - "type" : "boolean", - "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" - }, - "size" : { - "description" : "Volume size (read only value).", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, - "type" : "string" - }, - "volume" : { - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "format" : "pve-lxc-mp-string", - "format_description" : "volume", - "type" : "string" - } - }, + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 \" .\n\t\t \"digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40, "optional" : 1, "type" : "string", - "typetext" : "[volume=] [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" + "typetext" : "" }, - "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.", - "format" : "dns-name-list", + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "Target Storage.", + "format" : "pve-storage-id", "optional" : 1, "type" : "string", "typetext" : "" }, - "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.", - "format" : "pve-startup-order", + "target-digest" : { + "description" : "Prevent changes if current configuration file of the target \" .\n\t\t \"container has a different SHA1 digest. This can be used to prevent \" .\n\t\t \"concurrent modifications.", + "maxLength" : 40, "optional" : 1, "type" : "string", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + "typetext" : "" }, - "swap" : { - "default" : 512, - "description" : "Amount of SWAP for the VM in MB.", - "minimum" : 0, + "target-vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "optional" : 1, "type" : "integer", - "typetext" : " (0 - N)" + "typetext" : " (1 - N)" }, - "template" : { - "default" : 0, - "description" : "Enable/disable Template.", + "target-volume" : { + "description" : "The config key the volume will be moved to. Default is the source volume key.", + "enum" : [ + "rootfs", + "mp0", + "mp1", + "mp2", + "mp3", + "mp4", + "mp5", + "mp6", + "mp7", + "mp8", + "mp9", + "mp10", + "mp11", + "mp12", + "mp13", + "mp14", + "mp15", + "mp16", + "mp17", + "mp18", + "mp19", + "mp20", + "mp21", + "mp22", + "mp23", + "mp24", + "mp25", + "mp26", + "mp27", + "mp28", + "mp29", + "mp30", + "mp31", + "mp32", + "mp33", + "mp34", + "mp35", + "mp36", + "mp37", + "mp38", + "mp39", + "mp40", + "mp41", + "mp42", + "mp43", + "mp44", + "mp45", + "mp46", + "mp47", + "mp48", + "mp49", + "mp50", + "mp51", + "mp52", + "mp53", + "mp54", + "mp55", + "mp56", + "mp57", + "mp58", + "mp59", + "mp60", + "mp61", + "mp62", + "mp63", + "mp64", + "mp65", + "mp66", + "mp67", + "mp68", + "mp69", + "mp70", + "mp71", + "mp72", + "mp73", + "mp74", + "mp75", + "mp76", + "mp77", + "mp78", + "mp79", + "mp80", + "mp81", + "mp82", + "mp83", + "mp84", + "mp85", + "mp86", + "mp87", + "mp88", + "mp89", + "mp90", + "mp91", + "mp92", + "mp93", + "mp94", + "mp95", + "mp96", + "mp97", + "mp98", + "mp99", + "mp100", + "mp101", + "mp102", + "mp103", + "mp104", + "mp105", + "mp106", + "mp107", + "mp108", + "mp109", + "mp110", + "mp111", + "mp112", + "mp113", + "mp114", + "mp115", + "mp116", + "mp117", + "mp118", + "mp119", + "mp120", + "mp121", + "mp122", + "mp123", + "mp124", + "mp125", + "mp126", + "mp127", + "mp128", + "mp129", + "mp130", + "mp131", + "mp132", + "mp133", + "mp134", + "mp135", + "mp136", + "mp137", + "mp138", + "mp139", + "mp140", + "mp141", + "mp142", + "mp143", + "mp144", + "mp145", + "mp146", + "mp147", + "mp148", + "mp149", + "mp150", + "mp151", + "mp152", + "mp153", + "mp154", + "mp155", + "mp156", + "mp157", + "mp158", + "mp159", + "mp160", + "mp161", + "mp162", + "mp163", + "mp164", + "mp165", + "mp166", + "mp167", + "mp168", + "mp169", + "mp170", + "mp171", + "mp172", + "mp173", + "mp174", + "mp175", + "mp176", + "mp177", + "mp178", + "mp179", + "mp180", + "mp181", + "mp182", + "mp183", + "mp184", + "mp185", + "mp186", + "mp187", + "mp188", + "mp189", + "mp190", + "mp191", + "mp192", + "mp193", + "mp194", + "mp195", + "mp196", + "mp197", + "mp198", + "mp199", + "mp200", + "mp201", + "mp202", + "mp203", + "mp204", + "mp205", + "mp206", + "mp207", + "mp208", + "mp209", + "mp210", + "mp211", + "mp212", + "mp213", + "mp214", + "mp215", + "mp216", + "mp217", + "mp218", + "mp219", + "mp220", + "mp221", + "mp222", + "mp223", + "mp224", + "mp225", + "mp226", + "mp227", + "mp228", + "mp229", + "mp230", + "mp231", + "mp232", + "mp233", + "mp234", + "mp235", + "mp236", + "mp237", + "mp238", + "mp239", + "mp240", + "mp241", + "mp242", + "mp243", + "mp244", + "mp245", + "mp246", + "mp247", + "mp248", + "mp249", + "mp250", + "mp251", + "mp252", + "mp253", + "mp254", + "mp255", + "unused0", + "unused1", + "unused2", + "unused3", + "unused4", + "unused5", + "unused6", + "unused7", + "unused8", + "unused9", + "unused10", + "unused11", + "unused12", + "unused13", + "unused14", + "unused15", + "unused16", + "unused17", + "unused18", + "unused19", + "unused20", + "unused21", + "unused22", + "unused23", + "unused24", + "unused25", + "unused26", + "unused27", + "unused28", + "unused29", + "unused30", + "unused31", + "unused32", + "unused33", + "unused34", + "unused35", + "unused36", + "unused37", + "unused38", + "unused39", + "unused40", + "unused41", + "unused42", + "unused43", + "unused44", + "unused45", + "unused46", + "unused47", + "unused48", + "unused49", + "unused50", + "unused51", + "unused52", + "unused53", + "unused54", + "unused55", + "unused56", + "unused57", + "unused58", + "unused59", + "unused60", + "unused61", + "unused62", + "unused63", + "unused64", + "unused65", + "unused66", + "unused67", + "unused68", + "unused69", + "unused70", + "unused71", + "unused72", + "unused73", + "unused74", + "unused75", + "unused76", + "unused77", + "unused78", + "unused79", + "unused80", + "unused81", + "unused82", + "unused83", + "unused84", + "unused85", + "unused86", + "unused87", + "unused88", + "unused89", + "unused90", + "unused91", + "unused92", + "unused93", + "unused94", + "unused95", + "unused96", + "unused97", + "unused98", + "unused99", + "unused100", + "unused101", + "unused102", + "unused103", + "unused104", + "unused105", + "unused106", + "unused107", + "unused108", + "unused109", + "unused110", + "unused111", + "unused112", + "unused113", + "unused114", + "unused115", + "unused116", + "unused117", + "unused118", + "unused119", + "unused120", + "unused121", + "unused122", + "unused123", + "unused124", + "unused125", + "unused126", + "unused127", + "unused128", + "unused129", + "unused130", + "unused131", + "unused132", + "unused133", + "unused134", + "unused135", + "unused136", + "unused137", + "unused138", + "unused139", + "unused140", + "unused141", + "unused142", + "unused143", + "unused144", + "unused145", + "unused146", + "unused147", + "unused148", + "unused149", + "unused150", + "unused151", + "unused152", + "unused153", + "unused154", + "unused155", + "unused156", + "unused157", + "unused158", + "unused159", + "unused160", + "unused161", + "unused162", + "unused163", + "unused164", + "unused165", + "unused166", + "unused167", + "unused168", + "unused169", + "unused170", + "unused171", + "unused172", + "unused173", + "unused174", + "unused175", + "unused176", + "unused177", + "unused178", + "unused179", + "unused180", + "unused181", + "unused182", + "unused183", + "unused184", + "unused185", + "unused186", + "unused187", + "unused188", + "unused189", + "unused190", + "unused191", + "unused192", + "unused193", + "unused194", + "unused195", + "unused196", + "unused197", + "unused198", + "unused199", + "unused200", + "unused201", + "unused202", + "unused203", + "unused204", + "unused205", + "unused206", + "unused207", + "unused208", + "unused209", + "unused210", + "unused211", + "unused212", + "unused213", + "unused214", + "unused215", + "unused216", + "unused217", + "unused218", + "unused219", + "unused220", + "unused221", + "unused222", + "unused223", + "unused224", + "unused225", + "unused226", + "unused227", + "unused228", + "unused229", + "unused230", + "unused231", + "unused232", + "unused233", + "unused234", + "unused235", + "unused236", + "unused237", + "unused238", + "unused239", + "unused240", + "unused241", + "unused242", + "unused243", + "unused244", + "unused245", + "unused246", + "unused247", + "unused248", + "unused249", + "unused250", + "unused251", + "unused252", + "unused253", + "unused254", + "unused255" + ], "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string" }, - "tty" : { - "default" : 2, - "description" : "Specify the number of tty available to the container", - "maximum" : 6, - "minimum" : 0, - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "typetext" : " (0 - 6)" - }, - "unprivileged" : { - "default" : 0, - "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "typetext" : " (1 - N)" }, - "unused[n]" : { - "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", - "format" : "pve-volume-id", - "optional" : 1, + "volume" : { + "description" : "Volume which will be moved.", + "enum" : [ + "rootfs", + "mp0", + "mp1", + "mp2", + "mp3", + "mp4", + "mp5", + "mp6", + "mp7", + "mp8", + "mp9", + "mp10", + "mp11", + "mp12", + "mp13", + "mp14", + "mp15", + "mp16", + "mp17", + "mp18", + "mp19", + "mp20", + "mp21", + "mp22", + "mp23", + "mp24", + "mp25", + "mp26", + "mp27", + "mp28", + "mp29", + "mp30", + "mp31", + "mp32", + "mp33", + "mp34", + "mp35", + "mp36", + "mp37", + "mp38", + "mp39", + "mp40", + "mp41", + "mp42", + "mp43", + "mp44", + "mp45", + "mp46", + "mp47", + "mp48", + "mp49", + "mp50", + "mp51", + "mp52", + "mp53", + "mp54", + "mp55", + "mp56", + "mp57", + "mp58", + "mp59", + "mp60", + "mp61", + "mp62", + "mp63", + "mp64", + "mp65", + "mp66", + "mp67", + "mp68", + "mp69", + "mp70", + "mp71", + "mp72", + "mp73", + "mp74", + "mp75", + "mp76", + "mp77", + "mp78", + "mp79", + "mp80", + "mp81", + "mp82", + "mp83", + "mp84", + "mp85", + "mp86", + "mp87", + "mp88", + "mp89", + "mp90", + "mp91", + "mp92", + "mp93", + "mp94", + "mp95", + "mp96", + "mp97", + "mp98", + "mp99", + "mp100", + "mp101", + "mp102", + "mp103", + "mp104", + "mp105", + "mp106", + "mp107", + "mp108", + "mp109", + "mp110", + "mp111", + "mp112", + "mp113", + "mp114", + "mp115", + "mp116", + "mp117", + "mp118", + "mp119", + "mp120", + "mp121", + "mp122", + "mp123", + "mp124", + "mp125", + "mp126", + "mp127", + "mp128", + "mp129", + "mp130", + "mp131", + "mp132", + "mp133", + "mp134", + "mp135", + "mp136", + "mp137", + "mp138", + "mp139", + "mp140", + "mp141", + "mp142", + "mp143", + "mp144", + "mp145", + "mp146", + "mp147", + "mp148", + "mp149", + "mp150", + "mp151", + "mp152", + "mp153", + "mp154", + "mp155", + "mp156", + "mp157", + "mp158", + "mp159", + "mp160", + "mp161", + "mp162", + "mp163", + "mp164", + "mp165", + "mp166", + "mp167", + "mp168", + "mp169", + "mp170", + "mp171", + "mp172", + "mp173", + "mp174", + "mp175", + "mp176", + "mp177", + "mp178", + "mp179", + "mp180", + "mp181", + "mp182", + "mp183", + "mp184", + "mp185", + "mp186", + "mp187", + "mp188", + "mp189", + "mp190", + "mp191", + "mp192", + "mp193", + "mp194", + "mp195", + "mp196", + "mp197", + "mp198", + "mp199", + "mp200", + "mp201", + "mp202", + "mp203", + "mp204", + "mp205", + "mp206", + "mp207", + "mp208", + "mp209", + "mp210", + "mp211", + "mp212", + "mp213", + "mp214", + "mp215", + "mp216", + "mp217", + "mp218", + "mp219", + "mp220", + "mp221", + "mp222", + "mp223", + "mp224", + "mp225", + "mp226", + "mp227", + "mp228", + "mp229", + "mp230", + "mp231", + "mp232", + "mp233", + "mp234", + "mp235", + "mp236", + "mp237", + "mp238", + "mp239", + "mp240", + "mp241", + "mp242", + "mp243", + "mp244", + "mp245", + "mp246", + "mp247", + "mp248", + "mp249", + "mp250", + "mp251", + "mp252", + "mp253", + "mp254", + "mp255", + "unused0", + "unused1", + "unused2", + "unused3", + "unused4", + "unused5", + "unused6", + "unused7", + "unused8", + "unused9", + "unused10", + "unused11", + "unused12", + "unused13", + "unused14", + "unused15", + "unused16", + "unused17", + "unused18", + "unused19", + "unused20", + "unused21", + "unused22", + "unused23", + "unused24", + "unused25", + "unused26", + "unused27", + "unused28", + "unused29", + "unused30", + "unused31", + "unused32", + "unused33", + "unused34", + "unused35", + "unused36", + "unused37", + "unused38", + "unused39", + "unused40", + "unused41", + "unused42", + "unused43", + "unused44", + "unused45", + "unused46", + "unused47", + "unused48", + "unused49", + "unused50", + "unused51", + "unused52", + "unused53", + "unused54", + "unused55", + "unused56", + "unused57", + "unused58", + "unused59", + "unused60", + "unused61", + "unused62", + "unused63", + "unused64", + "unused65", + "unused66", + "unused67", + "unused68", + "unused69", + "unused70", + "unused71", + "unused72", + "unused73", + "unused74", + "unused75", + "unused76", + "unused77", + "unused78", + "unused79", + "unused80", + "unused81", + "unused82", + "unused83", + "unused84", + "unused85", + "unused86", + "unused87", + "unused88", + "unused89", + "unused90", + "unused91", + "unused92", + "unused93", + "unused94", + "unused95", + "unused96", + "unused97", + "unused98", + "unused99", + "unused100", + "unused101", + "unused102", + "unused103", + "unused104", + "unused105", + "unused106", + "unused107", + "unused108", + "unused109", + "unused110", + "unused111", + "unused112", + "unused113", + "unused114", + "unused115", + "unused116", + "unused117", + "unused118", + "unused119", + "unused120", + "unused121", + "unused122", + "unused123", + "unused124", + "unused125", + "unused126", + "unused127", + "unused128", + "unused129", + "unused130", + "unused131", + "unused132", + "unused133", + "unused134", + "unused135", + "unused136", + "unused137", + "unused138", + "unused139", + "unused140", + "unused141", + "unused142", + "unused143", + "unused144", + "unused145", + "unused146", + "unused147", + "unused148", + "unused149", + "unused150", + "unused151", + "unused152", + "unused153", + "unused154", + "unused155", + "unused156", + "unused157", + "unused158", + "unused159", + "unused160", + "unused161", + "unused162", + "unused163", + "unused164", + "unused165", + "unused166", + "unused167", + "unused168", + "unused169", + "unused170", + "unused171", + "unused172", + "unused173", + "unused174", + "unused175", + "unused176", + "unused177", + "unused178", + "unused179", + "unused180", + "unused181", + "unused182", + "unused183", + "unused184", + "unused185", + "unused186", + "unused187", + "unused188", + "unused189", + "unused190", + "unused191", + "unused192", + "unused193", + "unused194", + "unused195", + "unused196", + "unused197", + "unused198", + "unused199", + "unused200", + "unused201", + "unused202", + "unused203", + "unused204", + "unused205", + "unused206", + "unused207", + "unused208", + "unused209", + "unused210", + "unused211", + "unused212", + "unused213", + "unused214", + "unused215", + "unused216", + "unused217", + "unused218", + "unused219", + "unused220", + "unused221", + "unused222", + "unused223", + "unused224", + "unused225", + "unused226", + "unused227", + "unused228", + "unused229", + "unused230", + "unused231", + "unused232", + "unused233", + "unused234", + "unused235", + "unused236", + "unused237", + "unused238", + "unused239", + "unused240", + "unused241", + "unused242", + "unused243", + "unused244", + "unused245", + "unused246", + "unused247", + "unused248", + "unused249", + "unused250", + "unused251", + "unused252", + "unused253", + "unused254", + "unused255" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ] + ], + "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage. To move a volume to another container, you need the permissions on the target container as well." + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/move_volume", + "text" : "move_volume" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get container configuration, including pending changes.", + "method" : "GET", + "name" : "vm_pending", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" }, @@ -14210,244 +31203,874 @@ var pveapi = [ } } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk", - "VM.Config.CPU", - "VM.Config.Memory", - "VM.Config.Network", - "VM.Config.Options" - ], - "any", - 1 - ], - "description" : "non-volume mount points in rootfs and mp[n] are restricted to root@pam" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "delete" : { + "description" : "Indicates a pending delete request if present and not 0.", + "maximum" : 2, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "key" : { + "description" : "Configuration option name.", + "type" : "string" + }, + "pending" : { + "description" : "Pending value.", + "optional" : 1, + "type" : "string" + }, + "value" : { + "description" : "Current value.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/pending", + "text" : "pending" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy the container (also delete all uses files).", + "method" : "DELETE", + "name" : "destroy_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "destroy-unreferenced-disks" : { + "description" : "If set, destroy additionally all disks with the VMID from all enabled storages which are not referenced in the config.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "force" : { + "default" : 0, + "description" : "Force destroy, even if running.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "purge" : { + "default" : 0, + "description" : "Remove container from all related configurations. For example, backup jobs, replication jobs or HA. Related ACLs and Firewall entries will *always* be removed.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Directory index", + "method" : "GET", + "name" : "vmdiridx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}", + "text" : "{vmid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "LXC container index (per node).", + "method" : "GET", + "name" : "vmlist", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "Only list CTs where you have VM.Audit permissons on /vms/.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "cpus" : { + "description" : "Maximum usable CPUs.", + "optional" : 1, + "type" : "number" + }, + "lock" : { + "description" : "The current config lock, if any.", + "optional" : 1, + "type" : "string" + }, + "maxdisk" : { + "description" : "Root disk size in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxmem" : { + "description" : "Maximum memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "maxswap" : { + "description" : "Maximum SWAP memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "name" : { + "description" : "Container name.", + "optional" : 1, + "type" : "string" + }, + "status" : { + "description" : "LXC Container status.", + "enum" : [ + "stopped", + "running" + ], + "type" : "string" + }, + "tags" : { + "description" : "The current configured tags, if any.", + "optional" : 1, + "type" : "string" + }, + "uptime" : { + "description" : "Uptime.", + "optional" : 1, + "renderer" : "duration", + "type" : "integer" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{vmid}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create or restore a container.", + "method" : "POST", + "name" : "create_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "arch" : { + "default" : "amd64", + "description" : "OS architecture type.", + "enum" : [ + "amd64", + "i386", + "arm64", + "armhf" + ], + "optional" : 1, + "type" : "string" + }, + "bwlimit" : { + "default" : "restore limit from datacenter or storage config", + "description" : "Override I/O bandwidth limit (in KiB/s).", + "minimum" : "0", + "optional" : 1, + "type" : "number", + "typetext" : " (0 - N)" + }, + "cmode" : { + "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).", + "enum" : [ + "shell", + "console", + "tty" + ], + "optional" : 1, + "type" : "string" + }, + "console" : { + "default" : 1, + "description" : "Attach a console device (/dev/console) to the container.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cores" : { + "description" : "The number of cores assigned to the container. A container can use all available cores by default.", + "maximum" : 8192, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 8192)" + }, + "cpulimit" : { + "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.", + "maximum" : 8192, + "minimum" : 0, + "optional" : 1, + "type" : "number", + "typetext" : " (0 - 8192)" + }, + "cpuunits" : { + "default" : 1024, + "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.", + "maximum" : 500000, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 500000)" + }, + "debug" : { + "default" : 0, + "description" : "Try to be more verbose. For now this only enables debug log-level on start.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "description" : { + "description" : "Description for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file.", + "maxLength" : 8192, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "features" : { + "description" : "Allow containers access to advanced features.", + "format" : { + "force_rw_sys" : { + "default" : 0, + "description" : "Mount /sys in unprivileged containers as `rw` instead of `mixed`. This can break networking under newer (>= v245) systemd-network use.", + "optional" : 1, + "type" : "boolean" + }, + "fuse" : { + "default" : 0, + "description" : "Allow using 'fuse' file systems in a container. Note that interactions between fuse and the freezer cgroup can potentially cause I/O deadlocks.", + "optional" : 1, + "type" : "boolean" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" + "keyctl" : { + "default" : 0, + "description" : "For unprivileged containers only: Allow the use of the keyctl() system call. This is required to use docker inside a container. By default unprivileged containers will see this system call as non-existent. This is mostly a workaround for systemd-networkd, as it will treat it as a fatal error when some keyctl() operations are denied by the kernel due to lacking permissions. Essentially, you can choose between running systemd-networkd or docker.", + "optional" : 1, + "type" : "boolean" + }, + "mknod" : { + "default" : 0, + "description" : "Allow unprivileged containers to use mknod() to add certain device nodes. This requires a kernel with seccomp trap to user space support (5.3 or newer). This is experimental.", + "optional" : 1, + "type" : "boolean" + }, + "mount" : { + "description" : "Allow mounting file systems of specific types. This should be a list of file system types as used with the mount command. Note that this can have negative effects on the container's security. With access to a loop device, mounting a file can circumvent the mknod permission of the devices cgroup, mounting an NFS file system can block the host's I/O completely and prevent it from rebooting, etc.", + "format_description" : "fstype;fstype;...", + "optional" : 1, + "pattern" : "(?^:[a-zA-Z0-9_; ]+)", + "type" : "string" + }, + "nesting" : { + "default" : 0, + "description" : "Allow nesting. Best used with unprivileged containers with additional id mapping. Note that this will expose procfs and sysfs contents of the host to the guest.", + "optional" : 1, + "type" : "boolean" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[force_rw_sys=<1|0>] [,fuse=<1|0>] [,keyctl=<1|0>] [,mknod=<1|0>] [,mount=] [,nesting=<1|0>]" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/config", - "text" : "config" - }, - { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Get virtual machine status.", - "method" : "GET", - "name" : "vm_status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - } + "force" : { + "description" : "Allow to overwrite existing container.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "hookscript" : { + "description" : "Script that will be exectued during various steps in the containers lifetime.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "hostname" : { + "description" : "Set a host name for the container.", + "format" : "dns-name", + "maxLength" : 255, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ignore-unpack-errors" : { + "description" : "Ignore errors when extracting the template.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "lock" : { + "description" : "Lock/unlock the VM.", + "enum" : [ + "backup", + "create", + "destroyed", + "disk", + "fstrim", + "migrate", + "mounted", + "rollback", + "snapshot", + "snapshot-delete" + ], + "optional" : 1, + "type" : "string" + }, + "memory" : { + "default" : 512, + "description" : "Amount of RAM for the VM in MB.", + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - N)" + }, + "mp[n]" : { + "description" : "Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume.", + "format" : { + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/current", - "text" : "current" + "backup" : { + "description" : "Whether to include the mount point in backups.", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Whether to include the mount point in backups (only used for volume mount points)." + }, + "mountoptions" : { + "description" : "Extra mount options for rootfs/mps.", + "format_description" : "opt[;opt...]", + "optional" : 1, + "pattern" : "(?^:(?^:(noatime|lazytime|nodev|nosuid|noexec))(;(?^:(noatime|lazytime|nodev|nosuid|noexec)))*)", + "type" : "string" + }, + "mp" : { + "description" : "Path to the mount point as seen from inside the container (must not contain symlinks).", + "format" : "pve-lxc-mp-string", + "format_description" : "Path", + "type" : "string", + "verbose_description" : "Path to the mount point as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons." + }, + "quota" : { + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "optional" : 1, + "type" : "boolean" + }, + "replicate" : { + "default" : 1, + "description" : "Will include this volume to a storage replica job.", + "optional" : 1, + "type" : "boolean" + }, + "ro" : { + "description" : "Read-only mount point", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "default" : 0, + "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Volume size (read only value).", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "type" : "string" + } }, - { - "info" : { - "POST" : { - "description" : "Start the container.", - "method" : "POST", - "name" : "vm_start", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } + "optional" : 1, + "type" : "string", + "typetext" : "[volume=] ,mp= [,acl=<1|0>] [,backup=<1|0>] [,mountoptions=] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" + }, + "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.", + "format" : "lxc-ip-with-ll-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "net[n]" : { + "description" : "Specifies network interfaces for the container.", + "format" : { + "bridge" : { + "description" : "Bridge to attach the network device to.", + "format_description" : "bridge", + "optional" : 1, + "pattern" : "[-_.\\w\\d]+", + "type" : "string" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/start", - "text" : "start" + "firewall" : { + "description" : "Controls whether this interface's firewall rules should be used.", + "optional" : 1, + "type" : "boolean" + }, + "gw" : { + "description" : "Default gateway for IPv4 traffic.", + "format" : "ipv4", + "format_description" : "GatewayIPv4", + "optional" : 1, + "type" : "string" + }, + "gw6" : { + "description" : "Default gateway for IPv6 traffic.", + "format" : "ipv6", + "format_description" : "GatewayIPv6", + "optional" : 1, + "type" : "string" + }, + "hwaddr" : { + "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)", + "format" : "mac-addr", + "format_description" : "XX:XX:XX:XX:XX:XX", + "optional" : 1, + "type" : "string", + "verbose_description" : "A common MAC address with the I/G (Individual/Group) bit not set." + }, + "ip" : { + "description" : "IPv4 address in CIDR format.", + "format" : "pve-ipv4-config", + "format_description" : "(IPv4/CIDR|dhcp|manual)", + "optional" : 1, + "type" : "string" + }, + "ip6" : { + "description" : "IPv6 address in CIDR format.", + "format" : "pve-ipv6-config", + "format_description" : "(IPv6/CIDR|auto|dhcp|manual)", + "optional" : 1, + "type" : "string" + }, + "mtu" : { + "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", + "minimum" : 64, + "optional" : 1, + "type" : "integer" + }, + "name" : { + "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", + "format_description" : "string", + "pattern" : "[-_.\\w\\d]+", + "type" : "string" + }, + "rate" : { + "description" : "Apply rate limiting to the interface", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" + }, + "tag" : { + "description" : "VLAN tag for this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "trunks" : { + "description" : "VLAN ids to pass through the interface", + "format_description" : "vlanid[;vlanid...]", + "optional" : 1, + "pattern" : "(?^:\\d+(?:;\\d+)*)", + "type" : "string" + }, + "type" : { + "description" : "Network interface type.", + "enum" : [ + "veth" + ], + "optional" : 1, + "type" : "string" + } }, - { - "info" : { - "POST" : { - "description" : "Stop the container. This will abruptly stop all processes running in the container.", - "method" : "POST", - "name" : "vm_stop", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } + "optional" : 1, + "type" : "string", + "typetext" : "name= [,bridge=] [,firewall=<1|0>] [,gw=] [,gw6=] [,hwaddr=] [,ip=<(IPv4/CIDR|dhcp|manual)>] [,ip6=<(IPv6/CIDR|auto|dhcp|manual)>] [,mtu=] [,rate=] [,tag=] [,trunks=] [,type=]" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "onboot" : { + "default" : 0, + "description" : "Specifies whether a VM will be started during system bootup.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ostemplate" : { + "description" : "The OS template or backup file.", + "maxLength" : 255, + "type" : "string", + "typetext" : "" + }, + "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", + "devuan", + "ubuntu", + "centos", + "fedora", + "opensuse", + "archlinux", + "alpine", + "gentoo", + "nixos", + "unmanaged" + ], + "optional" : 1, + "type" : "string" + }, + "password" : { + "description" : "Sets root password inside container.", + "minLength" : 5, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "pool" : { + "description" : "Add the VM to the specified pool.", + "format" : "pve-poolid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "protection" : { + "default" : 0, + "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "restore" : { + "description" : "Mark this as restore task.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "rootfs" : { + "description" : "Use volume as container root.", + "format" : { + "acl" : { + "description" : "Explicitly enable or disable ACL support.", + "optional" : 1, + "type" : "boolean" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/stop", - "text" : "stop" - }, - { - "info" : { - "POST" : { - "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.", - "method" : "POST", - "name" : "vm_shutdown", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "forceStop" : { - "default" : 0, - "description" : "Make sure the Container stops.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timeout" : { - "default" : 60, - "description" : "Wait maximal timeout seconds.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } + "mountoptions" : { + "description" : "Extra mount options for rootfs/mps.", + "format_description" : "opt[;opt...]", + "optional" : 1, + "pattern" : "(?^:(?^:(noatime|lazytime|nodev|nosuid|noexec))(;(?^:(noatime|lazytime|nodev|nosuid|noexec)))*)", + "type" : "string" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", - "text" : "shutdown" + "quota" : { + "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", + "optional" : 1, + "type" : "boolean" + }, + "replicate" : { + "default" : 1, + "description" : "Will include this volume to a storage replica job.", + "optional" : 1, + "type" : "boolean" + }, + "ro" : { + "description" : "Read-only mount point", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "default" : 0, + "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", + "optional" : 1, + "type" : "boolean", + "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + }, + "size" : { + "description" : "Volume size (read only value).", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" + }, + "volume" : { + "default_key" : 1, + "description" : "Volume, device or directory to mount into the container.", + "format" : "pve-lxc-mp-string", + "format_description" : "volume", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[volume=] [,acl=<1|0>] [,mountoptions=] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" + }, + "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.", + "format" : "dns-name-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ssh-public-keys" : { + "description" : "Setup public SSH keys (one key per line, OpenSSH format).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "start" : { + "default" : 0, + "description" : "Start the CT after its creation finished successfully.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "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.", + "format" : "pve-startup-order", + "optional" : 1, + "type" : "string", + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " + }, + "storage" : { + "default" : "local", + "description" : "Default Storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "swap" : { + "default" : 512, + "description" : "Amount of SWAP for the VM in MB.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "tags" : { + "description" : "Tags of the Container. This is only meta information.", + "format" : "pve-tag-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "timezone" : { + "description" : "Time zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab", + "format" : "pve-ct-timezone", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tty" : { + "default" : 2, + "description" : "Specify the number of tty available to the container", + "maximum" : 6, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 6)" + }, + "unique" : { + "description" : "Assign a unique random ethernet address.", + "optional" : 1, + "requires" : "restore", + "type" : "boolean", + "typetext" : "" + }, + "unprivileged" : { + "default" : 0, + "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "unused[n]" : { + "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", + "format" : { + "volume" : { + "default_key" : 1, + "description" : "The volume that is not used currently.", + "format" : "pve-volume-id", + "format_description" : "volume", + "type" : "string" + } }, + "optional" : 1, + "type" : "string", + "typetext" : "[volume=]" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "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" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc", + "text" : "lxc" + }, + { + "children" : [ + { + "children" : [ + { + "children" : [ { "info" : { "POST" : { - "description" : "Suspend the container.", + "allowtoken" : 1, + "description" : "ceph osd in", "method" : "POST", - "name" : "vm_suspend", + "name" : "in", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -14457,448 +32080,772 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, + "osdid" : { + "description" : "OSD ID", "type" : "integer", - "typetext" : " (1 - N)" + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.PowerMgmt" + "Sys.Modify" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" + "type" : "null" } } }, "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", - "text" : "suspend" + "path" : "/nodes/{node}/ceph/osd/{osdid}/in", + "text" : "in" }, { "info" : { "POST" : { - "description" : "Resume the container.", - "method" : "POST", - "name" : "vm_resume", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/resume", - "text" : "resume" - } - ], - "info" : { - "GET" : { - "description" : "Directory index", - "method" : "GET", - "name" : "vmcmdidx", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "user" : "all" - }, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/status", - "text" : "status" - }, - { - "children" : [ - { - "children" : [ - { - "info" : { - "POST" : { - "description" : "Rollback LXC state to specified snapshot.", - "method" : "POST", - "name" : "rollback", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback", - "text" : "rollback" - }, - { - "info" : { - "GET" : { - "description" : "Get snapshot configuration", - "method" : "GET", - "name" : "get_snapshot_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update snapshot metadata.", - "method" : "PUT", - "name" : "update_snapshot_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "description" : { - "description" : "A textual description or comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config", - "text" : "config" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete a LXC snapshot.", - "method" : "DELETE", - "name" : "delsnapshot", + "allowtoken" : 1, + "description" : "ceph osd out", + "method" : "POST", + "name" : "out", "parameters" : { "additionalProperties" : 0, "properties" : { - "force" : { - "description" : "For removal from config file, even if removing disk snapshots fails.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, + "osdid" : { + "description" : "OSD ID", "type" : "integer", - "typetext" : " (1 - N)" + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Snapshot" + "Sys.Modify" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "description" : "the task ID.", - "type" : "string" + "type" : "null" } - }, - "GET" : { - "description" : "", - "method" : "GET", - "name" : "snapshot_cmd_idx", + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/osd/{osdid}/out", + "text" : "out" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Instruct the OSD to scrub.", + "method" : "POST", + "name" : "scrub", "parameters" : { "additionalProperties" : 0, "properties" : { + "deep" : { + "default" : 0, + "description" : "If set, instructs a deep scrub instead of a normal one.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, + "osdid" : { + "description" : "OSD ID", "type" : "integer", - "typetext" : " (1 - N)" + "typetext" : "" } } }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{cmd}", - "rel" : "child" - } - ], - "type" : "array" + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/osd/{osdid}/scrub", + "text" : "scrub" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy OSD", + "method" : "DELETE", + "name" : "destroyosd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cleanup" : { + "default" : 0, + "description" : "If set, we remove partition table entries.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "osdid" : { + "description" : "OSD ID", + "type" : "integer", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/osd/{osdid}", + "text" : "{osdid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get Ceph osd list/tree.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create OSD", + "method" : "POST", + "name" : "createosd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "crush-device-class" : { + "description" : "Set the device class of the OSD in crush.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "db_dev" : { + "description" : "Block device name for block.db.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "db_dev_size" : { + "default" : "bluestore_block_db_size or 10% of OSD size", + "description" : "Size in GiB for block.db.", + "minimum" : 1, + "optional" : 1, + "requires" : "db_dev", + "type" : "number", + "typetext" : " (1 - N)", + "verbose_description" : "If a block.db is requested but the size is not given, will be automatically selected by: bluestore_block_db_size from the ceph database (osd or global section) or config (osd or global section)in that order. If this is not available, it will be sized 10% of the size of the OSD device. Fails if the available size is not enough." + }, + "dev" : { + "description" : "Block device name.", + "type" : "string", + "typetext" : "" + }, + "encrypted" : { + "default" : 0, + "description" : "Enables encryption of the OSD.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "wal_dev" : { + "description" : "Block device name for block.wal.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "wal_dev_size" : { + "default" : "bluestore_block_wal_size or 1% of OSD size", + "description" : "Size in GiB for block.wal.", + "minimum" : 0.5, + "optional" : 1, + "requires" : "wal_dev", + "type" : "number", + "typetext" : " (0.5 - N)", + "verbose_description" : "If a block.wal is requested but the size is not given, will be automatically selected by: bluestore_block_wal_size from the ceph database (osd or global section) or config (osd or global section)in that order. If this is not available, it will be sized 1% of the size of the OSD device. Fails if the available size is not enough." + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/osd", + "text" : "osd" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy Ceph Metadata Server", + "method" : "DELETE", + "name" : "destroymds", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "The name (ID) of the mds", + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create Ceph Metadata Server (MDS)", + "method" : "POST", + "name" : "createmds", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "hotstandby" : { + "default" : "0", + "description" : "Determines whether a ceph-mds daemon should poll and replay the log of an active MDS. Faster switch on MDS failure, but needs more idle resources.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "default" : "nodename", + "description" : "The ID for the mds, when omitted the same as the nodename", + "maxLength" : 200, + "optional" : 1, + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/mds/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "MDS directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "addr" : { + "optional" : 1, + "type" : "string" + }, + "host" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "description" : "The name (ID) for the MDS" + }, + "rank" : { + "optional" : 1, + "type" : "integer" + }, + "standby_replay" : { + "description" : "If true, the standby MDS is polling the active MDS for faster recovery (hot standby).", + "optional" : 1, + "type" : "boolean" + }, + "state" : { + "description" : "State of the MDS", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/mds", + "text" : "mds" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy Ceph Manager.", + "method" : "DELETE", + "name" : "destroymgr", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "The ID of the manager", + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create Ceph Manager", + "method" : "POST", + "name" : "createmgr", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "The ID for the manager, when omitted the same as the nodename", + "maxLength" : 200, + "optional" : 1, + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/mgr/{id}", + "text" : "{id}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "MGR directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "addr" : { + "optional" : 1, + "type" : "string" + }, + "host" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "description" : "The name (ID) for the MGR" + }, + "state" : { + "description" : "State of the MGR", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/mgr", + "text" : "mgr" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy Ceph Monitor and Manager.", + "method" : "DELETE", + "name" : "destroymon", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "monid" : { + "description" : "Monitor ID", + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", - "text" : "{snapname}" - } - ], - "info" : { - "GET" : { - "description" : "List all snapshots.", - "method" : "GET", - "name" : "list", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create Ceph Monitor and Manager", + "method" : "POST", + "name" : "createmon", "parameters" : { "additionalProperties" : 0, "properties" : { + "mon-address" : { + "description" : "Overwrites autodetected monitor IP address(es). Must be in the public network(s) of Ceph.", + "format" : "ip-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "monid" : { + "description" : "The ID for the monitor, when omitted the same as the nodename", + "maxLength" : 200, + "optional" : 1, + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" } } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Audit" + "Sys.Modify" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/mon/{monid}", + "text" : "{monid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get Ceph monitor list.", + "method" : "GET", + "name" : "listmon", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "addr" : { + "optional" : 1, + "type" : "string" + }, + "host" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string" + } + }, + "type" : "object" }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/mon", + "text" : "mon" + }, + { + "children" : [ + { + "info" : { "POST" : { - "description" : "Snapshot a container.", + "allowtoken" : 1, + "description" : "Create a Ceph filesystem", "method" : "POST", - "name" : "snapshot", + "name" : "createfs", "parameters" : { "additionalProperties" : 0, "properties" : { - "description" : { - "description" : "A textual description or comment.", + "add-storage" : { + "default" : 0, + "description" : "Configure the created CephFS as storage for this cluster.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "default" : "cephfs", + "description" : "The ceph filesystem name.", "optional" : 1, "type" : "string", "typetext" : "" @@ -14909,2514 +32856,4505 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, + "pg_num" : { + "default" : 128, + "description" : "Number of placement groups for the backing data pool. The metadata pool will use a quarter of this.", + "maximum" : 32768, + "minimum" : 8, + "optional" : 1, "type" : "integer", - "typetext" : " (1 - N)" + "typetext" : " (8 - 32768)" } } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Snapshot" + "Sys.Modify" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "description" : "the task ID.", "type" : "string" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot", - "text" : "snapshot" - }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/fs/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "data_pool" : { + "description" : "The name of the data pool.", + "type" : "string" + }, + "metadata_pool" : { + "description" : "The name of the metadata pool.", + "type" : "string" + }, + "name" : { + "description" : "The ceph filesystem name.", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/fs", + "text" : "fs" + }, + { + "children" : [ { - "children" : [ - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete rule.", - "method" : "DELETE", - "name" : "delete_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Get single rule data.", - "method" : "GET", - "name" : "get_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : null, - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Modify rule data.", - "method" : "PUT", - "name" : "update_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "moveto" : { - "description" : "Move rule to new position . Other arguments are ignored.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 1, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" - } - } + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy pool", + "method" : "DELETE", + "name" : "destroypool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "default" : 0, + "description" : "If true, destroys pool even if in use", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}", - "text" : "{pos}" - } - ], - "info" : { - "GET" : { - "description" : "List rules.", - "method" : "GET", - "name" : "get_rules", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "name" : { + "description" : "The name of the pool. It must be unique.", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "proxyto" : null, - "returns" : { - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{pos}", - "rel" : "child" - } - ], - "type" : "array" + "remove_ecprofile" : { + "default" : 1, + "description" : "Remove the erasure code profile. Defaults to true, if applicable.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "remove_storages" : { + "default" : 0, + "description" : "Remove all pveceph-managed storages configured for this pool", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } - }, - "POST" : { - "description" : "Create new rule.", - "method" : "POST", - "name" : "create_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "List pool settings.", + "method" : "GET", + "name" : "getpool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "The name of the pool. It must be unique.", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : null, - "returns" : { - "type" : "null" + "verbose" : { + "default" : 0, + "description" : "If enabled, will display additional data(eg. statistics).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", - "text" : "rules" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "application" : { + "default" : "rbd", + "description" : "The application of the pool.", + "enum" : [ + "rbd", + "cephfs", + "rgw" + ], + "optional" : 1, + "title" : "Application", + "type" : "string" + }, + "application_list" : { + "optional" : 1, + "title" : "Application", + "type" : "array" + }, + "autoscale_status" : { + "optional" : 1, + "title" : "Autoscale Status", + "type" : "object" + }, + "crush_rule" : { + "description" : "The rule to use for mapping object placement in the cluster.", + "optional" : 1, + "title" : "Crush Rule Name", + "type" : "string" + }, + "fast_read" : { + "title" : "Fast Read", + "type" : "boolean" + }, + "hashpspool" : { + "title" : "hashpspool", + "type" : "boolean" + }, + "id" : { + "title" : "ID", + "type" : "integer" + }, + "min_size" : { + "default" : 2, + "description" : "Minimum number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "title" : "Min Size", + "type" : "integer" + }, + "name" : { + "description" : "The name of the pool. It must be unique.", + "title" : "Name", + "type" : "string" + }, + "nodeep-scrub" : { + "title" : "nodeep-scrub", + "type" : "boolean" + }, + "nodelete" : { + "title" : "nodelete", + "type" : "boolean" + }, + "nopgchange" : { + "title" : "nopgchange", + "type" : "boolean" + }, + "noscrub" : { + "title" : "noscrub", + "type" : "boolean" + }, + "nosizechange" : { + "title" : "nosizechange", + "type" : "boolean" + }, + "pg_autoscale_mode" : { + "default" : "warn", + "description" : "The automatic PG scaling mode of the pool.", + "enum" : [ + "on", + "off", + "warn" + ], + "optional" : 1, + "title" : "PG Autoscale Mode", + "type" : "string" + }, + "pg_num" : { + "default" : 128, + "description" : "Number of placement groups.", + "maximum" : 32768, + "minimum" : 1, + "optional" : 1, + "title" : "PG Num", + "type" : "integer" + }, + "pg_num_min" : { + "description" : "Minimal number of placement groups.", + "maximum" : 32768, + "optional" : 1, + "title" : "min. PG Num", + "type" : "integer" + }, + "pgp_num" : { + "title" : "PGP num", + "type" : "integer" + }, + "size" : { + "default" : 3, + "description" : "Number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "title" : "Size", + "type" : "integer" + }, + "statistics" : { + "optional" : 1, + "title" : "Statistics", + "type" : "object" + }, + "target_size" : { + "description" : "The estimated target size of the pool for the PG autoscaler.", + "optional" : 1, + "pattern" : "^(\\d+(\\.\\d+)?)([KMGT])?$", + "title" : "PG Autoscale Target Size", + "type" : "string" + }, + "target_size_ratio" : { + "description" : "The estimated target ratio of the pool for the PG autoscaler.", + "optional" : 1, + "title" : "PG Autoscale Target Ratio", + "type" : "number" + }, + "use_gmt_hitset" : { + "title" : "use_gmt_hitset", + "type" : "boolean" + }, + "write_fadvise_dontneed" : { + "title" : "write_fadvise_dontneed", + "type" : "boolean" + } + }, + "type" : "object" + } }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Remove IP or Network alias.", - "method" : "DELETE", - "name" : "remove_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read alias.", - "method" : "GET", - "name" : "read_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update IP or Network alias.", - "method" : "PUT", - "name" : "update_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "rename" : { - "description" : "Rename an existing alias.", - "maxLength" : 64, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } + "PUT" : { + "allowtoken" : 1, + "description" : "Change POOL settings", + "method" : "PUT", + "name" : "setpool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "application" : { + "description" : "The application of the pool.", + "enum" : [ + "rbd", + "cephfs", + "rgw" + ], + "optional" : 1, + "title" : "Application", + "type" : "string" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}", - "text" : "{name}" - } - ], - "info" : { - "GET" : { - "description" : "List aliases", - "method" : "GET", - "name" : "get_aliases", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "crush_rule" : { + "description" : "The rule to use for mapping object placement in the cluster.", + "optional" : 1, + "title" : "Crush Rule Name", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "min_size" : { + "description" : "Minimum number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "title" : "Min Size", + "type" : "integer", + "typetext" : " (1 - 7)" + }, + "name" : { + "description" : "The name of the pool. It must be unique.", + "title" : "Name", + "type" : "string", + "typetext" : "" }, - "returns" : { - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "name" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pg_autoscale_mode" : { + "description" : "The automatic PG scaling mode of the pool.", + "enum" : [ + "on", + "off", + "warn" ], - "type" : "array" + "optional" : 1, + "title" : "PG Autoscale Mode", + "type" : "string" + }, + "pg_num" : { + "description" : "Number of placement groups.", + "maximum" : 32768, + "minimum" : 1, + "optional" : 1, + "title" : "PG Num", + "type" : "integer", + "typetext" : " (1 - 32768)" + }, + "pg_num_min" : { + "description" : "Minimal number of placement groups.", + "maximum" : 32768, + "optional" : 1, + "title" : "min. PG Num", + "type" : "integer", + "typetext" : " (-N - 32768)" + }, + "size" : { + "description" : "Number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "title" : "Size", + "type" : "integer", + "typetext" : " (1 - 7)" + }, + "target_size" : { + "description" : "The estimated target size of the pool for the PG autoscaler.", + "optional" : 1, + "pattern" : "^(\\d+(\\.\\d+)?)([KMGT])?$", + "title" : "PG Autoscale Target Size", + "type" : "string" + }, + "target_size_ratio" : { + "description" : "The estimated target ratio of the pool for the PG autoscaler.", + "optional" : 1, + "title" : "PG Autoscale Target Ratio", + "type" : "number", + "typetext" : "" } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/pools/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List all pools.", + "method" : "GET", + "name" : "lspools", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "autoscale_status" : { + "optional" : 1, + "title" : "Autoscale Status", + "type" : "object" }, - "POST" : { - "description" : "Create IP or Network Alias.", - "method" : "POST", - "name" : "create_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "Alias name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "bytes_used" : { + "title" : "Used", + "type" : "integer" + }, + "crush_rule" : { + "title" : "Crush Rule", + "type" : "integer" + }, + "crush_rule_name" : { + "title" : "Crush Rule Name", + "type" : "string" + }, + "min_size" : { + "title" : "Min Size", + "type" : "integer" + }, + "percent_used" : { + "title" : "%-Used", + "type" : "number" + }, + "pg_autoscale_mode" : { + "optional" : 1, + "title" : "PG Autoscale Mode", + "type" : "string" + }, + "pg_num" : { + "title" : "PG Num", + "type" : "integer" + }, + "pg_num_final" : { + "optional" : 1, + "title" : "Optimal PG Num", + "type" : "integer" + }, + "pg_num_min" : { + "optional" : 1, + "title" : "min. PG Num", + "type" : "integer" + }, + "pool" : { + "title" : "ID", + "type" : "integer" + }, + "pool_name" : { + "title" : "Name", + "type" : "string" + }, + "size" : { + "title" : "Size", + "type" : "integer" + }, + "target_size" : { + "optional" : 1, + "title" : "PG Autoscale Target Size", + "type" : "integer" + }, + "target_size_ratio" : { + "optional" : 1, + "title" : "PG Autoscale Target Ratio", + "type" : "number" + }, + "type" : { + "enum" : [ + "replicated", + "erasure", + "unknown" + ], + "title" : "Type", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pool_name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create Ceph pool", + "method" : "POST", + "name" : "createpool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "add_storages" : { + "default" : "0; for erasure coded pools: 1", + "description" : "Configure VM and CT storage using the new pool.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "application" : { + "default" : "rbd", + "description" : "The application of the pool.", + "enum" : [ + "rbd", + "cephfs", + "rgw" + ], + "optional" : 1, + "title" : "Application", + "type" : "string" + }, + "crush_rule" : { + "description" : "The rule to use for mapping object placement in the cluster.", + "optional" : 1, + "title" : "Crush Rule Name", + "type" : "string", + "typetext" : "" + }, + "erasure-coding" : { + "description" : "Create an erasure coded pool for RBD with an accompaning replicated pool for metadata storage. With EC, the common ceph options 'size', 'min_size' and 'crush_rule' parameters will be applied to the metadata pool.", + "format" : { + "device-class" : { + "description" : "CRUSH device class. Will create an erasure coded pool plus a replicated pool for metadata.", + "format_description" : "class", + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "failure-domain" : { + "default" : "host", + "description" : "CRUSH failure domain. Default is 'host'. Will create an erasure coded pool plus a replicated pool for metadata.", + "format_description" : "domain", + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "returns" : { - "type" : "null" + "k" : { + "description" : "Number of data chunks. Will create an erasure coded pool plus a replicated pool for metadata.", + "minimum" : 2, + "type" : "integer" + }, + "m" : { + "description" : "Number of coding chunks. Will create an erasure coded pool plus a replicated pool for metadata.", + "minimum" : 1, + "type" : "integer" + }, + "profile" : { + "description" : "Override the erasure code (EC) profile to use. Will create an erasure coded pool plus a replicated pool for metadata.", + "format_description" : "profile", + "optional" : 1, + "type" : "string" } + }, + "optional" : 1, + "type" : "string", + "typetext" : "k= ,m= [,device-class=] [,failure-domain=] [,profile=]" + }, + "min_size" : { + "default" : 2, + "description" : "Minimum number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "title" : "Min Size", + "type" : "integer", + "typetext" : " (1 - 7)" + }, + "name" : { + "description" : "The name of the pool. It must be unique.", + "title" : "Name", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pg_autoscale_mode" : { + "default" : "warn", + "description" : "The automatic PG scaling mode of the pool.", + "enum" : [ + "on", + "off", + "warn" + ], + "optional" : 1, + "title" : "PG Autoscale Mode", + "type" : "string" + }, + "pg_num" : { + "default" : 128, + "description" : "Number of placement groups.", + "maximum" : 32768, + "minimum" : 1, + "optional" : 1, + "title" : "PG Num", + "type" : "integer", + "typetext" : " (1 - 32768)" + }, + "pg_num_min" : { + "description" : "Minimal number of placement groups.", + "maximum" : 32768, + "optional" : 1, + "title" : "min. PG Num", + "type" : "integer", + "typetext" : " (-N - 32768)" + }, + "size" : { + "default" : 3, + "description" : "Number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "title" : "Size", + "type" : "integer", + "typetext" : " (1 - 7)" + }, + "target_size" : { + "description" : "The estimated target size of the pool for the PG autoscaler.", + "optional" : 1, + "pattern" : "^(\\d+(\\.\\d+)?)([KMGT])?$", + "title" : "PG Autoscale Target Size", + "type" : "string" + }, + "target_size_ratio" : { + "description" : "The estimated target ratio of the pool for the PG autoscaler.", + "optional" : 1, + "title" : "PG Autoscale Target Ratio", + "type" : "number", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/pools", + "text" : "pools" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get Ceph configuration.", + "method" : "GET", + "name" : "config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/config", + "text" : "config" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get Ceph configuration database.", + "method" : "GET", + "name" : "configdb", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "can_update_at_runtime" : { + "type" : "boolean" + }, + "level" : { + "type" : "string" + }, + "mask" : { + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "section" : { + "type" : "string" + }, + "value" : { + "type" : "string" } }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases", - "text" : "aliases" - }, - { - "children" : [ - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Remove IP or Network from IPSet.", - "method" : "DELETE", - "name" : "remove_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read IP or Network settings from IPSet.", - "method" : "GET", - "name" : "read_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "object" - } - }, - "PUT" : { - "description" : "Update IP or Network settings", - "method" : "PUT", - "name" : "update_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}", - "text" : "{cidr}" - } - ], - "info" : { - "DELETE" : { - "description" : "Delete IPSet", - "method" : "DELETE", - "name" : "delete_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "List IPSet content", - "method" : "GET", - "name" : "get_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{cidr}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Add IP or Network to IPSet.", - "method" : "POST", - "name" : "create_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias", - "type" : "string", - "typetext" : "" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/configdb", + "text" : "configdb" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Create initial ceph default configuration and setup symlinks.", + "method" : "POST", + "name" : "init", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cluster-network" : { + "description" : "Declare a separate cluster network, OSDs will routeheartbeat, object replication and recovery traffic over it", + "format" : "CIDR", + "maxLength" : 128, + "optional" : 1, + "requires" : "network", + "type" : "string", + "typetext" : "" + }, + "disable_cephx" : { + "default" : 0, + "description" : "Disable cephx authentication.\n\nWARNING: cephx is a security feature protecting against man-in-the-middle attacks. Only consider disabling cephx if your network is private!", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "min_size" : { + "default" : 2, + "description" : "Minimum number of available replicas per object to allow I/O", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 7)" + }, + "network" : { + "description" : "Use specific network for all ceph related traffic", + "format" : "CIDR", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pg_bits" : { + "default" : 6, + "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.", + "maximum" : 14, + "minimum" : 6, + "optional" : 1, + "type" : "integer", + "typetext" : " (6 - 14)" + }, + "size" : { + "default" : 3, + "description" : "Targeted number of replicas per object", + "maximum" : 7, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 7)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/init", + "text" : "init" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Stop ceph services.", + "method" : "POST", + "name" : "stop", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "service" : { + "default" : "ceph.target", + "description" : "Ceph service name.", + "optional" : 1, + "pattern" : "(ceph|mon|mds|osd|mgr)(\\.[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?)?", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/stop", + "text" : "stop" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Start ceph services.", + "method" : "POST", + "name" : "start", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "service" : { + "default" : "ceph.target", + "description" : "Ceph service name.", + "optional" : 1, + "pattern" : "(ceph|mon|mds|osd|mgr)(\\.[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?)?", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/start", + "text" : "start" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Restart ceph services.", + "method" : "POST", + "name" : "restart", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "service" : { + "default" : "ceph.target", + "description" : "Ceph service name.", + "optional" : 1, + "pattern" : "(mon|mds|osd|mgr)(\\.[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?)?", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/restart", + "text" : "restart" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get ceph status.", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/status", + "text" : "status" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get OSD crush map", + "method" : "GET", + "name" : "crush", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/crush", + "text" : "crush" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read ceph log", + "method" : "GET", + "name" : "log", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Syslog" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/log", + "text" : "log" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List ceph rules.", + "method" : "GET", + "name" : "rules", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/rules", + "text" : "rules" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph", + "text" : "ceph" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get the currently configured vzdump defaults.", + "method" : "GET", + "name" : "defaults", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "The user needs 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions for the specified storage (or default storage if none specified). Some properties are only returned when the user has 'Sys.Audit' permissions for the node.", + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "additionalProperties" : 0, + "properties" : { + "all" : { + "default" : 0, + "description" : "Backup all known guest systems on this host.", + "optional" : 1, + "type" : "boolean" + }, + "bwlimit" : { + "default" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "compress" : { + "default" : "0", + "description" : "Compress dump file.", + "enum" : [ + "0", + "1", + "gzip", + "lzo", + "zstd" + ], + "optional" : 1, + "type" : "string" + }, + "dumpdir" : { + "description" : "Store resulting files to specified directory.", + "optional" : 1, + "type" : "string" + }, + "exclude" : { + "description" : "Exclude specified guest systems (assumes --all)", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string" + }, + "exclude-path" : { + "description" : "Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory.", + "format" : "string-alist", + "optional" : 1, + "type" : "string" + }, + "ionice" : { + "default" : 7, + "description" : "Set CFQ ionice priority.", + "maximum" : 8, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "lockwait" : { + "default" : 180, + "description" : "Maximal time to wait for the global lock (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "mailnotification" : { + "default" : "always", + "description" : "Specify when to send an email", + "enum" : [ + "always", + "failure" + ], + "optional" : 1, + "type" : "string" + }, + "mailto" : { + "description" : "Comma-separated list of email addresses or users that should receive email notifications.", + "format" : "email-or-username-list", + "optional" : 1, + "type" : "string" + }, + "maxfiles" : { + "description" : "Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system.", + "minimum" : 1, + "optional" : 1, + "type" : "integer" + }, + "mode" : { + "default" : "snapshot", + "description" : "Backup mode.", + "enum" : [ + "snapshot", + "suspend", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "Only run if executed on this node.", + "format" : "pve-node", + "optional" : 1, + "type" : "string" + }, + "notes-template" : { + "description" : "Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future.", + "optional" : 1, + "requires" : "storage", + "type" : "string" + }, + "pigz" : { + "default" : 0, + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", + "optional" : 1, + "type" : "integer" + }, + "pool" : { + "description" : "Backup all known guest systems included in the specified pool.", + "optional" : 1, + "type" : "string" + }, + "protected" : { + "description" : "If true, mark backup(s) as protected.", + "optional" : 1, + "requires" : "storage", + "type" : "boolean" + }, + "prune-backups" : { + "default" : "keep-all=1", + "description" : "Use these retention options instead of those from the storage configuration.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string" + }, + "quiet" : { + "default" : 0, + "description" : "Be quiet.", + "optional" : 1, + "type" : "boolean" + }, + "remove" : { + "default" : 1, + "description" : "Prune older backups according to 'prune-backups'.", + "optional" : 1, + "type" : "boolean" + }, + "script" : { + "description" : "Use specified hook script.", + "optional" : 1, + "type" : "string" + }, + "stdexcludes" : { + "default" : 1, + "description" : "Exclude temporary files and logs.", + "optional" : 1, + "type" : "boolean" + }, + "stop" : { + "default" : 0, + "description" : "Stop running backup jobs on this host.", + "optional" : 1, + "type" : "boolean" + }, + "stopwait" : { + "default" : 10, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "storage" : { + "description" : "Store resulting file to this storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string" + }, + "tmpdir" : { + "description" : "Store temporary files to specified directory.", + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "The ID of the guest system you want to backup.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string" + }, + "zstd" : { + "default" : 1, + "description" : "Zstd threads. N=0 uses half of the available cores, N>0 uses N as thread count.", + "optional" : 1, + "type" : "integer" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/vzdump/defaults", + "text" : "defaults" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Extract configuration from vzdump backup archive.", + "method" : "GET", + "name" : "extractconfig", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Volume identifier", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "The user needs 'VM.Backup' permissions on the backed up guest ID, and 'Datastore.AllocateSpace' on the backup storage.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/vzdump/extractconfig", + "text" : "extractconfig" + } + ], + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Create backup.", + "method" : "POST", + "name" : "vzdump", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "all" : { + "default" : 0, + "description" : "Backup all known guest systems on this host.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bwlimit" : { + "default" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "compress" : { + "default" : "0", + "description" : "Compress dump file.", + "enum" : [ + "0", + "1", + "gzip", + "lzo", + "zstd" + ], + "optional" : 1, + "type" : "string" + }, + "dumpdir" : { + "description" : "Store resulting files to specified directory.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "exclude" : { + "description" : "Exclude specified guest systems (assumes --all)", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "exclude-path" : { + "description" : "Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory.", + "format" : "string-alist", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ionice" : { + "default" : 7, + "description" : "Set CFQ ionice priority.", + "maximum" : 8, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 8)" + }, + "lockwait" : { + "default" : 180, + "description" : "Maximal time to wait for the global lock (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "mailnotification" : { + "default" : "always", + "description" : "Specify when to send an email", + "enum" : [ + "always", + "failure" + ], + "optional" : 1, + "type" : "string" + }, + "mailto" : { + "description" : "Comma-separated list of email addresses or users that should receive email notifications.", + "format" : "email-or-username-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "maxfiles" : { + "description" : "Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "mode" : { + "default" : "snapshot", + "description" : "Backup mode.", + "enum" : [ + "snapshot", + "suspend", + "stop" + ], + "optional" : 1, + "type" : "string" + }, + "node" : { + "description" : "Only run if executed on this node.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "notes-template" : { + "description" : "Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future.", + "optional" : 1, + "requires" : "storage", + "type" : "string", + "typetext" : "" + }, + "pigz" : { + "default" : 0, + "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "pool" : { + "description" : "Backup all known guest systems included in the specified pool.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "protected" : { + "description" : "If true, mark backup(s) as protected.", + "optional" : 1, + "requires" : "storage", + "type" : "boolean", + "typetext" : "" + }, + "prune-backups" : { + "default" : "keep-all=1", + "description" : "Use these retention options instead of those from the storage configuration.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "quiet" : { + "default" : 0, + "description" : "Be quiet.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "remove" : { + "default" : 1, + "description" : "Prune older backups according to 'prune-backups'.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "script" : { + "description" : "Use specified hook script.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "stdexcludes" : { + "default" : 1, + "description" : "Exclude temporary files and logs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stdout" : { + "description" : "Write tar to stdout, not to a file.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stop" : { + "default" : 0, + "description" : "Stop running backup jobs on this host.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "stopwait" : { + "default" : 10, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "storage" : { + "description" : "Store resulting file to this storage.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tmpdir" : { + "description" : "Store temporary files to specified directory.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "The ID of the guest system you want to backup.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "zstd" : { + "default" : 1, + "description" : "Zstd threads. N=0 uses half of the available cores, N>0 uses N as thread count.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage. The 'maxfiles', 'prune-backups', 'tmpdir', 'dumpdir', 'script', 'bwlimit' and 'ionice' parameters are restricted to the 'root@pam' user.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/vzdump", + "text" : "vzdump" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read service properties", + "method" : "GET", + "name" : "service_state", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}", - "text" : "{name}" + "service" : { + "description" : "Service ID", + "enum" : [ + "chrony", + "corosync", + "cron", + "ksmtuned", + "postfix", + "pve-cluster", + "pve-firewall", + "pve-ha-crm", + "pve-ha-lrm", + "pvedaemon", + "pvefw-logger", + "pveproxy", + "pvescheduler", + "pvestatd", + "spiceproxy", + "sshd", + "syslog", + "systemd-journald", + "systemd-timesyncd" + ], + "type" : "string" + } } - ], - "info" : { - "GET" : { - "description" : "List IPSets", - "method" : "GET", - "name" : "ipset_index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/state", + "text" : "state" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Start service.", + "method" : "POST", + "name" : "service_start", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "service" : { + "description" : "Service ID", + "enum" : [ + "chrony", + "corosync", + "cron", + "ksmtuned", + "postfix", + "pve-cluster", + "pve-firewall", + "pve-ha-crm", + "pve-ha-lrm", + "pvedaemon", + "pvefw-logger", + "pveproxy", + "pvescheduler", + "pvestatd", + "spiceproxy", + "sshd", + "syslog", + "systemd-journald", + "systemd-timesyncd" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/start", + "text" : "start" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Stop service.", + "method" : "POST", + "name" : "service_stop", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "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" : 0, - "type" : "string" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } + "service" : { + "description" : "Service ID", + "enum" : [ + "chrony", + "corosync", + "cron", + "ksmtuned", + "postfix", + "pve-cluster", + "pve-firewall", + "pve-ha-crm", + "pve-ha-lrm", + "pvedaemon", + "pvefw-logger", + "pveproxy", + "pvescheduler", + "pvestatd", + "spiceproxy", + "sshd", + "syslog", + "systemd-journald", + "systemd-timesyncd" ], - "type" : "array" + "type" : "string" } - }, - "POST" : { - "description" : "Create new IPSet", - "method" : "POST", - "name" : "create_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "name" : { - "description" : "IP set name.", - "maxLength" : 64, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "rename" : { - "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, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/stop", + "text" : "stop" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Hard restart service. Use reload if you want to reduce interruptions.", + "method" : "POST", + "name" : "service_restart", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "service" : { + "description" : "Service ID", + "enum" : [ + "chrony", + "corosync", + "cron", + "ksmtuned", + "postfix", + "pve-cluster", + "pve-firewall", + "pve-ha-crm", + "pve-ha-lrm", + "pvedaemon", + "pvefw-logger", + "pveproxy", + "pvescheduler", + "pvestatd", + "spiceproxy", + "sshd", + "syslog", + "systemd-journald", + "systemd-timesyncd" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/restart", + "text" : "restart" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Reload service. Falls back to restart if service cannot be reloaded.", + "method" : "POST", + "name" : "service_reload", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "returns" : { - "type" : "null" + "service" : { + "description" : "Service ID", + "enum" : [ + "chrony", + "corosync", + "cron", + "ksmtuned", + "postfix", + "pve-cluster", + "pve-firewall", + "pve-ha-crm", + "pve-ha-lrm", + "pvedaemon", + "pvefw-logger", + "pveproxy", + "pvescheduler", + "pvestatd", + "spiceproxy", + "sshd", + "syslog", + "systemd-journald", + "systemd-timesyncd" + ], + "type" : "string" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", - "text" : "ipset" - }, - { - "info" : { - "GET" : { - "description" : "Get VM firewall options.", - "method" : "GET", - "name" : "get_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "properties" : { - "dhcp" : { - "description" : "Enable DHCP.", - "optional" : 1, - "type" : "boolean" - }, - "enable" : { - "description" : "Enable/disable firewall rules.", - "optional" : 1, - "type" : "boolean" - }, - "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, - "type" : "boolean" - }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", - "optional" : 1, - "type" : "boolean" - }, - "ndp" : { - "description" : "Enable NDP.", - "optional" : 1, - "type" : "boolean" - }, - "policy_in" : { - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - }, - "policy_out" : { - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - }, - "radv" : { - "description" : "Allow sending Router Advertisement.", - "optional" : 1, - "type" : "boolean" - } - }, - "type" : "object" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/reload", + "text" : "reload" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Directory index", + "method" : "GET", + "name" : "srvcmdidx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "service" : { + "description" : "Service ID", + "enum" : [ + "chrony", + "corosync", + "cron", + "ksmtuned", + "postfix", + "pve-cluster", + "pve-firewall", + "pve-ha-crm", + "pve-ha-lrm", + "pvedaemon", + "pvefw-logger", + "pveproxy", + "pvescheduler", + "pvestatd", + "spiceproxy", + "sshd", + "syslog", + "systemd-journald", + "systemd-timesyncd" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/services/{service}", + "text" : "{service}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Service list.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{service}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/services", + "text" : "services" + }, + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete subscription key of this node.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read subscription info.", + "method" : "GET", + "name" : "get", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Update subscription info.", + "method" : "POST", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "default" : 0, + "description" : "Always connect to server, even if we have up to date info inside local cache.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set subscription key.", + "method" : "PUT", + "name" : "set", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "key" : { + "description" : "Proxmox VE subscription key", + "maxLength" : 32, + "pattern" : "pve([1248])([cbsp])-[0-9a-f]{10}", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/subscription", + "text" : "subscription" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete network device configuration", + "method" : "DELETE", + "name" : "delete_network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "iface" : { + "description" : "Network interface name.", + "format" : "pve-iface", + "maxLength" : 20, + "minLength" : 2, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read network device configuration", + "method" : "GET", + "name" : "network_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "iface" : { + "description" : "Network interface name.", + "format" : "pve-iface", + "maxLength" : 20, + "minLength" : 2, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "method" : { + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update network device configuration", + "method" : "PUT", + "name" : "update_network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "address" : { + "description" : "IP address.", + "format" : "ipv4", + "optional" : 1, + "requires" : "netmask", + "type" : "string", + "typetext" : "" + }, + "address6" : { + "description" : "IP address.", + "format" : "ipv6", + "optional" : 1, + "requires" : "netmask6", + "type" : "string", + "typetext" : "" + }, + "autostart" : { + "description" : "Automatically start interface on boot.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bond-primary" : { + "description" : "Specify the primary interface for active-backup bond.", + "format" : "pve-iface", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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" + }, + "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" + }, + "bridge_ports" : { + "description" : "Specify the interfaces you want to add to your bridge.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bridge_vlan_aware" : { + "description" : "Enable bridge vlan support.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cidr" : { + "description" : "IPv4 CIDR.", + "format" : "CIDRv4", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "cidr6" : { + "description" : "IPv6 CIDR.", + "format" : "CIDRv6", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "comments" : { + "description" : "Comments", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "comments6" : { + "description" : "Comments", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "gateway" : { + "description" : "Default gateway address.", + "format" : "ipv4", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "gateway6" : { + "description" : "Default ipv6 gateway address.", + "format" : "ipv6", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "iface" : { + "description" : "Network interface name.", + "format" : "pve-iface", + "maxLength" : 20, + "minLength" : 2, + "type" : "string", + "typetext" : "" + }, + "mtu" : { + "description" : "MTU.", + "maximum" : 65520, + "minimum" : 1280, + "optional" : 1, + "type" : "integer", + "typetext" : " (1280 - 65520)" + }, + "netmask" : { + "description" : "Network mask.", + "format" : "ipv4mask", + "optional" : 1, + "requires" : "address", + "type" : "string", + "typetext" : "" + }, + "netmask6" : { + "description" : "Network mask.", + "maximum" : 128, + "minimum" : 0, + "optional" : 1, + "requires" : "address6", + "type" : "integer", + "typetext" : " (0 - 128)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "ovs_bonds" : { + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_bridge" : { + "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", + "format" : "pve-iface", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_options" : { + "description" : "OVS interface options.", + "maxLength" : 1024, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_ports" : { + "description" : "Specify the interfaces you want to add to your bridge.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_tag" : { + "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 4094)" + }, + "slaves" : { + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Network interface type", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "unknown" + ], + "type" : "string" + }, + "vlan-id" : { + "description" : "vlan-id for a custom named vlan interface (ifupdown2 only).", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 4094)" + }, + "vlan-raw-device" : { + "description" : "Specify the raw interface for the vlan interface.", + "format" : "pve-iface", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/network/{iface}", + "text" : "{iface}" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Revert network configuration changes.", + "method" : "DELETE", + "name" : "revert_network_changes", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "List available networks", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Only list specific interface types.", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "any_bridge" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{iface}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create network device configuration", + "method" : "POST", + "name" : "create_network", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "address" : { + "description" : "IP address.", + "format" : "ipv4", + "optional" : 1, + "requires" : "netmask", + "type" : "string", + "typetext" : "" + }, + "address6" : { + "description" : "IP address.", + "format" : "ipv6", + "optional" : 1, + "requires" : "netmask6", + "type" : "string", + "typetext" : "" + }, + "autostart" : { + "description" : "Automatically start interface on boot.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "bond-primary" : { + "description" : "Specify the primary interface for active-backup bond.", + "format" : "pve-iface", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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" + }, + "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" + }, + "bridge_ports" : { + "description" : "Specify the interfaces you want to add to your bridge.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bridge_vlan_aware" : { + "description" : "Enable bridge vlan support.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cidr" : { + "description" : "IPv4 CIDR.", + "format" : "CIDRv4", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "cidr6" : { + "description" : "IPv6 CIDR.", + "format" : "CIDRv6", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "comments" : { + "description" : "Comments", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "comments6" : { + "description" : "Comments", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "gateway" : { + "description" : "Default gateway address.", + "format" : "ipv4", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "gateway6" : { + "description" : "Default ipv6 gateway address.", + "format" : "ipv6", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "iface" : { + "description" : "Network interface name.", + "format" : "pve-iface", + "maxLength" : 20, + "minLength" : 2, + "type" : "string", + "typetext" : "" + }, + "mtu" : { + "description" : "MTU.", + "maximum" : 65520, + "minimum" : 1280, + "optional" : 1, + "type" : "integer", + "typetext" : " (1280 - 65520)" + }, + "netmask" : { + "description" : "Network mask.", + "format" : "ipv4mask", + "optional" : 1, + "requires" : "address", + "type" : "string", + "typetext" : "" + }, + "netmask6" : { + "description" : "Network mask.", + "maximum" : 128, + "minimum" : 0, + "optional" : 1, + "requires" : "address6", + "type" : "integer", + "typetext" : " (0 - 128)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "ovs_bonds" : { + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_bridge" : { + "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", + "format" : "pve-iface", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_options" : { + "description" : "OVS interface options.", + "maxLength" : 1024, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_ports" : { + "description" : "Specify the interfaces you want to add to your bridge.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ovs_tag" : { + "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 4094)" + }, + "slaves" : { + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Network interface type", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "unknown" + ], + "type" : "string" + }, + "vlan-id" : { + "description" : "vlan-id for a custom named vlan interface (ifupdown2 only).", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 4094)" + }, + "vlan-raw-device" : { + "description" : "Specify the raw interface for the vlan interface.", + "format" : "pve-iface", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Reload network configuration", + "method" : "PUT", + "name" : "reload_network_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/network", + "text" : "network" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read task log.", + "method" : "GET", + "name" : "read_task_log", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "default" : 50, + "description" : "The maximum amount of lines that should be printed.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "start" : { + "default" : 0, + "description" : "The line number to start printing at.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "upid" : { + "description" : "The task's unique ID.", + "type" : "string", + "typetext" : "" } - }, - "PUT" : { - "description" : "Set Firewall options.", - "method" : "PUT", - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dhcp" : { - "description" : "Enable DHCP.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "enable" : { - "description" : "Enable/disable firewall rules.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "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, - "type" : "boolean", - "typetext" : "" - }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "ndp" : { - "description" : "Enable NDP.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "policy_in" : { - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - }, - "policy_out" : { - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "optional" : 1, - "type" : "string" - }, - "radv" : { - "description" : "Allow sending Router Advertisement.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + } + }, + "permissions" : { + "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if they aren't the owner of the task.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/tasks/{upid}/log", + "text" : "log" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read task status.", + "method" : "GET", + "name" : "read_task_status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" + "upid" : { + "description" : "The task's unique ID.", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/options", - "text" : "options" - }, - { - "info" : { - "GET" : { - "description" : "Read firewall log", - "method" : "GET", - "name" : "log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "permissions" : { + "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if they are not the owner of the task.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "exitstatus" : { + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] + "id" : { + "type" : "string" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" + "node" : { + "type" : "string" + }, + "pid" : { + "type" : "integer" + }, + "starttime" : { + "type" : "number" + }, + "status" : { + "enum" : [ + "running", + "stopped" + ], + "type" : "string" + }, + "type" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/tasks/{upid}/status", + "text" : "status" + } + ], + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Stop a task.", + "method" : "DELETE", + "name" : "stop_task", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "upid" : { + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "The user needs 'Sys.Modify' permissions on '/nodes/' if they aren't the owner of the task.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "", + "method" : "GET", + "name" : "upid_index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "upid" : { + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/tasks/{upid}", + "text" : "{upid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read task list for one node (finished tasks).", + "method" : "GET", + "name" : "node_tasks", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "errors" : { + "default" : 0, + "description" : "Only list tasks with a status of ERROR.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "limit" : { + "default" : 50, + "description" : "Only list this amount of tasks.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "since" : { + "description" : "Only list tasks since this UNIX epoch.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "source" : { + "default" : "archive", + "description" : "List archived, active or all tasks.", + "enum" : [ + "archive", + "active", + "all" + ], + "optional" : 1, + "type" : "string" + }, + "start" : { + "default" : 0, + "description" : "List tasks beginning from this offset.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "statusfilter" : { + "description" : "List of Task States that should be returned.", + "format" : "pve-task-status-type-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "typefilter" : { + "description" : "Only list tasks of this type (e.g., vzstart, vzdump).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "until" : { + "description" : "Only list tasks until this UNIX epoch.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "userfilter" : { + "description" : "Only list tasks from this user.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "Only list tasks for this VM.", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/ (the the task runs on).", + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "endtime" : { + "optional" : 1, + "title" : "Endtime", + "type" : "integer" + }, + "id" : { + "title" : "ID", + "type" : "string" + }, + "node" : { + "title" : "Node", + "type" : "string" + }, + "pid" : { + "title" : "PID", + "type" : "integer" + }, + "pstart" : { + "type" : "integer" + }, + "starttime" : { + "title" : "Starttime", + "type" : "integer" + }, + "status" : { + "optional" : 1, + "title" : "Status", + "type" : "string" + }, + "type" : { + "title" : "Type", + "type" : "string" + }, + "upid" : { + "title" : "UPID", + "type" : "string" + }, + "user" : { + "title" : "User", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{upid}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/tasks", + "text" : "tasks" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Scan remote NFS server.", + "method" : "GET", + "name" : "nfsscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "server" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "options" : { + "description" : "NFS export options.", + "type" : "string" + }, + "path" : { + "description" : "The exported path.", + "type" : "string" } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/log", - "text" : "log" + "type" : "object" }, - { - "info" : { - "GET" : { - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "method" : "GET", - "name" : "refs", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Only list references of specified type.", - "enum" : [ - "alias", - "ipset" - ], - "optional" : 1, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "items" : { - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "type" : { - "enum" : [ - "alias", - "ipset" - ], - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - } - } + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/nfs", + "text" : "nfs" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Scan remote CIFS server.", + "method" : "GET", + "name" : "cifsscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "domain" : { + "description" : "SMB domain (Workgroup).", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs", - "text" : "refs" - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "user" : "all" + "password" : { + "description" : "User password.", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" + "server" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", + "type" : "string", + "typetext" : "" + }, + "username" : { + "description" : "User name.", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/firewall", - "text" : "firewall" - }, - { - "info" : { - "GET" : { - "description" : "Read VM RRD statistics (returns PNG)", - "method" : "GET", - "name" : "rrd", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "optional" : 1, - "type" : "string" - }, - "ds" : { - "description" : "The list of datasources you want to display.", - "format" : "pve-configid-list", - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "description" : { + "description" : "Descriptive text from server.", + "type" : "string" + }, + "share" : { + "description" : "The cifs share name.", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/cifs", + "text" : "cifs" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Scan remote Proxmox Backup Server.", + "method" : "GET", + "name" : "pbsscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "optional" : 1, + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" }, - "protected" : 1, - "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, - "type" : "object" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "User password or API token secret.", + "type" : "string", + "typetext" : "" + }, + "port" : { + "default" : 8007, + "description" : "Optional port.", + "maximum" : 65535, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 65535)" + }, + "server" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", + "type" : "string", + "typetext" : "" + }, + "username" : { + "description" : "User-name or API token-ID.", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/rrd", - "text" : "rrd" - }, - { - "info" : { - "GET" : { - "description" : "Read VM RRD statistics", - "method" : "GET", - "name" : "rrddata", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "comment" : { + "description" : "Comment from server.", + "optional" : 1, + "type" : "string" + }, + "store" : { + "description" : "The datastore name.", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/pbs", + "text" : "pbs" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Scan remote GlusterFS server.", + "method" : "GET", + "name" : "glusterfsscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" + "server" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/rrddata", - "text" : "rrddata" - }, - { - "info" : { - "POST" : { - "description" : "Creates a TCP VNC proxy connections.", - "method" : "POST", - "name" : "vncproxy", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "height" : { - "description" : "sets the height of the console in pixels.", - "maximum" : 2160, - "minimum" : 16, - "optional" : 1, - "type" : "integer", - "typetext" : " (16 - 2160)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "websocket" : { - "description" : "use websocket instead of standard VNC.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "width" : { - "description" : "sets the width of the console in pixels.", - "maximum" : 4096, - "minimum" : 16, - "optional" : 1, - "type" : "integer", - "typetext" : " (16 - 4096)" - } + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "volname" : { + "description" : "The volume name.", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/glusterfs", + "text" : "glusterfs" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Scan remote iSCSI server.", + "method" : "GET", + "name" : "iscsiscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "returns" : { - "additionalProperties" : 0, - "properties" : { - "cert" : { - "type" : "string" - }, - "port" : { - "type" : "integer" - }, - "ticket" : { - "type" : "string" - }, - "upid" : { - "type" : "string" - }, - "user" : { - "type" : "string" - } - } + "portal" : { + "description" : "The iSCSI portal (IP or DNS name with optional port).", + "format" : "pve-storage-portal-dns", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/vncproxy", - "text" : "vncproxy" - }, - { - "info" : { - "GET" : { - "description" : "Opens a weksocket for VNC traffic.", - "method" : "GET", - "name" : "vncwebsocket", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "port" : { - "description" : "Port number returned by previous vncproxy call.", - "maximum" : 5999, - "minimum" : 5900, - "type" : "integer", - "typetext" : " (5900 - 5999)" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", - "maxLength" : 512, - "type" : "string", - "typetext" : "" - } + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "portal" : { + "description" : "The iSCSI portal name.", + "type" : "string" + }, + "target" : { + "description" : "The iSCSI target name.", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ], - "description" : "You also need to pass a valid ticket (vncticket)." - }, - "returns" : { - "properties" : { - "port" : { - "type" : "string" - } - }, - "type" : "object" + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/iscsi", + "text" : "iscsi" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List local LVM volume groups.", + "method" : "GET", + "name" : "lvmscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket", - "text" : "vncwebsocket" - }, - { - "info" : { - "POST" : { - "description" : "Returns a SPICE configuration to connect to the CT.", - "method" : "POST", - "name" : "spiceproxy", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "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).", - "format" : "address", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "vg" : { + "description" : "The LVM logical volume group name.", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/lvm", + "text" : "lvm" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List local LVM Thin Pools.", + "method" : "GET", + "name" : "lvmthinscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 1, - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", - "properties" : { - "host" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "proxy" : { - "type" : "string" - }, - "tls-port" : { - "type" : "integer" - }, - "type" : { - "type" : "string" - } - } + "vg" : { + "maxLength" : 100, + "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+", + "type" : "string" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy", - "text" : "spiceproxy" - }, - { - "info" : { - "POST" : { - "description" : "Migrate the container to another node. Creates a new migration task.", - "method" : "POST", - "name" : "migrate_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "force" : { - "description" : "Force migration despite local bind / device mounts. NOTE: deprecated, use 'shared' property of mount point instead.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "online" : { - "description" : "Use online/live migration.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "restart" : { - "description" : "Use restart migration", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "target" : { - "description" : "Target node.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "timeout" : { - "default" : 180, - "description" : "Timeout in seconds for shutdown for restart migration", - "optional" : 1, - "type" : "integer", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "lv" : { + "description" : "The LVM Thin Pool name (LVM logical volume).", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Migrate" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", - "type" : "string" + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/lvmthin", + "text" : "lvmthin" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Scan zfs pool list on local node.", + "method" : "GET", + "name" : "zfsscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/migrate", - "text" : "migrate" + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "pool" : { + "description" : "ZFS pool name.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/zfs", + "text" : "zfs" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Index of available scan methods", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "method" : { + "type" : "string" + } + }, + "type" : "object" }, + "links" : [ + { + "href" : "{method}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/scan", + "text" : "scan" + }, + { + "children" : [ + { + "children" : [ { - "info" : { - "GET" : { - "description" : "Check if feature for virtual machine is available.", - "method" : "GET", - "name" : "vm_feature", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "feature" : { - "description" : "Feature to check.", - "enum" : [ - "snapshot" - ], - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List mediated device types for given PCI device.", + "method" : "GET", + "name" : "mdevscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pciid" : { + "description" : "The PCI ID to list the mdev types for.", + "pattern" : "(?:[0-9a-fA-F]{4}:)?[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\\.[0-9a-fA-F]", + "type" : "string" + } + } }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "available" : { + "description" : "The number of still available instances of this type.", + "type" : "integer" + }, + "description" : { + "type" : "string" + }, + "type" : { + "description" : "The name of the mdev type.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "properties" : { - "hasFeature" : { - "type" : "boolean" - } - }, - "type" : "object" - } + }, + "leaf" : 1, + "path" : "/nodes/{node}/hardware/pci/{pciid}/mdev", + "text" : "mdev" } - }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/feature", - "text" : "feature" - }, - { + ], "info" : { - "POST" : { - "description" : "Create a Template.", - "method" : "POST", - "name" : "template", + "GET" : { + "allowtoken" : 1, + "description" : "Index of available pci methods", + "method" : "GET", + "name" : "pciindex", "parameters" : { "additionalProperties" : 0, "properties" : { - "experimental" : { - "default" : 0, - "description" : "The template feature is experimental, set this flag if you know what you are doing.", - "type" : "boolean", - "typetext" : "" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "pciid" : { + "pattern" : "(?:[0-9a-fA-F]{4}:)?[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\\.[0-9a-fA-F]", + "type" : "string" } } }, "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ], - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" + "user" : "all" }, - "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "null" + "items" : { + "properties" : { + "method" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{method}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/template", - "text" : "template" + "leaf" : 0, + "path" : "/nodes/{node}/hardware/pci/{pciid}", + "text" : "{pciid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List local PCI devices.", + "method" : "GET", + "name" : "pciscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pci-class-blacklist" : { + "default" : "05;06;0b", + "description" : "A list of blacklisted PCI classes, which will not be returned. Following are filtered by default: Memory Controller (05), Bridge (06) and Processor (0b).", + "format" : "string-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "verbose" : { + "default" : 1, + "description" : "If disabled, does only print the PCI IDs. Otherwise, additional information like vendor and device will be returned.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "class" : { + "description" : "The PCI Class of the device.", + "type" : "string" + }, + "device" : { + "description" : "The Device ID.", + "type" : "string" + }, + "device_name" : { + "optional" : 1, + "type" : "string" + }, + "id" : { + "description" : "The PCI ID.", + "type" : "string" + }, + "iommugroup" : { + "description" : "The IOMMU group in which the device is in. If no IOMMU group is detected, it is set to -1.", + "type" : "integer" + }, + "mdev" : { + "description" : "If set, marks that the device is capable of creating mediated devices.", + "optional" : 1, + "type" : "boolean" + }, + "subsystem_device" : { + "description" : "The Subsystem Device ID.", + "optional" : 1, + "type" : "string" + }, + "subsystem_device_name" : { + "optional" : 1, + "type" : "string" + }, + "subsystem_vendor" : { + "description" : "The Subsystem Vendor ID.", + "optional" : 1, + "type" : "string" + }, + "subsystem_vendor_name" : { + "optional" : 1, + "type" : "string" + }, + "vendor" : { + "description" : "The Vendor ID.", + "type" : "string" + }, + "vendor_name" : { + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/hardware/pci", + "text" : "pci" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List local USB devices.", + "method" : "GET", + "name" : "usbscan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "busnum" : { + "type" : "integer" + }, + "class" : { + "type" : "integer" + }, + "devnum" : { + "type" : "integer" + }, + "level" : { + "type" : "integer" + }, + "manufacturer" : { + "optional" : 1, + "type" : "string" + }, + "port" : { + "type" : "integer" + }, + "prodid" : { + "type" : "string" + }, + "product" : { + "optional" : 1, + "type" : "string" + }, + "serial" : { + "optional" : 1, + "type" : "string" + }, + "speed" : { + "type" : "string" + }, + "usbpath" : { + "optional" : 1, + "type" : "string" + }, + "vendid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/hardware/usb", + "text" : "usb" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Index of hardware types", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "type" : { + "type" : "string" + } + }, + "type" : "object" }, + "links" : [ + { + "href" : "{type}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/hardware", + "text" : "hardware" + }, + { + "children" : [ + { + "children" : [ { "info" : { - "POST" : { - "description" : "Create a container clone/copy", - "method" : "POST", - "name" : "clone_vm", + "GET" : { + "allowtoken" : 1, + "description" : "List all custom and default CPU models.", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { - "description" : { - "description" : "Description for the new CT.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "experimental" : { - "default" : 0, - "description" : "The clone feature is experimental, set this flag if you know what you are doing.", - "type" : "boolean", - "typetext" : "" - }, - "full" : { - "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.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "hostname" : { - "description" : "Set a hostname for the new CT.", - "format" : "dns-name", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "newid" : { - "description" : "VMID for the clone.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "pool" : { - "description" : "Add the new CT to the specified pool.", - "format" : "pve-poolid", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "Target storage for full clone.", - "format" : "pve-storage-id", - "optional" : 1, - "requires" : "full", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" } } }, "permissions" : { - "check" : [ - "and", - [ - "perm", - "/vms/{vmid}", - [ - "VM.Clone" - ] - ], - [ - "or", - [ - "perm", - "/vms/{newid}", - [ - "VM.Allocate" - ] - ], - [ - "perm", - "/pool/{pool}", - [ - "VM.Allocate" - ], - "require_param", - "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." + "description" : "Only returns custom models when the current user has Sys.Audit on /nodes.", + "user" : "all" }, - "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "string" + "items" : { + "properties" : { + "custom" : { + "description" : "True if this is a custom CPU model.", + "type" : "boolean" + }, + "name" : { + "description" : "Name of the CPU model. Identifies it for subsequent API calls. Prefixed with 'custom-' for custom models.", + "type" : "string" + }, + "vendor" : { + "description" : "CPU vendor visible to the guest when this model is selected. Vendor of 'reported-model' in case of custom models.", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" } } }, "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/clone", - "text" : "clone" + "path" : "/nodes/{node}/capabilities/qemu/cpu", + "text" : "cpu" }, { "info" : { - "PUT" : { - "description" : "Resize a container mount point.", - "method" : "PUT", - "name" : "resize_vm", + "GET" : { + "allowtoken" : 1, + "description" : "Get available QEMU/KVM machine types.", + "method" : "GET", + "name" : "types", "parameters" : { "additionalProperties" : 0, "properties" : { - "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", - "typetext" : "" - }, - "disk" : { - "description" : "The disk you want to resize.", - "enum" : [ - "rootfs", - "mp0", - "mp1", - "mp2", - "mp3", - "mp4", - "mp5", - "mp6", - "mp7", - "mp8", - "mp9" - ], - "type" : "string" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "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.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" } } }, "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ], - "any", - 1 - ] + "user" : "all" }, - "protected" : 1, "proxyto" : "node", "returns" : { - "description" : "the task ID.", - "type" : "string" + "items" : { + "additionalProperties" : 1, + "properties" : { + "id" : { + "description" : "Full name of machine type and version.", + "type" : "string" + }, + "type" : { + "description" : "The machine type.", + "enum" : [ + "q35", + "i440fx" + ], + "type" : "string" + }, + "version" : { + "description" : "The machine version.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } }, "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/resize", - "text" : "resize" + "path" : "/nodes/{node}/capabilities/qemu/machines", + "text" : "machines" } ], "info" : { - "DELETE" : { - "description" : "Destroy the container (also delete all uses files).", - "method" : "DELETE", - "name" : "destroy_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - }, "GET" : { - "description" : "Directory index", + "allowtoken" : 1, + "description" : "QEMU capabilities index.", "method" : "GET", - "name" : "vmdiridx", + "name" : "qemu_caps_index", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -17425,32 +37363,20 @@ var pveapi = [ "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" } } }, "permissions" : { "user" : "all" }, - "proxyto" : "node", "returns" : { "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, + "properties" : {}, "type" : "object" }, "links" : [ { - "href" : "{subdir}", + "href" : "{name}", "rel" : "child" } ], @@ -17459,15 +37385,16 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}", - "text" : "{vmid}" + "path" : "/nodes/{node}/capabilities/qemu", + "text" : "qemu" } ], "info" : { "GET" : { - "description" : "LXC container index (per node).", + "allowtoken" : 1, + "description" : "Node capabilities index.", "method" : "GET", - "name" : "vmlist", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -17480,11 +37407,8 @@ var pveapi = [ } }, "permissions" : { - "description" : "Only list CTs where you have VM.Audit permissons on /vms/.", "user" : "all" }, - "protected" : 1, - "proxyto" : "node", "returns" : { "items" : { "properties" : {}, @@ -17492,540 +37416,305 @@ var pveapi = [ }, "links" : [ { - "href" : "{vmid}", + "href" : "{name}", "rel" : "child" } ], "type" : "array" } - }, - "POST" : { - "description" : "Create or restore a container.", - "method" : "POST", - "name" : "create_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "arch" : { - "default" : "amd64", - "description" : "OS architecture type.", - "enum" : [ - "amd64", - "i386" - ], - "optional" : 1, - "type" : "string" - }, - "cmode" : { - "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).", - "enum" : [ - "shell", - "console", - "tty" - ], - "optional" : 1, - "type" : "string" - }, - "console" : { - "default" : 1, - "description" : "Attach a console device (/dev/console) to the container.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "cores" : { - "description" : "The number of cores assigned to the container. A container can use all available cores by default.", - "maximum" : 128, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 128)" - }, - "cpulimit" : { - "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.", - "maximum" : 128, - "minimum" : 0, - "optional" : 1, - "type" : "number", - "typetext" : " (0 - 128)" - }, - "cpuunits" : { - "default" : 1024, - "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.", - "maximum" : 500000, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 500000)" - }, - "description" : { - "description" : "Container description. Only used on the configuration web interface.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "force" : { - "description" : "Allow to overwrite existing container.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "hostname" : { - "description" : "Set a host name for the container.", - "format" : "dns-name", - "maxLength" : 255, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ignore-unpack-errors" : { - "description" : "Ignore errors when extracting the template.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "lock" : { - "description" : "Lock/unlock the VM.", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "optional" : 1, - "type" : "string" - }, - "memory" : { - "default" : 512, - "description" : "Amount of RAM for the VM in MB.", - "minimum" : 16, - "optional" : 1, - "type" : "integer", - "typetext" : " (16 - N)" - }, - "mp[n]" : { - "description" : "Use volume as container mount point.", - "format" : { - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "optional" : 1, - "type" : "boolean" - }, - "backup" : { - "description" : "Whether to include the mount point in backups.", - "optional" : 1, - "type" : "boolean", - "verbose_description" : "Whether to include the mount point in backups (only used for volume mount points)." - }, - "mp" : { - "description" : "Path to the mount point as seen from inside the container (must not contain symlinks).", - "format" : "pve-lxc-mp-string", - "format_description" : "Path", - "type" : "string", - "verbose_description" : "Path to the mount point as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons." - }, - "quota" : { - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "optional" : 1, - "type" : "boolean" - }, - "replicate" : { - "default" : 1, - "description" : "Will include this volume to a storage replica job.", - "optional" : 1, - "type" : "boolean" - }, - "ro" : { - "description" : "Read-only mount point", - "optional" : 1, - "type" : "boolean" - }, - "shared" : { - "default" : 0, - "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", - "optional" : 1, - "type" : "boolean", - "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" - }, - "size" : { - "description" : "Volume size (read only value).", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, - "type" : "string" - }, - "volume" : { - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "format" : "pve-lxc-mp-string", - "format_description" : "volume", - "type" : "string" - } - }, - "optional" : 1, - "type" : "string", - "typetext" : "[volume=] ,mp= [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" - }, - "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.", - "format" : "address-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "net[n]" : { - "description" : "Specifies network interfaces for the container.", - "format" : { - "bridge" : { - "description" : "Bridge to attach the network device to.", - "format_description" : "bridge", - "optional" : 1, - "pattern" : "[-_.\\w\\d]+", - "type" : "string" - }, - "firewall" : { - "description" : "Controls whether this interface's firewall rules should be used.", - "optional" : 1, - "type" : "boolean" - }, - "gw" : { - "description" : "Default gateway for IPv4 traffic.", - "format" : "ipv4", - "format_description" : "GatewayIPv4", - "optional" : 1, - "type" : "string" - }, - "gw6" : { - "description" : "Default gateway for IPv6 traffic.", - "format" : "ipv6", - "format_description" : "GatewayIPv6", - "optional" : 1, - "type" : "string" - }, - "hwaddr" : { - "description" : "The interface MAC address. This is dynamically allocated by default, but you can set that statically if needed, for example to always have the same link-local IPv6 address. (lxc.network.hwaddr)", - "format_description" : "XX:XX:XX:XX:XX:XX", - "optional" : 1, - "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", - "type" : "string" - }, - "ip" : { - "description" : "IPv4 address in CIDR format.", - "format" : "pve-ipv4-config", - "format_description" : "IPv4Format/CIDR", - "optional" : 1, - "type" : "string" - }, - "ip6" : { - "description" : "IPv6 address in CIDR format.", - "format" : "pve-ipv6-config", - "format_description" : "IPv6Format/CIDR", - "optional" : 1, - "type" : "string" - }, - "mtu" : { - "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", - "minimum" : 64, - "optional" : 1, - "type" : "integer" - }, - "name" : { - "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", - "format_description" : "string", - "pattern" : "[-_.\\w\\d]+", - "type" : "string" - }, - "rate" : { - "description" : "Apply rate limiting to the interface", - "format_description" : "mbps", - "optional" : 1, - "type" : "number" - }, - "tag" : { - "description" : "VLAN tag for this interface.", - "maximum" : 4094, - "minimum" : 1, - "optional" : 1, - "type" : "integer" - }, - "trunks" : { - "description" : "VLAN ids to pass through the interface", - "format_description" : "vlanid[;vlanid...]", - "optional" : 1, - "pattern" : "(?^:\\d+(?:;\\d+)*)", - "type" : "string" - }, - "type" : { - "description" : "Network interface type.", - "enum" : [ - "veth" - ], - "optional" : 1, - "type" : "string" - } - }, - "optional" : 1, - "type" : "string", - "typetext" : "name= [,bridge=] [,firewall=<1|0>] [,gw=] [,gw6=] [,hwaddr=] [,ip=] [,ip6=] [,mtu=] [,rate=] [,tag=] [,trunks=] [,type=]" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "onboot" : { - "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "ostemplate" : { - "description" : "The OS template or backup file.", - "maxLength" : 255, - "type" : "string", - "typetext" : "" - }, - "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", - "gentoo", - "unmanaged" - ], - "optional" : 1, - "type" : "string" - }, - "password" : { - "description" : "Sets root password inside container.", - "minLength" : 5, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "pool" : { - "description" : "Add the VM to the specified pool.", - "format" : "pve-poolid", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "protection" : { - "default" : 0, - "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "restore" : { - "description" : "Mark this as restore task.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "rootfs" : { - "description" : "Use volume as container root.", - "format" : { - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "optional" : 1, - "type" : "boolean" - }, - "quota" : { - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "optional" : 1, - "type" : "boolean" - }, - "replicate" : { - "default" : 1, - "description" : "Will include this volume to a storage replica job.", - "optional" : 1, - "type" : "boolean" - }, - "ro" : { - "description" : "Read-only mount point", - "optional" : 1, - "type" : "boolean" - }, - "shared" : { - "default" : 0, - "description" : "Mark this non-volume mount point as available on multiple nodes (see 'nodes')", - "optional" : 1, - "type" : "boolean", - "verbose_description" : "Mark this non-volume mount point as available on all nodes.\n\nWARNING: This option does not share the mount point automatically, it assumes it is shared already!" + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/capabilities", + "text" : "capabilities" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Prune backups. Only those using the standard naming scheme are considered.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "prune-backups" : { + "description" : "Use these retention options instead of those from the storage configuration.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Either 'qemu' or 'lxc'. Only consider backups for guests of this type.", + "enum" : [ + "qemu", + "lxc" + ], + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "Only prune backups for this VM.", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "size" : { - "description" : "Volume size (read only value).", - "format" : "disk-size", - "format_description" : "DiskSize", - "optional" : 1, - "type" : "string" + "permissions" : { + "description" : "You need the 'Datastore.Allocate' privilege on the storage (or if a VM ID is specified, 'Datastore.AllocateSpace' and 'VM.Backup' for the VM).", + "user" : "all" }, - "volume" : { - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "format" : "pve-lxc-mp-string", - "format_description" : "volume", + "protected" : 1, + "proxyto" : "node", + "returns" : { "type" : "string" } }, - "optional" : 1, - "type" : "string", - "typetext" : "[volume=] [,acl=<1|0>] [,quota=<1|0>] [,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=]" - }, - "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.", - "format" : "dns-name-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ssh-public-keys" : { - "description" : "Setup public SSH keys (one key per line, OpenSSH format).", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-startup-order", - "optional" : 1, - "type" : "string", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " - }, - "storage" : { - "default" : "local", - "description" : "Default Storage.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "swap" : { - "default" : 512, - "description" : "Amount of SWAP for the VM in MB.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "template" : { - "default" : 0, - "description" : "Enable/disable Template.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "tty" : { - "default" : 2, - "description" : "Specify the number of tty available to the container", - "maximum" : 6, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 6)" - }, - "unprivileged" : { - "default" : 0, - "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "unused[n]" : { - "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.", - "format" : "pve-volume-id", - "optional" : 1, - "type" : "string", - "typetext" : "" + "GET" : { + "allowtoken" : 1, + "description" : "Get prune information for backups. NOTE: this is only a preview and might not be what a subsequent prune call does if backups are removed/added in the meantime.", + "method" : "GET", + "name" : "dryrun", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "prune-backups" : { + "description" : "Use these retention options instead of those from the storage configuration.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Either 'qemu' or 'lxc'. Only consider backups for guests of this type.", + "enum" : [ + "qemu", + "lxc" + ], + "optional" : 1, + "type" : "string" + }, + "vmid" : { + "description" : "Only consider backups for this guest.", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "ctime" : { + "description" : "Creation time of the backup (seconds since the UNIX epoch).", + "type" : "integer" + }, + "mark" : { + "description" : "Whether the backup would be kept or removed. Backups that are protected or don't use the standard naming scheme are not removed.", + "enum" : [ + "keep", + "remove", + "protected", + "renamed" + ], + "type" : "string" + }, + "type" : { + "description" : "One of 'qemu', 'lxc', 'openvz' or 'unknown'.", + "type" : "string" + }, + "vmid" : { + "description" : "The VM the backup belongs to.", + "optional" : 1, + "type" : "integer" + }, + "volid" : { + "description" : "Backup volume ID.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "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" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/lxc", - "text" : "lxc" - }, - { - "children" : [ - { - "children" : [ + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/prunebackups", + "text" : "prunebackups" + }, { "children" : [ { "info" : { - "POST" : { - "description" : "ceph osd in", - "method" : "POST", - "name" : "in", + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete volume", + "method" : "DELETE", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { + "delay" : { + "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.", + "maximum" : 30, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 30)" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "osdid" : { - "description" : "OSD ID", - "type" : "integer", - "typetext" : "" + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Volume identifier", + "type" : "string", + "typetext" : "" } } }, "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "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" }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "null" + "optional" : 1, + "type" : "string" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/osd/{osdid}/in", - "text" : "in" - }, - { - "info" : { + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get volume attributes", + "method" : "GET", + "name" : "info", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Volume identifier", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "You need read access for the volume.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "format" : { + "description" : "Format identifier ('raw', 'qcow2', 'subvol', 'iso', 'tgz' ...)", + "type" : "string" + }, + "notes" : { + "description" : "Optional notes.", + "optional" : 1, + "type" : "string" + }, + "path" : { + "description" : "The Path", + "type" : "string" + }, + "protected" : { + "description" : "Protection status. Currently only supported for backups.", + "optional" : 1, + "type" : "boolean" + }, + "size" : { + "description" : "Volume size in bytes.", + "renderer" : "bytes", + "type" : "integer" + }, + "used" : { + "description" : "Used space. Please note that most storage plugins do not report anything useful here.", + "renderer" : "bytes", + "type" : "integer" + } + }, + "type" : "object" + } + }, "POST" : { - "description" : "ceph osd out", + "allowtoken" : 1, + "description" : "Copy a volume. This is experimental code - do not use.", "method" : "POST", - "name" : "out", + "name" : "copy", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -18035,21 +37724,81 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "osdid" : { - "description" : "OSD ID", - "type" : "integer", - "typetext" : "" + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "target" : { + "description" : "Target volume identifier", + "type" : "string", + "typetext" : "" + }, + "target_node" : { + "description" : "Target node. Default is local node.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Source volume identifier", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update volume attributes", + "method" : "PUT", + "name" : "updateattributes", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "notes" : { + "description" : "The new notes.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "protected" : { + "description" : "Protection status. Currently only supported for backups.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Volume identifier", + "type" : "string", + "typetext" : "" } } }, "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "description" : "You need read access for the volume.", + "user" : "all" }, "protected" : 1, "proxyto" : "node", @@ -18059,24 +37808,25 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/ceph/osd/{osdid}/out", - "text" : "out" + "path" : "/nodes/{node}/storage/{storage}/content/{volume}", + "text" : "{volume}" } ], "info" : { - "DELETE" : { - "description" : "Destroy OSD", - "method" : "DELETE", - "name" : "destroyosd", + "GET" : { + "allowtoken" : 1, + "description" : "List storage content.", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { - "cleanup" : { - "default" : 0, - "description" : "If set, we remove partition table entries.", + "content" : { + "description" : "Only list content of this type.", + "format" : "pve-storage-content", "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string", + "typetext" : "" }, "node" : { "description" : "The cluster node name.", @@ -18084,590 +37834,391 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "osdid" : { - "description" : "OSD ID", + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "Only list images for this VM", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, "type" : "integer", - "typetext" : "" + "typetext" : " (1 - N)" } } }, + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] + }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/ceph/osd/{osdid}", - "text" : "{osdid}" - } - ], - "info" : { - "GET" : { - "description" : "Get Ceph osd list/tree.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - }, - "POST" : { - "description" : "Create OSD", - "method" : "POST", - "name" : "createosd", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "bluestore" : { - "default" : 0, - "description" : "Use bluestore instead of filestore.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "dev" : { - "description" : "Block device name.", - "type" : "string", - "typetext" : "" - }, - "fstype" : { - "default" : "xfs", - "description" : "File system type (filestore only).", - "enum" : [ - "xfs", - "ext4", - "btrfs" - ], - "optional" : 1, - "type" : "string" - }, - "journal_dev" : { - "description" : "Block device name for journal.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/ceph/osd", - "text" : "osd" - }, - { - "info" : { - "GET" : { - "description" : "List local disks.", - "method" : "GET", - "name" : "disks", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Only list specific types of disks.", - "enum" : [ - "unused", - "journal_disks" - ], - "optional" : 1, - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "dev" : { - "type" : "string" - }, - "gpt" : { - "type" : "boolean" - }, - "model" : { - "optional" : 1, - "type" : "string" - }, - "osdid" : { - "type" : "integer" - }, - "serial" : { - "optional" : 1, - "type" : "string" - }, - "size" : { - "type" : "integer" - }, - "used" : { - "optional" : 1, - "type" : "string" - }, - "vendor" : { - "optional" : 1, - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/disks", - "text" : "disks" - }, - { - "info" : { - "GET" : { - "description" : "Get Ceph configuration.", - "method" : "GET", - "name" : "config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "items" : { + "properties" : { + "ctime" : { + "description" : "Creation time (seconds since the UNIX Epoch).", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "encrypted" : { + "description" : "If whole backup is encrypted, value is the fingerprint or '1' if encrypted. Only useful for the Proxmox Backup Server storage type.", + "optional" : 1, + "type" : "string" + }, + "format" : { + "description" : "Format identifier ('raw', 'qcow2', 'subvol', 'iso', 'tgz' ...)", + "type" : "string" + }, + "notes" : { + "description" : "Optional notes. If they contain multiple lines, only the first one is returned here.", + "optional" : 1, + "type" : "string" + }, + "parent" : { + "description" : "Volume identifier of parent (for linked cloned).", + "optional" : 1, + "type" : "string" + }, + "protected" : { + "description" : "Protection status. Currently only supported for backups.", + "optional" : 1, + "type" : "boolean" + }, + "size" : { + "description" : "Volume size in bytes.", + "renderer" : "bytes", + "type" : "integer" + }, + "used" : { + "description" : "Used space. Please note that most storage plugins do not report anything useful here.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "verification" : { + "description" : "Last backup verification result, only useful for PBS storages.", + "optional" : 1, + "properties" : { + "state" : { + "description" : "Last backup verification state.", + "type" : "string" + }, + "upid" : { + "description" : "Last backup verification UPID.", + "type" : "string" + } + }, + "type" : "object" + }, + "vmid" : { + "description" : "Associated Owner VMID.", + "optional" : 1, + "type" : "integer" + }, + "volid" : { + "description" : "Volume identifier.", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{volid}", + "rel" : "child" + } + ], + "type" : "array" } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/config", - "text" : "config" - }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Destroy Ceph monitor.", - "method" : "DELETE", - "name" : "destroymon", + }, + "POST" : { + "allowtoken" : 1, + "description" : "Allocate disk images.", + "method" : "POST", + "name" : "create", "parameters" : { "additionalProperties" : 0, "properties" : { - "monid" : { - "description" : "Monitor ID", - "type" : "integer", - "typetext" : "" + "filename" : { + "description" : "The name of the file to create.", + "type" : "string", + "typetext" : "" + }, + "format" : { + "enum" : [ + "raw", + "qcow2", + "subvol" + ], + "optional" : 1, + "requires" : "size", + "type" : "string" }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "size" : { + "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)", + "pattern" : "\\d+[MG]?", + "type" : "string" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "vmid" : { + "description" : "Specify owner VM", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } }, "permissions" : { "check" : [ "perm", - "/", + "/storage/{storage}", [ - "Sys.Modify" + "Datastore.AllocateSpace" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { + "description" : "Volume identifier", "type" : "string" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/mon/{monid}", - "text" : "{monid}" - } - ], - "info" : { - "GET" : { - "description" : "Get Ceph monitor list.", - "method" : "GET", - "name" : "listmon", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "addr" : { - "type" : "string" - }, - "name" : { - "type" : "string" + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}/content", + "text" : "content" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List files and directories for single file restore under the given path.", + "method" : "GET", + "name" : "list", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "filepath" : { + "description" : "base64-path to the directory or file being listed, or \"/\".", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Backup volume ID or name. Currently only PBS snapshots are supported.", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "You need read access for the volume.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "filepath" : { + "description" : "base64 path of the current entry", + "type" : "string" + }, + "leaf" : { + "description" : "If this entry is a leaf in the directory graph.", + "type" : "boolean" + }, + "mtime" : { + "description" : "Entry last-modified time (unix timestamp).", + "optional" : 1, + "type" : "integer" + }, + "size" : { + "description" : "Entry file size.", + "optional" : 1, + "type" : "integer" + }, + "text" : { + "description" : "Entry display text.", + "type" : "string" + }, + "type" : { + "description" : "Entry type.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } } }, - "type" : "object" + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/file-restore/list", + "text" : "list" }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create Ceph Monitor", - "method" : "POST", - "name" : "createmon", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/ceph/mon", - "text" : "mon" - }, - { - "info" : { - "POST" : { - "description" : "Create initial ceph default configuration and setup symlinks.", - "method" : "POST", - "name" : "init", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "disable_cephx" : { - "default" : 0, - "description" : "Disable cephx authentification.\n\nWARNING: cephx is a security feature protecting against man-in-the-middle attacks. Only consider disabling cephx if your network is private!", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "min_size" : { - "default" : 2, - "description" : "Minimum number of available replicas per object to allow I/O", - "maximum" : 7, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 7)" - }, - "network" : { - "description" : "Use specific network for all ceph related traffic", - "format" : "CIDR", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pg_bits" : { - "default" : 6, - "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.", - "maximum" : 14, - "minimum" : 6, - "optional" : 1, - "type" : "integer", - "typetext" : " (6 - 14)" + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Extract a file or directory (as zip archive) from a PBS backup.", + "method" : "GET", + "name" : "download", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "filepath" : { + "description" : "base64-path to the directory or file to download.", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Backup volume ID or name. Currently only PBS snapshots are supported.", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "description" : "You need read access for the volume.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "any" + } + } }, - "size" : { - "default" : 3, - "description" : "Targeted number of replicas per object", - "maximum" : 7, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 7)" - } + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/file-restore/download", + "text" : "download" } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/init", - "text" : "init" - }, - { - "info" : { - "POST" : { - "description" : "Stop ceph services.", - "method" : "POST", - "name" : "stop", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + ], + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}/file-restore", + "text" : "file-restore" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read storage status.", + "method" : "GET", + "name" : "read_status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + } + } }, - "service" : { - "description" : "Ceph service name.", - "optional" : 1, - "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/stop", - "text" : "stop" - }, - { - "info" : { - "POST" : { - "description" : "Start ceph services.", - "method" : "POST", - "name" : "start", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] }, - "service" : { - "description" : "Ceph service name.", - "optional" : 1, - "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/start", - "text" : "start" - }, - { - "info" : { - "GET" : { - "description" : "Get ceph status.", - "method" : "GET", - "name" : "status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "object" } } }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/status", - "text" : "status" - }, - { - "children" : [ + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/status", + "text" : "status" + }, { "info" : { - "DELETE" : { - "description" : "Destroy pool", - "method" : "DELETE", - "name" : "destroypool", + "GET" : { + "allowtoken" : 1, + "description" : "Read storage RRD statistics (returns PNG).", + "method" : "GET", + "name" : "rrd", "parameters" : { "additionalProperties" : 0, "properties" : { - "force" : { - "default" : 0, - "description" : "If true, destroys pool even if in use", + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string" }, - "name" : { - "description" : "The name of the pool. It must be unique.", + "ds" : { + "description" : "The list of datasources you want to display.", + "format" : "pve-configid-list", "type" : "string", "typetext" : "" }, @@ -18676,187 +38227,71 @@ var pveapi = [ "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" } } }, "permissions" : { "check" : [ "perm", - "/", + "/storage/{storage}", [ - "Sys.Modify" - ] + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "null" + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" } } }, "leaf" : 1, - "path" : "/nodes/{node}/ceph/pools/{name}", - "text" : "{name}" - } - ], - "info" : { - "GET" : { - "description" : "List all pools.", - "method" : "GET", - "name" : "lspools", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "pool" : { - "type" : "integer" - }, - "pool_name" : { - "type" : "string" - }, - "size" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{pool_name}", - "rel" : "child" - } - ], - "type" : "array" - } + "path" : "/nodes/{node}/storage/{storage}/rrd", + "text" : "rrd" }, - "POST" : { - "description" : "Create POOL", - "method" : "POST", - "name" : "createpool", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "crush_ruleset" : { - "default" : 0, - "description" : "The ruleset to use for mapping object placement in the cluster.", - "maximum" : 32768, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 32768)" - }, - "min_size" : { - "default" : 1, - "description" : "Minimum number of replicas per object", - "maximum" : 7, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 7)" - }, - "name" : { - "description" : "The name of the pool. It must be unique.", - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pg_num" : { - "default" : 64, - "description" : "Number of placement groups.", - "maximum" : 32768, - "minimum" : 8, - "optional" : 1, - "type" : "integer", - "typetext" : " (8 - 32768)" - }, - "size" : { - "default" : 2, - "description" : "Number of replicas per object", - "maximum" : 7, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 7)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/ceph/pools", - "text" : "pools" - }, - { - "children" : [ { "info" : { - "DELETE" : { - "description" : "Unset a ceph flag", - "method" : "DELETE", - "name" : "unset_flag", + "GET" : { + "allowtoken" : 1, + "description" : "Read storage RRD statistics.", + "method" : "GET", + "name" : "rrddata", "parameters" : { "additionalProperties" : 0, "properties" : { - "flag" : { - "description" : "The ceph flag to set/unset", + "cf" : { + "description" : "The RRD consolidation function", "enum" : [ - "full", - "pause", - "noup", - "nodown", - "noout", - "noin", - "nobackfill", - "norebalance", - "norecover", - "noscrub", - "nodeep-scrub", - "notieragent" + "AVERAGE", + "MAX" ], + "optional" : 1, "type" : "string" }, "node" : { @@ -18864,272 +38299,248 @@ var pveapi = [ "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" } } }, "permissions" : { "check" : [ "perm", - "/", + "/storage/{storage}", [ - "Sys.Modify" - ] + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "null" + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" } - }, + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/rrddata", + "text" : "rrddata" + }, + { + "info" : { "POST" : { - "description" : "Set a ceph flag", + "allowtoken" : 1, + "description" : "Upload templates and ISO images.", "method" : "POST", - "name" : "set_flag", + "name" : "upload", "parameters" : { "additionalProperties" : 0, "properties" : { - "flag" : { - "description" : "The ceph flag to set/unset", + "checksum" : { + "description" : "The expected checksum of the file.", + "optional" : 1, + "requires" : "checksum-algorithm", + "type" : "string", + "typetext" : "" + }, + "checksum-algorithm" : { + "description" : "The algorithm to calculate the checksum of the file.", + "enum" : [ + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512" + ], + "optional" : 1, + "requires" : "checksum", + "type" : "string" + }, + "content" : { + "description" : "Content type.", "enum" : [ - "full", - "pause", - "noup", - "nodown", - "noout", - "noin", - "nobackfill", - "norebalance", - "norecover", - "noscrub", - "nodeep-scrub", - "notieragent" + "iso", + "vztmpl" ], + "format" : "pve-storage-content", "type" : "string" }, + "filename" : { + "description" : "The name of the file to create. Caution: This will be normalized!", + "maxLength" : 255, + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "tmpfilename" : { + "description" : "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trusted port on localhost.", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/", + "/storage/{storage}", [ - "Sys.Modify" + "Datastore.AllocateTemplate" ] ] }, "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "null" + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/ceph/flags/{flag}", - "text" : "{flag}" - } - ], - "info" : { - "GET" : { - "description" : "get all set ceph flags", - "method" : "GET", - "name" : "get_flags", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/ceph/flags", - "text" : "flags" - }, - { - "info" : { - "GET" : { - "description" : "Get OSD crush map", - "method" : "GET", - "name" : "crush", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/crush", - "text" : "crush" - }, - { - "info" : { - "GET" : { - "description" : "Read ceph log", - "method" : "GET", - "name" : "log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Syslog" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" + "path" : "/nodes/{node}/storage/{storage}/upload", + "text" : "upload" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Download templates and ISO images by using an URL.", + "method" : "POST", + "name" : "download_url", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "checksum" : { + "description" : "The expected checksum of the file.", + "optional" : 1, + "requires" : "checksum-algorithm", + "type" : "string", + "typetext" : "" + }, + "checksum-algorithm" : { + "description" : "The algorithm to calculate the checksum of the file.", + "enum" : [ + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512" + ], + "optional" : 1, + "requires" : "checksum", + "type" : "string" + }, + "content" : { + "description" : "Content type.", + "enum" : [ + "iso", + "vztmpl" + ], + "format" : "pve-storage-content", + "type" : "string" + }, + "filename" : { + "description" : "The name of the file to create. Caution: This will be normalized!", + "maxLength" : 255, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "url" : { + "description" : "The URL to download the file from.", + "pattern" : "https?://.*", + "type" : "string" + }, + "verify-certificates" : { + "default" : 1, + "description" : "If false, no SSL/TLS certificates will be verified.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } } }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/ceph/log", - "text" : "log" - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } + "permissions" : { + "check" : [ + "and", + [ + "perm", + "/storage/{storage}", + [ + "Datastore.AllocateTemplate" + ] + ], + [ + "perm", + "/", + [ + "Sys.Audit", + "Sys.Modify" + ] + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/download-url", + "text" : "download-url" } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/ceph", - "text" : "ceph" - }, - { - "children" : [ - { + ], "info" : { "GET" : { - "description" : "Extract configuration from vzdump backup archive.", + "allowtoken" : 1, + "description" : "", "method" : "GET", - "name" : "extractconfig", + "name" : "diridx", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -19139,223 +38550,96 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "volume" : { - "description" : "Volume identifier", + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", "type" : "string", "typetext" : "" } } }, "permissions" : { - "description" : "The user needs 'VM.Backup' permissions on the backed up guest ID, and 'Datastore.AllocateSpace' on the backup storage.", - "user" : "all" + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] }, - "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "string" + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/vzdump/extractconfig", - "text" : "extractconfig" + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}", + "text" : "{storage}" } ], "info" : { - "POST" : { - "description" : "Create backup.", - "method" : "POST", - "name" : "vzdump", + "GET" : { + "allowtoken" : 1, + "description" : "Get status for all datastores.", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { - "all" : { - "default" : 0, - "description" : "Backup all known guest systems on this host.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "bwlimit" : { - "default" : 0, - "description" : "Limit I/O bandwidth (KBytes per second).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "compress" : { - "default" : "0", - "description" : "Compress dump file.", - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "optional" : 1, - "type" : "string" - }, - "dumpdir" : { - "description" : "Store resulting files to specified directory.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "exclude" : { - "description" : "Exclude specified guest systems (assumes --all)", - "format" : "pve-vmid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "exclude-path" : { - "description" : "Exclude certain files/directories (shell globs).", - "format" : "string-alist", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ionice" : { - "default" : 7, - "description" : "Set CFQ ionice priority.", - "maximum" : 8, - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - 8)" - }, - "lockwait" : { - "default" : 180, - "description" : "Maximal time to wait for the global lock (minutes).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "mailnotification" : { - "default" : "always", - "description" : "Specify when to send an email", - "enum" : [ - "always", - "failure" - ], - "optional" : 1, - "type" : "string" - }, - "mailto" : { - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "format" : "string-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "maxfiles" : { - "default" : 1, - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - }, - "mode" : { - "default" : "snapshot", - "description" : "Backup mode.", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "Only run if executed on this node.", - "format" : "pve-node", + "content" : { + "description" : "Only list stores which support this content type.", + "format" : "pve-storage-content-list", "optional" : 1, "type" : "string", "typetext" : "" }, - "pigz" : { - "default" : 0, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.", - "optional" : 1, - "type" : "integer", - "typetext" : "" - }, - "quiet" : { + "enabled" : { "default" : 0, - "description" : "Be quiet.", + "description" : "Only list stores which are enabled (not disabled in config).", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "remove" : { - "default" : 1, - "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", + "format" : { + "default" : 0, + "description" : "Include information about formats", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "script" : { - "description" : "Use specified hook script.", - "optional" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" }, - "size" : { - "default" : 1024, - "description" : "Unused, will be removed in a future release.", - "minimum" : 500, - "optional" : 1, - "type" : "integer", - "typetext" : " (500 - N)" - }, - "stdexcludes" : { - "default" : 1, - "description" : "Exclude temporary files and logs.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stdout" : { - "description" : "Write tar to stdout, not to a file.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stop" : { - "default" : 0, - "description" : "Stop runnig backup jobs on this host.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "stopwait" : { - "default" : 10, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, "storage" : { - "description" : "Store resulting file to this storage.", + "description" : "Only list status for specified storage", "format" : "pve-storage-id", "optional" : 1, "type" : "string", "typetext" : "" }, - "tmpdir" : { - "description" : "Store temporary files to specified directory.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "The ID of the guest system you want to backup.", - "format" : "pve-vmid-list", + "target" : { + "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", "optional" : 1, "type" : "string", "typetext" : "" @@ -19363,19 +38647,83 @@ var pveapi = [ } }, "permissions" : { - "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage. The 'maxfiles', 'tmpdir', 'dumpdir', 'script', 'bwlimit' and 'ionice' parameters are restricted to the 'root@pam' user.", + "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", "user" : "all" }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" + "items" : { + "properties" : { + "active" : { + "description" : "Set when storage is accessible.", + "optional" : 1, + "type" : "boolean" + }, + "avail" : { + "description" : "Available storage space in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "content" : { + "description" : "Allowed storage content types.", + "format" : "pve-storage-content-list", + "type" : "string" + }, + "enabled" : { + "description" : "Set when storage is enabled (not disabled).", + "optional" : 1, + "type" : "boolean" + }, + "shared" : { + "description" : "Shared flag from storage configuration.", + "optional" : 1, + "type" : "boolean" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string" + }, + "total" : { + "description" : "Total storage space in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "type" : { + "description" : "Storage type.", + "type" : "string" + }, + "used" : { + "description" : "Used storage space in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "used_fraction" : { + "description" : "Used fraction (used/total).", + "optional" : 1, + "renderer" : "fraction_as_percentage", + "type" : "number" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{storage}", + "rel" : "child" + } + ], + "type" : "array" } } }, "leaf" : 0, - "path" : "/nodes/{node}/vzdump", - "text" : "vzdump" + "path" : "/nodes/{node}/storage", + "text" : "storage" }, { "children" : [ @@ -19383,109 +38731,260 @@ var pveapi = [ "children" : [ { "info" : { - "GET" : { - "description" : "Read service properties", - "method" : "GET", - "name" : "service_state", + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove an LVM Volume Group.", + "method" : "DELETE", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { + "cleanup-config" : { + "default" : 0, + "description" : "Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cleanup-disks" : { + "default" : 0, + "description" : "Also wipe disks so they can be repurposed afterwards.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "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" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Audit" + "Sys.Modify", + "Datastore.Allocate" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "properties" : {}, - "type" : "object" + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/state", - "text" : "state" + "path" : "/nodes/{node}/disks/lvm/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List LVM Volume Groups", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "children" : { + "items" : { + "properties" : { + "children" : { + "description" : "The underlying physical volumes", + "items" : { + "properties" : { + "free" : { + "description" : "The free bytes in the physical volume", + "type" : "integer" + }, + "leaf" : { + "type" : "boolean" + }, + "name" : { + "description" : "The name of the physical volume", + "type" : "string" + }, + "size" : { + "description" : "The size of the physical volume in bytes", + "type" : "integer" + } + }, + "type" : "object" + }, + "optional" : 1, + "type" : "array" + }, + "free" : { + "description" : "The free bytes in the volume group", + "type" : "integer" + }, + "leaf" : { + "type" : "boolean" + }, + "name" : { + "description" : "The name of the volume group", + "type" : "string" + }, + "size" : { + "description" : "The size of the volume group in bytes", + "type" : "integer" + } + }, + "type" : "object" + }, + "type" : "array" + }, + "leaf" : { + "type" : "boolean" + } + }, + "type" : "object" + } }, + "POST" : { + "allowtoken" : 1, + "description" : "Create an LVM Volume Group", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "add_storage" : { + "default" : 0, + "description" : "Configure storage using the Volume Group", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "device" : { + "description" : "The block device you want to create the volume group on", + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify", + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/disks/lvm", + "text" : "lvm" + }, + { + "children" : [ { "info" : { - "POST" : { - "description" : "Start service.", - "method" : "POST", - "name" : "service_start", + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove an LVM thin pool.", + "method" : "DELETE", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "cleanup-config" : { + "default" : 0, + "description" : "Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "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" + "cleanup-disks" : { + "default" : 0, + "description" : "Also wipe disks so they can be repurposed afterwards.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "volume-group" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Modify" + "Sys.Modify", + "Datastore.Allocate" ] ] }, @@ -19497,54 +38996,176 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/start", - "text" : "start" + "path" : "/nodes/{node}/disks/lvmthin/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List LVM thinpools", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "lv" : { + "description" : "The name of the thinpool.", + "type" : "string" + }, + "lv_size" : { + "description" : "The size of the thinpool in bytes.", + "type" : "integer" + }, + "metadata_size" : { + "description" : "The size of the metadata lv in bytes.", + "type" : "integer" + }, + "metadata_used" : { + "description" : "The used bytes of the metadata lv.", + "type" : "integer" + }, + "used" : { + "description" : "The used bytes of the thinpool.", + "type" : "integer" + }, + "vg" : { + "description" : "The associated volume group.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } }, + "POST" : { + "allowtoken" : 1, + "description" : "Create an LVM thinpool", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "add_storage" : { + "default" : 0, + "description" : "Configure storage using the thinpool.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "device" : { + "description" : "The block device you want to create the thinpool on.", + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify", + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/disks/lvmthin", + "text" : "lvmthin" + }, + { + "children" : [ { "info" : { - "POST" : { - "description" : "Stop service.", - "method" : "POST", - "name" : "service_stop", + "DELETE" : { + "allowtoken" : 1, + "description" : "Unmounts the storage and removes the mount unit.", + "method" : "DELETE", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { + "cleanup-config" : { + "default" : 0, + "description" : "Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cleanup-disks" : { + "default" : 0, + "description" : "Also wipe disk so it can be repurposed afterwards.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "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" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Modify" + "Sys.Modify", + "Datastore.Allocate" ] ] }, @@ -19556,54 +39177,182 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/stop", - "text" : "stop" + "path" : "/nodes/{node}/disks/directory/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "PVE Managed Directory storages.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "device" : { + "description" : "The mounted device.", + "type" : "string" + }, + "options" : { + "description" : "The mount options.", + "type" : "string" + }, + "path" : { + "description" : "The mount path.", + "type" : "string" + }, + "type" : { + "description" : "The filesystem type.", + "type" : "string" + }, + "unitfile" : { + "description" : "The path of the mount unit.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a Filesystem on an unused disk. Will be mounted under '/mnt/pve/NAME'.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "add_storage" : { + "default" : 0, + "description" : "Configure storage using the directory.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "device" : { + "description" : "The block device you want to create the filesystem on.", + "type" : "string", + "typetext" : "" + }, + "filesystem" : { + "default" : "ext4", + "description" : "The desired filesystem.", + "enum" : [ + "ext4", + "xfs" + ], + "optional" : 1, + "type" : "string" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify", + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/disks/directory", + "text" : "directory" + }, + { + "children" : [ { "info" : { - "POST" : { - "description" : "Restart service.", - "method" : "POST", - "name" : "service_restart", + "DELETE" : { + "allowtoken" : 1, + "description" : "Destroy a ZFS pool.", + "method" : "DELETE", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { + "cleanup-config" : { + "default" : 0, + "description" : "Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cleanup-disks" : { + "default" : 0, + "description" : "Also wipe disks so they can be repurposed afterwards.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "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" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Modify" + "Sys.Modify", + "Datastore.Allocate" ] ] }, @@ -19612,105 +39361,256 @@ var pveapi = [ "returns" : { "type" : "string" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/restart", - "text" : "restart" - }, - { - "info" : { - "POST" : { - "description" : "Reload service.", - "method" : "POST", - "name" : "service_reload", + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get details about a zpool.", + "method" : "GET", + "name" : "detail", "parameters" : { "additionalProperties" : 0, "properties" : { + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "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" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Modify" - ] + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" + "properties" : { + "action" : { + "description" : "Information about the recommended action to fix the state.", + "optional" : 1, + "type" : "string" + }, + "children" : { + "description" : "The pool configuration information, including the vdevs for each section (e.g. spares, cache), may be nested.", + "items" : { + "properties" : { + "cksum" : { + "optional" : 1, + "type" : "number" + }, + "msg" : { + "description" : "An optional message about the vdev.", + "type" : "string" + }, + "name" : { + "description" : "The name of the vdev or section.", + "type" : "string" + }, + "read" : { + "optional" : 1, + "type" : "number" + }, + "state" : { + "description" : "The state of the vdev.", + "optional" : 1, + "type" : "string" + }, + "write" : { + "optional" : 1, + "type" : "number" + } + }, + "type" : "object" + }, + "type" : "array" + }, + "errors" : { + "description" : "Information about the errors on the zpool.", + "type" : "string" + }, + "name" : { + "description" : "The name of the zpool.", + "type" : "string" + }, + "scan" : { + "description" : "Information about the last/current scrub.", + "optional" : 1, + "type" : "string" + }, + "state" : { + "description" : "The state of the zpool.", + "type" : "string" + }, + "status" : { + "description" : "Information about the state of the zpool.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" } } }, "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/reload", - "text" : "reload" + "path" : "/nodes/{node}/disks/zfs/{name}", + "text" : "{name}" } ], "info" : { "GET" : { - "description" : "Directory index", + "allowtoken" : 1, + "description" : "List Zpools.", "method" : "GET", - "name" : "srvcmdidx", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "alloc" : { + "description" : "", + "type" : "integer" + }, + "dedup" : { + "description" : "", + "type" : "number" + }, + "frag" : { + "description" : "", + "type" : "integer" + }, + "free" : { + "description" : "", + "type" : "integer" + }, + "health" : { + "description" : "", + "type" : "string" + }, + "name" : { + "description" : "", + "type" : "string" + }, + "size" : { + "description" : "", + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a ZFS pool.", + "method" : "POST", + "name" : "create", "parameters" : { "additionalProperties" : 0, "properties" : { + "add_storage" : { + "default" : 0, + "description" : "Configure storage using the zpool.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ashift" : { + "default" : 12, + "description" : "Pool sector size exponent.", + "maximum" : 16, + "minimum" : 9, + "optional" : 1, + "type" : "integer", + "typetext" : " (9 - 16)" + }, + "compression" : { + "default" : "on", + "description" : "The compression algorithm to use.", + "enum" : [ + "on", + "off", + "gzip", + "lz4", + "lzjb", + "zle", + "zstd" + ], + "optional" : 1, + "type" : "string" + }, + "devices" : { + "description" : "The block devices you want to create the zpool on.", + "format" : "string-list", + "type" : "string", + "typetext" : "" + }, + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "service" : { - "description" : "Service ID", + "raidlevel" : { + "description" : "The RAID level to use.", "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" + "single", + "mirror", + "raid10", + "raidz", + "raidz2", + "raidz3" ], "type" : "string" } @@ -19719,222 +39619,171 @@ var pveapi = [ "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Audit" + "Sys.Modify", + "Datastore.Allocate" ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ], - "type" : "array" + "type" : "string" } } }, "leaf" : 0, - "path" : "/nodes/{node}/services/{service}", - "text" : "{service}" - } - ], - "info" : { - "GET" : { - "description" : "Service list.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{service}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/services", - "text" : "services" - }, - { - "info" : { - "GET" : { - "description" : "Read subscription info.", - "method" : "GET", - "name" : "get", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "user" : "all" - }, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - }, - "POST" : { - "description" : "Update subscription info.", - "method" : "POST", - "name" : "update", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "force" : { - "default" : 0, - "description" : "Always connect to server, even if we have up to date info inside local cache.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } + "path" : "/nodes/{node}/disks/zfs", + "text" : "zfs" }, - "PUT" : { - "description" : "Set subscription key.", - "method" : "PUT", - "name" : "set", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "key" : { - "description" : "Proxmox VE subscription key", - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/subscription", - "text" : "subscription" - }, - { - "children" : [ { "info" : { - "DELETE" : { - "description" : "Delete network device configuration", - "method" : "DELETE", - "name" : "delete_network", + "GET" : { + "allowtoken" : 1, + "description" : "List local disks.", + "method" : "GET", + "name" : "list", "parameters" : { "additionalProperties" : 0, "properties" : { - "iface" : { - "description" : "Network interface name.", - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "type" : "string", - "typetext" : "" + "include-partitions" : { + "default" : 0, + "description" : "Also include partitions.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "skipsmart" : { + "default" : 0, + "description" : "Skip smart checks.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "type" : { + "description" : "Only list specific types of disks.", + "enum" : [ + "unused", + "journal_disks" + ], + "optional" : 1, + "type" : "string" } } }, "permissions" : { "check" : [ - "perm", - "/nodes/{node}", + "or", [ - "Sys.Modify" + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ], + [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "null" + "items" : { + "properties" : { + "devpath" : { + "description" : "The device path", + "type" : "string" + }, + "gpt" : { + "type" : "boolean" + }, + "health" : { + "optional" : 1, + "type" : "string" + }, + "model" : { + "optional" : 1, + "type" : "string" + }, + "mounted" : { + "type" : "boolean" + }, + "osdid" : { + "type" : "integer" + }, + "parent" : { + "description" : "For partitions only. The device path of the disk the partition resides on.", + "optional" : 1, + "type" : "string" + }, + "serial" : { + "optional" : 1, + "type" : "string" + }, + "size" : { + "type" : "integer" + }, + "used" : { + "optional" : 1, + "type" : "string" + }, + "vendor" : { + "optional" : 1, + "type" : "string" + }, + "wwn" : { + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } - }, + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/disks/list", + "text" : "list" + }, + { + "info" : { "GET" : { - "description" : "Read network device configuration", + "allowtoken" : 1, + "description" : "Get SMART Health of a disk.", "method" : "GET", - "name" : "network_config", + "name" : "smart", "parameters" : { "additionalProperties" : 0, "properties" : { - "iface" : { - "description" : "Network interface name.", - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "type" : "string", - "typetext" : "" + "disk" : { + "description" : "Block device name", + "pattern" : "^/dev/[a-zA-Z0-9\\/]+$", + "type" : "string" + }, + "healthonly" : { + "description" : "If true returns only the health status", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, "node" : { "description" : "The cluster node name.", @@ -19947,215 +39796,69 @@ var pveapi = [ "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Audit" - ] + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 ] }, + "protected" : 1, "proxyto" : "node", "returns" : { "properties" : { - "method" : { + "attributes" : { + "optional" : 1, + "type" : "array" + }, + "health" : { + "type" : "string" + }, + "text" : { + "optional" : 1, "type" : "string" }, "type" : { + "optional" : 1, "type" : "string" } }, "type" : "object" } - }, - "PUT" : { - "description" : "Update network device configuration", - "method" : "PUT", - "name" : "update_network", + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/disks/smart", + "text" : "smart" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Initialize Disk with GPT", + "method" : "POST", + "name" : "initgpt", "parameters" : { "additionalProperties" : 0, "properties" : { - "address" : { - "description" : "IP address.", - "format" : "ipv4", - "optional" : 1, - "requires" : "netmask", - "type" : "string", - "typetext" : "" - }, - "address6" : { - "description" : "IP address.", - "format" : "ipv6", - "optional" : 1, - "requires" : "netmask6", - "type" : "string", - "typetext" : "" - }, - "autostart" : { - "description" : "Automatically start interface on boot.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "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" - }, - "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, + "disk" : { + "description" : "Block device name", + "pattern" : "^/dev/[a-zA-Z0-9\\/]+$", "type" : "string" }, - "bridge_ports" : { - "description" : "Specify the iterfaces you want to add to your bridge.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "bridge_vlan_aware" : { - "description" : "Enable bridge vlan support.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "comments" : { - "description" : "Comments", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "comments6" : { - "description" : "Comments", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "gateway" : { - "description" : "Default gateway address.", - "format" : "ipv4", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "gateway6" : { - "description" : "Default ipv6 gateway address.", - "format" : "ipv6", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "iface" : { - "description" : "Network interface name.", - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "type" : "string", - "typetext" : "" - }, - "netmask" : { - "description" : "Network mask.", - "format" : "ipv4mask", - "optional" : 1, - "requires" : "address", - "type" : "string", - "typetext" : "" - }, - "netmask6" : { - "description" : "Network mask.", - "maximum" : 128, - "minimum" : 0, - "optional" : 1, - "requires" : "address6", - "type" : "integer", - "typetext" : " (0 - 128)" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "ovs_bonds" : { - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_bridge" : { - "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", - "format" : "pve-iface", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_options" : { - "description" : "OVS interface options.", - "maxLength" : 1024, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_ports" : { - "description" : "Specify the iterfaces you want to add to your bridge.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_tag" : { - "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", - "maximum" : 4094, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 4094)" - }, - "slaves" : { - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Network interface type", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "unknown" - ], + "uuid" : { + "description" : "UUID for the GPT table", + "maxLength" : 36, + "optional" : 1, + "pattern" : "[a-fA-F0-9\\-]+", "type" : "string" } } @@ -20163,7 +39866,7 @@ var pveapi = [ "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ "Sys.Modify" ] @@ -20172,48 +39875,53 @@ var pveapi = [ "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "null" + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/network/{iface}", - "text" : "{iface}" - } - ], - "info" : { - "DELETE" : { - "description" : "Revert network configuration changes.", - "method" : "DELETE", - "name" : "revert_network_changes", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "path" : "/nodes/{node}/disks/initgpt", + "text" : "initgpt" + }, + { + "info" : { + "PUT" : { + "allowtoken" : 1, + "description" : "Wipe a disk or partition.", + "method" : "PUT", + "name" : "wipe_disk", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "disk" : { + "description" : "Block device name", + "pattern" : "^/dev/[a-zA-Z0-9\\/]+$", + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - }, + "leaf" : 1, + "path" : "/nodes/{node}/disks/wipedisk", + "text" : "wipedisk" + } + ], + "info" : { "GET" : { - "description" : "List available networks", + "allowtoken" : 1, + "description" : "Node index.", "method" : "GET", "name" : "index", "parameters" : { @@ -20224,23 +39932,6 @@ var pveapi = [ "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "type" : { - "description" : "Only list specific interface types.", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "any_bridge" - ], - "optional" : 1, - "type" : "string" } } }, @@ -20255,357 +39946,416 @@ var pveapi = [ }, "links" : [ { - "href" : "{iface}", + "href" : "{name}", "rel" : "child" } ], "type" : "array" } - }, - "POST" : { - "description" : "Create network device configuration", - "method" : "POST", - "name" : "create_network", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "address" : { - "description" : "IP address.", - "format" : "ipv4", - "optional" : 1, - "requires" : "netmask", - "type" : "string", - "typetext" : "" + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/disks", + "text" : "disks" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List available updates.", + "method" : "GET", + "name" : "list_updates", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } }, - "address6" : { - "description" : "IP address.", - "format" : "ipv6", - "optional" : 1, - "requires" : "netmask6", - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "autostart" : { - "description" : "Automatically start interface on boot.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "This is used to resynchronize the package index files from their sources (apt-get update).", + "method" : "POST", + "name" : "update_database", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "notify" : { + "default" : 0, + "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "quiet" : { + "default" : 0, + "description" : "Only produces output suitable for logging, omitting progress indicators.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } }, - "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" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "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, + "protected" : 1, + "proxyto" : "node", + "returns" : { "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/update", + "text" : "update" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get package changelogs.", + "method" : "GET", + "name" : "changelog", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "name" : { + "description" : "Package name.", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "version" : { + "description" : "Package version.", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } }, - "bridge_ports" : { - "description" : "Specify the iterfaces you want to add to your bridge.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "bridge_vlan_aware" : { - "description" : "Enable bridge vlan support.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "comments" : { - "description" : "Comments", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "comments6" : { - "description" : "Comments", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "gateway" : { - "description" : "Default gateway address.", - "format" : "ipv4", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "gateway6" : { - "description" : "Default ipv6 gateway address.", - "format" : "ipv6", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "iface" : { - "description" : "Network interface name.", - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "type" : "string", - "typetext" : "" - }, - "netmask" : { - "description" : "Network mask.", - "format" : "ipv4mask", - "optional" : 1, - "requires" : "address", - "type" : "string", - "typetext" : "" - }, - "netmask6" : { - "description" : "Network mask.", - "maximum" : 128, - "minimum" : 0, - "optional" : 1, - "requires" : "address6", - "type" : "integer", - "typetext" : " (0 - 128)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "ovs_bonds" : { - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_bridge" : { - "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", - "format" : "pve-iface", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_options" : { - "description" : "OVS interface options.", - "maxLength" : 1024, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_ports" : { - "description" : "Specify the iterfaces you want to add to your bridge.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "ovs_tag" : { - "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", - "maximum" : 4094, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 4094)" - }, - "slaves" : { - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "type" : { - "description" : "Network interface type", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "unknown" - ], + "proxyto" : "node", + "returns" : { "type" : "string" } } }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/network", - "text" : "network" - }, - { - "children" : [ + "leaf" : 1, + "path" : "/nodes/{node}/apt/changelog", + "text" : "changelog" + }, { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Read task log.", - "method" : "GET", - "name" : "read_task_log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get APT repository information.", + "method" : "GET", + "name" : "repositories", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "description" : "Result from parsing the APT repository files in /etc/apt/.", + "properties" : { + "digest" : { + "description" : "Common digest of all files.", + "type" : "string" + }, + "errors" : { + "description" : "List of problematic repository files.", + "items" : { + "properties" : { + "error" : { + "description" : "The error message", + "type" : "string" + }, + "path" : { + "description" : "Path to the problematic file.", + "type" : "string" + } }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" + "type" : "object" + }, + "type" : "array" + }, + "files" : { + "description" : "List of parsed repository files.", + "items" : { + "properties" : { + "digest" : { + "description" : "Digest of the file as bytes.", + "items" : { + "type" : "integer" + }, + "type" : "array" + }, + "file-type" : { + "description" : "Format of the file.", + "enum" : [ + "list", + "sources" + ], + "type" : "string" + }, + "path" : { + "description" : "Path to the problematic file.", + "type" : "string" + }, + "repositories" : { + "description" : "The parsed repositories.", + "items" : { + "properties" : { + "Comment" : { + "description" : "Associated comment", + "optional" : 1, + "type" : "string" + }, + "Components" : { + "description" : "List of repository components", + "items" : { + "type" : "string" + }, + "optional" : 1, + "type" : "array" + }, + "Enabled" : { + "description" : "Whether the repository is enabled or not", + "type" : "boolean" + }, + "FileType" : { + "description" : "Format of the defining file.", + "enum" : [ + "list", + "sources" + ], + "type" : "string" + }, + "Options" : { + "description" : "Additional options", + "items" : { + "properties" : { + "Key" : { + "type" : "string" + }, + "Values" : { + "items" : { + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object" + }, + "optional" : 1, + "type" : "array" + }, + "Suites" : { + "description" : "List of package distribuitions", + "items" : { + "type" : "string" + }, + "type" : "array" + }, + "Types" : { + "description" : "List of package types.", + "items" : { + "enum" : [ + "deb", + "deb-src" + ], + "type" : "string" + }, + "type" : "array" + }, + "URIs" : { + "description" : "List of repository URIs.", + "items" : { + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object" + }, + "type" : "array" + } }, - "upid" : { - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", - "user" : "all" + "type" : "object" + }, + "type" : "array" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { + "infos" : { + "description" : "Additional information/warnings for APT repositories.", "items" : { "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" + "index" : { + "description" : "Index of the associated repository within the file.", + "type" : "string" }, - "t" : { - "description" : "Line text", + "kind" : { + "description" : "Kind of the information (e.g. warning).", + "type" : "string" + }, + "message" : { + "description" : "Information message.", + "type" : "string" + }, + "path" : { + "description" : "Path to the associated file.", + "type" : "string" + }, + "property" : { + "description" : "Property from which the info originates.", + "optional" : 1, "type" : "string" } }, "type" : "object" }, "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/tasks/{upid}/log", - "text" : "log" - }, - { - "info" : { - "GET" : { - "description" : "Read task status.", - "method" : "GET", - "name" : "read_task_status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "upid" : { - "type" : "string", - "typetext" : "" - } - } }, - "permissions" : { - "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", - "user" : "all" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "properties" : { - "pid" : { - "type" : "integer" + "standard-repos" : { + "description" : "List of standard repositories and their configuration status", + "items" : { + "properties" : { + "handle" : { + "description" : "Handle to identify the repository.", + "type" : "string" + }, + "name" : { + "description" : "Full name of the repository.", + "type" : "string" + }, + "status" : { + "description" : "Indicating enabled/disabled status, if the repository is configured.", + "optional" : 1, + "type" : "boolean" + } }, - "status" : { - "enum" : [ - "running", - "stopped" - ], - "type" : "string" - } + "type" : "object" }, - "type" : "object" + "type" : "array" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/tasks/{upid}/status", - "text" : "status" - } - ], - "info" : { - "DELETE" : { - "description" : "Stop a task.", - "method" : "DELETE", - "name" : "stop_task", + }, + "type" : "object" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Change the properties of a repository. Currently only allows enabling/disabling.", + "method" : "POST", + "name" : "change_repository", "parameters" : { "additionalProperties" : 0, "properties" : { + "digest" : { + "description" : "Digest to detect modifications.", + "maxLength" : 80, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enabled" : { + "description" : "Whether the repository should be enabled or not.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "index" : { + "description" : "Index within the file (starting from 0).", + "type" : "integer", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "upid" : { + "path" : { + "description" : "Path to the containing file.", "type" : "string", "typetext" : "" } } }, "permissions" : { - "description" : "The user needs 'Sys.Modify' permissions on '/nodes/' if the task does not belong to him.", - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, "protected" : 1, "proxyto" : "node", @@ -20613,130 +40363,476 @@ var pveapi = [ "type" : "null" } }, - "GET" : { - "description" : "", - "method" : "GET", - "name" : "upid_index", + "PUT" : { + "allowtoken" : 1, + "description" : "Add a standard repository to the configuration", + "method" : "PUT", + "name" : "add_repository", "parameters" : { "additionalProperties" : 0, "properties" : { + "digest" : { + "description" : "Digest to detect modifications.", + "maxLength" : 80, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "handle" : { + "description" : "Handle that identifies a repository.", + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "upid" : { + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/repositories", + "text" : "repositories" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get package information for important Proxmox packages.", + "method" : "GET", + "name" : "versions", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" } } }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] }, + "proxyto" : "node", "returns" : { "items" : { "properties" : {}, "type" : "object" }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], "type" : "array" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/tasks/{upid}", - "text" : "{upid}" + "leaf" : 1, + "path" : "/nodes/{node}/apt/versions", + "text" : "versions" } ], "info" : { "GET" : { - "description" : "Read task list for one node (finished tasks).", + "allowtoken" : 1, + "description" : "Directory index for apt (Advanced Package Tool).", "method" : "GET", - "name" : "node_tasks", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { - "errors" : { - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "userfilter" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "Only list tasks for this VM.", - "format" : "pve-vmid", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" } } }, "permissions" : { - "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/ (the the task runs on).", "user" : "all" }, - "proxyto" : "node", "returns" : { "items" : { "properties" : { - "upid" : { + "id" : { "type" : "string" } }, - "type" : "object" - }, - "links" : [ - { - "href" : "{upid}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/tasks", - "text" : "tasks" - }, - { - "children" : [ - { + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/apt", + "text" : "apt" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete rule.", + "method" : "DELETE", + "name" : "delete_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get single rule data.", + "method" : "GET", + "name" : "get_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "icmp-type" : { + "optional" : 1, + "type" : "string" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "log" : { + "description" : "Log level for firewall rule", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "optional" : 1, + "type" : "string" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Modify rule data.", + "method" : "PUT", + "name" : "update_rule", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 1, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "moveto" : { + "description" : "Move rule to new position . Other arguments are ignored.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/firewall/rules/{pos}", + "text" : "{pos}" + } + ], "info" : { "GET" : { - "description" : "Scan zfs pool list on local node.", + "allowtoken" : 1, + "description" : "List rules.", "method" : "GET", - "name" : "zfsscan", + "name" : "get_rules", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -20751,140 +40847,195 @@ var pveapi = [ "permissions" : { "check" : [ "perm", - "/storage", + "/nodes/{node}", [ - "Datastore.Allocate" + "Sys.Audit" ] ] }, - "protected" : 1, "proxyto" : "node", "returns" : { "items" : { "properties" : { - "pool" : { - "type" : "string" + "pos" : { + "type" : "integer" } }, "type" : "object" }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], "type" : "array" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/scan/zfs", - "text" : "zfs" - }, - { - "info" : { - "GET" : { - "description" : "Scan remote NFS server.", - "method" : "GET", - "name" : "nfsscan", + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new rule.", + "method" : "POST", + "name" : "create_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, + "optional" : 0, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" + }, + "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, "type" : "string", "typetext" : "" }, - "server" : { - "format" : "pve-storage-server", + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-dport-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Flag to enable/disable a rule.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "icmp-type" : { + "description" : "Specify icmp-type. Only valid if proto equals 'icmp'.", + "format" : "pve-fw-icmp-type-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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, + "minLength" : 2, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "log" : { + "description" : "Log level for firewall rule.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, "type" : "string", "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "options" : { - "type" : "string" - }, - "path" : { - "type" : "string" - } }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/scan/nfs", - "text" : "nfs" - }, - { - "info" : { - "GET" : { - "description" : "Scan remote GlusterFS server.", - "method" : "GET", - "name" : "glusterfsscan", - "parameters" : { - "additionalProperties" : 0, - "properties" : { "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "server" : { - "format" : "pve-storage-server", + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "proto" : { + "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "format" : "pve-fw-protocol-spec", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-addr-spec", + "maxLength" : 512, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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.", + "format" : "pve-fw-sport-spec", + "optional" : 1, "type" : "string", "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 0, + "type" : "string" } } }, "permissions" : { "check" : [ "perm", - "/storage", + "/nodes/{node}", [ - "Datastore.Allocate" + "Sys.Modify" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "volname" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" + "type" : "null" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/scan/glusterfs", - "text" : "glusterfs" + "leaf" : 0, + "path" : "/nodes/{node}/firewall/rules", + "text" : "rules" }, { "info" : { "GET" : { - "description" : "Scan remote iSCSI server.", + "allowtoken" : 1, + "description" : "Get host firewall options.", "method" : "GET", - "name" : "iscsiscan", + "name" : "get_options", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -20893,163 +41044,399 @@ var pveapi = [ "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "portal" : { - "format" : "pve-storage-portal-dns", - "type" : "string", - "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/storage", + "/nodes/{node}", [ - "Datastore.Allocate" + "Sys.Audit" ] ] }, - "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "portal" : { - "type" : "string" - }, - "target" : { - "type" : "string" - } + "properties" : { + "enable" : { + "description" : "Enable host firewall rules.", + "optional" : 1, + "type" : "boolean" }, - "type" : "object" + "log_level_in" : { + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_nf_conntrack" : { + "default" : 0, + "description" : "Enable logging of conntrack information.", + "optional" : 1, + "type" : "boolean" + }, + "ndp" : { + "default" : 0, + "description" : "Enable NDP (Neighbor Discovery Protocol).", + "optional" : 1, + "type" : "boolean" + }, + "nf_conntrack_allow_invalid" : { + "default" : 0, + "description" : "Allow invalid packets on connection tracking.", + "optional" : 1, + "type" : "boolean" + }, + "nf_conntrack_max" : { + "default" : 262144, + "description" : "Maximum number of tracked connections.", + "minimum" : 32768, + "optional" : 1, + "type" : "integer" + }, + "nf_conntrack_tcp_timeout_established" : { + "default" : 432000, + "description" : "Conntrack established timeout.", + "minimum" : 7875, + "optional" : 1, + "type" : "integer" + }, + "nf_conntrack_tcp_timeout_syn_recv" : { + "default" : 60, + "description" : "Conntrack syn recv timeout.", + "maximum" : 60, + "minimum" : 30, + "optional" : 1, + "type" : "integer" + }, + "nosmurfs" : { + "description" : "Enable SMURFS filter.", + "optional" : 1, + "type" : "boolean" + }, + "protection_synflood" : { + "default" : 0, + "description" : "Enable synflood protection", + "optional" : 1, + "type" : "boolean" + }, + "protection_synflood_burst" : { + "default" : 1000, + "description" : "Synflood protection rate burst by ip src.", + "optional" : 1, + "type" : "integer" + }, + "protection_synflood_rate" : { + "default" : 200, + "description" : "Synflood protection rate syn/sec by ip src.", + "optional" : 1, + "type" : "integer" + }, + "smurf_log_level" : { + "description" : "Log level for SMURFS filter.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "tcp_flags_log_level" : { + "description" : "Log level for illegal tcp flags filter.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "tcpflags" : { + "default" : 0, + "description" : "Filter illegal combinations of TCP flags.", + "optional" : 1, + "type" : "boolean" + } }, - "type" : "array" + "type" : "object" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/scan/iscsi", - "text" : "iscsi" - }, - { - "info" : { - "GET" : { - "description" : "List local LVM volume groups.", - "method" : "GET", - "name" : "lvmscan", + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set Firewall options.", + "method" : "PUT", + "name" : "set_options", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, "type" : "string", "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "vg" : { - "type" : "string" - } }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/scan/lvm", - "text" : "lvm" - }, - { - "info" : { - "GET" : { - "description" : "List local LVM Thin Pools.", - "method" : "GET", - "name" : "lvmthinscan", - "parameters" : { - "additionalProperties" : 0, - "properties" : { + "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", + "typetext" : "" + }, + "enable" : { + "description" : "Enable host firewall rules.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "log_level_in" : { + "description" : "Log level for incoming traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "log_nf_conntrack" : { + "default" : 0, + "description" : "Enable logging of conntrack information.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "ndp" : { + "default" : 0, + "description" : "Enable NDP (Neighbor Discovery Protocol).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "nf_conntrack_allow_invalid" : { + "default" : 0, + "description" : "Allow invalid packets on connection tracking.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "nf_conntrack_max" : { + "default" : 262144, + "description" : "Maximum number of tracked connections.", + "minimum" : 32768, + "optional" : 1, + "type" : "integer", + "typetext" : " (32768 - N)" + }, + "nf_conntrack_tcp_timeout_established" : { + "default" : 432000, + "description" : "Conntrack established timeout.", + "minimum" : 7875, + "optional" : 1, + "type" : "integer", + "typetext" : " (7875 - N)" + }, + "nf_conntrack_tcp_timeout_syn_recv" : { + "default" : 60, + "description" : "Conntrack syn recv timeout.", + "maximum" : 60, + "minimum" : 30, + "optional" : 1, + "type" : "integer", + "typetext" : " (30 - 60)" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "vg" : { - "maxLength" : 100, - "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+", + "nosmurfs" : { + "description" : "Enable SMURFS filter.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "protection_synflood" : { + "default" : 0, + "description" : "Enable synflood protection", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "protection_synflood_burst" : { + "default" : 1000, + "description" : "Synflood protection rate burst by ip src.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "protection_synflood_rate" : { + "default" : 200, + "description" : "Synflood protection rate syn/sec by ip src.", + "optional" : 1, + "type" : "integer", + "typetext" : "" + }, + "smurf_log_level" : { + "description" : "Log level for SMURFS filter.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" + }, + "tcp_flags_log_level" : { + "description" : "Log level for illegal tcp flags filter.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, "type" : "string" + }, + "tcpflags" : { + "default" : 0, + "description" : "Filter illegal combinations of TCP flags.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/storage", + "/nodes/{node}", [ - "Datastore.Allocate" + "Sys.Modify" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "lv" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" + "type" : "null" } } }, "leaf" : 1, - "path" : "/nodes/{node}/scan/lvmthin", - "text" : "lvmthin" + "path" : "/nodes/{node}/firewall/options", + "text" : "options" }, { "info" : { "GET" : { - "description" : "List local USB devices.", + "allowtoken" : 1, + "description" : "Read firewall log", "method" : "GET", - "name" : "usbscan", + "name" : "log", "parameters" : { "additionalProperties" : 0, "properties" : { + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "Sys.Modify" + "Sys.Syslog" ] ] }, @@ -21058,44 +41445,12 @@ var pveapi = [ "returns" : { "items" : { "properties" : { - "busnum" : { - "type" : "integer" - }, - "class" : { - "type" : "integer" - }, - "devnum" : { - "type" : "integer" - }, - "level" : { - "type" : "integer" - }, - "manufacturer" : { - "optional" : 1, - "type" : "string" - }, - "port" : { + "n" : { + "description" : "Line number", "type" : "integer" }, - "prodid" : { - "type" : "string" - }, - "product" : { - "optional" : 1, - "type" : "string" - }, - "serial" : { - "optional" : 1, - "type" : "string" - }, - "speed" : { - "type" : "string" - }, - "usbpath" : { - "optional" : 1, - "type" : "string" - }, - "vendid" : { + "t" : { + "description" : "Line text", "type" : "string" } }, @@ -21106,13 +41461,14 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/scan/usb", - "text" : "usb" + "path" : "/nodes/{node}/firewall/log", + "text" : "log" } ], "info" : { "GET" : { - "description" : "Index of available scan methods", + "allowtoken" : 1, + "description" : "Directory index.", "method" : "GET", "name" : "index", "parameters" : { @@ -21131,16 +41487,12 @@ var pveapi = [ }, "returns" : { "items" : { - "properties" : { - "method" : { - "type" : "string" - } - }, + "properties" : {}, "type" : "object" }, "links" : [ { - "href" : "{method}", + "href" : "{name}", "rel" : "child" } ], @@ -21149,464 +41501,106 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/nodes/{node}/scan", - "text" : "scan" + "path" : "/nodes/{node}/firewall", + "text" : "firewall" }, { "children" : [ - { - "children" : [ - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete volume", - "method" : "DELETE", - "name" : "delete", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "volume" : { - "description" : "Volume identifier", - "type" : "string", - "typetext" : "" - } - } - }, - "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" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Get volume attributes", - "method" : "GET", - "name" : "info", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "volume" : { - "description" : "Volume identifier", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "description" : "You need read access for the volume.", - "user" : "all" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "object" - } - }, - "POST" : { - "description" : "Copy a volume. This is experimental code - do not use.", - "method" : "POST", - "name" : "copy", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "target" : { - "description" : "Target volume identifier", - "type" : "string", - "typetext" : "" - }, - "target_node" : { - "description" : "Target node. Default is local node.", - "format" : "pve-node", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "volume" : { - "description" : "Source volume identifier", - "type" : "string", - "typetext" : "" - } - } - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/content/{volume}", - "text" : "{volume}" - } - ], - "info" : { - "GET" : { - "description" : "List storage content.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "content" : { - "description" : "Only list content of this type.", - "format" : "pve-storage-content", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "Only list images for this VM", - "format" : "pve-vmid", - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "volid" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{volid}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Allocate disk images.", - "method" : "POST", - "name" : "create", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "filename" : { - "description" : "The name of the file to create.", - "type" : "string", - "typetext" : "" - }, - "format" : { - "enum" : [ - "raw", - "qcow2", - "subvol" - ], - "optional" : 1, - "requires" : "size", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "size" : { - "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)", - "pattern" : "\\d+[MG]?", - "type" : "string" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "vmid" : { - "description" : "Specify owner VM", - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "typetext" : " (1 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.AllocateSpace" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "description" : "Volume identifier", - "type" : "string" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/storage/{storage}/content", - "text" : "content" - }, - { - "info" : { - "GET" : { - "description" : "Read storage status.", - "method" : "GET", - "name" : "read_status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "properties" : {}, - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/status", - "text" : "status" - }, + { + "children" : [ { "info" : { "GET" : { - "description" : "Read storage RRD statistics (returns PNG).", + "allowtoken" : 1, + "description" : "Get replication job status.", "method" : "GET", - "name" : "rrd", + "name" : "job_status", "parameters" : { "additionalProperties" : 0, "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "optional" : 1, + "id" : { + "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", + "format" : "pve-replication-job-id", + "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", "type" : "string" }, - "ds" : { - "description" : "The list of datasources you want to display.", - "format" : "pve-configid-list", - "type" : "string", - "typetext" : "" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" } } }, "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] + "description" : "Requires the VM.Audit permission on /vms/.", + "user" : "all" }, "protected" : 1, "proxyto" : "node", "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, "type" : "object" } } }, "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/rrd", - "text" : "rrd" + "path" : "/nodes/{node}/replication/{id}/status", + "text" : "status" }, { "info" : { "GET" : { - "description" : "Read storage RRD statistics.", + "allowtoken" : 1, + "description" : "Read replication job log.", "method" : "GET", - "name" : "rrddata", + "name" : "read_job_log", "parameters" : { "additionalProperties" : 0, "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], - "optional" : 1, + "id" : { + "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", + "format" : "pve-replication-job-id", + "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", "type" : "string" }, + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] + "description" : "Requires the VM.Audit permission on /vms/, or 'Sys.Audit' on '/nodes/'", + "user" : "all" }, "protected" : 1, "proxyto" : "node", "returns" : { "items" : { - "properties" : {}, + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" + } + }, "type" : "object" }, "type" : "array" @@ -21614,115 +41608,88 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/rrddata", - "text" : "rrddata" + "path" : "/nodes/{node}/replication/{id}/log", + "text" : "log" }, { "info" : { "POST" : { - "description" : "Upload templates and ISO images.", + "allowtoken" : 1, + "description" : "Schedule replication job to start as soon as possible.", "method" : "POST", - "name" : "upload", + "name" : "schedule_now", "parameters" : { "additionalProperties" : 0, "properties" : { - "content" : { - "description" : "Content type.", - "format" : "pve-storage-content", - "type" : "string", - "typetext" : "" - }, - "filename" : { - "description" : "The name of the file to create.", - "type" : "string", - "typetext" : "" + "id" : { + "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", + "format" : "pve-replication-job-id", + "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", + "type" : "string" }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "tmpfilename" : { - "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.", - "optional" : 1, - "type" : "string", - "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/storage/{storage}", + "/storage", [ - "Datastore.AllocateTemplate" + "Datastore.Allocate" ] ] }, "protected" : 1, + "proxyto" : "node", "returns" : { "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/upload", - "text" : "upload" + "path" : "/nodes/{node}/replication/{id}/schedule_now", + "text" : "schedule_now" } ], "info" : { "GET" : { - "description" : "", + "allowtoken" : 1, + "description" : "Directory index.", "method" : "GET", - "name" : "diridx", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { + "id" : { + "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", + "format" : "pve-replication-job-id", + "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", + "type" : "string" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" } } }, "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] + "user" : "all" }, "returns" : { "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, + "properties" : {}, "type" : "object" }, "links" : [ { - "href" : "{subdir}", + "href" : "{name}", "rel" : "child" } ], @@ -21731,56 +41698,37 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/nodes/{node}/storage/{storage}", - "text" : "{storage}" + "path" : "/nodes/{node}/replication/{id}", + "text" : "{id}" } ], "info" : { "GET" : { - "description" : "Get status for all datastores.", + "allowtoken" : 1, + "description" : "List status of all replication jobs on this node.", "method" : "GET", - "name" : "index", + "name" : "status", "parameters" : { "additionalProperties" : 0, "properties" : { - "content" : { - "description" : "Only list stores which support this content type.", - "format" : "pve-storage-content-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enabled" : { - "default" : 0, - "description" : "Only list stores which are enabled (not disabled in config).", + "guest" : { + "description" : "Only list replication jobs for this guest.", + "format" : "pve-vmid", + "minimum" : 1, "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "integer", + "typetext" : " (1 - N)" }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "storage" : { - "description" : "Only list status for specified storage", - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "target" : { - "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", - "optional" : 1, - "type" : "string", - "typetext" : "" } } }, "permissions" : { - "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", + "description" : "Requires the VM.Audit permission on /vms/.", "user" : "all" }, "protected" : 1, @@ -21788,7 +41736,7 @@ var pveapi = [ "returns" : { "items" : { "properties" : { - "storage" : { + "id" : { "type" : "string" } }, @@ -21796,7 +41744,7 @@ var pveapi = [ }, "links" : [ { - "href" : "{storage}", + "href" : "{id}", "rel" : "child" } ], @@ -21805,258 +41753,134 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/nodes/{node}/storage", - "text" : "storage" + "path" : "/nodes/{node}/replication", + "text" : "replication" }, { "children" : [ { - "info" : { - "GET" : { - "description" : "List local disks.", - "method" : "GET", - "name" : "list", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "devpath" : { - "description" : "The device path", - "type" : "string" - }, - "gpt" : { - "type" : "boolean" - }, - "health" : { - "optional" : 1, - "type" : "string" - }, - "model" : { - "optional" : 1, - "type" : "string" - }, - "osdid" : { - "type" : "integer" - }, - "serial" : { - "optional" : 1, - "type" : "string" - }, - "size" : { - "type" : "integer" - }, - "used" : { - "optional" : 1, - "type" : "string" - }, - "vendor" : { - "optional" : 1, - "type" : "string" - }, - "wwn" : { - "optional" : 1, - "type" : "string" + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Revoke existing certificate from CA.", + "method" : "DELETE", + "name" : "revoke_certificate", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } } }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/disks/list", - "text" : "list" - }, - { - "info" : { - "GET" : { - "description" : "Get SMART Health of a disk.", - "method" : "GET", - "name" : "smart", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "disk" : { - "description" : "Block device name", - "pattern" : "^/dev/[a-zA-Z0-9\\/]+$", - "type" : "string" - }, - "healthonly" : { - "description" : "If true returns only the health status", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "properties" : { - "attributes" : { - "optional" : 1, - "type" : "array" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "health" : { + "protected" : 1, + "proxyto" : "node", + "returns" : { "type" : "string" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Order a new certificate from ACME-compatible CA.", + "method" : "POST", + "name" : "new_certificate", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "default" : 0, + "description" : "Overwrite existing custom certificate.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } }, - "text" : { - "optional" : 1, - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "type" : { - "optional" : 1, + "protected" : 1, + "proxyto" : "node", + "returns" : { "type" : "string" } }, - "type" : "object" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/disks/smart", - "text" : "smart" - }, - { - "info" : { - "POST" : { - "description" : "Initialize Disk with GPT", - "method" : "POST", - "name" : "initgpt", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "disk" : { - "description" : "Block device name", - "pattern" : "^/dev/[a-zA-Z0-9\\/]+$", - "type" : "string" + "PUT" : { + "allowtoken" : 1, + "description" : "Renew existing certificate from CA.", + "method" : "PUT", + "name" : "renew_certificate", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "default" : 0, + "description" : "Force renewal even if expiry is more than 30 days away.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "uuid" : { - "description" : "UUID for the GPT table", - "maxLength" : 36, - "optional" : 1, - "pattern" : "[a-fA-F0-9\\-]+", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/disks/initgpt", - "text" : "initgpt" - } - ], - "info" : { - "GET" : { - "description" : "Node index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } + "leaf" : 1, + "path" : "/nodes/{node}/certificates/acme/certificate", + "text" : "certificate" } - }, - "permissions" : { - "user" : "all" - }, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/disks", - "text" : "disks" - }, - { - "children" : [ - { + ], "info" : { "GET" : { - "description" : "List available updates.", + "allowtoken" : 1, + "description" : "ACME index.", "method" : "GET", - "name" : "list_updates", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -22069,28 +41893,34 @@ var pveapi = [ } }, "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "user" : "all" }, - "protected" : 1, - "proxyto" : "node", "returns" : { "items" : { "properties" : {}, "type" : "object" }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], "type" : "array" } - }, - "POST" : { - "description" : "This is used to resynchronize the package index files from their sources (apt-get update).", - "method" : "POST", - "name" : "update_database", + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/certificates/acme", + "text" : "acme" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get information about node's certificates.", + "method" : "GET", + "name" : "info", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -22099,68 +41929,106 @@ var pveapi = [ "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "notify" : { - "default" : 0, - "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "quiet" : { - "default" : 0, - "description" : "Only produces output suitable for logging, omitting progress indicators.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" } } }, "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "user" : "all" }, - "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" + "items" : { + "properties" : { + "filename" : { + "optional" : 1, + "type" : "string" + }, + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "optional" : 1, + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" + }, + "issuer" : { + "description" : "Certificate issuer name.", + "optional" : 1, + "type" : "string" + }, + "notafter" : { + "description" : "Certificate's notAfter timestamp (UNIX epoch).", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" + }, + "notbefore" : { + "description" : "Certificate's notBefore timestamp (UNIX epoch).", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" + }, + "pem" : { + "description" : "Certificate in PEM format", + "format" : "pem-certificate", + "optional" : 1, + "type" : "string" + }, + "public-key-bits" : { + "description" : "Certificate's public key size", + "optional" : 1, + "type" : "integer" + }, + "public-key-type" : { + "description" : "Certificate's public key algorithm", + "optional" : 1, + "type" : "string" + }, + "san" : { + "description" : "List of Certificate's SubjectAlternativeName entries.", + "items" : { + "type" : "string" + }, + "optional" : 1, + "renderer" : "yaml", + "type" : "array" + }, + "subject" : { + "description" : "Certificate subject name.", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } }, "leaf" : 1, - "path" : "/nodes/{node}/apt/update", - "text" : "update" + "path" : "/nodes/{node}/certificates/info", + "text" : "info" }, { "info" : { - "GET" : { - "description" : "Get package changelogs.", - "method" : "GET", - "name" : "changelog", + "DELETE" : { + "allowtoken" : 1, + "description" : "DELETE custom certificate chain and key.", + "method" : "DELETE", + "name" : "remove_custom_cert", "parameters" : { "additionalProperties" : 0, "properties" : { - "name" : { - "description" : "Package name.", - "type" : "string", - "typetext" : "" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "version" : { - "description" : "Package version.", + "restart" : { + "default" : 0, + "description" : "Restart pveproxy.", "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "boolean", + "typetext" : "" } } }, @@ -22173,30 +42041,52 @@ var pveapi = [ ] ] }, + "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" + "type" : "null" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/apt/changelog", - "text" : "changelog" - }, - { - "info" : { - "GET" : { - "description" : "Get package information for important Proxmox packages.", - "method" : "GET", - "name" : "versions", + }, + "POST" : { + "allowtoken" : 1, + "description" : "Upload or update custom certificate chain and key.", + "method" : "POST", + "name" : "upload_custom_cert", "parameters" : { "additionalProperties" : 0, "properties" : { + "certificates" : { + "description" : "PEM encoded certificate (chain).", + "format" : "pem-certificate-chain", + "type" : "string", + "typetext" : "" + }, + "force" : { + "default" : 0, + "description" : "Overwrite existing custom or ACME certificate files.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "key" : { + "description" : "PEM encoded private key.", + "format" : "pem-string", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "restart" : { + "default" : 0, + "description" : "Restart pveproxy.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, @@ -22205,28 +42095,85 @@ var pveapi = [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Modify" ] ] }, + "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : {}, - "type" : "object" + "properties" : { + "filename" : { + "optional" : 1, + "type" : "string" + }, + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "optional" : 1, + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" + }, + "issuer" : { + "description" : "Certificate issuer name.", + "optional" : 1, + "type" : "string" + }, + "notafter" : { + "description" : "Certificate's notAfter timestamp (UNIX epoch).", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" + }, + "notbefore" : { + "description" : "Certificate's notBefore timestamp (UNIX epoch).", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" + }, + "pem" : { + "description" : "Certificate in PEM format", + "format" : "pem-certificate", + "optional" : 1, + "type" : "string" + }, + "public-key-bits" : { + "description" : "Certificate's public key size", + "optional" : 1, + "type" : "integer" + }, + "public-key-type" : { + "description" : "Certificate's public key algorithm", + "optional" : 1, + "type" : "string" + }, + "san" : { + "description" : "List of Certificate's SubjectAlternativeName entries.", + "items" : { + "type" : "string" + }, + "optional" : 1, + "renderer" : "yaml", + "type" : "array" + }, + "subject" : { + "description" : "Certificate subject name.", + "optional" : 1, + "type" : "string" + } }, - "type" : "array" + "type" : "object" } } }, "leaf" : 1, - "path" : "/nodes/{node}/apt/versions", - "text" : "versions" + "path" : "/nodes/{node}/certificates/custom", + "text" : "custom" } ], "info" : { "GET" : { - "description" : "Directory index for apt (Advanced Package Tool).", + "allowtoken" : 1, + "description" : "Node index.", "method" : "GET", "name" : "index", "parameters" : { @@ -22245,16 +42192,12 @@ var pveapi = [ }, "returns" : { "items" : { - "properties" : { - "id" : { - "type" : "string" - } - }, + "properties" : {}, "type" : "object" }, "links" : [ { - "href" : "{id}", + "href" : "{name}", "rel" : "child" } ], @@ -22263,251 +42206,406 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/nodes/{node}/apt", - "text" : "apt" + "path" : "/nodes/{node}/certificates", + "text" : "certificates" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get node configuration options.", + "method" : "GET", + "name" : "get_config", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "property" : { + "default" : "all", + "description" : "Return only a specific property from the node configuration.", + "enum" : [ + "acme", + "acmedomain0", + "acmedomain1", + "acmedomain2", + "acmedomain3", + "acmedomain4", + "acmedomain5", + "description", + "startall-onboot-delay", + "wakeonlan" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "acme" : { + "description" : "Node specific ACME settings.", + "format" : { + "account" : { + "default" : "default", + "description" : "ACME account config file name.", + "format" : "pve-configid", + "format_description" : "name", + "optional" : 1, + "type" : "string" + }, + "domains" : { + "description" : "List of domains for this node's ACME certificate", + "format" : "pve-acme-domain-list", + "format_description" : "domain[;domain;...]", + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "acmedomain[n]" : { + "description" : "ACME domain and validation plugin", + "format" : { + "alias" : { + "description" : "Alias for the Domain to verify ACME Challenge over DNS", + "format" : "pve-acme-alias", + "format_description" : "domain", + "optional" : 1, + "type" : "string" + }, + "domain" : { + "default_key" : 1, + "description" : "domain for this node's ACME certificate", + "format" : "pve-acme-domain", + "format_description" : "domain", + "type" : "string" + }, + "plugin" : { + "default" : "standalone", + "description" : "The ACME plugin ID", + "format" : "pve-configid", + "format_description" : "name of the plugin configuration", + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string" + }, + "description" : { + "description" : "Description for the Node. Shown in the web-interface node notes panel. This is saved as comment inside the configuration file.", + "maxLength" : 65536, + "optional" : 1, + "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" + }, + "startall-onboot-delay" : { + "default" : 0, + "description" : "Initial delay in seconds, before starting all the Virtual Guests with on-boot enabled.", + "maximum" : 300, + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "wakeonlan" : { + "description" : "MAC address for wake on LAN", + "format" : "mac-addr", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Set node configuration options.", + "method" : "PUT", + "name" : "set_options", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "acme" : { + "description" : "Node specific ACME settings.", + "format" : { + "account" : { + "default" : "default", + "description" : "ACME account config file name.", + "format" : "pve-configid", + "format_description" : "name", + "optional" : 1, + "type" : "string" + }, + "domains" : { + "description" : "List of domains for this node's ACME certificate", + "format" : "pve-acme-domain-list", + "format_description" : "domain[;domain;...]", + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[account=] [,domains=]" + }, + "acmedomain[n]" : { + "description" : "ACME domain and validation plugin", + "format" : { + "alias" : { + "description" : "Alias for the Domain to verify ACME Challenge over DNS", + "format" : "pve-acme-alias", + "format_description" : "domain", + "optional" : 1, + "type" : "string" + }, + "domain" : { + "default_key" : 1, + "description" : "domain for this node's ACME certificate", + "format" : "pve-acme-domain", + "format_description" : "domain", + "type" : "string" + }, + "plugin" : { + "default" : "standalone", + "description" : "The ACME plugin ID", + "format" : "pve-configid", + "format_description" : "name of the plugin configuration", + "optional" : 1, + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[domain=] [,alias=] [,plugin=]" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "description" : { + "description" : "Description for the Node. Shown in the web-interface node notes panel. This is saved as comment inside the configuration file.", + "maxLength" : 65536, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "startall-onboot-delay" : { + "default" : 0, + "description" : "Initial delay in seconds, before starting all the Virtual Guests with on-boot enabled.", + "maximum" : 300, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - 300)" + }, + "wakeonlan" : { + "description" : "MAC address for wake on LAN", + "format" : "mac-addr", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/config", + "text" : "config" }, { "children" : [ { "children" : [ { - "info" : { - "DELETE" : { - "description" : "Delete rule.", - "method" : "DELETE", - "name" : "delete_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "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", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "List zone content.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", + "type" : "string", + "typetext" : "" + } + } }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Get single rule data.", - "method" : "GET", - "name" : "get_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "perm", + "/sdn/zones/{zone}", + [ + "SDN.Audit" + ], + "any", + 1 + ] }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "status" : { + "description" : "Status.", + "optional" : 1, + "type" : "string" + }, + "statusmsg" : { + "description" : "Status details", + "optional" : 1, + "type" : "string" + }, + "vnet" : { + "description" : "Vnet identifier.", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{vnet}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Modify rule data.", - "method" : "PUT", - "name" : "update_rule", + "leaf" : 1, + "path" : "/nodes/{node}/sdn/zones/{zone}/content", + "text" : "content" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "", + "method" : "GET", + "name" : "diridx", "parameters" : { "additionalProperties" : 0, "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "moveto" : { - "description" : "Move rule to new position . Other arguments are ignored.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", "type" : "string", "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 1, - "type" : "string" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/sdn/zones/{zone}", [ - "Sys.Modify" - ] + "SDN.Audit" + ], + "any", + 1 ] }, - "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "null" + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/firewall/rules/{pos}", - "text" : "{pos}" + "leaf" : 0, + "path" : "/nodes/{node}/sdn/zones/{zone}", + "text" : "{zone}" } ], "info" : { "GET" : { - "description" : "List rules.", + "allowtoken" : 1, + "description" : "Get status for all zones.", "method" : "GET", - "name" : "get_rules", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -22520,799 +42618,932 @@ var pveapi = [ } }, "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "description" : "Only list entries where you have 'SDN.Audit'", + "user" : "all" }, + "protected" : 1, "proxyto" : "node", "returns" : { "items" : { "properties" : { - "pos" : { - "type" : "integer" + "status" : { + "description" : "Status of zone", + "enum" : [ + "available", + "pending", + "error" + ], + "type" : "string" + }, + "zone" : { + "description" : "The SDN zone object identifier.", + "format" : "pve-sdn-zone-id", + "type" : "string" } }, "type" : "object" }, "links" : [ { - "href" : "{pos}", + "href" : "{zone}", "rel" : "child" } ], - "type" : "array" + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/sdn/zones", + "text" : "zones" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "SDN index.", + "method" : "GET", + "name" : "sdnindex", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/sdn", + "text" : "sdn" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "API version details", + "method" : "GET", + "name" : "version", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "release" : { + "description" : "The current installed Proxmox VE Release", + "type" : "string" + }, + "repoid" : { + "description" : "The short git commit hash ID from which this version was build", + "type" : "string" + }, + "version" : { + "description" : "The current installed pve-manager package version", + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/version", + "text" : "version" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read node status", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Reboot or shutdown a node.", + "method" : "POST", + "name" : "node_cmd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "command" : { + "description" : "Specify the command.", + "enum" : [ + "reboot", + "shutdown" + ], + "type" : "string" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/status", + "text" : "status" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read tap/vm network device interface counters", + "method" : "GET", + "name" : "netstat", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/netstat", + "text" : "netstat" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Execute multiple commands in order.", + "method" : "POST", + "name" : "execute", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "commands" : { + "description" : "JSON encoded array of commands.", + "format" : "pve-command-batch", + "type" : "string", + "typetext" : "", + "verbose_description" : "JSON encoded array of commands, where each command is an object with the following properties:\n args: \n\n\t A set of parameter names and their values.\n\n method: (GET|POST|PUT|DELETE)\n\n\t A method related to the API endpoint (GET, POST etc.).\n\n path: \n\n\t A relative path to an API endpoint on this node.\n\n" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/execute", + "text" : "execute" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Try to wake a node via 'wake on LAN' network packet.", + "method" : "POST", + "name" : "wakeonlan", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "target node for wake on LAN packet", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.PowerMgmt" + ] + ] + }, + "protected" : 1, + "returns" : { + "description" : "MAC address used to assemble the WoL magic packet.", + "format" : "mac-addr", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/wakeonlan", + "text" : "wakeonlan" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read node RRD statistics (returns PNG)", + "method" : "GET", + "name" : "rrd", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" + }, + "ds" : { + "description" : "The list of datasources you want to display.", + "format" : "pve-configid-list", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "properties" : { + "filename" : { + "type" : "string" } }, - "POST" : { - "description" : "Create new rule.", - "method" : "POST", - "name" : "create_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20, - "minLength" : 2, - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "description" : "Descriptive comment.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "enable" : { - "description" : "Flag to enable/disable a rule.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "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, - "minLength" : 2, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "macro" : { - "description" : "Use predefined standard macro.", - "maxLength" : 128, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "pos" : { - "description" : "Update rule at position .", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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.", - "format" : "pve-fw-sport-spec", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "type" : { - "description" : "Rule type.", - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - } - } + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/rrd", + "text" : "rrd" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read node RRD statistics", + "method" : "GET", + "name" : "rrddata", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cf" : { + "description" : "The RRD consolidation function", + "enum" : [ + "AVERAGE", + "MAX" + ], + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" + "timeframe" : { + "description" : "Specify the time frame you are interested in.", + "enum" : [ + "hour", + "day", + "week", + "month", + "year" + ], + "type" : "string" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/firewall/rules", - "text" : "rules" - }, - { - "info" : { - "GET" : { - "description" : "Get host firewall options.", - "method" : "GET", - "name" : "get_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/rrddata", + "text" : "rrddata" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Read system log", + "method" : "GET", + "name" : "syslog", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "proxyto" : "node", - "returns" : { - "properties" : { - "enable" : { - "description" : "Enable host firewall rules.", - "optional" : 1, - "type" : "boolean" - }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "ndp" : { - "description" : "Enable NDP.", - "optional" : 1, - "type" : "boolean" - }, - "nf_conntrack_max" : { - "description" : "Maximum number of tracked connections.", - "minimum" : 32768, - "optional" : 1, - "type" : "integer" - }, - "nf_conntrack_tcp_timeout_established" : { - "description" : "Conntrack established timeout.", - "minimum" : 7875, - "optional" : 1, - "type" : "integer" - }, - "nosmurfs" : { - "description" : "Enable SMURFS filter.", - "optional" : 1, - "type" : "boolean" - }, - "smurf_log_level" : { - "description" : "Log level for SMURFS filter.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "tcp_flags_log_level" : { - "description" : "Log level for illegal tcp flags filter.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "tcpflags" : { - "description" : "Filter illegal combinations of TCP flags.", - "optional" : 1, - "type" : "boolean" - } - }, - "type" : "object" - } - }, - "PUT" : { - "description" : "Set Firewall options.", - "method" : "PUT", - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "enable" : { - "description" : "Enable host firewall rules.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "ndp" : { - "description" : "Enable NDP.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "nf_conntrack_max" : { - "description" : "Maximum number of tracked connections.", - "minimum" : 32768, - "optional" : 1, - "type" : "integer", - "typetext" : " (32768 - N)" - }, - "nf_conntrack_tcp_timeout_established" : { - "description" : "Conntrack established timeout.", - "minimum" : 7875, - "optional" : 1, - "type" : "integer", - "typetext" : " (7875 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "nosmurfs" : { - "description" : "Enable SMURFS filter.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "smurf_log_level" : { - "description" : "Log level for SMURFS filter.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "tcp_flags_log_level" : { - "description" : "Log level for illegal tcp flags filter.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "optional" : 1, - "type" : "string" - }, - "tcpflags" : { - "description" : "Filter illegal combinations of TCP flags.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } - } + "service" : { + "description" : "Service ID", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "since" : { + "description" : "Display all log since this date-time string.", + "optional" : 1, + "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", + "type" : "string" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" + "until" : { + "description" : "Display all log until this date-time string.", + "optional" : 1, + "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", + "type" : "string" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/firewall/options", - "text" : "options" - }, - { - "info" : { - "GET" : { - "description" : "Read firewall log", - "method" : "GET", - "name" : "log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Syslog" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" } }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Syslog" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/firewall/log", - "text" : "log" + "type" : "object" + }, + "type" : "array" + } } - ], + }, + "leaf" : 1, + "path" : "/nodes/{node}/syslog", + "text" : "syslog" + }, + { "info" : { "GET" : { - "description" : "Directory index.", + "allowtoken" : 1, + "description" : "Read Journal", "method" : "GET", - "name" : "index", + "name" : "journal", "parameters" : { "additionalProperties" : 0, "properties" : { + "endcursor" : { + "description" : "End before the given Cursor. Conflicts with 'until'", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "lastentries" : { + "description" : "Limit to the last X lines. Conflicts with a range.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "since" : { + "description" : "Display all log since this UNIX epoch. Conflicts with 'startcursor'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "startcursor" : { + "description" : "Start after the given Cursor. Conflicts with 'since'", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "until" : { + "description" : "Display all log until this UNIX epoch. Conflicts with 'endcursor'.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } } }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Syslog" + ] + ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { "items" : { - "properties" : {}, - "type" : "object" + "type" : "string" }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], "type" : "array" } } }, - "leaf" : 0, - "path" : "/nodes/{node}/firewall", - "text" : "firewall" + "leaf" : 1, + "path" : "/nodes/{node}/journal", + "text" : "journal" }, { - "children" : [ - { - "children" : [ - { - "info" : { - "GET" : { - "description" : "Get replication job status.", - "method" : "GET", - "name" : "job_status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", - "format" : "pve-replication-job-id", - "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "description" : "Requires the VM.Audit permission on /vms/.", - "user" : "all" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "properties" : {}, - "type" : "object" - } - } + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Creates a VNC Shell proxy.", + "method" : "POST", + "name" : "vncshell", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cmd" : { + "default" : "login", + "description" : "Run specific command or default to login.", + "enum" : [ + "upgrade", + "login", + "ceph_install" + ], + "optional" : 1, + "type" : "string" }, - "leaf" : 1, - "path" : "/nodes/{node}/replication/{id}/status", - "text" : "status" - }, - { - "info" : { - "GET" : { - "description" : "Read replication job log.", - "method" : "GET", - "name" : "read_job_log", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", - "format" : "pve-replication-job-id", - "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", - "type" : "string" - }, - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - } - } - }, - "permissions" : { - "description" : "Requires the VM.Audit permission on /vms/, or 'Sys.Audit' on '/nodes/'", - "user" : "all" - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - } - } + "cmd-opts" : { + "default" : "", + "description" : "Add parameters to a command. Encoded as null terminated strings.", + "optional" : 1, + "requires" : "cmd", + "type" : "string", + "typetext" : "" }, - "leaf" : 1, - "path" : "/nodes/{node}/replication/{id}/log", - "text" : "log" - }, - { - "info" : { - "POST" : { - "description" : "Schedule replication job to start as soon as possible.", - "method" : "POST", - "name" : "schedule_now", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", - "format" : "pve-replication-job-id", - "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } + "height" : { + "description" : "sets the height of the console in pixels.", + "maximum" : 2160, + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - 2160)" }, - "leaf" : 1, - "path" : "/nodes/{node}/replication/{id}/schedule_now", - "text" : "schedule_now" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "websocket" : { + "description" : "use websocket instead of standard vnc.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "width" : { + "description" : "sets the width of the console in pixels.", + "maximum" : 4096, + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - 4096)" + } } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "description" : "Replication Job ID. The ID is composed of a Guest ID and a job number, separated by a hyphen, i.e. '-'.", - "format" : "pve-replication-job-id", - "pattern" : "[1-9][0-9]{2,8}-\\d{1,9}", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'" + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "cert" : { + "type" : "string" }, - "permissions" : { - "user" : "all" + "port" : { + "type" : "integer" }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/vncshell", + "text" : "vncshell" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Creates a VNC Shell proxy.", + "method" : "POST", + "name" : "termproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "cmd" : { + "default" : "login", + "description" : "Run specific command or default to login.", + "enum" : [ + "upgrade", + "login", + "ceph_install" ], - "type" : "array" + "optional" : 1, + "type" : "string" + }, + "cmd-opts" : { + "default" : "", + "description" : "Add parameters to a command. Encoded as null terminated strings.", + "optional" : 1, + "requires" : "cmd", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'" + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/termproxy", + "text" : "termproxy" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Opens a websocket for VNC traffic.", + "method" : "GET", + "name" : "vncwebsocket", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "port" : { + "description" : "Port number returned by previous vncproxy call.", + "maximum" : 5999, + "minimum" : 5900, + "type" : "integer", + "typetext" : " (5900 - 5999)" + }, + "vncticket" : { + "description" : "Ticket from previous call to vncproxy.", + "maxLength" : 512, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)." + }, + "returns" : { + "properties" : { + "port" : { + "type" : "string" } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}/replication/{id}", - "text" : "{id}" + }, + "type" : "object" + } } - ], + }, + "leaf" : 1, + "path" : "/nodes/{node}/vncwebsocket", + "text" : "vncwebsocket" + }, + { "info" : { - "GET" : { - "description" : "List status of all replication jobs on this node.", - "method" : "GET", - "name" : "status", + "POST" : { + "allowtoken" : 1, + "description" : "Creates a SPICE shell.", + "method" : "POST", + "name" : "spiceshell", "parameters" : { "additionalProperties" : 0, "properties" : { - "guest" : { - "description" : "Only list replication jobs for this guest.", - "format" : "pve-vmid", - "minimum" : 1, + "cmd" : { + "default" : "login", + "description" : "Run specific command or default to login.", + "enum" : [ + "upgrade", + "login", + "ceph_install" + ], "optional" : 1, - "type" : "integer", - "typetext" : " (1 - N)" + "type" : "string" + }, + "cmd-opts" : { + "default" : "", + "description" : "Add parameters to a command. Encoded as null terminated strings.", + "optional" : 1, + "requires" : "cmd", + "type" : "string", + "typetext" : "" }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "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 reasonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", + "format" : "address", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, "permissions" : { - "description" : "Requires the VM.Audit permission on /vms/.", - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'" }, "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "id" : { - "type" : "string" - } + "additionalProperties" : 1, + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", + "properties" : { + "host" : { + "type" : "string" }, - "type" : "object" - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" + "password" : { + "type" : "string" + }, + "proxy" : { + "type" : "string" + }, + "tls-port" : { + "type" : "integer" + }, + "type" : { + "type" : "string" } - ], - "type" : "array" + } } } }, - "leaf" : 0, - "path" : "/nodes/{node}/replication", - "text" : "replication" + "leaf" : 1, + "path" : "/nodes/{node}/spiceshell", + "text" : "spiceshell" }, { "info" : { "GET" : { - "description" : "API version details", + "allowtoken" : 1, + "description" : "Read DNS settings.", "method" : "GET", - "name" : "version", + "name" : "dns", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -23325,35 +43556,111 @@ var pveapi = [ } }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] }, "proxyto" : "node", "returns" : { + "additionalProperties" : 0, "properties" : { - "release" : { + "dns1" : { + "description" : "First name server IP address.", + "optional" : 1, "type" : "string" }, - "repoid" : { + "dns2" : { + "description" : "Second name server IP address.", + "optional" : 1, "type" : "string" }, - "version" : { + "dns3" : { + "description" : "Third name server IP address.", + "optional" : 1, + "type" : "string" + }, + "search" : { + "description" : "Search domain for host-name lookup.", + "optional" : 1, "type" : "string" } }, "type" : "object" } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Write DNS settings.", + "method" : "PUT", + "name" : "update_dns", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dns1" : { + "description" : "First name server IP address.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dns2" : { + "description" : "Second name server IP address.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "dns3" : { + "description" : "Third name server IP address.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "search" : { + "description" : "Search domain for host-name lookup.", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } } }, "leaf" : 1, - "path" : "/nodes/{node}/version", - "text" : "version" + "path" : "/nodes/{node}/dns", + "text" : "dns" }, { "info" : { "GET" : { - "description" : "Read node status", + "allowtoken" : 1, + "description" : "Read server time and time zone settings.", "method" : "GET", - "name" : "status", + "name" : "time", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -23376,30 +43683,46 @@ var pveapi = [ }, "proxyto" : "node", "returns" : { - "properties" : {}, + "additionalProperties" : 0, + "properties" : { + "localtime" : { + "description" : "Seconds since 1970-01-01 00:00:00 (local time)", + "minimum" : 1297163644, + "renderer" : "timestamp_gmt", + "type" : "integer" + }, + "time" : { + "description" : "Seconds since 1970-01-01 00:00:00 UTC.", + "minimum" : 1297163644, + "renderer" : "timestamp", + "type" : "integer" + }, + "timezone" : { + "description" : "Time zone", + "type" : "string" + } + }, "type" : "object" } }, - "POST" : { - "description" : "Reboot or shutdown a node.", - "method" : "POST", - "name" : "node_cmd", + "PUT" : { + "allowtoken" : 1, + "description" : "Set time zone.", + "method" : "PUT", + "name" : "set_timezone", "parameters" : { "additionalProperties" : 0, "properties" : { - "command" : { - "description" : "Specify the command.", - "enum" : [ - "reboot", - "shutdown" - ], - "type" : "string" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" + }, + "timezone" : { + "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.", + "type" : "string", + "typetext" : "" } } }, @@ -23408,7 +43731,7 @@ var pveapi = [ "perm", "/nodes/{node}", [ - "Sys.PowerMgmt" + "Sys.Modify" ] ] }, @@ -23420,15 +43743,16 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/nodes/{node}/status", - "text" : "status" + "path" : "/nodes/{node}/time", + "text" : "time" }, { "info" : { "GET" : { - "description" : "Read tap/vm network device interface counters", + "allowtoken" : 1, + "description" : "Get list of appliances.", "method" : "GET", - "name" : "netstat", + "name" : "aplinfo", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -23441,13 +43765,7 @@ var pveapi = [ } }, "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "user" : "all" }, "proxyto" : "node", "returns" : { @@ -23457,26 +43775,130 @@ var pveapi = [ }, "type" : "array" } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Download appliance templates.", + "method" : "POST", + "name" : "apl_download", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "The storage where the template will be stored", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "template" : { + "description" : "The template which will downloaded", + "maxLength" : 255, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.AllocateTemplate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } } }, "leaf" : 1, - "path" : "/nodes/{node}/netstat", - "text" : "netstat" + "path" : "/nodes/{node}/aplinfo", + "text" : "aplinfo" }, { "info" : { - "POST" : { - "description" : "Execute multiple commands in order.", - "method" : "POST", - "name" : "execute", + "GET" : { + "allowtoken" : 1, + "description" : "Query metadata of an URL: file size, file name and mime type.", + "method" : "GET", + "name" : "query_url_metadata", "parameters" : { "additionalProperties" : 0, "properties" : { - "commands" : { - "description" : "JSON encoded array of commands.", + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" }, + "url" : { + "description" : "The URL to query the metadata from.", + "pattern" : "https?://.*", + "type" : "string" + }, + "verify-certificates" : { + "default" : 1, + "description" : "If false, no SSL/TLS certificates will be verified.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Sys.Modify" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "properties" : { + "filename" : { + "optional" : 1, + "type" : "string" + }, + "mimetype" : { + "optional" : 1, + "type" : "string" + }, + "size" : { + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/query-url-metadata", + "text" : "query-url-metadata" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Gather various systems information about a node", + "method" : "GET", + "name" : "report", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "node" : { "description" : "The cluster node name.", "format" : "pve-node", @@ -23497,99 +43919,127 @@ var pveapi = [ "protected" : 1, "proxyto" : "node", "returns" : { - "properties" : {}, - "type" : "array" + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/execute", - "text" : "execute" + "path" : "/nodes/{node}/report", + "text" : "report" }, { "info" : { - "GET" : { - "description" : "Read node RRD statistics (returns PNG)", - "method" : "GET", - "name" : "rrd", + "POST" : { + "allowtoken" : 1, + "description" : "Start all VMs and containers located on this node (by default only those with onboot=1).", + "method" : "POST", + "name" : "startall", "parameters" : { "additionalProperties" : 0, "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], + "force" : { + "default" : "off", + "description" : "Issue start command even if virtual guest have 'onboot' not set or set to off.", "optional" : 1, - "type" : "string" + "type" : "boolean", + "typetext" : "" }, - "ds" : { - "description" : "The list of datasources you want to display.", - "format" : "pve-configid-list", + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", "typetext" : "" }, + "vms" : { + "description" : "Only consider guests from this comma separated list of VMIDs.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "VM.PowerMgmt" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/startall", + "text" : "startall" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Stop all VMs and Containers.", + "method" : "POST", + "name" : "stopall", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" + "vms" : { + "description" : "Only consider Guests with these IDs.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Audit" + "VM.PowerMgmt" ] ] }, "protected" : 1, + "proxyto" : "node", "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, - "type" : "object" + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/rrd", - "text" : "rrd" + "path" : "/nodes/{node}/stopall", + "text" : "stopall" }, { "info" : { - "GET" : { - "description" : "Read node RRD statistics", - "method" : "GET", - "name" : "rrddata", + "POST" : { + "allowtoken" : 1, + "description" : "Migrate all VMs and Containers.", + "method" : "POST", + "name" : "migrateall", "parameters" : { "additionalProperties" : 0, "properties" : { - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], + "maxworkers" : { + "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!", + "minimum" : 1, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (1 - N)" }, "node" : { "description" : "The cluster node name.", @@ -23597,159 +44047,117 @@ var pveapi = [ "type" : "string", "typetext" : "" }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" + "target" : { + "description" : "Target node.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vms" : { + "description" : "Only consider Guests with these IDs.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "with-local-disks" : { + "description" : "Enable live storage migration for local disk", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Audit" + "VM.Migrate" ] ] }, "protected" : 1, + "proxyto" : "node", "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" + "type" : "string" } } }, "leaf" : 1, - "path" : "/nodes/{node}/rrddata", - "text" : "rrddata" + "path" : "/nodes/{node}/migrateall", + "text" : "migrateall" }, { "info" : { "GET" : { - "description" : "Read system log", + "allowtoken" : 1, + "description" : "Get the content of /etc/hosts.", "method" : "GET", - "name" : "syslog", + "name" : "get_etc_hosts", "parameters" : { "additionalProperties" : 0, "properties" : { - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "since" : { - "description" : "Display all log since this date-time string.", - "optional" : 1, - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "type" : "string" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "until" : { - "description" : "Display all log until this date-time string.", - "optional" : 1, - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "type" : "string" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Syslog" + "Sys.Audit" ] ] }, "protected" : 1, "proxyto" : "node", "returns" : { - "items" : { - "properties" : { - "n" : { - "description" : "Line number", - "type" : "integer" - }, - "t" : { - "description" : "Line text", - "type" : "string" - } + "properties" : { + "data" : { + "description" : "The content of /etc/hosts.", + "type" : "string" }, - "type" : "object" + "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" : "array" + "type" : "object" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/syslog", - "text" : "syslog" - }, - { - "info" : { + }, "POST" : { - "description" : "Creates a VNC Shell proxy.", + "allowtoken" : 1, + "description" : "Write /etc/hosts.", "method" : "POST", - "name" : "vncshell", + "name" : "write_etc_hosts", "parameters" : { "additionalProperties" : 0, "properties" : { - "height" : { - "description" : "sets the height of the console in pixels.", - "maximum" : 2160, - "minimum" : 16, + "data" : { + "description" : "The target content of /etc/hosts.", + "type" : "string", + "typetext" : "" + }, + "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" : "integer", - "typetext" : " (16 - 2160)" + "type" : "string", + "typetext" : "" }, "node" : { "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", "typetext" : "" - }, - "upgrade" : { - "default" : 0, - "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "websocket" : { - "description" : "use websocket instead of standard vnc.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "width" : { - "description" : "sets the width of the console in pixels.", - "maximum" : 4096, - "minimum" : 16, - "optional" : 1, - "type" : "integer", - "typetext" : " (16 - 4096)" } } }, @@ -23758,416 +44166,1686 @@ var pveapi = [ "perm", "/nodes/{node}", [ - "Sys.Console" + "Sys.Modify" ] - ], - "description" : "Restricted to users on realm 'pam'" + ] }, "protected" : 1, + "proxyto" : "node", "returns" : { - "additionalProperties" : 0, - "properties" : { - "cert" : { - "type" : "string" - }, - "port" : { - "type" : "integer" - }, - "ticket" : { - "type" : "string" - }, - "upid" : { - "type" : "string" - }, - "user" : { - "type" : "string" - } - } + "type" : "null" } } }, "leaf" : 1, - "path" : "/nodes/{node}/vncshell", - "text" : "vncshell" + "path" : "/nodes/{node}/hosts", + "text" : "hosts" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Node index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}", + "text" : "{node}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Cluster node index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "cpu" : { + "description" : "CPU utilization.", + "optional" : 1, + "renderer" : "fraction_as_percentage", + "type" : "number" + }, + "level" : { + "description" : "Support level.", + "optional" : 1, + "type" : "string" + }, + "maxcpu" : { + "description" : "Number of available CPUs.", + "optional" : 1, + "type" : "integer" + }, + "maxmem" : { + "description" : "Number of available memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "mem" : { + "description" : "Used memory in bytes.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string" + }, + "ssl_fingerprint" : { + "description" : "The SSL fingerprint for the node certificate.", + "optional" : 1, + "type" : "string" + }, + "status" : { + "description" : "Node status.", + "enum" : [ + "unknown", + "online", + "offline" + ], + "type" : "string" + }, + "uptime" : { + "description" : "Node uptime in seconds.", + "optional" : 1, + "renderer" : "duration", + "type" : "integer" + } + }, + "type" : "object" }, - { - "info" : { - "GET" : { - "description" : "Opens a weksocket for VNC traffic.", - "method" : "GET", - "name" : "vncwebsocket", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "links" : [ + { + "href" : "{node}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes", + "text" : "nodes" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete storage configuration.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Read storage configuration.", + "method" : "GET", + "name" : "read", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Allocate" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update storage configuration.", + "method" : "PUT", + "name" : "update", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "blocksize" : { + "description" : "block size", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bwlimit" : { + "description" : "Set bandwidth/io limits various operations.", + "format" : { + "clone" : { + "description" : "bandwidth limit in KiB/s for cloning disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" }, - "port" : { - "description" : "Port number returned by previous vncproxy call.", - "maximum" : 5999, - "minimum" : 5900, - "type" : "integer", - "typetext" : " (5900 - 5999)" + "default" : { + "description" : "default bandwidth limit in KiB/s", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" }, - "vncticket" : { - "description" : "Ticket from previous call to vncproxy.", - "maxLength" : 512, - "type" : "string", - "typetext" : "" + "migration" : { + "description" : "bandwidth limit in KiB/s for migrating guests (including moving local disks)", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "move" : { + "description" : "bandwidth limit in KiB/s for moving disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "restore" : { + "description" : "bandwidth limit in KiB/s for restoring guests from backups", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[clone=] [,default=] [,migration=] [,move=] [,restore=]" + }, + "comstar_hg" : { + "description" : "host group for comstar views", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "comstar_tg" : { + "description" : "target group for comstar views", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "content" : { + "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", + "format" : "pve-storage-content-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "data-pool" : { + "description" : "Data Pool (for erasure coding only)", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", + "typetext" : "" + }, + "disable" : { + "description" : "Flag to disable the storage.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "domain" : { + "description" : "CIFS domain.", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "encryption-key" : { + "description" : "Encryption key. Use 'autogen' to generate one automatically without passphrase.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "optional" : 1, + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" + }, + "format" : { + "description" : "Default image format.", + "format" : "pve-storage-format", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fs-name" : { + "description" : "The Ceph filesystem name.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fuse" : { + "description" : "Mount CephFS through FUSE.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "is_mountpoint" : { + "default" : "no", + "description" : "Assume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "keyring" : { + "description" : "Client keyring contents (for external clusters).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "krbd" : { + "description" : "Always access rbd through krbd kernel module.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "lio_tpg" : { + "description" : "target portal group for Linux LIO targets", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "master-pubkey" : { + "description" : "Base64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "max-protected-backups" : { + "default" : "Unlimited for users with Datastore.Allocate privilege, 5 for other users", + "description" : "Maximal number of protected backups per guest. Use '-1' for unlimited.", + "minimum" : -1, + "optional" : 1, + "type" : "integer", + "typetext" : " (-1 - N)" + }, + "maxfiles" : { + "description" : "Deprecated: use 'prune-backups' instead. Maximal number of backup files per VM. Use '0' for unlimited.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "mkdir" : { + "default" : "yes", + "description" : "Create the directory if it doesn't exist.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "monhost" : { + "description" : "IP addresses of monitors (for external clusters).", + "format" : "pve-storage-portal-dns-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mountpoint" : { + "description" : "mount point", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "namespace" : { + "description" : "Namespace.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "nocow" : { + "default" : 0, + "description" : "Set the NOCOW flag on files. Disables data checksumming and causes data errors to be unrecoverable from while allowing direct I/O. Only use this if data does not need to be any more safe than on a single ext4 formatted disk with no underlying raid system.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "nowritecache" : { + "description" : "disable write caching on the target", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "options" : { + "description" : "NFS mount options (see 'man nfs')", + "format" : "pve-storage-options", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "Password for accessing the share/datastore.", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "pool" : { + "description" : "Pool.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "port" : { + "default" : 8007, + "description" : "For non default port.", + "maximum" : 65535, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 65535)" + }, + "preallocation" : { + "default" : "metadata", + "description" : "Preallocation mode for raw and qcow2 images. Using 'metadata' on raw images results in preallocation=off.", + "enum" : [ + "off", + "metadata", + "falloc", + "full" + ], + "optional" : 1, + "type" : "string" + }, + "prune-backups" : { + "description" : "The retention options with shorter intervals are processed first with --keep-last being the very first one. Each option covers a specific period of time. We say that backups within this period are covered by this option. The next option does not take care of already covered backups and only considers older backups.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "saferemove" : { + "description" : "Zero-out data when removing LVs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "saferemove_throughput" : { + "description" : "Wipe throughput (cstream -t parameter value).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server" : { + "description" : "Server IP or DNS name.", + "format" : "pve-storage-server", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server2" : { + "description" : "Backup volfile server IP or DNS name.", + "format" : "pve-storage-server", + "optional" : 1, + "requires" : "server", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Console" - ] + "shared" : { + "description" : "Mark storage as shared.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "smbversion" : { + "default" : "default", + "description" : "SMB protocol version. 'default' if not set, negotiates the highest SMB2+ version supported by both the client and server.", + "enum" : [ + "default", + "2.0", + "2.1", + "3", + "3.0", + "3.11" ], - "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)." + "optional" : 1, + "type" : "string" }, - "returns" : { + "sparse" : { + "description" : "use sparse volumes", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "subdir" : { + "description" : "Subdir to mount.", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tagged_only" : { + "description" : "Only use logical volumes tagged with 'pve-vm-ID'.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "transport" : { + "description" : "Gluster transport: tcp or rdma", + "enum" : [ + "tcp", + "rdma", + "unix" + ], + "optional" : 1, + "type" : "string" + }, + "username" : { + "description" : "RBD Id.", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "properties" : { + "config" : { + "additionalProperties" : 1, + "description" : "Partial, possible server generated, configuration properties.", + "optional" : 1, "properties" : { - "port" : { + "encryption-key" : { + "description" : "The, possible auto-generated, encryption-key.", + "optional" : 1, "type" : "string" } }, "type" : "object" + }, + "storage" : { + "description" : "The ID of the created storage.", + "type" : "string" + }, + "type" : { + "description" : "The type of the created storage.", + "enum" : [ + "btrfs", + "cephfs", + "cifs", + "dir", + "glusterfs", + "iscsi", + "iscsidirect", + "lvm", + "lvmthin", + "nfs", + "pbs", + "rbd", + "zfs", + "zfspool" + ], + "type" : "string" } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/storage/{storage}", + "text" : "{storage}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Storage index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "type" : { + "description" : "Only list storage of specific type", + "enum" : [ + "btrfs", + "cephfs", + "cifs", + "dir", + "glusterfs", + "iscsi", + "iscsidirect", + "lvm", + "lvmthin", + "nfs", + "pbs", + "rbd", + "zfs", + "zfspool" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "storage" : { + "type" : "string" } }, - "leaf" : 1, - "path" : "/nodes/{node}/vncwebsocket", - "text" : "vncwebsocket" + "type" : "object" }, - { - "info" : { - "POST" : { - "description" : "Creates a SPICE shell.", - "method" : "POST", - "name" : "spiceshell", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "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).", - "format" : "address", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "upgrade" : { - "default" : 0, - "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } - } + "links" : [ + { + "href" : "{storage}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create a new storage.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "authsupported" : { + "description" : "Authsupported.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "base" : { + "description" : "Base volume. This volume is automatically activated.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "blocksize" : { + "description" : "block size", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bwlimit" : { + "description" : "Set bandwidth/io limits various operations.", + "format" : { + "clone" : { + "description" : "bandwidth limit in KiB/s for cloning disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Console" - ] - ], - "description" : "Restricted to users on realm 'pam'" + "default" : { + "description" : "default bandwidth limit in KiB/s", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 1, - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", - "properties" : { - "host" : { - "type" : "string" - }, - "password" : { - "type" : "string" - }, - "proxy" : { - "type" : "string" - }, - "tls-port" : { - "type" : "integer" - }, - "type" : { - "type" : "string" - } - } + "migration" : { + "description" : "bandwidth limit in KiB/s for migrating guests (including moving local disks)", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "move" : { + "description" : "bandwidth limit in KiB/s for moving disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "restore" : { + "description" : "bandwidth limit in KiB/s for restoring guests from backups", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[clone=] [,default=] [,migration=] [,move=] [,restore=]" + }, + "comstar_hg" : { + "description" : "host group for comstar views", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "comstar_tg" : { + "description" : "target group for comstar views", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "content" : { + "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", + "format" : "pve-storage-content-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "data-pool" : { + "description" : "Data Pool (for erasure coding only)", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "datastore" : { + "description" : "Proxmox Backup Server datastore name.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "disable" : { + "description" : "Flag to disable the storage.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "domain" : { + "description" : "CIFS domain.", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "encryption-key" : { + "description" : "Encryption key. Use 'autogen' to generate one automatically without passphrase.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "export" : { + "description" : "NFS export path.", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "optional" : 1, + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" + }, + "format" : { + "description" : "Default image format.", + "format" : "pve-storage-format", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fs-name" : { + "description" : "The Ceph filesystem name.", + "format" : "pve-configid", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "fuse" : { + "description" : "Mount CephFS through FUSE.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "is_mountpoint" : { + "default" : "no", + "description" : "Assume the given path is an externally managed mountpoint and consider the storage offline if it is not mounted. Using a boolean (yes/no) value serves as a shortcut to using the target path in this field.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "iscsiprovider" : { + "description" : "iscsi provider", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "keyring" : { + "description" : "Client keyring contents (for external clusters).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "krbd" : { + "description" : "Always access rbd through krbd kernel module.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "lio_tpg" : { + "description" : "target portal group for Linux LIO targets", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "master-pubkey" : { + "description" : "Base64-encoded, PEM-formatted public RSA key. Used to encrypt a copy of the encryption-key which will be added to each encrypted backup.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "max-protected-backups" : { + "default" : "Unlimited for users with Datastore.Allocate privilege, 5 for other users", + "description" : "Maximal number of protected backups per guest. Use '-1' for unlimited.", + "minimum" : -1, + "optional" : 1, + "type" : "integer", + "typetext" : " (-1 - N)" + }, + "maxfiles" : { + "description" : "Deprecated: use 'prune-backups' instead. Maximal number of backup files per VM. Use '0' for unlimited.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "mkdir" : { + "default" : "yes", + "description" : "Create the directory if it doesn't exist.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "monhost" : { + "description" : "IP addresses of monitors (for external clusters).", + "format" : "pve-storage-portal-dns-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mountpoint" : { + "description" : "mount point", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "namespace" : { + "description" : "Namespace.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "nocow" : { + "default" : 0, + "description" : "Set the NOCOW flag on files. Disables data checksumming and causes data errors to be unrecoverable from while allowing direct I/O. Only use this if data does not need to be any more safe than on a single ext4 formatted disk with no underlying raid system.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "nodes" : { + "description" : "List of cluster node names.", + "format" : "pve-node-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "nowritecache" : { + "description" : "disable write caching on the target", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "options" : { + "description" : "NFS mount options (see 'man nfs')", + "format" : "pve-storage-options", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "Password for accessing the share/datastore.", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "path" : { + "description" : "File system path.", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "pool" : { + "description" : "Pool.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "port" : { + "default" : 8007, + "description" : "For non default port.", + "maximum" : 65535, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 65535)" + }, + "portal" : { + "description" : "iSCSI portal (IP or DNS name with optional port).", + "format" : "pve-storage-portal-dns", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "preallocation" : { + "default" : "metadata", + "description" : "Preallocation mode for raw and qcow2 images. Using 'metadata' on raw images results in preallocation=off.", + "enum" : [ + "off", + "metadata", + "falloc", + "full" + ], + "optional" : 1, + "type" : "string" + }, + "prune-backups" : { + "description" : "The retention options with shorter intervals are processed first with --keep-last being the very first one. Each option covers a specific period of time. We say that backups within this period are covered by this option. The next option does not take care of already covered backups and only considers older backups.", + "format" : "prune-backups", + "optional" : 1, + "type" : "string", + "typetext" : "[keep-all=<1|0>] [,keep-daily=] [,keep-hourly=] [,keep-last=] [,keep-monthly=] [,keep-weekly=] [,keep-yearly=]" + }, + "saferemove" : { + "description" : "Zero-out data when removing LVs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "saferemove_throughput" : { + "description" : "Wipe throughput (cstream -t parameter value).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server" : { + "description" : "Server IP or DNS name.", + "format" : "pve-storage-server", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server2" : { + "description" : "Backup volfile server IP or DNS name.", + "format" : "pve-storage-server", + "optional" : 1, + "requires" : "server", + "type" : "string", + "typetext" : "" + }, + "share" : { + "description" : "CIFS share.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "shared" : { + "description" : "Mark storage as shared.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "smbversion" : { + "default" : "default", + "description" : "SMB protocol version. 'default' if not set, negotiates the highest SMB2+ version supported by both the client and server.", + "enum" : [ + "default", + "2.0", + "2.1", + "3", + "3.0", + "3.11" + ], + "optional" : 1, + "type" : "string" + }, + "sparse" : { + "description" : "use sparse volumes", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "subdir" : { + "description" : "Subdir to mount.", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "tagged_only" : { + "description" : "Only use logical volumes tagged with 'pve-vm-ID'.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "target" : { + "description" : "iSCSI target.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "thinpool" : { + "description" : "LVM thin pool LV name.", + "format" : "pve-storage-vgname", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "transport" : { + "description" : "Gluster transport: tcp or rdma", + "enum" : [ + "tcp", + "rdma", + "unix" + ], + "optional" : 1, + "type" : "string" }, - "leaf" : 1, - "path" : "/nodes/{node}/spiceshell", - "text" : "spiceshell" + "type" : { + "description" : "Storage type.", + "enum" : [ + "btrfs", + "cephfs", + "cifs", + "dir", + "glusterfs", + "iscsi", + "iscsidirect", + "lvm", + "lvmthin", + "nfs", + "pbs", + "rbd", + "zfs", + "zfspool" + ], + "type" : "string" + }, + "username" : { + "description" : "RBD Id.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vgname" : { + "description" : "Volume group name.", + "format" : "pve-storage-vgname", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "volume" : { + "description" : "Glusterfs Volume.", + "optional" : 1, + "type" : "string", + "typetext" : "" + } }, - { - "info" : { - "GET" : { - "description" : "Read DNS settings.", - "method" : "GET", - "name" : "dns", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 0, - "properties" : { - "dns1" : { - "description" : "First name server IP address.", - "optional" : 1, - "type" : "string" - }, - "dns2" : { - "description" : "Second name server IP address.", - "optional" : 1, - "type" : "string" - }, - "dns3" : { - "description" : "Third name server IP address.", - "optional" : 1, - "type" : "string" - }, - "search" : { - "description" : "Search domain for host-name lookup.", - "optional" : 1, - "type" : "string" - } - }, - "type" : "object" + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "properties" : { + "config" : { + "additionalProperties" : 1, + "description" : "Partial, possible server generated, configuration properties.", + "optional" : 1, + "properties" : { + "encryption-key" : { + "description" : "The, possible auto-generated, encryption-key.", + "optional" : 1, + "type" : "string" } }, - "PUT" : { - "description" : "Write DNS settings.", - "method" : "PUT", - "name" : "update_dns", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "dns1" : { - "description" : "First name server IP address.", - "format" : "ip", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dns2" : { - "description" : "Second name server IP address.", - "format" : "ip", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "dns3" : { - "description" : "Third name server IP address.", - "format" : "ip", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "search" : { - "description" : "Search domain for host-name lookup.", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } + "type" : "object" }, - "leaf" : 1, - "path" : "/nodes/{node}/dns", - "text" : "dns" + "storage" : { + "description" : "The ID of the created storage.", + "type" : "string" + }, + "type" : { + "description" : "The type of the created storage.", + "enum" : [ + "btrfs", + "cephfs", + "cifs", + "dir", + "glusterfs", + "iscsi", + "iscsidirect", + "lvm", + "lvmthin", + "nfs", + "pbs", + "rbd", + "zfs", + "zfspool" + ], + "type" : "string" + } }, + "type" : "object" + } + } + }, + "leaf" : 0, + "path" : "/storage", + "text" : "storage" + }, + { + "children" : [ + { + "children" : [ { - "info" : { - "GET" : { - "description" : "Read server time and time zone settings.", - "method" : "GET", - "name" : "time", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "proxyto" : "node", - "returns" : { - "additionalProperties" : 0, - "properties" : { - "localtime" : { - "description" : "Seconds since 1970-01-01 00:00:00 (local time)", - "minimum" : 1297163644, - "type" : "integer" + "children" : [ + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get user TFA types (Personal and Realm).", + "method" : "GET", + "name" : "read_user_tfa_type", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "multiple" : { + "default" : 0, + "description" : "Request all entries as an array.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } }, - "time" : { - "description" : "Seconds since 1970-01-01 00:00:00 UTC.", - "minimum" : 1297163644, - "type" : "integer" + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify", + "Sys.Audit" + ] + ] + ] }, - "timezone" : { - "description" : "Time zone", - "type" : "string" + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "realm" : { + "description" : "The type of TFA the users realm has set, if any.", + "enum" : [ + "oath", + "yubico" + ], + "optional" : 1, + "type" : "string" + }, + "types" : { + "description" : "Array of the user configured TFA types, if any. Only available if 'multiple' was not passed.", + "items" : { + "description" : "A TFA type.", + "enum" : [ + "totp", + "u2f", + "yubico", + "webauthn", + "recovedry" + ], + "type" : "string" + }, + "optional" : 1, + "type" : "array" + }, + "user" : { + "description" : "The type of TFA the user has set, if any. Only set if 'multiple' was not passed.", + "enum" : [ + "oath", + "u2f" + ], + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" } - }, - "type" : "object" - } + } + }, + "leaf" : 1, + "path" : "/access/users/{userid}/tfa", + "text" : "tfa" }, - "PUT" : { - "description" : "Set time zone.", - "method" : "PUT", - "name" : "set_timezone", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Remove API token for a specific user.", + "method" : "DELETE", + "name" : "remove_token", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "tokenid" : { + "description" : "User-specific token identifier.", + "pattern" : "(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)", + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get specific API token information.", + "method" : "GET", + "name" : "read_token", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "tokenid" : { + "description" : "User-specific token identifier.", + "pattern" : "(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)", + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "returns" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Generate a new API token for a specific user. NOTE: returns API token value, which needs to be stored as it cannot be retrieved afterwards!", + "method" : "POST", + "name" : "generate_token", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "tokenid" : { + "description" : "User-specific token identifier.", + "pattern" : "(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)", + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "full-tokenid" : { + "description" : "The full token id.", + "format_description" : "!", + "type" : "string" + }, + "info" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + }, + "value" : { + "description" : "API token value used for authentication.", + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update API token for a specific user.", + "method" : "PUT", + "name" : "update_token_info", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "tokenid" : { + "description" : "User-specific token identifier.", + "pattern" : "(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)", + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "description" : "Updated token information.", + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/access/users/{userid}/token/{tokenid}", + "text" : "{tokenid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get user API tokens.", + "method" : "GET", + "name" : "token_index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } }, - "timezone" : { - "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.", - "type" : "string", - "typetext" : "" + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean" + }, + "tokenid" : { + "description" : "User-specific token identifier.", + "pattern" : "(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)", + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{tokenid}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "null" - } + "leaf" : 0, + "path" : "/access/users/{userid}/token", + "text" : "token" } - }, - "leaf" : 1, - "path" : "/nodes/{node}/time", - "text" : "time" - }, - { + ], "info" : { - "GET" : { - "description" : "Get list of appliances.", - "method" : "GET", - "name" : "aplinfo", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "user" : "all" - }, - "proxyto" : "node", - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "type" : "array" - } - }, - "POST" : { - "description" : "Download appliance templates.", - "method" : "POST", - "name" : "apl_download", + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete user.", + "method" : "DELETE", + "name" : "delete_user", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - }, - "storage" : { - "description" : "The storage where the template will be stored", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "template" : { - "description" : "The template wich will downloaded", - "maxLength" : 255, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, "type" : "string", "typetext" : "" } @@ -24175,36 +45853,36 @@ var pveapi = [ }, "permissions" : { "check" : [ - "perm", - "/storage/{storage}", + "and", [ - "Datastore.AllocateTemplate" + "userid-param", + "Realm.AllocateUser" + ], + [ + "userid-group", + [ + "User.Modify" + ] ] ] }, "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "string" + "type" : "null" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/aplinfo", - "text" : "aplinfo" - }, - { - "info" : { + }, "GET" : { - "description" : "Gather various systems information about a node", + "allowtoken" : 1, + "description" : "Get user configuration.", "method" : "GET", - "name" : "report", + "name" : "read_user", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, "type" : "string", "typetext" : "" } @@ -24212,871 +45890,418 @@ var pveapi = [ }, "permissions" : { "check" : [ - "perm", - "/nodes/{node}", + "userid-group", [ + "User.Modify", "Sys.Audit" ] ] }, - "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/report", - "text" : "report" - }, - { - "info" : { - "POST" : { - "description" : "Start all VMs and containers (when onboot=1).", - "method" : "POST", - "name" : "startall", - "parameters" : { "additionalProperties" : 0, "properties" : { - "force" : { - "description" : "force if onboot=0.", + "comment" : { "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "string" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" + "email" : { + "format" : "email-opt", + "optional" : 1, + "type" : "string" }, - "vms" : { - "description" : "Only consider Guests with these IDs.", - "format" : "pve-vmid-list", + "enable" : { + "default" : 1, + "description" : "Enable the account (default). You can set this to '0' to disable the account", "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "boolean" + }, + "expire" : { + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "firstname" : { + "optional" : 1, + "type" : "string" + }, + "groups" : { + "items" : { + "format" : "pve-groupid", + "type" : "string" + }, + "optional" : 1, + "type" : "array" + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, + "type" : "string" + }, + "lastname" : { + "optional" : 1, + "type" : "string" + }, + "tokens" : { + "additionalProperties" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + }, + "optional" : 1, + "type" : "object" } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "VM.PowerMgmt" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" + }, + "type" : "object" } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/startall", - "text" : "startall" - }, - { - "info" : { - "POST" : { - "description" : "Stop all VMs and Containers.", - "method" : "POST", - "name" : "stopall", + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update user configuration.", + "method" : "PUT", + "name" : "update_user", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "append" : { + "optional" : 1, + "requires" : "groups", + "type" : "boolean", + "typetext" : "" + }, + "comment" : { + "optional" : 1, "type" : "string", "typetext" : "" }, - "vms" : { - "description" : "Only consider Guests with these IDs.", - "format" : "pve-vmid-list", + "email" : { + "format" : "email-opt", "optional" : 1, "type" : "string", "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "VM.PowerMgmt" - ] - ] - }, - "protected" : 1, - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "leaf" : 1, - "path" : "/nodes/{node}/stopall", - "text" : "stopall" - }, - { - "info" : { - "POST" : { - "description" : "Migrate all VMs and Containers.", - "method" : "POST", - "name" : "migrateall", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "maxworkers" : { - "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!", - "minimum" : 1, + }, + "enable" : { + "default" : 1, + "description" : "Enable the account (default). You can set this to '0' to disable the account", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "expire" : { + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, "optional" : 1, "type" : "integer", - "typetext" : " (1 - N)" + "typetext" : " (0 - N)" }, - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", + "firstname" : { + "optional" : 1, "type" : "string", "typetext" : "" }, - "target" : { - "description" : "Target node.", - "format" : "pve-node", + "groups" : { + "format" : "pve-groupid-list", + "optional" : 1, "type" : "string", "typetext" : "" }, - "vms" : { - "description" : "Only consider Guests with these IDs.", - "format" : "pve-vmid-list", + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "lastname" : { "optional" : 1, "type" : "string", "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" } } }, "permissions" : { "check" : [ - "perm", - "/", + "userid-group", [ - "VM.Migrate" - ] + "User.Modify" + ], + "groups_param", + "update" ] }, "protected" : 1, - "proxyto" : "node", "returns" : { - "type" : "string" + "type" : "null" } } }, - "leaf" : 1, - "path" : "/nodes/{node}/migrateall", - "text" : "migrateall" + "leaf" : 0, + "path" : "/access/users/{userid}", + "text" : "{userid}" } ], "info" : { "GET" : { - "description" : "Node index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "format" : "pve-node", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes/{node}", - "text" : "{node}" - } - ], - "info" : { - "GET" : { - "description" : "Cluster node index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{node}", - "rel" : "child" - } - ], - "type" : "array" - } - } - }, - "leaf" : 0, - "path" : "/nodes", - "text" : "nodes" - }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "description" : "Delete storage configuration.", - "method" : "DELETE", - "name" : "delete", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "description" : "Read storage configuration.", + "allowtoken" : 1, + "description" : "User index.", "method" : "GET", - "name" : "read", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Allocate" - ] - ] - }, - "returns" : {} - }, - "PUT" : { - "description" : "Update storage configuration.", - "method" : "PUT", - "name" : "update", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { - "blocksize" : { - "description" : "block size", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "comstar_hg" : { - "description" : "host group for comstar views", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "comstar_tg" : { - "description" : "target group for comstar views", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "content" : { - "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", - "format" : "pve-storage-content-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "maxLength" : 4096, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "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", - "typetext" : "" - }, - "disable" : { - "description" : "Flag to disable the storage.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "format" : { - "description" : "Default image format.", - "format" : "pve-storage-format", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "is_mountpoint" : { - "default" : "no", - "description" : "Assume the directory is an externally managed mountpoint. If nothing is mounted the storage will be considered offline.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "krbd" : { - "description" : "Access rbd through krbd kernel module.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "maxfiles" : { - "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "mkdir" : { - "default" : "yes", - "description" : "Create the directory if it doesn't exist.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "nodes" : { - "description" : "List of cluster node names.", - "format" : "pve-node-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "nowritecache" : { - "description" : "disable write caching on the target", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "options" : { - "description" : "NFS mount options (see 'man nfs')", - "format" : "pve-storage-options", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "pool" : { - "description" : "Pool.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "redundancy" : { - "default" : 2, - "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.", - "maximum" : 16, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 16)" - }, - "saferemove" : { - "description" : "Zero-out data when removing LVs.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "saferemove_throughput" : { - "description" : "Wipe throughput (cstream -t parameter value).", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "server" : { - "description" : "Server IP or DNS name.", - "format" : "pve-storage-server", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "server2" : { - "description" : "Backup volfile server IP or DNS name.", - "format" : "pve-storage-server", - "optional" : 1, - "requires" : "server", - "type" : "string", - "typetext" : "" - }, - "shared" : { - "description" : "Mark storage as shared.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "sparse" : { - "description" : "use sparse volumes", + "enabled" : { + "description" : "Optional filter for enable property.", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "tagged_only" : { - "description" : "Only use logical volumes tagged with 'pve-vm-ID'.", + "full" : { + "default" : 0, + "description" : "Include group and token information.", "optional" : 1, "type" : "boolean", "typetext" : "" - }, - "transport" : { - "description" : "Gluster transport: tcp or rdma", - "enum" : [ - "tcp", - "rdma", - "unix" - ], - "optional" : 1, - "type" : "string" - }, - "username" : { - "description" : "RBD Id.", - "optional" : 1, - "type" : "string", - "typetext" : "" } - }, - "type" : "object" + } }, "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] + "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" }, - "protected" : 1, "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/storage/{storage}", - "text" : "{storage}" - } - ], - "info" : { - "GET" : { - "description" : "Storage index.", - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "description" : "Only list storage of specific type", - "enum" : [ - "dir", - "drbd", - "glusterfs", - "iscsi", - "iscsidirect", - "lvm", - "lvmthin", - "nfs", - "rbd", - "sheepdog", - "zfs", - "zfspool" - ], - "optional" : 1, - "type" : "string" - } - } - }, - "permissions" : { - "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", - "user" : "all" - }, - "returns" : { - "items" : { - "properties" : { - "storage" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{storage}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "POST" : { - "description" : "Create a new storage.", - "method" : "POST", - "name" : "create", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "authsupported" : { - "description" : "Authsupported.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "base" : { - "description" : "Base volume. This volume is automatically activated.", - "format" : "pve-volume-id", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "blocksize" : { - "description" : "block size", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "comstar_hg" : { - "description" : "host group for comstar views", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "comstar_tg" : { - "description" : "target group for comstar views", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "content" : { - "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", - "format" : "pve-storage-content-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "disable" : { - "description" : "Flag to disable the storage.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "export" : { - "description" : "NFS export path.", - "format" : "pve-storage-path", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "format" : { - "description" : "Default image format.", - "format" : "pve-storage-format", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "is_mountpoint" : { - "default" : "no", - "description" : "Assume the directory is an externally managed mountpoint. If nothing is mounted the storage will be considered offline.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "iscsiprovider" : { - "description" : "iscsi provider", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "krbd" : { - "description" : "Access rbd through krbd kernel module.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "maxfiles" : { - "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "mkdir" : { - "default" : "yes", - "description" : "Create the directory if it doesn't exist.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "monhost" : { - "description" : "Monitors daemon ips.", - "format" : "pve-storage-portal-dns-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "nodes" : { - "description" : "List of cluster node names.", - "format" : "pve-node-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "nowritecache" : { - "description" : "disable write caching on the target", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "options" : { - "description" : "NFS mount options (see 'man nfs')", - "format" : "pve-storage-options", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "path" : { - "description" : "File system path.", - "format" : "pve-storage-path", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "pool" : { - "description" : "Pool.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "portal" : { - "description" : "iSCSI portal (IP or DNS name with optional port).", - "format" : "pve-storage-portal-dns", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "redundancy" : { - "default" : 2, - "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.", - "maximum" : 16, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 16)" - }, - "saferemove" : { - "description" : "Zero-out data when removing LVs.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "saferemove_throughput" : { - "description" : "Wipe throughput (cstream -t parameter value).", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "server" : { - "description" : "Server IP or DNS name.", - "format" : "pve-storage-server", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "server2" : { - "description" : "Backup volfile server IP or DNS name.", - "format" : "pve-storage-server", - "optional" : 1, - "requires" : "server", - "type" : "string", - "typetext" : "" - }, - "shared" : { - "description" : "Mark storage as shared.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "sparse" : { - "description" : "use sparse volumes", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "storage" : { - "description" : "The storage identifier.", - "format" : "pve-storage-id", - "type" : "string", - "typetext" : "" - }, - "tagged_only" : { - "description" : "Only use logical volumes tagged with 'pve-vm-ID'.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "target" : { - "description" : "iSCSI target.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "thinpool" : { - "description" : "LVM thin pool LV name.", - "format" : "pve-storage-vgname", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "transport" : { - "description" : "Gluster transport: tcp or rdma", - "enum" : [ - "tcp", - "rdma", - "unix" + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "email" : { + "format" : "email-opt", + "optional" : 1, + "type" : "string" + }, + "enable" : { + "default" : 1, + "description" : "Enable the account (default). You can set this to '0' to disable the account", + "optional" : 1, + "type" : "boolean" + }, + "expire" : { + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "firstname" : { + "optional" : 1, + "type" : "string" + }, + "groups" : { + "format" : "pve-groupid-list", + "optional" : 1, + "type" : "string" + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, + "type" : "string" + }, + "lastname" : { + "optional" : 1, + "type" : "string" + }, + "realm-type" : { + "description" : "The type of the users realm", + "format" : "pve-realm", + "optional" : 1, + "type" : "string" + }, + "tokens" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "expire" : { + "default" : "same as user", + "description" : "API token expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer" + }, + "privsep" : { + "default" : 1, + "description" : "Restrict API token privileges with separate ACLs (default), or give full privileges of corresponding user.", + "optional" : 1, + "type" : "boolean" + }, + "tokenid" : { + "description" : "User-specific token identifier.", + "pattern" : "(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)", + "type" : "string" + } + }, + "type" : "object" + }, + "optional" : 1, + "type" : "array" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{userid}", + "rel" : "child" + } ], - "optional" : 1, - "type" : "string" + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new user.", + "method" : "POST", + "name" : "create_user", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "email" : { + "format" : "email-opt", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "default" : 1, + "description" : "Enable the account (default). You can set this to '0' to disable the account", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "expire" : { + "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "firstname" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "groups" : { + "format" : "pve-groupid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "lastname" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "Initial password.", + "maxLength" : 64, + "minLength" : 5, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } }, - "type" : { - "description" : "Storage type.", - "enum" : [ - "dir", - "drbd", - "glusterfs", - "iscsi", - "iscsidirect", - "lvm", - "lvmthin", - "nfs", - "rbd", - "sheepdog", - "zfs", - "zfspool" + "permissions" : { + "check" : [ + "and", + [ + "userid-param", + "Realm.AllocateUser" + ], + [ + "userid-group", + [ + "User.Modify" + ], + "groups_param", + "create" + ] ], - "type" : "string" - }, - "username" : { - "description" : "RBD Id.", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "vgname" : { - "description" : "Volume group name.", - "format" : "pve-storage-vgname", - "optional" : 1, - "type" : "string", - "typetext" : "" + "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." }, - "volume" : { - "description" : "Glusterfs Volume.", - "optional" : 1, - "type" : "string", - "typetext" : "" + "protected" : 1, + "returns" : { + "type" : "null" } - }, - "type" : "object" - }, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] + } }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 0, - "path" : "/storage", - "text" : "storage" - }, - { - "children" : [ + "leaf" : 0, + "path" : "/access/users", + "text" : "users" + }, { "children" : [ { "info" : { "DELETE" : { - "description" : "Delete user.", + "allowtoken" : 1, + "description" : "Delete group.", "method" : "DELETE", - "name" : "delete_user", + "name" : "delete_group", "parameters" : { "additionalProperties" : 0, "properties" : { - "userid" : { - "description" : "User ID", - "format" : "pve-userid", - "maxLength" : 64, + "groupid" : { + "format" : "pve-groupid", "type" : "string", "typetext" : "" } @@ -25084,16 +46309,10 @@ var pveapi = [ }, "permissions" : { "check" : [ - "and", - [ - "userid-param", - "Realm.AllocateUser" - ], + "perm", + "/access/groups", [ - "userid-group", - [ - "User.Modify" - ] + "Group.Allocate" ] ] }, @@ -25103,16 +46322,15 @@ var pveapi = [ } }, "GET" : { - "description" : "Get user configuration.", + "allowtoken" : 1, + "description" : "Get group configuration.", "method" : "GET", - "name" : "read_user", + "name" : "read_group", "parameters" : { "additionalProperties" : 0, "properties" : { - "userid" : { - "description" : "User ID", - "format" : "pve-userid", - "maxLength" : 64, + "groupid" : { + "format" : "pve-groupid", "type" : "string", "typetext" : "" } @@ -25120,11 +46338,14 @@ var pveapi = [ }, "permissions" : { "check" : [ - "userid-group", + "perm", + "/access/groups", [ - "User.Modify", - "Sys.Audit" - ] + "Sys.Audit", + "Group.Allocate" + ], + "any", + 1 ] }, "returns" : { @@ -25134,98 +46355,364 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "email" : { + "members" : { + "items" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string" + }, + "type" : "array" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update group data.", + "method" : "PUT", + "name" : "update_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "enable" : { + "groupid" : { + "format" : "pve-groupid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/access/groups", + [ + "Group.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/access/groups/{groupid}", + "text" : "{groupid}" + } + ], + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Group index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "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" + }, + "returns" : { + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "groupid" : { + "format" : "pve-groupid", + "type" : "string" + }, + "users" : { + "description" : "list of users which form this group", + "format" : "pve-userid-list", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{groupid}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "allowtoken" : 1, + "description" : "Create new group.", + "method" : "POST", + "name" : "create_group", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "groupid" : { + "format" : "pve-groupid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/access/groups", + [ + "Group.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/access/groups", + "text" : "groups" + }, + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 1, + "description" : "Delete role.", + "method" : "DELETE", + "name" : "delete_role", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "roleid" : { + "format" : "pve-roleid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/access", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "GET" : { + "allowtoken" : 1, + "description" : "Get role configuration.", + "method" : "GET", + "name" : "read_role", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "roleid" : { + "format" : "pve-roleid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "Datastore.Allocate" : { + "optional" : 1, "type" : "boolean" }, - "expire" : { + "Datastore.AllocateSpace" : { "optional" : 1, - "type" : "integer" + "type" : "boolean" }, - "firstname" : { + "Datastore.AllocateTemplate" : { "optional" : 1, - "type" : "string" + "type" : "boolean" }, - "groups" : { - "type" : "array" + "Datastore.Audit" : { + "optional" : 1, + "type" : "boolean" }, - "keys" : { + "Group.Allocate" : { "optional" : 1, - "type" : "string" + "type" : "boolean" }, - "lastname" : { + "Permissions.Modify" : { "optional" : 1, - "type" : "string" - } - } - } - }, - "PUT" : { - "description" : "Update user configuration.", - "method" : "PUT", - "name" : "update_user", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "append" : { + "type" : "boolean" + }, + "Pool.Allocate" : { "optional" : 1, - "requires" : "groups", - "type" : "boolean", - "typetext" : "" + "type" : "boolean" }, - "comment" : { + "Pool.Audit" : { "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "boolean" }, - "email" : { - "format" : "email-opt", + "Realm.Allocate" : { "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "boolean" }, - "enable" : { - "description" : "Enable/disable the account.", + "Realm.AllocateUser" : { "optional" : 1, - "type" : "boolean", - "typetext" : "" + "type" : "boolean" }, - "expire" : { - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", - "minimum" : 0, + "SDN.Allocate" : { "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" + "type" : "boolean" }, - "firstname" : { + "SDN.Audit" : { "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "boolean" }, - "groups" : { - "format" : "pve-groupid-list", + "Sys.Audit" : { "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : "boolean" }, - "keys" : { - "description" : "Keys for two factor auth (yubico).", + "Sys.Console" : { + "optional" : 1, + "type" : "boolean" + }, + "Sys.Modify" : { + "optional" : 1, + "type" : "boolean" + }, + "Sys.PowerMgmt" : { + "optional" : 1, + "type" : "boolean" + }, + "Sys.Syslog" : { + "optional" : 1, + "type" : "boolean" + }, + "User.Modify" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Allocate" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Audit" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Backup" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Clone" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.CDROM" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.CPU" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.Cloudinit" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.Disk" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.HWType" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.Memory" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.Network" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Config.Options" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Console" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Migrate" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Monitor" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.PowerMgmt" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Snapshot" : { + "optional" : 1, + "type" : "boolean" + }, + "VM.Snapshot.Rollback" : { + "optional" : 1, + "type" : "boolean" + } + }, + "type" : "object" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update an existing role.", + "method" : "PUT", + "name" : "update_role", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "append" : { "optional" : 1, - "type" : "string", - "typetext" : "" + "requires" : "privs", + "type" : "boolean", + "typetext" : "" }, - "lastname" : { + "privs" : { + "format" : "pve-priv-list", "optional" : 1, "type" : "string", "typetext" : "" }, - "userid" : { - "description" : "User ID", - "format" : "pve-userid", - "maxLength" : 64, + "roleid" : { + "format" : "pve-roleid", "type" : "string", "typetext" : "" } @@ -25233,12 +46720,11 @@ var pveapi = [ }, "permissions" : { "check" : [ - "userid-group", + "perm", + "/access", [ - "User.Modify" - ], - "groups_param", - 1 + "Sys.Modify" + ] ] }, "protected" : 1, @@ -25248,42 +46734,45 @@ var pveapi = [ } }, "leaf" : 1, - "path" : "/access/users/{userid}", - "text" : "{userid}" + "path" : "/access/roles/{roleid}", + "text" : "{roleid}" } ], "info" : { "GET" : { - "description" : "User index.", + "allowtoken" : 1, + "description" : "Role index.", "method" : "GET", "name" : "index", "parameters" : { - "additionalProperties" : 0, - "properties" : { - "enabled" : { - "description" : "Optional filter for enable property.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - } - } + "additionalProperties" : 0 }, "permissions" : { - "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" }, "returns" : { "items" : { "properties" : { - "userid" : { + "privs" : { + "format" : "pve-priv-list", + "optional" : 1, + "type" : "string" + }, + "roleid" : { + "format" : "pve-roleid", "type" : "string" + }, + "special" : { + "default" : 0, + "optional" : 1, + "type" : "boolean" } }, "type" : "object" }, "links" : [ { - "href" : "{userid}", + "href" : "{roleid}", "rel" : "child" } ], @@ -25291,71 +46780,143 @@ var pveapi = [ } }, "POST" : { - "description" : "Create new user.", + "allowtoken" : 1, + "description" : "Create new role.", "method" : "POST", - "name" : "create_user", + "name" : "create_role", "parameters" : { "additionalProperties" : 0, "properties" : { - "comment" : { + "privs" : { + "format" : "pve-priv-list", "optional" : 1, "type" : "string", "typetext" : "" }, - "email" : { - "format" : "email-opt", - "optional" : 1, + "roleid" : { + "format" : "pve-roleid", "type" : "string", "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/access", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/access/roles", + "text" : "roles" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Get Access Control List (ACLs).", + "method" : "GET", + "name" : "read_acl", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "description" : "The returned list is restricted to objects where you have rights to modify permissions.", + "user" : "all" + }, + "returns" : { + "items" : { + "additionalProperties" : 0, + "properties" : { + "path" : { + "description" : "Access control path", + "type" : "string" + }, + "propagate" : { + "default" : 1, + "description" : "Allow to propagate (inherit) permissions.", + "optional" : 1, + "type" : "boolean" + }, + "roleid" : { + "type" : "string" + }, + "type" : { + "enum" : [ + "user", + "group", + "token" + ], + "type" : "string" + }, + "ugid" : { + "type" : "string" + } }, - "enable" : { - "default" : 1, - "description" : "Enable the account (default). You can set this to '0' to disable the accout", + "type" : "object" + }, + "type" : "array" + } + }, + "PUT" : { + "allowtoken" : 1, + "description" : "Update Access Control List (add or remove permissions).", + "method" : "PUT", + "name" : "update_acl", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "description" : "Remove permissions (instead of adding it).", "optional" : 1, "type" : "boolean", "typetext" : "" }, - "expire" : { - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "typetext" : " (0 - N)" - }, - "firstname" : { - "optional" : 1, - "type" : "string", - "typetext" : "" - }, "groups" : { + "description" : "List of groups.", "format" : "pve-groupid-list", "optional" : 1, "type" : "string", "typetext" : "" }, - "keys" : { - "description" : "Keys for two factor auth (yubico).", - "optional" : 1, + "path" : { + "description" : "Access control path", "type" : "string", "typetext" : "" }, - "lastname" : { + "propagate" : { + "default" : 1, + "description" : "Allow to propagate (inherit) permissions.", "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "roles" : { + "description" : "List of roles.", + "format" : "pve-roleid-list", "type" : "string", "typetext" : "" }, - "password" : { - "description" : "Initial password.", - "maxLength" : 64, - "minLength" : 5, + "tokens" : { + "description" : "List of API tokens.", + "format" : "pve-tokenid-list", "optional" : 1, "type" : "string", "typetext" : "" }, - "userid" : { - "description" : "User ID", - "format" : "pve-userid", - "maxLength" : 64, + "users" : { + "description" : "List of users.", + "format" : "pve-userid-list", + "optional" : 1, "type" : "string", "typetext" : "" } @@ -25363,21 +46924,9 @@ var pveapi = [ }, "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." + "perm-modify", + "{path}" + ] }, "protected" : 1, "returns" : { @@ -25385,23 +46934,121 @@ var pveapi = [ } } }, - "leaf" : 0, - "path" : "/access/users", - "text" : "users" + "leaf" : 1, + "path" : "/access/acl", + "text" : "acl" }, { "children" : [ { + "children" : [ + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : "Syncs users and/or groups from the configured LDAP to user.cfg. NOTE: Synced groups will have the name 'name-$realm', so make sure those groups do not exist to prevent overwriting.", + "method" : "POST", + "name" : "sync", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "dry-run" : { + "default" : 0, + "description" : "If set, does not write anything.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "enable-new" : { + "default" : "1", + "description" : "Enable newly synced users immediately.", + "optional" : "1", + "type" : "boolean", + "typetext" : "" + }, + "full" : { + "description" : "DEPRECATED: use 'remove-vanished' instead. If set, uses the LDAP Directory as source of truth, deleting users or groups not returned from the sync and removing all locally modified properties of synced users. If not set, only syncs information which is present in the synced data, and does not delete or modify anything else.", + "optional" : "1", + "type" : "boolean", + "typetext" : "" + }, + "purge" : { + "description" : "DEPRECATED: use 'remove-vanished' instead. Remove ACLs for users or groups which were removed from the config during a sync.", + "optional" : "1", + "type" : "boolean", + "typetext" : "" + }, + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "typetext" : "" + }, + "remove-vanished" : { + "description" : "A semicolon-seperated list of things to remove when they or the user vanishes during a sync. The following values are possible: 'entry' removes the user/group when not returned from the sync. 'properties' removes the set properties on existing user/group that do not appear in the source (even custom ones). 'acl' removes acls when the user/group is not returned from the sync.", + "optional" : "1", + "pattern" : "(?:(?:acl|properties|entry);)*(?:acl|properties|entry)", + "type" : "string", + "typetext" : "[acl];[properties];[entry]" + }, + "scope" : { + "description" : "Select what to sync.", + "enum" : [ + "users", + "groups", + "both" + ], + "optional" : "1", + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "and", + [ + "perm", + "/access/realm/{realm}", + [ + "Realm.AllocateUser" + ] + ], + [ + "perm", + "/access/groups", + [ + "User.Modify" + ] + ] + ], + "description" : "'Realm.AllocateUser' on '/access/realm/' and 'User.Modify' permissions to '/access/groups/'." + }, + "protected" : 1, + "returns" : { + "description" : "Worker Task-UPID", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/access/domains/{realm}/sync", + "text" : "sync" + } + ], "info" : { "DELETE" : { - "description" : "Delete group.", + "allowtoken" : 1, + "description" : "Delete an authentication server.", "method" : "DELETE", - "name" : "delete_group", + "name" : "delete", "parameters" : { "additionalProperties" : 0, "properties" : { - "groupid" : { - "format" : "pve-groupid", + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, "type" : "string", "typetext" : "" } @@ -25410,9 +47057,9 @@ var pveapi = [ "permissions" : { "check" : [ "perm", - "/access/groups", + "/access/realm", [ - "Group.Allocate" + "Realm.Allocate" ] ] }, @@ -25422,14 +47069,17 @@ var pveapi = [ } }, "GET" : { - "description" : "Get group configuration.", + "allowtoken" : 1, + "description" : "Get auth server configuration.", "method" : "GET", - "name" : "read_group", + "name" : "read", "parameters" : { "additionalProperties" : 0, "properties" : { - "groupid" : { - "format" : "pve-groupid", + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, "type" : "string", "typetext" : "" } @@ -25438,57 +47088,301 @@ var pveapi = [ "permissions" : { "check" : [ "perm", - "/access/groups", + "/access/realm", [ - "Sys.Audit", - "Group.Allocate" + "Realm.Allocate", + "Sys.Audit" ], "any", 1 ] }, - "returns" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "members" : { - "items" : { - "type" : "string" - }, - "type" : "array" - } - }, - "type" : "object" - } + "returns" : {} }, "PUT" : { - "description" : "Update group data.", + "allowtoken" : 1, + "description" : "Update authentication server settings.", "method" : "PUT", - "name" : "update_group", + "name" : "update", "parameters" : { "additionalProperties" : 0, "properties" : { + "acr-values" : { + "description" : "Specifies the Authentication Context Class Reference values that theAuthorization Server is being requested to use for the Auth Request.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "autocreate" : { + "default" : 0, + "description" : "Automatically create users if they do not exist.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "base_dn" : { + "description" : "LDAP base domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "bind_dn" : { + "description" : "LDAP bind domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "capath" : { + "default" : "/etc/ssl/certs", + "description" : "Path to the CA certificate store", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "case-sensitive" : { + "default" : 1, + "description" : "username is case-sensitive", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cert" : { + "description" : "Path to the client certificate", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "certkey" : { + "description" : "Path to the client certificate key", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "client-id" : { + "description" : "OpenID Client ID", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "client-key" : { + "description" : "OpenID Client Key", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "comment" : { + "description" : "Description.", + "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" }, - "groupid" : { - "format" : "pve-groupid", + "default" : { + "description" : "Use this as default realm", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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", "typetext" : "" + }, + "domain" : { + "description" : "AD domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\S+", + "type" : "string" + }, + "filter" : { + "description" : "LDAP filter for user sync.", + "maxLength" : 2048, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group_classes" : { + "default" : "groupOfNames, group, univentionGroup, ipausergroup", + "description" : "The objectclasses for groups.", + "format" : "ldap-simple-attr-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group_dn" : { + "description" : "LDAP base domain name for group sync. If not set, the base_dn will be used.", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "group_filter" : { + "description" : "LDAP filter for group sync.", + "maxLength" : 2048, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group_name_attr" : { + "description" : "LDAP attribute representing a groups name. If not set or found, the first value of the DN will be used as name.", + "format" : "ldap-simple-attr", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "issuer-url" : { + "description" : "OpenID Issuer Url", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mode" : { + "default" : "ldap", + "description" : "LDAP protocol mode.", + "enum" : [ + "ldap", + "ldaps", + "ldap+starttls" + ], + "optional" : 1, + "type" : "string" + }, + "password" : { + "description" : "LDAP bind password. Will be stored in '/etc/pve/priv/realm/.pw'.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "port" : { + "description" : "Server port.", + "maximum" : 65535, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 65535)" + }, + "prompt" : { + "description" : "Specifies whether the Authorization Server prompts the End-User for reauthentication and consent.", + "optional" : 1, + "pattern" : "(?:none|login|consent|select_account|\\S+)", + "type" : "string" + }, + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "typetext" : "" + }, + "scopes" : { + "default" : "email profile", + "description" : "Specifies the scopes (user details) that should be authorized and returned, for example 'email' or 'profile'.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "secure" : { + "description" : "Use secure LDAPS protocol. DEPRECATED: use 'mode' instead.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "server1" : { + "description" : "Server IP address (or DNS name)", + "format" : "address", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server2" : { + "description" : "Fallback Server IP address (or DNS name)", + "format" : "address", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "sslversion" : { + "description" : "LDAPS TLS/SSL version. It's not recommended to use version older than 1.2!", + "enum" : [ + "tlsv1", + "tlsv1_1", + "tlsv1_2", + "tlsv1_3" + ], + "optional" : 1, + "type" : "string" + }, + "sync-defaults-options" : { + "description" : "The default options for behavior of synchronizations.", + "format" : "realm-sync-options", + "optional" : 1, + "type" : "string", + "typetext" : "[enable-new=<1|0>] [,full=<1|0>] [,purge=<1|0>] [,remove-vanished=[acl];[properties];[entry]] [,scope=]" + }, + "sync_attributes" : { + "description" : "Comma separated list of key=value pairs for specifying which LDAP attributes map to which PVE user field. For example, to map the LDAP attribute 'mail' to PVEs 'email', write 'email=mail'. By default, each PVE user field is represented by an LDAP attribute of the same name.", + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "tfa" : { + "description" : "Use Two-factor authentication.", + "format" : "pve-tfa-config", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "type= [,digits=] [,id=] [,key=] [,step=] [,url=]" + }, + "user_attr" : { + "description" : "LDAP user attribute name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\S{2,}", + "type" : "string" + }, + "user_classes" : { + "default" : "inetorgperson, posixaccount, person, user", + "description" : "The objectclasses for users.", + "format" : "ldap-simple-attr-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "verify" : { + "default" : 0, + "description" : "Verify the server's SSL certificate", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } - } + }, + "type" : "object" }, "permissions" : { "check" : [ "perm", - "/access/groups", + "/access/realm", [ - "Group.Allocate" + "Realm.Allocate" ] ] }, @@ -25498,27 +47392,45 @@ var pveapi = [ } } }, - "leaf" : 1, - "path" : "/access/groups/{groupid}", - "text" : "{groupid}" + "leaf" : 0, + "path" : "/access/domains/{realm}", + "text" : "{realm}" } ], "info" : { "GET" : { - "description" : "Group index.", + "allowtoken" : 1, + "description" : "Authentication domain index.", "method" : "GET", "name" : "index", "parameters" : { "additionalProperties" : 0 }, "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" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).", + "user" : "world" }, "returns" : { "items" : { "properties" : { - "groupid" : { + "comment" : { + "description" : "A comment. The GUI use this text when you select a domain (Realm) on the login window.", + "optional" : 1, + "type" : "string" + }, + "realm" : { + "type" : "string" + }, + "tfa" : { + "description" : "Two-factor authentication provider.", + "enum" : [ + "yubico", + "oath" + ], + "optional" : 1, + "type" : "string" + }, + "type" : { "type" : "string" } }, @@ -25526,7 +47438,7 @@ var pveapi = [ }, "links" : [ { - "href" : "{groupid}", + "href" : "{realm}", "rel" : "child" } ], @@ -25534,30 +47446,291 @@ var pveapi = [ } }, "POST" : { - "description" : "Create new group.", + "allowtoken" : 1, + "description" : "Add an authentication server.", "method" : "POST", - "name" : "create_group", + "name" : "create", "parameters" : { "additionalProperties" : 0, "properties" : { + "acr-values" : { + "description" : "Specifies the Authentication Context Class Reference values that theAuthorization Server is being requested to use for the Auth Request.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "autocreate" : { + "default" : 0, + "description" : "Automatically create users if they do not exist.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "base_dn" : { + "description" : "LDAP base domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "bind_dn" : { + "description" : "LDAP bind domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "capath" : { + "default" : "/etc/ssl/certs", + "description" : "Path to the CA certificate store", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "case-sensitive" : { + "default" : 1, + "description" : "username is case-sensitive", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "cert" : { + "description" : "Path to the client certificate", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "certkey" : { + "description" : "Path to the client certificate key", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "client-id" : { + "description" : "OpenID Client ID", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "client-key" : { + "description" : "OpenID Client Key", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "comment" : { + "description" : "Description.", + "maxLength" : 4096, "optional" : 1, "type" : "string", "typetext" : "" }, - "groupid" : { - "format" : "pve-groupid", + "default" : { + "description" : "Use this as default realm", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "domain" : { + "description" : "AD domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\S+", + "type" : "string" + }, + "filter" : { + "description" : "LDAP filter for user sync.", + "maxLength" : 2048, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group_classes" : { + "default" : "groupOfNames, group, univentionGroup, ipausergroup", + "description" : "The objectclasses for groups.", + "format" : "ldap-simple-attr-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group_dn" : { + "description" : "LDAP base domain name for group sync. If not set, the base_dn will be used.", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "group_filter" : { + "description" : "LDAP filter for group sync.", + "maxLength" : 2048, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "group_name_attr" : { + "description" : "LDAP attribute representing a groups name. If not set or found, the first value of the DN will be used as name.", + "format" : "ldap-simple-attr", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "issuer-url" : { + "description" : "OpenID Issuer Url", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "mode" : { + "default" : "ldap", + "description" : "LDAP protocol mode.", + "enum" : [ + "ldap", + "ldaps", + "ldap+starttls" + ], + "optional" : 1, + "type" : "string" + }, + "password" : { + "description" : "LDAP bind password. Will be stored in '/etc/pve/priv/realm/.pw'.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "port" : { + "description" : "Server port.", + "maximum" : 65535, + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - 65535)" + }, + "prompt" : { + "description" : "Specifies whether the Authorization Server prompts the End-User for reauthentication and consent.", + "optional" : 1, + "pattern" : "(?:none|login|consent|select_account|\\S+)", + "type" : "string" + }, + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "typetext" : "" + }, + "scopes" : { + "default" : "email profile", + "description" : "Specifies the scopes (user details) that should be authorized and returned, for example 'email' or 'profile'.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "secure" : { + "description" : "Use secure LDAPS protocol. DEPRECATED: use 'mode' instead.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "server1" : { + "description" : "Server IP address (or DNS name)", + "format" : "address", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server2" : { + "description" : "Fallback Server IP address (or DNS name)", + "format" : "address", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "sslversion" : { + "description" : "LDAPS TLS/SSL version. It's not recommended to use version older than 1.2!", + "enum" : [ + "tlsv1", + "tlsv1_1", + "tlsv1_2", + "tlsv1_3" + ], + "optional" : 1, + "type" : "string" + }, + "sync-defaults-options" : { + "description" : "The default options for behavior of synchronizations.", + "format" : "realm-sync-options", + "optional" : 1, + "type" : "string", + "typetext" : "[enable-new=<1|0>] [,full=<1|0>] [,purge=<1|0>] [,remove-vanished=[acl];[properties];[entry]] [,scope=]" + }, + "sync_attributes" : { + "description" : "Comma separated list of key=value pairs for specifying which LDAP attributes map to which PVE user field. For example, to map the LDAP attribute 'mail' to PVEs 'email', write 'email=mail'. By default, each PVE user field is represented by an LDAP attribute of the same name.", + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" + }, + "tfa" : { + "description" : "Use Two-factor authentication.", + "format" : "pve-tfa-config", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "type= [,digits=] [,id=] [,key=] [,step=] [,url=]" + }, + "type" : { + "description" : "Realm type.", + "enum" : [ + "ad", + "ldap", + "openid", + "pam", + "pve" + ], + "type" : "string" + }, + "user_attr" : { + "description" : "LDAP user attribute name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\S{2,}", + "type" : "string" + }, + "user_classes" : { + "default" : "inetorgperson, posixaccount, person, user", + "description" : "The objectclasses for users.", + "format" : "ldap-simple-attr-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "username-claim" : { + "description" : "OpenID claim used to generate the unique username.", + "optional" : 1, "type" : "string", "typetext" : "" + }, + "verify" : { + "default" : 0, + "description" : "Verify the server's SSL certificate", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } - } + }, + "type" : "object" }, "permissions" : { "check" : [ "perm", - "/access/groups", + "/access/realm", [ - "Group.Allocate" + "Realm.Allocate" ] ] }, @@ -25568,108 +47741,115 @@ var pveapi = [ } }, "leaf" : 0, - "path" : "/access/groups", - "text" : "groups" + "path" : "/access/domains", + "text" : "domains" }, { "children" : [ { "info" : { - "DELETE" : { - "description" : "Delete role.", - "method" : "DELETE", - "name" : "delete_role", + "POST" : { + "allowtoken" : 1, + "description" : "Get the OpenId Authorization Url for the specified realm.", + "method" : "POST", + "name" : "auth_url", "parameters" : { "additionalProperties" : 0, "properties" : { - "roleid" : { - "format" : "pve-roleid", + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "typetext" : "" + }, + "redirect-url" : { + "description" : "Redirection Url. The client should set this to the used server url (location.origin).", + "maxLength" : 255, "type" : "string", "typetext" : "" } } }, "permissions" : { - "check" : [ - "perm", - "/access", - [ - "Sys.Modify" - ] - ] + "user" : "world" }, "protected" : 1, "returns" : { - "type" : "null" + "description" : "Redirection URL.", + "type" : "string" } - }, - "GET" : { - "description" : "Get role configuration.", - "method" : "GET", - "name" : "read_role", + } + }, + "leaf" : 1, + "path" : "/access/openid/auth-url", + "text" : "auth-url" + }, + { + "info" : { + "POST" : { + "allowtoken" : 1, + "description" : " Verify OpenID authorization code and create a ticket.", + "method" : "POST", + "name" : "login", "parameters" : { "additionalProperties" : 0, "properties" : { - "roleid" : { - "format" : "pve-roleid", + "code" : { + "description" : "OpenId authorization code.", + "maxLength" : 4096, "type" : "string", "typetext" : "" - } - } - }, - "permissions" : { - "user" : "all" - }, - "returns" : {} - }, - "PUT" : { - "description" : "Create new role.", - "method" : "PUT", - "name" : "update_role", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "append" : { - "optional" : 1, - "requires" : "privs", - "type" : "boolean", - "typetext" : "" }, - "privs" : { - "format" : "pve-priv-list", + "redirect-url" : { + "description" : "Redirection Url. The client should set this to the used server url (location.origin).", + "maxLength" : 255, "type" : "string", "typetext" : "" }, - "roleid" : { - "format" : "pve-roleid", + "state" : { + "description" : "OpenId state.", + "maxLength" : 1024, "type" : "string", "typetext" : "" } } }, "permissions" : { - "check" : [ - "perm", - "/access", - [ - "Sys.Modify" - ] - ] + "user" : "world" }, "protected" : 1, "returns" : { - "type" : "null" + "properties" : { + "CSRFPreventionToken" : { + "type" : "string" + }, + "cap" : { + "type" : "object" + }, + "clustername" : { + "optional" : 1, + "type" : "string" + }, + "ticket" : { + "type" : "string" + }, + "username" : { + "type" : "string" + } + } } } }, "leaf" : 1, - "path" : "/access/roles/{roleid}", - "text" : "{roleid}" + "path" : "/access/openid/login", + "text" : "login" } ], "info" : { "GET" : { - "description" : "Role index.", + "allowtoken" : 1, + "description" : "Directory index.", "method" : "GET", "name" : "index", "parameters" : { @@ -25681,7 +47861,7 @@ var pveapi = [ "returns" : { "items" : { "properties" : { - "roleid" : { + "subdir" : { "type" : "string" } }, @@ -25689,172 +47869,231 @@ var pveapi = [ }, "links" : [ { - "href" : "{roleid}", + "href" : "{subdir}", "rel" : "child" } ], "type" : "array" } - }, - "POST" : { - "description" : "Create new role.", - "method" : "POST", - "name" : "create_role", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "privs" : { - "format" : "pve-priv-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "roleid" : { - "format" : "pve-roleid", - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/access", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } } }, "leaf" : 0, - "path" : "/access/roles", - "text" : "roles" + "path" : "/access/openid", + "text" : "openid" }, { - "info" : { - "GET" : { - "description" : "Get Access Control List (ACLs).", - "method" : "GET", - "name" : "read_acl", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "description" : "The returned list is restricted to objects where you have rights to modify permissions.", - "user" : "all" - }, - "returns" : { - "items" : { - "additionalProperties" : 0, - "properties" : { - "path" : { - "type" : "string" - }, - "propagate" : { - "type" : "boolean" - }, - "roleid" : { - "type" : "string" + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "allowtoken" : 0, + "description" : "Delete a TFA entry by ID.", + "method" : "DELETE", + "name" : "delete_tfa", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "A TFA entry id.", + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "The current password.", + "maxLength" : 64, + "minLength" : 5, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } }, - "type" : { - "enum" : [ - "user", - "group" - ], - "type" : "string" + "GET" : { + "allowtoken" : 0, + "description" : "Fetch a requested TFA entry if present.", + "method" : "GET", + "name" : "get_tfa_entry", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "id" : { + "description" : "A TFA entry id.", + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify", + "Sys.Audit" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "description" : "TFA Entry.", + "properties" : { + "created" : { + "description" : "Creation time of this entry as unix epoch.", + "type" : "integer" + }, + "description" : { + "description" : "User chosen description for this entry.", + "type" : "string" + }, + "enable" : { + "default" : 1, + "description" : "Whether this TFA entry is currently enabled.", + "optional" : 1, + "type" : "boolean" + }, + "id" : { + "description" : "The id used to reference this entry.", + "type" : "string" + }, + "type" : { + "description" : "TFA Entry Type.", + "enum" : [ + "totp", + "u2f", + "webauthn", + "recovery", + "yubico" + ], + "type" : "string" + } + }, + "type" : "object" + } }, - "ugid" : { - "type" : "string" + "PUT" : { + "allowtoken" : 0, + "description" : "Add a TFA entry for a user.", + "method" : "PUT", + "name" : "update_tfa_entry", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "description" : { + "description" : "A description to distinguish multiple entries from one another", + "maxLength" : 255, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "enable" : { + "description" : "Whether the entry should be enabled for login.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "id" : { + "description" : "A TFA entry id.", + "type" : "string", + "typetext" : "" + }, + "password" : { + "description" : "The current password.", + "maxLength" : 64, + "minLength" : 5, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "or", + [ + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "type" : "object" - }, - "type" : "array" - } - }, - "PUT" : { - "description" : "Update Access Control List (add or remove permissions).", - "method" : "PUT", - "name" : "update_acl", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "delete" : { - "description" : "Remove permissions (instead of adding it).", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "groups" : { - "description" : "List of groups.", - "format" : "pve-groupid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "path" : { - "description" : "Access control path", - "type" : "string", - "typetext" : "" - }, - "propagate" : { - "default" : 1, - "description" : "Allow to propagate (inherit) permissions.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "roles" : { - "description" : "List of roles.", - "format" : "pve-roleid-list", - "type" : "string", - "typetext" : "" - }, - "users" : { - "description" : "List of users.", - "format" : "pve-userid-list", - "optional" : 1, - "type" : "string", - "typetext" : "" - } + "leaf" : 1, + "path" : "/access/tfa/{userid}/{id}", + "text" : "{id}" } - }, - "permissions" : { - "check" : [ - "perm-modify", - "{path}" - ] - }, - "protected" : 1, - "returns" : { - "type" : "null" - } - } - }, - "leaf" : 1, - "path" : "/access/acl", - "text" : "acl" - }, - { - "children" : [ - { + ], "info" : { - "DELETE" : { - "description" : "Delete an authentication server.", - "method" : "DELETE", - "name" : "delete", + "GET" : { + "allowtoken" : 0, + "description" : "List TFA configurations of users.", + "method" : "GET", + "name" : "list_user_tfa", "parameters" : { "additionalProperties" : 0, "properties" : { - "realm" : { - "description" : "Authentication domain ID", - "format" : "pve-realm", - "maxLength" : 32, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, "type" : "string", "typetext" : "" } @@ -25862,352 +48101,272 @@ var pveapi = [ }, "permissions" : { "check" : [ - "perm", - "/access/realm", + "or", [ - "Realm.Allocate" + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify", + "Sys.Audit" + ] ] ] }, "protected" : 1, "returns" : { - "type" : "null" + "description" : "A list of the user's TFA entries.", + "items" : { + "description" : "TFA Entry.", + "properties" : { + "created" : { + "description" : "Creation time of this entry as unix epoch.", + "type" : "integer" + }, + "description" : { + "description" : "User chosen description for this entry.", + "type" : "string" + }, + "enable" : { + "default" : 1, + "description" : "Whether this TFA entry is currently enabled.", + "optional" : 1, + "type" : "boolean" + }, + "id" : { + "description" : "The id used to reference this entry.", + "type" : "string" + }, + "type" : { + "description" : "TFA Entry Type.", + "enum" : [ + "totp", + "u2f", + "webauthn", + "recovery", + "yubico" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } }, - "GET" : { - "description" : "Get auth server configuration.", - "method" : "GET", - "name" : "read", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "realm" : { - "description" : "Authentication domain ID", - "format" : "pve-realm", - "maxLength" : 32, - "type" : "string", - "typetext" : "" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate", - "Sys.Audit" - ], - "any", - 1 - ] - }, - "returns" : {} - }, - "PUT" : { - "description" : "Update authentication server settings.", - "method" : "PUT", - "name" : "update", + "POST" : { + "allowtoken" : 0, + "description" : "Add a TFA entry for a user.", + "method" : "POST", + "name" : "add_tfa_entry", "parameters" : { "additionalProperties" : 0, "properties" : { - "base_dn" : { - "description" : "LDAP base domain name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", - "type" : "string" - }, - "bind_dn" : { - "description" : "LDAP bind domain name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", - "type" : "string" - }, - "comment" : { - "description" : "Description.", - "maxLength" : 4096, + "challenge" : { + "description" : "When responding to a u2f challenge: the original challenge string", "optional" : 1, "type" : "string", "typetext" : "" }, - "default" : { - "description" : "Use this as default realm", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list", - "maxLength" : 4096, + "description" : { + "description" : "A description to distinguish multiple entries from one another", + "maxLength" : 255, "optional" : 1, "type" : "string", "typetext" : "" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40, + "password" : { + "description" : "The current password.", + "maxLength" : 64, + "minLength" : 5, "optional" : 1, "type" : "string", "typetext" : "" }, - "domain" : { - "description" : "AD domain name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\S+", - "type" : "string" - }, - "port" : { - "description" : "Server port.", - "maximum" : 65535, - "minimum" : 1, + "totp" : { + "description" : "A totp URI.", "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 65535)" - }, - "realm" : { - "description" : "Authentication domain ID", - "format" : "pve-realm", - "maxLength" : 32, "type" : "string", "typetext" : "" }, - "secure" : { - "description" : "Use secure LDAPS protocol.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "server1" : { - "description" : "Server IP address (or DNS name)", - "format" : "address", - "maxLength" : 256, - "optional" : 1, - "type" : "string", - "typetext" : "" + "type" : { + "description" : "TFA Entry Type.", + "enum" : [ + "totp", + "u2f", + "webauthn", + "recovery", + "yubico" + ], + "type" : "string" }, - "server2" : { - "description" : "Fallback Server IP address (or DNS name)", - "format" : "address", - "maxLength" : 256, - "optional" : 1, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, "type" : "string", "typetext" : "" }, - "tfa" : { - "description" : "Use Two-factor authentication.", - "format" : "pve-tfa-config", - "maxLength" : 128, + "value" : { + "description" : "The current value for the provided totp URI, or a Webauthn/U2F challenge response", "optional" : 1, "type" : "string", "typetext" : "" - }, - "user_attr" : { - "description" : "LDAP user attribute name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\S{2,}", - "type" : "string" } - }, - "type" : "object" + } }, "permissions" : { "check" : [ - "perm", - "/access/realm", + "or", [ - "Realm.Allocate" + "userid-param", + "self" + ], + [ + "userid-group", + [ + "User.Modify" + ] ] ] }, "protected" : 1, "returns" : { - "type" : "null" + "properties" : { + "challenge" : { + "description" : "When adding u2f entries, this contains a challenge the user must respond to in order to finish the registration.", + "optional" : 1, + "type" : "string" + }, + "id" : { + "description" : "The id of a newly added TFA entry.", + "type" : "string" + }, + "recovery" : { + "description" : "When adding recovery codes, this contains the list of codes to be displayed to the user", + "items" : { + "description" : "A recovery entry.", + "type" : "string" + }, + "optional" : 1, + "type" : "array" + } + }, + "type" : "object" } } }, - "leaf" : 1, - "path" : "/access/domains/{realm}", - "text" : "{realm}" + "leaf" : 0, + "path" : "/access/tfa/{userid}", + "text" : "{userid}" } ], "info" : { "GET" : { - "description" : "Authentication domain index.", + "allowtoken" : 0, + "description" : "List TFA configurations of users.", "method" : "GET", - "name" : "index", + "name" : "list_tfa", "parameters" : { "additionalProperties" : 0 }, "permissions" : { - "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).", - "user" : "world" + "description" : "Returns all or just the logged-in user, depending on privileges.", + "user" : "all" }, + "protected" : 1, "returns" : { + "description" : "The list tuples of user and TFA entries.", "items" : { "properties" : { - "comment" : { - "description" : "A comment. The GUI use this text when you select a domain (Realm) on the login window.", - "optional" : 1, - "type" : "string" - }, - "realm" : { - "type" : "string" + "entries" : { + "items" : { + "description" : "TFA Entry.", + "properties" : { + "created" : { + "description" : "Creation time of this entry as unix epoch.", + "type" : "integer" + }, + "description" : { + "description" : "User chosen description for this entry.", + "type" : "string" + }, + "enable" : { + "default" : 1, + "description" : "Whether this TFA entry is currently enabled.", + "optional" : 1, + "type" : "boolean" + }, + "id" : { + "description" : "The id used to reference this entry.", + "type" : "string" + }, + "type" : { + "description" : "TFA Entry Type.", + "enum" : [ + "totp", + "u2f", + "webauthn", + "recovery", + "yubico" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" }, - "tfa" : { - "description" : "Two-factor authentication provider.", - "enum" : [ - "yubico", - "oath" - ], - "optional" : 1, + "userid" : { + "description" : "User this entry belongs to.", "type" : "string" } }, "type" : "object" }, - "links" : [ - { - "href" : "{realm}", - "rel" : "child" - } - ], "type" : "array" } }, "POST" : { - "description" : "Add an authentication server.", + "allowtoken" : 0, + "description" : "Finish a u2f challenge.", "method" : "POST", - "name" : "create", + "name" : "verify_tfa", "parameters" : { "additionalProperties" : 0, "properties" : { - "base_dn" : { - "description" : "LDAP base domain name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", - "type" : "string" - }, - "bind_dn" : { - "description" : "LDAP bind domain name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", - "type" : "string" - }, - "comment" : { - "description" : "Description.", - "maxLength" : 4096, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "default" : { - "description" : "Use this as default realm", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "domain" : { - "description" : "AD domain name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\S+", - "type" : "string" - }, - "port" : { - "description" : "Server port.", - "maximum" : 65535, - "minimum" : 1, - "optional" : 1, - "type" : "integer", - "typetext" : " (1 - 65535)" - }, - "realm" : { - "description" : "Authentication domain ID", - "format" : "pve-realm", - "maxLength" : 32, - "type" : "string", - "typetext" : "" - }, - "secure" : { - "description" : "Use secure LDAPS protocol.", - "optional" : 1, - "type" : "boolean", - "typetext" : "" - }, - "server1" : { - "description" : "Server IP address (or DNS name)", - "format" : "address", - "maxLength" : 256, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "server2" : { - "description" : "Fallback Server IP address (or DNS name)", - "format" : "address", - "maxLength" : 256, - "optional" : 1, - "type" : "string", - "typetext" : "" - }, - "tfa" : { - "description" : "Use Two-factor authentication.", - "format" : "pve-tfa-config", - "maxLength" : 128, - "optional" : 1, + "response" : { + "description" : "The response to the current authentication challenge.", "type" : "string", "typetext" : "" - }, - "type" : { - "description" : "Realm type.", - "enum" : [ - "ad", - "ldap", - "pam", - "pve" - ], - "type" : "string" - }, - "user_attr" : { - "description" : "LDAP user attribute name", - "maxLength" : 256, - "optional" : 1, - "pattern" : "\\S{2,}", - "type" : "string" } - }, - "type" : "object" + } }, "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate" - ] - ] + "user" : "all" }, "protected" : 1, "returns" : { - "type" : "null" + "properties" : { + "ticket" : { + "type" : "string" + } + }, + "type" : "object" } } }, "leaf" : 0, - "path" : "/access/domains", - "text" : "domains" + "path" : "/access/tfa", + "text" : "tfa" }, { "info" : { "GET" : { - "description" : "Dummy. Useful for formaters which want to priovde a login page.", + "allowtoken" : 1, + "description" : "Dummy. Useful for formatters which want to provide a login page.", "method" : "GET", "name" : "get_ticket", "parameters" : { @@ -26221,12 +48380,20 @@ var pveapi = [ } }, "POST" : { + "allowtoken" : 0, "description" : "Create or verify authentication ticket.", "method" : "POST", "name" : "create_ticket", "parameters" : { "additionalProperties" : 0, "properties" : { + "new-format" : { + "default" : 0, + "description" : "With webauthn the format of half-authenticated tickts changed. New clients should pass 1 here and not worry about the old format. The old format is deprecated and will be retired with PVE-8.0", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, "otp" : { "description" : "One-time password for Two-factor authentication.", "optional" : 1, @@ -26263,6 +48430,12 @@ var pveapi = [ "type" : "string", "typetext" : "" }, + "tfa-challenge" : { + "description" : "The signed TFA challenge string the user wants to respond to.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "username" : { "description" : "User name", "maxLength" : 64, @@ -26282,6 +48455,10 @@ var pveapi = [ "optional" : 1, "type" : "string" }, + "clustername" : { + "optional" : 1, + "type" : "string" + }, "ticket" : { "optional" : 1, "type" : "string" @@ -26301,9 +48478,10 @@ var pveapi = [ { "info" : { "PUT" : { + "allowtoken" : 0, "description" : "Change user password.", "method" : "PUT", - "name" : "change_passsword", + "name" : "change_password", "parameters" : { "additionalProperties" : 0, "properties" : { @@ -26355,10 +48533,49 @@ var pveapi = [ "leaf" : 1, "path" : "/access/password", "text" : "password" + }, + { + "info" : { + "GET" : { + "allowtoken" : 1, + "description" : "Retrieve effective permissions of given user/token.", + "method" : "GET", + "name" : "permissions", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "path" : { + "description" : "Only dump this specific path, not the whole tree.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID or full API token ID", + "optional" : 1, + "pattern" : "(?^:^(?^:[^\\s:/]+)\\@(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+)(?:!(?^:[A-Za-z][A-Za-z0-9\\.\\-_]+))?$)", + "type" : "string" + } + } + }, + "permissions" : { + "description" : "Each user/token is allowed to dump their own permissions. A user can dump the permissions of another user if they have 'Sys.Audit' permission on /access.", + "user" : "all" + }, + "returns" : { + "description" : "Map of \"path\" => (Map of \"privilege\" => \"propagate boolean\").", + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/access/permissions", + "text" : "permissions" } ], "info" : { "GET" : { + "allowtoken" : 1, "description" : "Directory index.", "method" : "GET", "name" : "index", @@ -26396,6 +48613,7 @@ var pveapi = [ { "info" : { "DELETE" : { + "allowtoken" : 1, "description" : "Delete pool.", "method" : "DELETE", "name" : "delete_pool", @@ -26425,6 +48643,7 @@ var pveapi = [ } }, "GET" : { + "allowtoken" : 1, "description" : "Get pool configuration.", "method" : "GET", "name" : "read_pool", @@ -26435,6 +48654,15 @@ var pveapi = [ "format" : "pve-poolid", "type" : "string", "typetext" : "" + }, + "type" : { + "enum" : [ + "qemu", + "lxc", + "storage" + ], + "optional" : 1, + "type" : "string" } } }, @@ -26443,7 +48671,7 @@ var pveapi = [ "perm", "/pool/{poolid}", [ - "Pool.Allocate" + "Pool.Audit" ] ] }, @@ -26491,6 +48719,7 @@ var pveapi = [ } }, "PUT" : { + "allowtoken" : 1, "description" : "Update pool data.", "method" : "PUT", "name" : "update_pool", @@ -26552,6 +48781,7 @@ var pveapi = [ ], "info" : { "GET" : { + "allowtoken" : 1, "description" : "Pool index.", "method" : "GET", "name" : "index", @@ -26559,7 +48789,7 @@ var pveapi = [ "additionalProperties" : 0 }, "permissions" : { - "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/.", + "description" : "List all pools where you have Pool.Audit permissions on /pool/.", "user" : "all" }, "returns" : { @@ -26581,6 +48811,7 @@ var pveapi = [ } }, "POST" : { + "allowtoken" : 1, "description" : "Create new pool.", "method" : "POST", "name" : "create_pool", @@ -26621,7 +48852,8 @@ var pveapi = [ { "info" : { "GET" : { - "description" : "API version details. The result also includes the global datacenter confguration.", + "allowtoken" : 1, + "description" : "API version details, including some parts of the global datacenter config.", "method" : "GET", "name" : "version", "parameters" : { @@ -26632,13 +48864,27 @@ var pveapi = [ }, "returns" : { "properties" : { + "console" : { + "description" : "The default console viewer to use.", + "enum" : [ + "applet", + "vv", + "html5", + "xtermjs" + ], + "optional" : 1, + "type" : "string" + }, "release" : { + "description" : "The current Proxmox VE point release in `x.y` format.", "type" : "string" }, "repoid" : { + "description" : "The short git revision from which this version was build.", "type" : "string" }, "version" : { + "description" : "The full pve-manager package version of this node.", "type" : "string" } },