X-Git-Url: https://git.proxmox.com/?p=pve-docs.git;a=blobdiff_plain;f=api-viewer%2Fapidata.js;h=60e0a238d8076d5371992170673939d2de9ab18b;hp=26307a5f9881acee73fddf616e5d65cd6fd816dc;hb=94958b8b9230d5b9b5e2e70c481f115b18a5fa0b;hpb=7aacca6f1d325ac2014e98852a40d3e967ccb216 diff --git a/api-viewer/apidata.js b/api-viewer/apidata.js index 26307a5..60e0a23 100644 --- a/api-viewer/apidata.js +++ b/api-viewer/apidata.js @@ -1,597 +1,446 @@ var pveapi = [ { - "leaf" : 0, - "path" : "/cluster", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ], - "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array" - }, - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "index", - "description" : "Cluster index." - } - }, "children" : [ { - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] - }, - "description" : "Directory index.", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "index" - } - }, - "text" : "firewall", "children" : [ { "info" : { + "DELETE" : { + "description" : "Mark replication job for removal.", + "method" : "DELETE", + "name" : "delete", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "default" : 0, + "description" : "Will remove the jobconfig entry, but will not cleanup.", + "optional" : 1, + "type" : "boolean", + "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" + }, + "keep" : { + "default" : 0, + "description" : "Keep replicated data at target (do not remove).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, "GET" : { + "description" : "Read replication job configuration.", "method" : "GET", - "returns" : { - "type" : "array", - "links" : [ - { - "href" : "{group}", - "rel" : "child" + "name" : "read", + "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" } - ], - "items" : { - "properties" : { - "group" : { - "maxLength" : 20, - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Security Group name.", - "type" : "string" - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0, - "type" : "string", - "maxLength" : 40 - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - }, - "type" : "object" } }, - "description" : "List security groups.", "permissions" : { + "description" : "Requires the VM.Audit permission on /vms/.", "user" : "all" }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "list_security_groups" - }, - "POST" : { "returns" : { - "type" : "null" - }, - "method" : "POST", + "type" : "object" + } + }, + "PUT" : { + "description" : "Update replication job configuration.", + "method" : "PUT", + "name" : "update", "parameters" : { "additionalProperties" : 0, "properties" : { - "group" : { - "maxLength" : 20, - "description" : "Security Group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" + "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", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + "typetext" : "" }, - "rename" : { - "maxLength" : 20, + "disable" : { + "description" : "Flag to disable/deactivate the entry.", + "optional" : 1, + "type" : "boolean", + "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" + }, + "rate" : { + "description" : "Rate limit in mbps (megabytes per second) as floating point number.", + "minimum" : 1, + "optional" : 1, + "type" : "number", + "typetext" : " (1 - N)" + }, + "remove_job" : { + "description" : "Mark the replication job for removal. The job will remove all local replication snapshots. When set to 'full', it also tries to remove replicated volumes on the target. The job then removes itself from the configuration file.", + "enum" : [ + "local", + "full" + ], + "optional" : 1, + "type" : "string" + }, + "schedule" : { + "default" : "*/15", + "description" : "Storage replication schedule. The format is a subset of `systemd` calender events.", + "format" : "pve-calendar-event", + "maxLength" : 128, "optional" : 1, "type" : "string", - "minLength" : 2, - "description" : "Rename/update an existing security group. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing group.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" + "typetext" : "" }, - "comment" : { + "source" : { + "description" : "Source of the replication.", + "format" : "pve-node", + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "" } - } + }, + "type" : "object" }, "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Modify" + "Datastore.Allocate" ] ] }, - "name" : "create_security_group", - "description" : "Create new security group.", - "protected" : 1 + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "text" : "groups", - "children" : [ - { - "leaf" : 0, - "path" : "/cluster/firewall/groups/{group}", - "info" : { - "GET" : { - "proxyto" : null, - "description" : "List rules.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "properties" : { - "group" : { - "minLength" : 2, - "description" : "Security Group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string", - "maxLength" : 20 - } - }, - "additionalProperties" : 0 - }, - "name" : "get_rules", - "method" : "GET", - "returns" : { - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{pos}", - "rel" : "child" - } - ], - "type" : "array" - } - }, - "DELETE" : { - "name" : "delete_security_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "group" : { - "maxLength" : 20, - "minLength" : 2, - "description" : "Security Group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "protected" : 1, - "description" : "Delete security group.", - "returns" : { - "type" : "null" - }, - "method" : "DELETE" - }, - "POST" : { - "method" : "POST", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "iface" : { - "maxLength" : 20, - "format" : "pve-iface", - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "minLength" : 2, - "optional" : 1, - "type" : "string" - }, - "comment" : { + "leaf" : 1, + "path" : "/cluster/replication/{id}", + "text" : "{id}" + } + ], + "info" : { + "GET" : { + "description" : "List replication jobs.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "description" : "Requires the VM.Audit permission on /vms/.", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "description" : "Create a new replication job", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "description" : "Description.", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "disable" : { + "description" : "Flag to disable/deactivate the entry.", + "optional" : 1, + "type" : "boolean", + "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" + }, + "rate" : { + "description" : "Rate limit in mbps (megabytes per second) as floating point number.", + "minimum" : 1, + "optional" : 1, + "type" : "number", + "typetext" : " (1 - N)" + }, + "remove_job" : { + "description" : "Mark the replication job for removal. The job will remove all local replication snapshots. When set to 'full', it also tries to remove replicated volumes on the target. The job then removes itself from the configuration file.", + "enum" : [ + "local", + "full" + ], + "optional" : 1, + "type" : "string" + }, + "schedule" : { + "default" : "*/15", + "description" : "Storage replication schedule. The format is a subset of `systemd` calender events.", + "format" : "pve-calendar-event", + "maxLength" : 128, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "source" : { + "description" : "Source of the replication.", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "target" : { + "description" : "Target node.", + "format" : "pve-node", + "optional" : 0, + "type" : "string", + "typetext" : "" + }, + "type" : { + "description" : "Section type.", + "enum" : [ + "local" + ], + "type" : "string" + } + }, + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/replication", + "text" : "replication" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "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", - "optional" : 1 - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "typetext" : "" + } + } + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "POST" : { + "description" : "Adds a node to the cluster configuration. This call is for internal use.", + "method" : "POST", + "name" : "addnode", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "force" : { + "description" : "Do not throw error if node already exists.", "optional" : 1, - "type" : "string" + "type" : "boolean", + "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.", - "optional" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-fw-addr-spec" - }, - "sport" : { - "format" : "pve-fw-sport-spec", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "optional" : 1, - "type" : "string" + "typetext" : "" }, - "dest" : { + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "format" : "pve-fw-addr-spec" - }, - "action" : { - "maxLength" : 20, - "type" : "string", - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "minLength" : 2 - }, - "enable" : { - "minimum" : 0, "type" : "integer", - "optional" : 1 - }, - "dport" : { - "format" : "pve-fw-dport-spec", - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "type" : "string", - "optional" : 1 + "typetext" : " (1 - N)" }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - }, - "macro" : { - "type" : "string", + "ring0_addr" : { + "default" : "Hostname of the node", + "description" : "Hostname (or IP) of the corosync ring0 address of this node.", + "format" : "address", "optional" : 1, - "maxLength" : 128 - }, - "group" : { "type" : "string", - "description" : "Security Group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 20 + "typetext" : "" }, - "proto" : { + "ring1_addr" : { + "description" : "Hostname (or IP) of the corosync ring1 address of this node. Requires a valid configured ring 1 (bindnet1_addr) in the cluster.", + "format" : "address", "optional" : 1, "type" : "string", - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec" + "typetext" : "" }, - "pos" : { + "votes" : { + "description" : "Number of votes for this node", "minimum" : 0, - "description" : "Update rule at position .", + "optional" : 1, "type" : "integer", - "optional" : 1 + "typetext" : " (0 - N)" } } }, - "name" : "create_rule", "protected" : 1, "returns" : { - "type" : "null" - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "properties" : { + "corosync_authkey" : { + "type" : "string" + }, + "corosync_conf" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/cluster/config/nodes/{node}", + "text" : "{node}" + } + ], + "info" : { + "GET" : { + "description" : "Corosync node list.", + "method" : "GET", + "name" : "nodes", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "node" : { + "type" : "string" + } }, - "description" : "Create new rule.", - "proxyto" : null + "type" : "object" + }, + "links" : [ + { + "href" : "{node}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/cluster/config/nodes", + "text" : "nodes" + }, + { + "info" : { + "GET" : { + "description" : "Get information needed to join this cluster over the connected node.", + "method" : "GET", + "name" : "join_info", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "default" : "current connected node", + "description" : "The node for which the joinee gets the nodeinfo. ", + "format" : "pve-node", + "optional" : 1, + "type" : "string", + "typetext" : "" + } } }, - "children" : [ - { - "text" : "{pos}", - "info" : { - "PUT" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "sport" : { - "format" : "pve-fw-sport-spec", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "type" : "string", - "optional" : 1 - }, - "iface" : { - "minLength" : 2, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "type" : "string", - "optional" : 1, - "maxLength" : 20, - "format" : "pve-iface" - }, - "macro" : { - "maxLength" : 128, - "optional" : 1, - "type" : "string" - }, - "proto" : { - "format" : "pve-fw-protocol-spec", - "type" : "string", - "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." - }, - "pos" : { - "description" : "Update rule at position .", - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "action" : { - "optional" : 1, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "maxLength" : 20 - }, - "enable" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string", - "maxLength" : 40 - }, - "source" : { - "optional" : 1, - "type" : "string", - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "format" : "pve-fw-addr-spec" - }, - "dest" : { - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "type" : "string", - "optional" : 1, - "format" : "pve-configid-list" - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "moveto" : { - "description" : "Move rule to new position . Other arguments are ignored.", - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "group" : { - "maxLength" : 20, - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Security Group name.", - "minLength" : 2 - }, - "dport" : { - "type" : "string", - "optional" : 1, - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "format" : "pve-fw-dport-spec" - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 1, - "type" : "string" - } - } - }, - "name" : "update_rule", - "protected" : 1, - "method" : "PUT", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "description" : "Modify rule data.", - "proxyto" : null, - "returns" : { - "type" : "null" - } - }, - "DELETE" : { - "returns" : { - "type" : "null" - }, - "description" : "Delete rule.", - "proxyto" : null, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "method" : "DELETE", - "protected" : 1, - "name" : "delete_rule", - "parameters" : { - "properties" : { - "pos" : { - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position .", - "minimum" : 0 - }, - "group" : { - "maxLength" : 20, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Security Group name.", - "minLength" : 2, - "type" : "string" - }, - "digest" : { - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - } - }, - "additionalProperties" : 0 - } - }, - "GET" : { - "name" : "get_rule", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "properties" : { - "pos" : { - "description" : "Update rule at position .", - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "group" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Security Group name.", - "minLength" : 2, - "type" : "string", - "maxLength" : 20 - } - }, - "additionalProperties" : 0 - }, - "proxyto" : null, - "description" : "Get single rule data.", - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "method" : "GET" - } - }, - "path" : "/cluster/firewall/groups/{group}/{pos}", - "leaf" : 1 - } - ], - "text" : "{group}" - } - ], - "leaf" : 0, - "path" : "/cluster/firewall/groups" - }, - { - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{pos}" - } - ], - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "name" : "get_rules", - "parameters" : { - "additionalProperties" : 0 - }, "permissions" : { "check" : [ "perm", @@ -601,531 +450,529 @@ var pveapi = [ ] ] }, - "description" : "List rules.", - "proxyto" : null + "returns" : { + "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" : { + "default" : "Hostname of the node", + "description" : "Hostname (or IP) of the corosync ring0 address of this node.", + "format" : "address", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + }, + "preferred_node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string" + }, + "totem" : { + "type" : "object" + } + }, + "type" : "object" + } }, "POST" : { + "description" : "Joins this node into an existing cluster.", "method" : "POST", - "protected" : 1, - "name" : "create_rule", + "name" : "join", "parameters" : { + "additionalProperties" : 0, "properties" : { - "dport" : { - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "optional" : 1, - "type" : "string", - "format" : "pve-fw-dport-spec" - }, - "type" : { - "type" : "string", - "optional" : 0, - "enum" : [ - "in", - "out", - "group" - ] + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", + "type" : "string" }, - "enable" : { - "type" : "integer", + "force" : { + "description" : "Do not throw error if node already exists.", "optional" : 1, - "minimum" : 0 + "type" : "boolean", + "typetext" : "" }, - "action" : { + "hostname" : { + "description" : "Hostname (or IP) of an existing cluster member.", "type" : "string", - "optional" : 0, - "minLength" : 2, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 20 + "typetext" : "" }, - "macro" : { + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "maxLength" : 128 - }, - "pos" : { - "description" : "Update rule at position .", "type" : "integer", - "optional" : 1, - "minimum" : 0 + "typetext" : " (1 - N)" }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "password" : { + "description" : "Superuser (root) password of peer node.", + "maxLength" : 128, "type" : "string", - "optional" : 1, - "format" : "pve-fw-protocol-spec" + "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.", - "minLength" : 2, - "type" : "string", + "ring0_addr" : { + "default" : "IP resolved by node's hostname", + "description" : "Hostname (or IP) of the corosync ring0 address of this node.", + "format" : "address", "optional" : 1, - "maxLength" : 20, - "format" : "pve-iface" - }, - "comment" : { "type" : "string", - "optional" : 1 + "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.", + "ring1_addr" : { + "description" : "Hostname (or IP) of the corosync ring1 address of this node. Requires a valid configured ring 1 (bindnet1_addr) in the cluster.", + "format" : "address", "optional" : 1, "type" : "string", - "format" : "pve-fw-addr-spec" + "typetext" : "" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1, - "maxLength" : 40 - }, - "dest" : { - "format" : "pve-fw-addr-spec", - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "optional" : 1, - "type" : "string" - }, - "sport" : { - "format" : "pve-fw-sport-spec", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", + "votes" : { + "description" : "Number of votes for this node", + "minimum" : 0, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (0 - N)" } - }, - "additionalProperties" : 0 + } }, + "protected" : 1, "returns" : { - "type" : "null" + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/cluster/config/join", + "text" : "join" + }, + { + "info" : { + "GET" : { + "description" : "Get corosync totem protocol settings.", + "method" : "GET", + "name" : "totem", + "parameters" : { + "additionalProperties" : 0 }, - "proxyto" : null, - "description" : "Create new rule.", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] + }, + "returns" : { + "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" + } + }, + "POST" : { + "description" : "Generate new cluster configuration.", + "method" : "POST", + "name" : "create", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "bindnet0_addr" : { + "description" : "This specifies the network address the corosync ring 0 executive should bind to and defaults to the local IP address of the node.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "bindnet1_addr" : { + "description" : "This specifies the network address the corosync ring 1 executive should bind to and is optional.", + "format" : "ip", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "clustername" : { + "description" : "The name of the cluster.", + "format" : "pve-node", + "maxLength" : 15, + "type" : "string", + "typetext" : "" + }, + "nodeid" : { + "description" : "Node id for this node.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "ring0_addr" : { + "default" : "Hostname of the node", + "description" : "Hostname (or IP) of the corosync ring0 address of this node.", + "format" : "address", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "ring1_addr" : { + "description" : "Hostname (or IP) of the corosync ring1 address of this node. Requires a valid configured ring 1 (bindnet1_addr) in the cluster.", + "format" : "address", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "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/config", + "text" : "config" + }, + { + "children" : [ + { "children" : [ { - "text" : "{pos}", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "pos" : { - "description" : "Update rule at position .", - "optional" : 1, - "type" : "integer", - "minimum" : 0 - } - } - }, - "name" : "get_rule", - "description" : "Get single rule data.", - "proxyto" : null - }, - "PUT" : { - "protected" : 1, - "name" : "update_rule", - "parameters" : { - "properties" : { - "delete" : { - "description" : "A list of settings you want to delete.", - "optional" : 1, - "type" : "string", - "format" : "pve-configid-list" - }, - "iface" : { - "minLength" : 2, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "type" : "string", - "optional" : 1, - "format" : "pve-iface", - "maxLength" : 20 + "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)" + } + } }, - "moveto" : { - "minimum" : 0, - "description" : "Move rule to new position . Other arguments are ignored.", - "type" : "integer", - "optional" : 1 + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "source" : { - "format" : "pve-fw-addr-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." - }, - "sport" : { - "optional" : 1, - "type" : "string", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "format" : "pve-fw-sport-spec" - }, - "dest" : { - "type" : "string", - "optional" : 1, - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "format" : "pve-fw-addr-spec" - }, - "enable" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "dport" : { - "optional" : 1, - "type" : "string", - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "format" : "pve-fw-dport-spec" - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "type" : "string", - "optional" : 1 - }, - "action" : { - "type" : "string", - "optional" : 1, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "minLength" : 2, - "maxLength" : 20 - }, - "macro" : { - "optional" : 1, - "type" : "string", - "maxLength" : 128 - }, - "pos" : { - "description" : "Update rule at position .", - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "optional" : 1, - "type" : "string", - "format" : "pve-fw-protocol-spec" + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" } }, - "additionalProperties" : 0 - }, - "method" : "PUT", - "proxyto" : null, - "description" : "Modify rule data.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "returns" : { - "type" : "null" - } - }, - "DELETE" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "proxyto" : null, - "description" : "Delete rule.", - "returns" : { - "type" : "null" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "pos" : { - "optional" : 1, - "type" : "integer", - "description" : "Update rule at position .", - "minimum" : 0 + "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)" + } + } }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - } - } - }, - "name" : "delete_rule", - "protected" : 1, - "method" : "DELETE" - } - }, - "path" : "/cluster/firewall/rules/{pos}", - "leaf" : 1 - } - ], - "text" : "rules", - "leaf" : 0, - "path" : "/cluster/firewall/rules" - }, - { - "path" : "/cluster/firewall/ipset", - "leaf" : 0, - "children" : [ - { - "leaf" : 0, - "path" : "/cluster/firewall/ipset/{name}", - "info" : { - "DELETE" : { - "protected" : 1, - "description" : "Delete IPSet", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string", - "maxLength" : 64 - } - } - }, - "name" : "delete_ipset", - "returns" : { - "type" : "null" - }, - "method" : "DELETE" - }, - "GET" : { - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 - }, - "cidr" : { - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.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" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "macro" : { + "optional" : 1, + "type" : "integer" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 0 - } + "type" : "object" } }, - "links" : [ - { - "href" : "{cidr}", - "rel" : "child" - } - ], - "type" : "array" - }, - "method" : "GET", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "name" : "get_ipset", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string", - "maxLength" : 64 - } - } - }, - "description" : "List IPSet content" - }, - "POST" : { - "returns" : { - "type" : "null" - }, - "method" : "POST", - "name" : "create_ip", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "format" : "IPorCIDRorAlias", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 - }, - "name" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2, - "maxLength" : 64 - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "description" : "Add IP or Network to IPSet.", - "protected" : 1 - } - }, - "text" : "{name}", - "children" : [ - { - "text" : "{cidr}", - "info" : { - "GET" : { - "returns" : { - "type" : "object" - }, - "method" : "GET", - "description" : "Read IP or Network settings from IPSet.", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDRorAlias" - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name." - } - } - }, - "name" : "read_ip" - }, "PUT" : { + "description" : "Modify rule data.", "method" : "PUT", - "returns" : { - "type" : "null" - }, + "name" : "update_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "nomatch" : { + "action" : { + "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", + "maxLength" : 20, + "minLength" : 2, "optional" : 1, - "type" : "boolean" - }, - "name" : { - "maxLength" : 64, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2, "type" : "string" }, "comment" : { + "description" : "Descriptive comment.", + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "" }, - "cidr" : { - "format" : "IPorCIDRorAlias", - "description" : "Network/IP specification in CIDR format.", - "type" : "string" + "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", - "maxLength" : 40 + "typetext" : "" + }, + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 1, + "type" : "string" } } }, - "name" : "update_ip", "permissions" : { "check" : [ "perm", @@ -1135,270 +982,35 @@ var pveapi = [ ] ] }, - "description" : "Update IP or Network settings", - "protected" : 1 - }, - "DELETE" : { - "method" : "DELETE", + "protected" : 1, + "proxyto" : null, "returns" : { "type" : "null" - }, - "description" : "Remove IP or Network from IPSet.", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "parameters" : { - "properties" : { - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDRorAlias" - }, - "name" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "type" : "string", - "maxLength" : 64 - } - }, - "additionalProperties" : 0 - }, - "name" : "remove_ip" + } } }, - "path" : "/cluster/firewall/ipset/{name}/{cidr}", - "leaf" : 1 + "leaf" : 1, + "path" : "/cluster/firewall/groups/{group}/{pos}", + "text" : "{pos}" } - ] - } - ], - "text" : "ipset", - "info" : { - "POST" : { - "returns" : { - "type" : "null" - }, - "method" : "POST", - "protected" : 1, - "description" : "Create new IPSet", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "name" : { - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string", - "maxLength" : 64 - }, - "rename" : { - "type" : "string", - "optional" : 1, - "minLength" : 2, - "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64 - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1 - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "name" : "create_ipset" - }, - "GET" : { - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name." - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 0, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ] - }, - "method" : "GET", - "description" : "List IPSets", - "name" : "ipset_index", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - } - } - } - }, - { - "info" : { - "POST" : { - "method" : "POST", - "returns" : { - "type" : "null" - }, - "protected" : 1, - "description" : "Create IP or Network Alias.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDR" - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" - }, - "comment" : { - "optional" : 1, - "type" : "string" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "name" : "create_alias" - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ], - "items" : { - "properties" : { - "digest" : { - "optional" : 0, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "cidr" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string" - } - }, - "type" : "object" - } - }, - "description" : "List aliases", - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "name" : "get_aliases" - } - }, - "text" : "aliases", - "children" : [ - { + ], "info" : { "DELETE" : { + "description" : "Delete security group.", + "method" : "DELETE", + "name" : "delete_security_group", "parameters" : { + "additionalProperties" : 0, "properties" : { - "digest" : { - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "description" : "Alias name.", + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, + "minLength" : 2, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 + "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "name" : "remove_alias", "permissions" : { "check" : [ "perm", @@ -1408,153 +1020,267 @@ var pveapi = [ ] ] }, - "description" : "Remove IP or Network alias.", "protected" : 1, "returns" : { "type" : "null" - }, - "method" : "DELETE" + } }, - "PUT" : { - "method" : "PUT", - "returns" : { - "type" : "null" - }, - "description" : "Update IP or Network alias.", - "protected" : 1, + "GET" : { + "description" : "List rules.", + "method" : "GET", + "name" : "get_rules", "parameters" : { "additionalProperties" : 0, "properties" : { - "rename" : { - "maxLength" : 64, + "group" : { + "description" : "Security Group name.", + "maxLength" : 18, "minLength" : 2, - "description" : "Rename an existing alias.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "optional" : 1, - "type" : "string" - }, - "name" : { - "maxLength" : 64, "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name.", - "minLength" : 2, "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDR" - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." } } }, - "name" : "update_alias", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Modify" + "Sys.Audit" ] ] + }, + "proxyto" : null, + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "type" : "array" } }, - "GET" : { + "POST" : { + "description" : "Create new rule.", + "method" : "POST", + "name" : "create_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "name" : { - "maxLength" : 64, - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name.", - "minLength" : 2 - } - } + "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)" + }, + "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" : "" + }, + "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" + } + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "name" : "read_alias", - "description" : "Read alias.", + "protected" : 1, + "proxyto" : null, "returns" : { - "type" : "object" - }, - "method" : "GET" + "type" : "null" + } } }, - "text" : "{name}", - "leaf" : 1, - "path" : "/cluster/firewall/aliases/{name}" + "leaf" : 0, + "path" : "/cluster/firewall/groups/{group}", + "text" : "{group}" } ], - "leaf" : 0, - "path" : "/cluster/firewall/aliases" - }, - { "info" : { - "PUT" : { - "description" : "Set Firewall options.", - "protected" : 1, + "GET" : { + "description" : "List security groups.", + "method" : "GET", + "name" : "list_security_groups", "parameters" : { - "properties" : { - "policy_out" : { - "type" : "string", - "optional" : 1, - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ] + "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" + } }, - "delete" : { + "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", - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list" - }, - "enable" : { - "type" : "integer", - "optional" : 1, - "description" : "Enable or disable the firewall cluster wide.", - "minimum" : 0 + "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", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + "typetext" : "" }, - "policy_in" : { + "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, - "type" : "string", - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ] + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "name" : "set_options", "permissions" : { "check" : [ "perm", @@ -1564,116 +1290,286 @@ var pveapi = [ ] ] }, - "method" : "PUT", + "protected" : 1, "returns" : { "type" : "null" } - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "get_options", - "description" : "Get Firewall options.", - "method" : "GET", - "returns" : { - "type" : "object", - "properties" : { - "policy_in" : { - "optional" : 1, - "type" : "string", - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ] - }, - "enable" : { - "description" : "Enable or disable the firewall cluster wide.", - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "policy_out" : { - "optional" : 1, - "type" : "string", - "description" : "Output policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ] - } - } - } } }, - "text" : "options", - "leaf" : 1, - "path" : "/cluster/firewall/options" + "leaf" : 0, + "path" : "/cluster/firewall/groups", + "text" : "groups" }, { - "info" : { - "GET" : { - "description" : "List available macros", - "name" : "get_macros", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0 - }, - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "descr" : { - "type" : "string", - "description" : "More verbose description (if available)." + "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" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "macro" : { + "optional" : 1, + "type" : "integer" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } }, - "macro" : { - "description" : "Macro name.", - "type" : "string" + "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)" + }, + "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" + } } }, - "type" : "object" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } } - } + }, + "leaf" : 1, + "path" : "/cluster/firewall/rules/{pos}", + "text" : "{pos}" } - }, - "text" : "macros", - "leaf" : 1, - "path" : "/cluster/firewall/macros" - }, - { - "leaf" : 1, - "path" : "/cluster/firewall/refs", + ], "info" : { "GET" : { + "description" : "List rules.", + "method" : "GET", + "name" : "get_rules", "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "description" : "Only list references of specified type.", - "enum" : [ - "alias", - "ipset" - ], - "type" : "string", - "optional" : 1 - } - } + "additionalProperties" : 0 }, "permissions" : { "check" : [ @@ -1684,761 +1580,271 @@ var pveapi = [ ] ] }, - "name" : "refs", - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", + "proxyto" : null, "returns" : { "items" : { "properties" : { - "name" : { - "type" : "string" - }, - "type" : { - "type" : "string", - "enum" : [ - "alias", - "ipset" - ] - }, - "ref" : { - "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 + "pos" : { + "type" : "integer" } }, "type" : "object" }, - "type" : "array" - }, - "method" : "GET" - } - }, - "text" : "refs" - } - ], - "leaf" : 0, - "path" : "/cluster/firewall" - }, - { - "children" : [ - { - "info" : { - "DELETE" : { - "protected" : 1, - "description" : "Delete vzdump backup job definition.", - "name" : "delete_job", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "id" : { - "type" : "string", - "description" : "The job ID.", - "maxLength" : 50 + "links" : [ + { + "href" : "{pos}", + "rel" : "child" } - } - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "method" : "DELETE", - "returns" : { - "type" : "null" + ], + "type" : "array" } }, - "PUT" : { - "method" : "PUT", - "returns" : { - "type" : "null" - }, - "name" : "update_job", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, + "POST" : { + "description" : "Create new rule.", + "method" : "POST", + "name" : "create_rule", "parameters" : { + "additionalProperties" : 0, "properties" : { - "size" : { - "minimum" : 500, - "description" : "Unused, will be removed in a future release.", - "default" : 1024, - "optional" : 1, - "type" : "integer" - }, - "node" : { - "type" : "string", - "optional" : 1, - "description" : "Only run if executed on this node.", - "format" : "pve-node" - }, - "exclude" : { - "optional" : 1, - "type" : "string", - "description" : "Exclude specified guest systems (assumes --all)", - "format" : "pve-vmid-list" - }, - "delete" : { - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "description" : "A list of settings you want to delete." - }, - "stdexcludes" : { - "description" : "Exclude temporary files and logs.", - "default" : 1, - "optional" : 1, - "type" : "boolean" - }, - "exclude-path" : { - "format" : "string-alist", - "type" : "string", - "optional" : 1, - "description" : "Exclude certain files/directories (shell globs)." - }, - "enabled" : { - "description" : "Enable or disable the job.", - "type" : "boolean", - "optional" : 1, - "default" : "1" + "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" }, - "storage" : { - "format" : "pve-storage-id", + "comment" : { + "description" : "Descriptive comment.", "optional" : 1, "type" : "string", - "description" : "Store resulting file to this storage." - }, - "pigz" : { - "default" : 0, - "optional" : 1, - "type" : "integer", - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." - }, - "stopwait" : { - "minimum" : 0, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "type" : "integer", - "optional" : 1, - "default" : 10 + "typetext" : "" }, - "quiet" : { - "description" : "Be quiet.", - "default" : 0, + "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" : "boolean" - }, - "mailnotification" : { - "enum" : [ - "always", - "failure" - ], - "description" : "Specify when to send an email", "type" : "string", - "optional" : 1, - "default" : "always" + "typetext" : "" }, - "all" : { - "type" : "boolean", + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40, "optional" : 1, - "default" : 0, - "description" : "Backup all known guest systems on this host." - }, - "id" : { - "description" : "The job ID.", "type" : "string", - "maxLength" : 50 - }, - "remove" : { - "default" : 1, - "optional" : 1, - "type" : "boolean", - "description" : "Remove old backup files if there are more than 'maxfiles' backup files." + "typetext" : "" }, - "script" : { + "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", - "description" : "Use specified hook script." + "typetext" : "" }, - "lockwait" : { + "enable" : { + "description" : "Flag to enable/disable a rule.", "minimum" : 0, - "default" : 180, "optional" : 1, "type" : "integer", - "description" : "Maximal time to wait for the global lock (minutes)." + "typetext" : " (0 - N)" }, - "mailto" : { - "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, - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "format" : "string-list" - }, - "dumpdir" : { - "description" : "Store resulting files to specified directory.", - "type" : "string", - "optional" : 1 - }, - "starttime" : { - "pattern" : "\\d{1,2}:\\d{1,2}", - "description" : "Job Start time.", "type" : "string", - "typetext" : "HH:MM" + "typetext" : "" }, - "bwlimit" : { - "minimum" : 0, - "description" : "Limit I/O bandwidth (KBytes per second).", - "default" : 0, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, "optional" : 1, - "type" : "integer" + "type" : "string", + "typetext" : "" }, - "ionice" : { + "pos" : { + "description" : "Update rule at position .", "minimum" : 0, - "description" : "Set CFQ ionice priority.", "optional" : 1, "type" : "integer", - "default" : 7, - "maximum" : 8 + "typetext" : " (0 - N)" }, - "stop" : { - "default" : 0, - "optional" : 1, - "type" : "boolean", - "description" : "Stop runnig backup jobs on this host." - }, - "maxfiles" : { - "description" : "Maximal number of backup files per guest system.", - "default" : 1, + "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" : "integer", - "minimum" : 1 - }, - "mode" : { - "description" : "Backup mode.", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "default" : "snapshot", "type" : "string", - "optional" : 1 + "typetext" : "" }, - "compress" : { - "default" : "0", + "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", - "description" : "Compress dump file.", - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ] + "typetext" : "" }, - "tmpdir" : { + "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", - "description" : "Store temporary files to specified directory." - }, - "vmid" : { - "format" : "pve-vmid-list", - "type" : "string", - "optional" : 1, - "description" : "The ID of the guest system you want to backup." + "typetext" : "" }, - "dow" : { - "description" : "Day of week selection.", - "optional" : 1, - "type" : "string", - "format" : "pve-day-of-week-list" - } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "description" : "Update vzdump backup job definition." - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object" - }, - "parameters" : { - "properties" : { - "id" : { - "description" : "The job ID.", - "type" : "string", - "maxLength" : 50 + "type" : { + "description" : "Rule type.", + "enum" : [ + "in", + "out", + "group" + ], + "optional" : 0, + "type" : "string" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "name" : "read_job", - "description" : "Read vzdump backup job definition." - } - }, - "text" : "{id}", - "leaf" : 1, - "path" : "/cluster/backup/{id}" - } - ], - "text" : "backup", - "info" : { - "POST" : { - "description" : "Create new vzdump backup job.", - "protected" : 1, - "name" : "create_job", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "parameters" : { - "properties" : { - "stopwait" : { - "default" : 10, - "optional" : 1, - "type" : "integer", - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "minimum" : 0 - }, - "quiet" : { - "description" : "Be quiet.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "remove" : { - "default" : 1, - "type" : "boolean", - "optional" : 1, - "description" : "Remove old backup files if there are more than 'maxfiles' backup files." - }, - "mailnotification" : { - "description" : "Specify when to send an email", - "enum" : [ - "always", - "failure" - ], - "default" : "always", - "type" : "string", - "optional" : 1 - }, - "all" : { - "description" : "Backup all known guest systems on this host.", - "optional" : 1, - "type" : "boolean", - "default" : 0 - }, - "exclude" : { - "description" : "Exclude specified guest systems (assumes --all)", - "type" : "string", - "optional" : 1, - "format" : "pve-vmid-list" - }, - "size" : { - "description" : "Unused, will be removed in a future release.", - "default" : 1024, - "type" : "integer", - "optional" : 1, - "minimum" : 500 - }, - "node" : { - "optional" : 1, - "type" : "string", - "description" : "Only run if executed on this node.", - "format" : "pve-node" - }, - "pigz" : { - "default" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." - }, - "stdexcludes" : { - "description" : "Exclude temporary files and logs.", - "default" : 1, - "type" : "boolean", - "optional" : 1 - }, - "exclude-path" : { - "type" : "string", - "optional" : 1, - "description" : "Exclude certain files/directories (shell globs).", - "format" : "string-alist" - }, - "storage" : { - "optional" : 1, - "type" : "string", - "description" : "Store resulting file to this storage.", - "format" : "pve-storage-id" - }, - "enabled" : { - "description" : "Enable or disable the job.", - "default" : "1", - "optional" : 1, - "type" : "boolean" - }, - "maxfiles" : { - "minimum" : 1, - "default" : 1, - "optional" : 1, - "type" : "integer", - "description" : "Maximal number of backup files per guest system." - }, - "stop" : { - "type" : "boolean", - "optional" : 1, - "default" : 0, - "description" : "Stop runnig backup jobs on this host." - }, - "tmpdir" : { - "optional" : 1, - "type" : "string", - "description" : "Store temporary files to specified directory." - }, - "compress" : { - "optional" : 1, - "type" : "string", - "default" : "0", - "enum" : [ - "0", - "1", - "gzip", - "lzo" - ], - "description" : "Compress dump file." - }, - "mode" : { - "type" : "string", - "optional" : 1, - "default" : "snapshot", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "description" : "Backup mode." - }, - "bwlimit" : { - "description" : "Limit I/O bandwidth (KBytes per second).", - "default" : 0, - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "ionice" : { - "minimum" : 0, - "default" : 7, - "maximum" : 8, - "type" : "integer", - "optional" : 1, - "description" : "Set CFQ ionice priority." - }, - "dow" : { - "format" : "pve-day-of-week-list", - "default" : "mon,tue,wed,thu,fri,sat,sun", - "optional" : 1, - "type" : "string", - "description" : "Day of week selection." - }, - "vmid" : { - "description" : "The ID of the guest system you want to backup.", - "type" : "string", - "optional" : 1, - "format" : "pve-vmid-list" - }, - "lockwait" : { - "minimum" : 0, - "description" : "Maximal time to wait for the global lock (minutes).", - "type" : "integer", - "optional" : 1, - "default" : 180 - }, - "script" : { - "type" : "string", - "optional" : 1, - "description" : "Use specified hook script." - }, - "mailto" : { - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "optional" : 1, - "type" : "string", - "format" : "string-list" - }, - "dumpdir" : { - "description" : "Store resulting files to specified directory.", - "type" : "string", - "optional" : 1 - }, - "starttime" : { - "typetext" : "HH:MM", - "description" : "Job Start time.", - "pattern" : "\\d{1,2}:\\d{1,2}", - "type" : "string" + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" } - }, - "additionalProperties" : 0 + } }, - "method" : "POST", - "returns" : { - "type" : "null" - } + "leaf" : 0, + "path" : "/cluster/firewall/rules", + "text" : "rules" }, - "GET" : { - "method" : "GET", - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{id}" - } - ], - "items" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - } - } - }, - "type" : "array" - }, - "description" : "List vzdump backup schedule.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - } - } - }, - "path" : "/cluster/backup", - "leaf" : 0 - }, - { - "path" : "/cluster/ha", - "leaf" : 0, - "text" : "ha", - "children" : [ { - "info" : { - "POST" : { - "method" : "POST", - "returns" : { - "type" : "null" - }, - "name" : "create", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Console" - ] - ] - }, - "parameters" : { - "properties" : { - "max_restart" : { - "description" : "Maximal number of tries to restart the service on a node after its start failed.", - "default" : 1, - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "state" : { - "type" : "string", - "optional" : 1, - "default" : "enabled", - "enum" : [ - "enabled", - "disabled" - ], - "description" : "Resource state." - }, - "max_relocate" : { - "default" : 1, - "optional" : 1, - "type" : "integer", - "description" : "Maximal number of service relocate tries when a service failes to start.", - "minimum" : 0 - }, - "group" : { - "type" : "string", - "optional" : 1, - "description" : "The HA group identifier.", - "format" : "pve-configid" - }, - "comment" : { - "optional" : 1, - "type" : "string", - "description" : "Description.", - "maxLength" : 4096 - }, - "type" : { - "enum" : [ - "vm", - "ct" - ], - "description" : "Resource type.", - "type" : "string", - "optional" : 1 - }, - "sid" : { - "format" : "pve-ha-resource-or-vm-id", - "typetext" : ":", - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "type" : "string" - } - }, - "additionalProperties" : 0, - "type" : "object" - }, - "protected" : 1, - "description" : "Create a new HA resource." - }, - "GET" : { - "returns" : { - "items" : { - "properties" : { - "sid" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "href" : "{sid}", - "rel" : "child" - } - ], - "type" : "array" - }, - "method" : "GET", - "description" : "List HA resources.", - "name" : "index", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "vm", - "ct" - ], - "description" : "Only list resources of specific type" - } - } - } - } - }, - "text" : "resources", "children" : [ { - "text" : "{sid}", "children" : [ { - "path" : "/cluster/ha/resources/{sid}/migrate", - "leaf" : 1, - "text" : "migrate", "info" : { - "POST" : { - "name" : "migrate", + "DELETE" : { + "description" : "Remove IP or Network from IPSet.", + "method" : "DELETE", + "name" : "remove_ip", "parameters" : { + "additionalProperties" : 0, "properties" : { - "sid" : { - "typetext" : ":", - "format" : "pve-ha-resource-or-vm-id", + "cidr" : { + "description" : "Network/IP specification in CIDR format.", + "format" : "IPorCIDRorAlias", "type" : "string", - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)." + "typetext" : "" }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "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" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, - "description" : "Request resource migration (online) to another node.", "returns" : { "type" : "null" - }, - "method" : "POST" - } - } - }, - { - "path" : "/cluster/ha/resources/{sid}/relocate", - "leaf" : 1, - "text" : "relocate", - "info" : { - "POST" : { - "name" : "relocate", + } + }, + "GET" : { + "description" : "Read IP or Network settings from IPSet.", + "method" : "GET", + "name" : "read_ip", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "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" : "" }, - "sid" : { - "typetext" : ":", - "format" : "pve-ha-resource-or-vm-id", + "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", - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100)." + "typetext" : "" + }, + "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" : "" } } }, @@ -2447,172 +1853,169 @@ var pveapi = [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, "protected" : 1, - "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.", "returns" : { "type" : "null" - }, - "method" : "POST" + } } - } + }, + "leaf" : 1, + "path" : "/cluster/firewall/ipset/{name}/{cidr}", + "text" : "{cidr}" } ], "info" : { - "GET" : { - "returns" : {}, - "method" : "GET", + "DELETE" : { + "description" : "Delete IPSet", + "method" : "DELETE", + "name" : "delete_ipset", "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).", - "type" : "string", - "format" : "pve-ha-resource-or-vm-id", - "typetext" : ":" + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "name" : "read", - "description" : "Read resource configuration." - }, - "PUT" : { + "protected" : 1, "returns" : { "type" : "null" - }, - "method" : "PUT", + } + }, + "GET" : { + "description" : "List IPSet content", + "method" : "GET", + "name" : "get_ipset", "parameters" : { "additionalProperties" : 0, - "type" : "object", "properties" : { - "group" : { - "format" : "pve-configid", - "optional" : 1, - "type" : "string", - "description" : "The HA group identifier." - }, - "max_restart" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "default" : 1, - "description" : "Maximal number of tries to restart the service on a node after its start failed." - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "optional" : 1, - "type" : "string", - "format" : "pve-configid-list", - "maxLength" : 4096 + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "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" + } }, - "sid" : { - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", + "type" : "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", - "format" : "pve-ha-resource-or-vm-id", - "typetext" : ":" + "typetext" : "" }, "comment" : { - "description" : "Description.", "optional" : 1, "type" : "string", - "maxLength" : 4096 - }, - "max_relocate" : { - "optional" : 1, - "type" : "integer", - "default" : 1, - "description" : "Maximal number of service relocate tries when a service failes to start.", - "minimum" : 0 + "typetext" : "" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1, - "maxLength" : 40 + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" }, - "state" : { - "enum" : [ - "enabled", - "disabled" - ], - "description" : "Resource state.", - "type" : "string", + "nomatch" : { "optional" : 1, - "default" : "enabled" + "type" : "boolean", + "typetext" : "" } } }, - "name" : "update", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, - "description" : "Update resource configuration.", - "protected" : 1 - }, - "DELETE" : { "protected" : 1, - "description" : "Delete resource configuration.", - "name" : "delete", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Console" - ] - ] - }, - "parameters" : { - "properties" : { - "sid" : { - "description" : "HA resource ID. This consists of a resource type followed by a resource specific name, separated with colon (example: vm:100 / ct:100). For virtual machines and containers, you can simply use the VM or CT id as a shortcut (example: 100).", - "type" : "string", - "format" : "pve-ha-resource-or-vm-id", - "typetext" : ":" - } - }, - "additionalProperties" : 0 - }, - "method" : "DELETE", "returns" : { "type" : "null" } } }, - "path" : "/cluster/ha/resources/{sid}", - "leaf" : 0 + "leaf" : 0, + "path" : "/cluster/firewall/ipset/{name}", + "text" : "{name}" } ], - "leaf" : 0, - "path" : "/cluster/ha/resources" - }, - { - "leaf" : 0, - "path" : "/cluster/ha/groups", "info" : { "GET" : { + "description" : "List IPSets", + "method" : "GET", + "name" : "ipset_index", "parameters" : { "additionalProperties" : 0 }, - "name" : "index", "permissions" : { "check" : [ "perm", @@ -2622,2422 +2025,10153 @@ var pveapi = [ ] ] }, - "description" : "Get HA groups.", - "method" : "GET", "returns" : { - "type" : "array", "items" : { - "type" : "object", "properties" : { - "group" : { + "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" : "{group}", + "href" : "{name}", "rel" : "child" } - ] + ], + "type" : "array" } }, "POST" : { + "description" : "Create new IPSet", "method" : "POST", - "returns" : { - "type" : "null" - }, - "description" : "Create a new HA group.", - "protected" : 1, + "name" : "create_ipset", "parameters" : { + "additionalProperties" : 0, "properties" : { "comment" : { - "maxLength" : 4096, - "description" : "Description.", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "restricted" : { - "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", + "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" : "boolean", - "default" : 0 + "type" : "string", + "typetext" : "" }, - "nofailback" : { - "type" : "boolean", - "optional" : 1, - "default" : 0, - "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" }, - "type" : { - "enum" : [ - "group" - ], - "description" : "Group type.", + "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" - }, - "nodes" : { - "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", - "type" : "string", - "optional" : 0, - "format" : "pve-ha-group-node-list", - "typetext" : "[:]{,[:]}*" - }, - "group" : { - "format" : "pve-configid", - "type" : "string", - "description" : "The HA group identifier." } - }, - "type" : "object", - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, - "name" : "create" + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "text" : "groups", + "leaf" : 0, + "path" : "/cluster/firewall/ipset", + "text" : "ipset" + }, + { "children" : [ { "info" : { - "PUT" : { - "protected" : 1, - "description" : "Update ha group configuration.", + "DELETE" : { + "description" : "Remove IP or Network alias.", + "method" : "DELETE", + "name" : "remove_alias", "parameters" : { - "type" : "object", "additionalProperties" : 0, "properties" : { - "nodes" : { - "format" : "pve-ha-group-node-list", - "typetext" : "[:]{,[:]}*", - "description" : "List of cluster node names with optional priority. We use priority '0' as default. The CRM tries to run services on the node with highest priority (also see option 'nofailback').", - "optional" : 1, - "type" : "string" - }, "digest" : { "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", + "maxLength" : 40, "optional" : 1, - "maxLength" : 40 - }, - "group" : { - "description" : "The HA group identifier.", - "type" : "string", - "format" : "pve-configid" - }, - "comment" : { - "maxLength" : 4096, "type" : "string", - "optional" : 1, - "description" : "Description." - }, - "nofailback" : { - "default" : 0, - "optional" : 1, - "type" : "boolean", - "description" : "The CRM tries to run services on the node with the highest priority. If a node with higher priority comes online, the CRM migrates the service to that node. Enabling nofailback prevents that behavior." + "typetext" : "" }, - "restricted" : { - "description" : "Services on unrestricted groups may run on any cluster members if all group members are offline. But they will migrate back as soon as a group member comes online. One can implement a 'preferred node' behavior using an unrestricted group with one member.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "delete" : { - "format" : "pve-configid-list", - "maxLength" : 4096, - "optional" : 1, - "type" : "string", - "description" : "A list of settings you want to delete." + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" } } }, - "name" : "update", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Modify" ] ] }, - "method" : "PUT", + "protected" : 1, "returns" : { "type" : "null" } }, - "DELETE" : { - "method" : "DELETE", - "returns" : { - "type" : "null" - }, - "name" : "delete", + "GET" : { + "description" : "Read alias.", + "method" : "GET", + "name" : "read_alias", "parameters" : { + "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "The HA group identifier.", - "type" : "string", - "format" : "pve-configid" + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", "/", [ - "Sys.Console" + "Sys.Audit" ] ] }, - "description" : "Delete ha group configuration.", - "protected" : 1 + "returns" : { + "type" : "object" + } }, - "GET" : { + "PUT" : { + "description" : "Update IP or Network alias.", + "method" : "PUT", + "name" : "update_alias", "parameters" : { + "additionalProperties" : 0, "properties" : { - "group" : { - "description" : "The HA group identifier.", + "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", - "format" : "pve-configid" + "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" } - }, - "additionalProperties" : 0 - }, - "name" : "read", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "description" : "Read ha group configuration.", - "returns" : {}, - "method" : "GET" - } - }, - "text" : "{group}", - "leaf" : 1, - "path" : "/cluster/ha/groups/{group}" - } - ] - }, - { - "text" : "status", - "children" : [ - { - "info" : { - "GET" : { - "returns" : { - "type" : "array" + } }, - "method" : "GET", - "description" : "Get HA manger status.", - "name" : "status", "permissions" : { "check" : [ "perm", "/", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "parameters" : { - "additionalProperties" : 0 - } - } - }, - "text" : "current", - "leaf" : 1, - "path" : "/cluster/ha/status/current" - }, - { - "info" : { - "GET" : { - "method" : "GET", + "protected" : 1, "returns" : { - "type" : "object" - }, - "description" : "Get full HA manger status, including LRM status.", - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "manager_status", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] + "type" : "null" } } }, - "text" : "manager_status", "leaf" : 1, - "path" : "/cluster/ha/status/manager_status" + "path" : "/cluster/firewall/aliases/{name}", + "text" : "{name}" } ], "info" : { "GET" : { + "description" : "List aliases", "method" : "GET", + "name" : "get_aliases", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, "returns" : { "items" : { - "properties" : {}, + "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" : [ { - "rel" : "child", - "href" : "{name}" + "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" + } + } }, - "description" : "Directory index.", "permissions" : { - "user" : "all" + "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 }, - "name" : "index" - } - }, - "path" : "/cluster/ha/status", - "leaf" : 0 - } - ], - "info" : { - "GET" : { - "description" : "Directory index.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "name" : "index", - "parameters" : { - "additionalProperties" : 0 - }, - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "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" + }, + "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" } - ] - } - } - } - }, - { - "path" : "/cluster/log", - "leaf" : 1, - "text" : "log", - "info" : { - "GET" : { - "description" : "Read cluster log", - "permissions" : { - "user" : "all" + }, + "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" : "" + }, + "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)" + }, + "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" + } + } }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "max" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum number of entries.", - "minimum" : 1 + "leaf" : 1, + "path" : "/cluster/firewall/options", + "text" : "options" + }, + { + "info" : { + "GET" : { + "description" : "List available macros", + "method" : "GET", + "name" : "get_macros", + "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" } } }, - "name" : "log", - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} + "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", + "/", + [ + "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" + } } - } + }, + "leaf" : 1, + "path" : "/cluster/firewall/refs", + "text" : "refs" } - } - }, - { + ], "info" : { "GET" : { + "description" : "Directory index.", "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, "returns" : { "items" : { "properties" : {}, "type" : "object" }, - "type" : "array" - }, - "name" : "resources", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "type" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "vm", - "storage", - "node" - ] + "links" : [ + { + "href" : "{name}", + "rel" : "child" } - } - }, - "description" : "Resources index (cluster wide)." - } - }, - "text" : "resources", - "leaf" : 1, - "path" : "/cluster/resources" - }, - { - "info" : { - "GET" : { - "description" : "List recent tasks (cluster wide).", - "permissions" : { - "user" : "all" - }, - "name" : "tasks", - "parameters" : { - "additionalProperties" : 0 - }, - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "upid" : { - "type" : "string" - } - } - } + ], + "type" : "array" } } }, - "text" : "tasks", - "leaf" : 1, - "path" : "/cluster/tasks" + "leaf" : 0, + "path" : "/cluster/firewall", + "text" : "firewall" }, { - "leaf" : 1, - "path" : "/cluster/options", - "info" : { - "GET" : { - "parameters" : { - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "name" : "get_options", - "description" : "Get datacenter options.", - "method" : "GET", - "returns" : { - "type" : "object", - "properties" : {} - } - }, - "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "fencing" : { - "default" : "watchdog", - "type" : "string", - "optional" : 1, - "description" : "Set the fencing mode of the HA cluster. Hardware mode needs a valid configuration of fence devices in /etc/pve/ha/fence.cfg. With both all two modes are used.\n\nWARNING: 'hardware' and 'both' are EXPERIMENTAL & WIP", - "enum" : [ - "watchdog", - "hardware", - "both" - ] + "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" : "" + } + } }, - "console" : { - "optional" : 1, - "type" : "string", - "description" : "Select the default Console viewer. You can either use the builtin java applet (VNC), an external virt-viewer comtatible application (SPICE), or an HTML5 based viewer (noVNC).", - "enum" : [ - "applet", - "vv", - "html5" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] ] }, - "delete" : { - "format" : "pve-configid-list", - "description" : "A list of settings you want to delete.", - "optional" : 1, - "type" : "string" - }, - "max_workers" : { - "minimum" : 1, - "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.", - "type" : "integer", - "optional" : 1 - }, - "language" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "en", - "de" - ], - "description" : "Default GUI language." - }, - "keyboard" : { - "enum" : [ - "da", - "sv", - "en-gb", - "lt", - "is", - "mk", - "pl", - "hu", - "fr-be", - "pt-br", - "de-ch", - "nl", - "no", - "tr", - "sl", - "de", - "fr-ca", - "ja", - "es", - "it", - "pt", - "fr", - "en-us", - "fi", - "fr-ch" - ], - "description" : "Default keybord layout for vnc server.", - "optional" : 1, - "type" : "string" - }, - "http_proxy" : { - "optional" : 1, - "type" : "string", - "pattern" : "http://.*", - "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')" - }, - "email_from" : { - "format" : "email-opt", - "optional" : 1, - "type" : "string", - "description" : "Specify email address to send notification from (default is root@$hostname)" - }, - "migration_unsecure" : { - "type" : "boolean", - "optional" : 1, - "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration." - } - } - }, - "protected" : 1, - "description" : "Set datacenter options.", - "returns" : { - "type" : "null" - }, - "method" : "PUT" - } - }, - "text" : "options" - }, - { - "text" : "status", - "info" : { - "GET" : { - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "get_status", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit" - ] - ] - }, - "description" : "Get cluster status informations.", - "protected" : 1, - "method" : "GET", - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "type" : { - "type" : "string" - } + "protected" : 1, + "returns" : { + "type" : "null" } }, - "type" : "array" - } - } - }, - "path" : "/cluster/status", - "leaf" : 1 - }, - { - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "integer", - "description" : "The next free VMID." - }, - "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.", - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "optional" : 1, - "type" : "integer" + "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" } }, - "additionalProperties" : 0 - }, - "name" : "nextid", - "permissions" : { - "user" : "all" - } - } - }, - "text" : "nextid", - "leaf" : 1, - "path" : "/cluster/nextid" - } - ], - "text" : "cluster" - }, - { - "path" : "/nodes", - "leaf" : 0, - "text" : "nodes", - "children" : [ - { + "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" : [ { - "rel" : "child", - "href" : "{name}" + "href" : "{id}", + "rel" : "child" } ], - "items" : { - "type" : "object", - "properties" : {} - }, "type" : "array" - }, - "method" : "GET", - "description" : "Node index.", + } + }, + "POST" : { + "description" : "Create new vzdump backup job.", + "method" : "POST", + "name" : "create_job", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "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" : { - "user" : "all" + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ], + "description" : "The 'tmpdir', 'dumpdir' and 'script' parameters are additionally restricted to the 'root@pam' user." }, - "name" : "index" + "protected" : 1, + "returns" : { + "type" : "null" + } } }, + "leaf" : 0, + "path" : "/cluster/backup", + "text" : "backup" + }, + { "children" : [ { "children" : [ { - "path" : "/nodes/{node}/qemu/{vmid}", - "leaf" : 0, - "text" : "{vmid}", "children" : [ { - "path" : "/nodes/{node}/qemu/{vmid}/firewall", - "leaf" : 0, - "text" : "firewall", - "children" : [ - { - "text" : "rules", - "children" : [ - { - "text" : "{pos}", - "info" : { - "DELETE" : { - "method" : "DELETE", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "pos" : { - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position .", - "minimum" : 0 - }, - "digest" : { - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - } - }, - "additionalProperties" : 0 - }, - "name" : "delete_rule", - "protected" : 1, - "returns" : { - "type" : "null" - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "description" : "Delete rule.", - "proxyto" : null - }, - "PUT" : { - "returns" : { - "type" : "null" - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "proxyto" : null, - "description" : "Modify rule data.", - "method" : "PUT", - "parameters" : { - "properties" : { - "dport" : { - "format" : "pve-fw-dport-spec", - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "optional" : 1, - "type" : "string" - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "type" : "string", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "moveto" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Move rule to new position . Other arguments are ignored." - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "delete" : { - "format" : "pve-configid-list", - "description" : "A list of settings you want to delete.", - "type" : "string", - "optional" : 1 - }, - "dest" : { - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." - }, - "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.", - "type" : "string", - "optional" : 1, - "format" : "pve-fw-addr-spec" - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "enable" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "action" : { - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "optional" : 1, - "type" : "string", - "maxLength" : 20 - }, - "pos" : { - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position .", - "minimum" : 0 - }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "type" : "string", - "optional" : 1, - "format" : "pve-fw-protocol-spec" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "macro" : { - "maxLength" : 128, - "type" : "string", - "optional" : 1 - }, - "iface" : { - "format" : "pve-iface", - "maxLength" : 20, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "minLength" : 2, - "optional" : 1, - "type" : "string" - }, - "sport" : { - "format" : "pve-fw-sport-spec", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "optional" : 1, - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "name" : "update_rule", - "protected" : 1 - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "name" : "get_rule", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "pos" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position ." - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "proxyto" : null, - "description" : "Get single rule data.", - "returns" : { - "type" : "object", - "properties" : { - "pos" : { - "type" : "integer" - } - } - }, - "method" : "GET" - } + "info" : { + "POST" : { + "description" : "Request resource migration (online) to another node.", + "method" : "POST", + "name" : "migrate", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}", - "leaf" : 1 + "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" : ":" + } } - ], - "info" : { - "POST" : { - "returns" : { - "type" : "null" - }, - "description" : "Create new rule.", - "proxyto" : null, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "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", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "method" : "POST", - "protected" : 1, - "parameters" : { - "properties" : { - "pos" : { - "optional" : 1, - "type" : "integer", - "description" : "Update rule at position .", - "minimum" : 0 - }, - "proto" : { - "format" : "pve-fw-protocol-spec", - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "optional" : 1, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "macro" : { - "optional" : 1, - "type" : "string", - "maxLength" : 128 - }, - "dport" : { - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "type" : "string", - "optional" : 1, - "format" : "pve-fw-dport-spec" - }, - "type" : { - "optional" : 0, - "type" : "string", - "enum" : [ - "in", - "out", - "group" - ] - }, - "enable" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, - "action" : { - "optional" : 0, - "type" : "string", - "minLength" : 2, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 20 - }, - "sport" : { - "type" : "string", - "optional" : 1, - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "format" : "pve-fw-sport-spec" - }, - "dest" : { - "format" : "pve-fw-addr-spec", - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "optional" : 1, - "type" : "string" - }, - "source" : { - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "optional" : 1, - "type" : "string", - "format" : "pve-fw-addr-spec" - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string", - "maxLength" : 40 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "iface" : { - "optional" : 1, - "type" : "string", - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "minLength" : 2, - "format" : "pve-iface", - "maxLength" : 20 - } - }, - "additionalProperties" : 0 - }, - "name" : "create_rule" - }, - "GET" : { - "description" : "List rules.", - "proxyto" : null, - "name" : "get_rules", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "type" : "array", - "links" : [ - { - "href" : "{pos}", - "rel" : "child" - } - ], - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - } - }, - "method" : "GET" + "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" : ":" + } } }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules", - "leaf" : 0 + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/ha/resources/{sid}/relocate", + "text" : "relocate" + } + ], + "info" : { + "DELETE" : { + "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" : { + "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" : {} + }, + "PUT" : { + "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" + } }, - { - "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases", - "leaf" : 0, - "children" : [ - { - "text" : "{name}", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object" - }, - "description" : "Read alias.", - "parameters" : { - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "name" : { - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name.", - "minLength" : 2, - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - }, - "name" : "read_alias", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - } - }, - "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ + "type" : "object" + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/cluster/ha/resources/{sid}", + "text" : "{sid}" + } + ], + "info" : { + "GET" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/cluster/acme/tos", + "text" : "tos" + }, + { + "info" : { + "GET" : { + "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" : { + "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" + }, + { + "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)" + } + } + }, + "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" + ], + "optional" : 1, + "type" : "string" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "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" + }, + "node" : { + "description" : "The cluster node name (when type in node,storage,qemu,lxc).", + "format" : "pve-node", + "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" + ], + "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" : { + "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" : { + "description" : "Get datacenter options.", + "method" : "GET", + "name" : "get_options", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "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 MiB/s for cloning disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "default" : { + "description" : "default bandwidth limit in MiB/s", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "migration" : { + "description" : "bandwidth limit in MiB/s for migrating guests", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "move" : { + "description" : "bandwidth limit in MiB/s for moving disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "restore" : { + "description" : "bandwidth limit in MiB/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" : "" + }, + "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" + }, + "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" : [ + "zh_CN", + "zh_TW", + "ca", + "en", + "eu", + "fr", + "de", + "it", + "es", + "ja", + "nb", + "nn", + "fa", + "pl", + "pt_BR", + "ru", + "sl", + "sv", + "tr" + ], + "optional" : 1, + "type" : "string" + }, + "mac_prefix" : { + "description" : "Prefix for autogenerated MAC addresses.", + "optional" : 1, + "pattern" : "(?^i:[a-f0-9]{2}(?::[a-f0-9]{2}){0,2}:?)", + "type" : "string" + }, + "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" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/cluster/options", + "text" : "options" + }, + { + "info" : { + "GET" : { + "description" : "Get cluster status informations.", + "method" : "GET", + "name" : "get_status", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : { + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/cluster/status", + "text" : "status" + }, + { + "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" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "macro" : { + "optional" : 1, + "type" : "integer" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "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" + } + } + }, + "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" + }, + "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)" + } + } + }, + "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" : { + "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" + } + } + }, + "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" : "" + }, + "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" : { + "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" : { + "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}/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)" + } + } + }, + "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" ] ] }, - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDR" - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "rename" : { - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rename an existing alias.", - "minLength" : 2, - "type" : "string", - "optional" : 1 - }, - "name" : { - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name.", - "minLength" : 2, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, + "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" : "" + }, + "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" : { + "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" : { + "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" + } + }, + "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" : { + "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, + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : { + "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" : 64, + "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" : { + "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", + "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" : { + "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" : { + "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" : { + "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" : "" + }, + "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" : { + "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" : { + "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" : { + "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" + ], + "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" : { + "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).", + "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" : { + "description" : "The current VM configuration.", + "properties" : { + "acpi" : { + "default" : 1, + "description" : "Enable/disable ACPI.", + "optional" : 1, + "type" : "boolean" + }, + "agent" : { + "description" : "Enable/disable Qemu GuestAgent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable Qemu GuestAgent.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after cloning/moving a disk.", + "optional" : 1, + "type" : "boolean" + } + }, + "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" + }, + "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" : { + "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" : "" + }, + "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" + ], + "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" : { + "cputype" : { + "default" : "kvm64", + "default_key" : 1, + "description" : "Emulated CPU type.", + "enum" : [ + "486", + "athlon", + "Broadwell", + "Broadwell-IBRS", + "Broadwell-noTSX", + "Broadwell-noTSX-IBRS", + "Conroe", + "core2duo", + "coreduo", + "EPYC", + "EPYC-IBPB", + "Haswell", + "Haswell-IBRS", + "Haswell-noTSX", + "Haswell-noTSX-IBRS", + "host", + "IvyBridge", + "IvyBridge-IBRS", + "kvm32", + "kvm64", + "max", + "Nehalem", + "Nehalem-IBRS", + "Opteron_G1", + "Opteron_G2", + "Opteron_G3", + "Opteron_G4", + "Opteron_G5", + "Penryn", + "pentium", + "pentium2", + "pentium3", + "phenom", + "qemu32", + "qemu64", + "SandyBridge", + "SandyBridge-IBRS", + "Skylake-Client", + "Skylake-Client-IBRS", + "Skylake-Server", + "Skylake-Server-IBRS", + "Westmere", + "Westmere-IBRS" + ], + "type" : "string" + }, + "flags" : { + "description" : "List of additional CPU flags separated by ';'. Use '+FLAG' to enable, '-FLAG' to disable a flag. Currently supported flags: 'pcid', 'spec-ctrl', 'ibpb', 'ssbd', 'virt-ssbd', 'amd-ssbd', 'amd-no-ssb', 'pdpe1gb'.", + "format_description" : "+FLAG[;-FLAG...]", + "optional" : 1, + "pattern" : "(?^:(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb))(;(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb)))*)", + "type" : "string" + }, + "hidden" : { + "default" : 0, + "description" : "Do not identify as a KVM virtual machine.", + "optional" : 1, + "type" : "boolean" + } + }, + "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" : 1024, + "description" : "CPU weight for a VM.", + "maximum" : 262144, + "minimum" : 2, + "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. Only used on the configuration web interface. This is saved as comment inside the configuration file.", + "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" : { + "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" + }, + "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" + }, + "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. Value '1' 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" + ], + "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" + } + }, + "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 gateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string" + }, + "keyboard" : { + "default" : null, + "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.cfg' configuration file.It should not be necessary to set it.", + "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 to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "optional" : 1, + "type" : "boolean" + }, + "lock" : { + "description" : "Lock/unlock the VM.", + "enum" : [ + "migrate", + "backup", + "snapshot", + "rollback" + ], + "optional" : 1, + "type" : "string" + }, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?|virt(?:-\\d+\\.\\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_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).", + "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'.", + "enum" : [ + "rtl8139", + "ne2k_pci", + "e1000", + "pcnet", + "virtio", + "ne2k_isa", + "i82551", + "i82557b", + "i82559er", + "vmxnet3", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em" + ], + "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" + }, + "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", + "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\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" + }, + "reboot" : { + "default" : 1, + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "optional" : 1, + "type" : "boolean" + }, + "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" + ], + "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" + } + }, + "optional" : 1, + "type" : "string" + }, + "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", + "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" + }, + "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.", + "optional" : 1, + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "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" + }, + "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" + } + }, + "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 - 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. 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" : 256, + "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" + }, + "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 (-vga=qxl)." + }, + "tdf" : { + "default" : 0, + "description" : "Enable/disable time drift fix.", + "optional" : 1, + "type" : "boolean" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean" + }, + "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" + }, + "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" + } + }, + "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", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "vmware" + ], + "optional" : 1, + "type" : "string" + } + }, + "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" + ], + "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" + }, + "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" + }, + "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" + }, + "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 throug API/CLI create or update methods, but not when manually editing the config file." + }, + "vmstatestorage" : { + "description" : "Default storage for VM state volumes/files.", + "format" : "pve-storage-id", + "optional" : 1, + "type" : "string" + }, + "watchdog" : { + "description" : "Create a virtual hardware watchdog device.", + "format" : "pve-qm-watchdog", + "optional" : 1, + "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" : { + "description" : "Set virtual machine options (asynchrounous API).", + "method" : "POST", + "name" : "update_vm_async", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "acpi" : { + "default" : 1, + "description" : "Enable/disable ACPI.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "agent" : { + "description" : "Enable/disable Qemu GuestAgent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable Qemu GuestAgent.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after cloning/moving a disk.", + "optional" : 1, + "type" : "boolean" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[enabled=]<1|0> [,fstrim_cloned_disks=<1|0>]" + }, + "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", + "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" + }, + "autostart" : { + "default" : 0, + "description" : "Automatic restart after crash (currently ignored).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "background_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)" + }, + "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" : "" + }, + "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" + ], + "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" : { + "cputype" : { + "default" : "kvm64", + "default_key" : 1, + "description" : "Emulated CPU type.", + "enum" : [ + "486", + "athlon", + "Broadwell", + "Broadwell-IBRS", + "Broadwell-noTSX", + "Broadwell-noTSX-IBRS", + "Conroe", + "core2duo", + "coreduo", + "EPYC", + "EPYC-IBPB", + "Haswell", + "Haswell-IBRS", + "Haswell-noTSX", + "Haswell-noTSX-IBRS", + "host", + "IvyBridge", + "IvyBridge-IBRS", + "kvm32", + "kvm64", + "max", + "Nehalem", + "Nehalem-IBRS", + "Opteron_G1", + "Opteron_G2", + "Opteron_G3", + "Opteron_G4", + "Opteron_G5", + "Penryn", + "pentium", + "pentium2", + "pentium3", + "phenom", + "qemu32", + "qemu64", + "SandyBridge", + "SandyBridge-IBRS", + "Skylake-Client", + "Skylake-Client-IBRS", + "Skylake-Server", + "Skylake-Server-IBRS", + "Westmere", + "Westmere-IBRS" + ], + "type" : "string" + }, + "flags" : { + "description" : "List of additional CPU flags separated by ';'. Use '+FLAG' to enable, '-FLAG' to disable a flag. Currently supported flags: 'pcid', 'spec-ctrl', 'ibpb', 'ssbd', 'virt-ssbd', 'amd-ssbd', 'amd-no-ssb', 'pdpe1gb'.", + "format_description" : "+FLAG[;-FLAG...]", + "optional" : 1, + "pattern" : "(?^:(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb))(;(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb)))*)", + "type" : "string" + }, + "hidden" : { + "default" : 0, + "description" : "Do not identify as a KVM virtual machine.", + "optional" : 1, + "type" : "boolean" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[cputype=] [,flags=<+FLAG[;-FLAG...]>] [,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" : 262144, + "minimum" : 2, + "optional" : 1, + "type" : "integer", + "typetext" : " (2 - 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. 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" : "" + }, + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars", + "format" : { + "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" + }, + "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=] [,format=] [,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, + "requires" : "delete", + "type" : "boolean", + "typetext" : "" + }, + "freeze" : { + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "hostpci[n]" : { + "description" : "Map host PCI devices into guest.", + "format" : "pve-qm-hostpci", + "optional" : 1, + "type" : "string", + "typetext" : "[host=] [,mdev=] [,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", + "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).", + "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" + }, + "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" + } + }, + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" + }, + "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 gateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string", + "typetext" : "[gw=] [,gw6=] [,ip=] [,ip6=]" + }, + "keyboard" : { + "default" : null, + "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.cfg' configuration file.It should not be necessary to set it.", + "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", + "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" + ], + "optional" : 1, + "type" : "string" + }, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?|virt(?:-\\d+\\.\\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_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).", + "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'.", + "enum" : [ + "rtl8139", + "ne2k_pci", + "e1000", + "pcnet", + "virtio", + "ne2k_isa", + "i82551", + "i82557b", + "i82559er", + "vmxnet3", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em" + ], + "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=] [,=]" + }, + "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", + "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\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" : "" + }, + "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" + ], + "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" }, - "name" : "update_alias", - "protected" : 1, - "description" : "Update IP or Network alias.", - "returns" : { - "type" : "null" + "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" }, - "method" : "PUT" + "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" + } }, - "DELETE" : { - "name" : "remove_alias", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name." - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - } + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<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" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "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" }, - "protected" : 1, - "description" : "Remove IP or Network alias.", - "returns" : { - "type" : "null" + "bps_wr_length" : { + "alias" : "bps_wr_max_length" }, - "method" : "DELETE" - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}", - "leaf" : 1 - } - ], - "text" : "aliases", - "info" : { - "POST" : { - "description" : "Create IP or Network Alias.", - "protected" : 1, - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "cidr" : { - "format" : "IPorCIDR", - "description" : "Network/IP specification in CIDR format.", + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], + "optional" : 1, "type" : "string" }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name." + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" }, - "comment" : { + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], "optional" : 1, "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "name" : "create_alias", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "method" : "POST", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0, - "type" : "string" - }, - "cidr" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ] - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "name" : "get_aliases", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", "type" : "string" - } - } - }, - "description" : "List aliases" - } - } - }, - { - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset", - "leaf" : 0, - "children" : [ - { - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}", - "info" : { - "POST" : { - "returns" : { - "type" : "null" }, - "method" : "POST", - "name" : "create_ip", - "parameters" : { - "properties" : { - "nomatch" : { - "type" : "boolean", - "optional" : 1 - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDRorAlias" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - } - }, - "additionalProperties" : 0 + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" }, - "description" : "Add IP or Network to IPSet.", - "protected" : 1 - }, - "DELETE" : { - "method" : "DELETE", - "returns" : { - "type" : "null" + "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" }, - "description" : "Delete IPSet", - "protected" : 1, - "name" : "delete_ipset", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "iothread" : { + "description" : "Whether to use iothreads for this drive", + "optional" : 1, + "type" : "boolean" }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "name" : { - "type" : "string", - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 64 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - } - } - } - }, - "GET" : { - "method" : "GET", - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{cidr}" - } - ], - "items" : { - "properties" : { - "cidr" : { - "type" : "string" - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0, - "type" : "string", - "maxLength" : 40 - }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - }, - "type" : "object" - }, - "type" : "array" + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "description" : "List IPSet content", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "name" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2, - "maxLength" : 64 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "name" : "get_ipset" - } - }, - "text" : "{name}", - "children" : [ - { - "info" : { - "DELETE" : { - "method" : "DELETE", - "returns" : { - "type" : "null" - }, - "parameters" : { - "properties" : { - "name" : { - "maxLength" : 64, - "type" : "string", - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1 - }, - "cidr" : { - "format" : "IPorCIDRorAlias", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - } - }, - "additionalProperties" : 0 - }, - "name" : "remove_ip", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "description" : "Remove IP or Network from IPSet." - }, - "PUT" : { - "description" : "Update IP or Network settings", - "protected" : 1, - "name" : "update_ip", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "cidr" : { - "format" : "IPorCIDRorAlias", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1, - "maxLength" : 40 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "name" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2, - "type" : "string", - "maxLength" : 64 - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - } - }, - "additionalProperties" : 0 - }, - "method" : "PUT", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2, - "maxLength" : 64 - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDRorAlias" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "name" : "read_ip", - "description" : "Read IP or Network settings from IPSet.", - "protected" : 1, - "method" : "GET", - "returns" : { - "type" : "object" - } - } + "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" }, - "text" : "{cidr}", - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}" - } - ] - } - ], - "text" : "ipset", - "info" : { - "POST" : { - "protected" : 1, - "description" : "Create new IPSet", - "parameters" : { - "properties" : { - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "mbps_wr_max" : { + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string", - "maxLength" : 40 + "type" : "number" }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", + "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" }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "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" }, - "name" : { - "minLength" : 2, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string", - "maxLength" : 64 + "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" }, - "rename" : { + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", - "maxLength" : 64 + "type" : "integer" }, - "comment" : { - "type" : "string", - "optional" : 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" : "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" } }, - "additionalProperties" : 0 + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" }, - "name" : "create_ipset", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "scsihw" : { + "default" : "lsi", + "description" : "SCSI controller model", + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], + "optional" : 1, + "type" : "string" }, - "returns" : { - "type" : "null" + "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" : "" }, - "method" : "POST" - }, - "GET" : { - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "name" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2, - "type" : "string", - "maxLength" : 64 - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "digest" : { - "optional" : 0, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - } - }, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] + "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" }, - "method" : "GET", - "description" : "List IPSets", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "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" : 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)" + }, + "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 (-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" : "" + }, + "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" : "" }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 + "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" }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "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" } - } - }, - "name" : "ipset_index" - } - } - }, - { - "text" : "options", - "info" : { - "PUT" : { - "description" : "Set Firewall options.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + }, + "optional" : 1, + "type" : "string", + "typetext" : "[host=] [,usb3=<1|0>]" }, - "returns" : { - "type" : "null" + "vcpus" : { + "default" : 0, + "description" : "Number of hotplugged vcpus.", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "protected" : 1, - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "ipfilter" : { - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.", - "type" : "boolean", - "optional" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "radv" : { + "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" : "boolean", - "description" : "Allow sending Router Advertisement." + "type" : "integer" }, - "policy_out" : { + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", "enum" : [ - "ACCEPT", - "REJECT", - "DROP" + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "vmware" ], - "description" : "Output policy.", "optional" : 1, "type" : "string" - }, - "delete" : { - "type" : "string", - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list" - }, - "log_level_in" : { - "description" : "Log level for incoming traffic.", + } + }, + "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).", + "format" : { + "aio" : { + "description" : "AIO type to use.", "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "native", + "threads" ], "optional" : 1, "type" : "string" }, - "dhcp" : { - "description" : "Enable DHCP.", + "backup" : { + "description" : "Whether the drive should be included when making backups.", "optional" : 1, "type" : "boolean" }, - "ndp" : { + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "boolean", - "description" : "Enable NDP." + "type" : "integer" }, - "policy_in" : { - "type" : "string", + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ] + "type" : "integer" }, - "macfilter" : { + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "boolean", - "description" : "Enable/disable MAC address filter." + "type" : "integer" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "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" : "string", - "maxLength" : 40 + "type" : "integer" }, - "enable" : { - "description" : "Enable/disable firewall rules.", + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "boolean" + "type" : "integer" }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", + "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" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" ], - "type" : "string", - "optional" : 1 + "optional" : 1, + "type" : "string" }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - } - }, - "method" : "PUT" - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object", - "properties" : { - "policy_out" : { + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "optional" : 1, - "type" : "string", + "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" : [ - "ACCEPT", - "REJECT", - "DROP" + "ignore", + "on" ], - "description" : "Output policy." + "optional" : 1, + "type" : "string" }, - "log_level_in" : { + "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" ], - "description" : "Log level for incoming traffic.", - "type" : "string", - "optional" : 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" }, - "ipfilter" : { - "type" : "boolean", + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added." + "type" : "integer" }, - "radv" : { - "description" : "Allow sending Router Advertisement.", - "type" : "boolean", - "optional" : 1 + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", + "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" }, - "policy_in" : { - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "description" : "Input policy.", + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string" + "type" : "number" }, - "ndp" : { - "description" : "Enable NDP.", - "type" : "boolean", - "optional" : 1 + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "dhcp" : { + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean", - "description" : "Enable DHCP." + "type" : "number" }, - "enable" : { + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean", - "description" : "Enable/disable firewall rules." + "type" : "number" }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", + "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" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" + "cdrom", + "disk" ], - "type" : "string", - "optional" : 1 - } - } - }, - "name" : "get_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "optional" : 1, + "type" : "string" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : "node", - "description" : "Get VM firewall options." - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/options", - "leaf" : 1 - }, - { - "text" : "log", - "info" : { - "GET" : { - "returns" : { - "items" : { - "properties" : { - "t" : { - "description" : "Line text", - "type" : "string" - }, - "n" : { - "type" : "integer", - "description" : "Line number" - } + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", + "optional" : 1, + "type" : "boolean" }, - "type" : "object" - }, - "type" : "array" - }, - "proxyto" : "node", - "description" : "Read firewall log", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] - }, - "method" : "GET", - "protected" : 1, - "name" : "log", - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" }, - "start" : { + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, - "type" : "integer", - "minimum" : 0 + "type" : "integer" }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "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" }, - "limit" : { + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, - "type" : "integer", - "minimum" : 0 - } - }, - "additionalProperties" : 0 - } - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/firewall/log", - "leaf" : 1 - }, - { - "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs", - "leaf" : 1, - "text" : "refs", - "info" : { - "GET" : { - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." + "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!" }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, "type" : "string" }, - "type" : { - "description" : "Only list references of specified type.", + "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" + }, + "trans" : { + "description" : "Force disk geometry bios translation mode.", "enum" : [ - "alias", - "ipset" + "none", + "lba", + "auto" ], - "type" : "string", - "optional" : 1 - } - }, - "additionalProperties" : 0 - }, - "name" : "refs", - "method" : "GET", - "returns" : { - "items" : { - "properties" : { - "type" : { - "enum" : [ - "alias", - "ipset" - ], - "type" : "string" - }, - "name" : { - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - } + "optional" : 1, + "type" : "string" }, - "type" : "object" + "volume" : { + "alias" : "file" + }, + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], + "optional" : 1, + "type" : "string" + } }, - "type" : "array" - } - } - } - } - ], - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array" - }, - "parameters" : { - "properties" : { - "node" : { + "optional" : 1, "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "name" : "index", - "description" : "Directory index." - } - } - }, - { - "path" : "/nodes/{node}/qemu/{vmid}/rrd", - "leaf" : 1, - "text" : "rrd", - "info" : { - "GET" : { - "name" : "rrd", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cf" : { - "enum" : [ - "AVERAGE", - "MAX" - ], - "description" : "The RRD consolidation function", + "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" + "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 throug API/CLI create or update methods, but not when manually editing the config file." }, "vmid" : { - "type" : "integer", "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", - "minimum" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "timeframe" : { - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "description" : "Specify the time frame you are interested in.", - "type" : "string" - }, - "ds" : { - "description" : "The list of datasources you want to display.", - "type" : "string", - "format" : "pve-configid-list" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "description" : "Read VM RRD statistics (returns PNG)", - "protected" : 1, - "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, - "type" : "object" - }, - "method" : "GET" - } - } - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/rrddata", - "info" : { - "GET" : { - "protected" : 1, - "description" : "Read VM RRD statistics", - "name" : "rrddata", - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "timeframe" : { + "vmstatestorage" : { + "description" : "Default storage for VM state volumes/files.", + "format" : "pve-storage-id", + "optional" : 1, "type" : "string", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "description" : "Specify the time frame you are interested in." - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 + "typetext" : "" }, - "cf" : { - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ], + "watchdog" : { + "description" : "Create a virtual hardware watchdog device.", + "format" : "pve-qm-watchdog", + "optional" : 1, "type" : "string", - "optional" : 1 + "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)" } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} } - } - } - }, - "text" : "rrddata" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/config", - "info" : { - "POST" : { - "returns" : { - "type" : "string", - "optional" : 1 }, "permissions" : { "check" : [ @@ -5056,217 +12190,428 @@ var pveapi = [ 1 ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Set virtual machine options (asynchrounous API).", - "method" : "POST", + "returns" : { + "optional" : 1, + "type" : "string" + } + }, + "PUT" : { + "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", "parameters" : { + "additionalProperties" : 0, "properties" : { - "cpulimit" : { - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", + "acpi" : { + "default" : 1, + "description" : "Enable/disable ACPI.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "agent" : { + "description" : "Enable/disable Qemu GuestAgent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable Qemu GuestAgent.", + "type" : "boolean" + }, + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after cloning/moving a disk.", + "optional" : 1, + "type" : "boolean" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[enabled=]<1|0> [,fstrim_cloned_disks=<1|0>]" + }, + "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", + "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" + }, + "autostart" : { "default" : 0, - "maximum" : 128, + "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" : { + "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, - "type" : "number", - "minimum" : 0 + "pattern" : "(ide|sata|scsi|virtio)\\d+", + "type" : "string" }, - "node" : { - "description" : "The cluster node name.", + "cdrom" : { + "description" : "This is an alias for option -ide2", + "format" : "pve-qm-ide", + "optional" : 1, "type" : "string", - "format" : "pve-node" + "typetext" : "" }, - "force" : { + "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" : "boolean", - "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", - "requires" : "delete" + "type" : "string", + "typetext" : "" }, - "kvm" : { + "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" + ], + "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" : "boolean", - "description" : "Enable/disable KVM hardware virtualization." + "type" : "integer", + "typetext" : " (1 - N)" }, - "localtime" : { - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", + "cpu" : { + "description" : "Emulated CPU type.", + "format" : { + "cputype" : { + "default" : "kvm64", + "default_key" : 1, + "description" : "Emulated CPU type.", + "enum" : [ + "486", + "athlon", + "Broadwell", + "Broadwell-IBRS", + "Broadwell-noTSX", + "Broadwell-noTSX-IBRS", + "Conroe", + "core2duo", + "coreduo", + "EPYC", + "EPYC-IBPB", + "Haswell", + "Haswell-IBRS", + "Haswell-noTSX", + "Haswell-noTSX-IBRS", + "host", + "IvyBridge", + "IvyBridge-IBRS", + "kvm32", + "kvm64", + "max", + "Nehalem", + "Nehalem-IBRS", + "Opteron_G1", + "Opteron_G2", + "Opteron_G3", + "Opteron_G4", + "Opteron_G5", + "Penryn", + "pentium", + "pentium2", + "pentium3", + "phenom", + "qemu32", + "qemu64", + "SandyBridge", + "SandyBridge-IBRS", + "Skylake-Client", + "Skylake-Client-IBRS", + "Skylake-Server", + "Skylake-Server-IBRS", + "Westmere", + "Westmere-IBRS" + ], + "type" : "string" + }, + "flags" : { + "description" : "List of additional CPU flags separated by ';'. Use '+FLAG' to enable, '-FLAG' to disable a flag. Currently supported flags: 'pcid', 'spec-ctrl', 'ibpb', 'ssbd', 'virt-ssbd', 'amd-ssbd', 'amd-no-ssb', 'pdpe1gb'.", + "format_description" : "+FLAG[;-FLAG...]", + "optional" : 1, + "pattern" : "(?^:(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb))(;(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb)))*)", + "type" : "string" + }, + "hidden" : { + "default" : 0, + "description" : "Do not identify as a KVM virtual machine.", + "optional" : 1, + "type" : "boolean" + } + }, "optional" : 1, - "type" : "boolean" + "type" : "string", + "typetext" : "[cputype=] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>]" }, - "migrate_speed" : { - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", + "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" : 262144, + "minimum" : 2, "optional" : 1, "type" : "integer", - "minimum" : 0 + "typetext" : " (2 - 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." }, - "startdate" : { - "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", - "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", + "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, - "default" : "now", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + "type" : "string", + "typetext" : "" }, - "sata[n]" : { + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars", "format" : { - "mbps" : { - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" }, - "cyls" : { - "format_description" : "count", + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], "optional" : 1, - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific cylinder count." + "type" : "string" }, - "bps_rd" : { - "description" : "Maximum read speed speed in bytes per second.", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", "optional" : 1, - "type" : "integer", - "format_description" : "bps" + "type" : "string" }, - "trans" : { - "format_description" : "none|lba|auto", - "type" : "string", - "optional" : 1, + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,format=] [,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, + "requires" : "delete", + "type" : "boolean", + "typetext" : "" + }, + "freeze" : { + "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "hostpci[n]" : { + "description" : "Map host PCI devices into guest.", + "format" : "pve-qm-hostpci", + "optional" : 1, + "type" : "string", + "typetext" : "[host=] [,mdev=] [,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", + "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).", + "format" : { + "aio" : { + "description" : "AIO type to use.", "enum" : [ - "none", - "lba", - "auto" + "native", + "threads" ], - "description" : "Force disk geometry bios translation mode." + "optional" : 1, + "type" : "string" }, - "volume" : { - "alias" : "file" + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" }, - "iops" : { - "format_description" : "iops", - "description" : "Maximum r/w I/O speed in operations per second.", + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", "optional" : 1, "type" : "integer" }, - "file" : { - "default_key" : 1, - "format_description" : "volume", - "format" : "pve-volume-id-or-qm-path", - "type" : "string", - "description" : "The drive's backing volume." - }, - "mbps_wr" : { + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "number", - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps" - }, - "mbps_rd" : { - "format_description" : "mbps", - "description" : "Maximum read speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "type" : "integer" }, - "backup" : { - "format_description" : "on|off", - "type" : "boolean", + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "description" : "Whether the drive should be included when making backups." + "type" : "integer" }, - "iops_wr_max" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "format_description" : "iops" + "bps_rd_length" : { + "alias" : "bps_rd_max_length" }, - "aio" : { - "format_description" : "native|threads", - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ], + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string" + "type" : "integer" }, - "werror" : { - "format_description" : "enospc|ignore|report|stop", + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "string", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action." + "type" : "integer" }, - "size" : { - "format" : "disk-size", - "type" : "string", - "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect." + "bps_wr_length" : { + "alias" : "bps_wr_max_length" }, - "iops_rd" : { - "format_description" : "iops", - "type" : "integer", + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Maximum read I/O speed in operations per second." + "type" : "integer" }, - "mbps_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], "optional" : 1, - "type" : "number" + "type" : "string" }, - "bps_wr" : { - "format_description" : "bps", - "type" : "integer", + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "optional" : 1, - "description" : "Maximum write speed speed in bytes per second." + "type" : "integer" }, - "mbps_rd_max" : { - "format_description" : "mbps", + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second." + "type" : "boolean" }, "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", "enum" : [ "ignore", "on" ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "type" : "string", - "optional" : 1, - "format_description" : "ignore|on" - }, - "serial" : { - "maxLength" : 60, - "format" : "urlencoded", - "format_description" : "serial", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "type" : "string", - "optional" : 1 - }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", - "type" : "integer", - "optional" : 1, - "format_description" : "count" - }, - "bps" : { - "description" : "Maximum r/w speed speed in bytes per second.", - "type" : "integer", "optional" : 1, - "format_description" : "bps" + "type" : "string" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "optional" : 1, - "type" : "integer", - "format_description" : "iops" + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" }, "format" : { - "format_description" : "drive format", "description" : "The drive's backing file's data format.", "enum" : [ "raw", @@ -5280,741 +12625,655 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "mbps_wr_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "type" : "number", - "optional" : 1 - }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "type" : "boolean" + "type" : "integer" }, - "secs" : { - "format_description" : "count", + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific sector count." + "type" : "integer" }, - "iops_wr" : { + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", "optional" : 1, "type" : "integer" }, - "cache" : { + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "description" : "The drive's cache mode", - "format_description" : "none|writethrough|writeback|unsafe|directsync" + "type" : "integer" }, - "rerror" : { - "enum" : [ - "ignore", - "report", - "stop" - ], - "description" : "Read error action.", - "type" : "string", + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "format_description" : "ignore|report|stop" + "type" : "integer" }, - "media" : { - "format_description" : "cdrom|disk", - "default" : "disk", - "type" : "string", - "optional" : 1, - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ] + "iops_rd_length" : { + "alias" : "iops_rd_max_length" }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean", + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "format_description" : "on|off" + "type" : "integer" }, - "iops_max" : { + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" - } - }, - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", - "type" : "string", - "optional" : 1 - }, - "tablet" : { - "optional" : 1, - "type" : "boolean", - "default" : 1, - "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl)." - }, - "boot" : { - "pattern" : "[acdn]{1,4}", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", - "optional" : 1, - "type" : "string", - "default" : "cdn" - }, - "numa[n]" : { - "optional" : 1, - "type" : "string", - "description" : "numa topology", - "format" : { - "memory" : { - "format_description" : "mb", - "description" : "Amount of memory this numa node provides.", + "type" : "integer" + }, + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "number" + "type" : "integer" }, - "cpus" : { - "type" : "string", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "description" : "CPUs accessing this numa node.", - "format_description" : "id[-id];..." + "iops_wr_length" : { + "alias" : "iops_wr_max_length" }, - "hostnodes" : { + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "description" : "host numa nodes to use", - "format_description" : "id[-id];..." + "type" : "integer" }, - "policy" : { + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string", - "description" : "numa allocation policy.", - "enum" : [ - "preferred", - "bind", - "interleave" - ], - "format_description" : "preferred|bind|interleave" - } - } - }, - "tdf" : { - "description" : "Enable/disable time drift fix.", - "type" : "boolean", - "optional" : 1, - "default" : 0 - }, - "autostart" : { - "description" : "Automatic restart after crash (currently ignored).", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "ostype" : { - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "l24", - "l26", - "solaris" - ], - "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", - "optional" : 1, - "type" : "string" - }, - "unused[n]" : { - "format" : "pve-volume-id", - "type" : "string", - "optional" : 1, - "description" : "Reference to unused volumes." - }, - "template" : { - "description" : "Enable/disable Template.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "shares" : { - "default" : 1000, - "maximum" : 50000, - "type" : "integer", - "optional" : 1, - "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", - "minimum" : 0 - }, - "bios" : { - "enum" : [ - "seabios", - "ovmf" - ], - "description" : "Select BIOS implementation.", - "optional" : 1, - "type" : "string", - "default" : "seabios" - }, - "protection" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Sets the protection flag of the VM. This will prevent the remove operation." - }, - "memory" : { - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", - "default" : 512, - "type" : "integer", - "optional" : 1, - "minimum" : 16 - }, - "args" : { - "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", - "type" : "string", - "optional" : 1 - }, - "background_delay" : { - "minimum" : 1, - "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.", - "maximum" : 30, - "type" : "integer", - "optional" : 1 - }, - "cpu" : { - "description" : "Emulated CPU type.", - "type" : "string", - "optional" : 1, - "format" : { - "cputype" : { - "description" : "Emulated CPU type.", - "enum" : [ - "486", - "athlon", - "pentium", - "pentium2", - "pentium3", - "coreduo", - "core2duo", - "kvm32", - "kvm64", - "qemu32", - "qemu64", - "phenom", - "Conroe", - "Penryn", - "Nehalem", - "Westmere", - "SandyBridge", - "IvyBridge", - "Haswell", - "Haswell-noTSX", - "Broadwell", - "Broadwell-noTSX", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "host" - ], - "default" : "kvm64", - "type" : "string", - "format_description" : "cputype", - "default_key" : 1 + "type" : "integer" }, - "hidden" : { - "description" : "Do not identify as a KVM virtual machine.", - "default" : 0, + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean" - } - } - }, - "scsihw" : { - "type" : "string", - "optional" : 1, - "default" : "lsi", - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ], - "description" : "scsi controller model" - }, - "usb[n]" : { - "format" : { - "usb3" : { - "format_description" : "yes|no", - "description" : "Specifies whether if given host option is a USB3 device or port", + "type" : "number" + }, + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean" + "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" }, - "host" : { - "description" : "The Host USB device or port or the value spice", - "type" : "string", - "format_description" : "HOSTUSBDEVICE|spice", - "format" : "pve-qm-usb-device", - "default_key" : 1 - } - }, - "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", - "optional" : 1, - "type" : "string" - }, - "cdrom" : { - "description" : "This is an alias for option -ide2", - "type" : "string", - "optional" : 1, - "format" : "pve-qm-drive", - "typetext" : "volume" - }, - "skiplock" : { - "type" : "boolean", - "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." - }, - "net[n]" : { - "format" : "pve-qm-net", - "type" : "string", - "optional" : 1, - "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n" - }, - "scsi[n]" : { - "format" : { "media" : { - "format_description" : "cdrom|disk", + "default" : "disk", + "description" : "The drive's media type.", "enum" : [ "cdrom", "disk" ], - "description" : "The drive's media type.", - "type" : "string", "optional" : 1, - "default" : "disk" + "type" : "string" }, - "iothread" : { - "format_description" : "off|on", + "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" : "boolean", - "description" : "Whether to use iothreads for this drive" + "type" : "string" }, - "cache" : { + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", "optional" : 1, - "type" : "string", + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" + "ignore", + "report", + "stop" ], - "description" : "The drive's cache mode", - "format_description" : "none|writethrough|writeback|unsafe|directsync" + "optional" : 1, + "type" : "string" }, "secs" : { "description" : "Force the drive's physical geometry to have a specific sector count.", - "type" : "integer", "optional" : 1, - "format_description" : "count" + "type" : "integer" }, - "iops_wr" : { - "description" : "Maximum write I/O speed in operations per second.", - "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, - "format_description" : "iops" + "type" : "string" }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", + "optional" : 1, "type" : "boolean", - "optional" : 1 + "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!" }, - "iops_max" : { - "format_description" : "iops", - "type" : "integer", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." + "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", - "description" : "Whether the drive should be included when making snapshots.", - "format_description" : "on|off" - }, - "bps_wr" : { - "optional" : 1, - "type" : "integer", - "description" : "Maximum write speed speed in bytes per second.", - "format_description" : "bps" + "type" : "boolean" }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "type" : "number", + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, - "format_description" : "mbps" + "type" : "boolean" }, - "iops_rd" : { - "format_description" : "iops", - "type" : "integer", + "trans" : { + "description" : "Force disk geometry bios translation mode.", + "enum" : [ + "none", + "lba", + "auto" + ], "optional" : 1, - "description" : "Maximum read I/O speed in operations per second." + "type" : "string" }, - "size" : { - "format" : "disk-size", - "description" : "Disk size. This is purely informational and has no effect.", - "type" : "string", - "optional" : 1 + "volume" : { + "alias" : "file" }, - "iops_rd_max" : { - "format_description" : "iops", + "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=] [,model=] [,replicate=<1|0>] [,rerror=] [,secs=] [,serial=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" + }, + "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 gateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string", + "typetext" : "[gw=] [,gw6=] [,ip=] [,ip6=]" + }, + "keyboard" : { + "default" : null, + "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.cfg' configuration file.It should not be necessary to set it.", + "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", + "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" + ], + "optional" : 1, + "type" : "string" + }, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?|virt(?:-\\d+\\.\\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_description" : "bridge", "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled read I/O pool speed in operations per second." + "type" : "string" }, - "format" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "description" : "The drive's backing file's data format.", - "format_description" : "drive format" + "e1000" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "mbps_wr_max" : { - "format_description" : "mbps", - "type" : "number", - "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "e1000-82540em" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "bps" : { - "description" : "Maximum r/w speed speed in bytes per second.", - "optional" : 1, - "type" : "integer", - "format_description" : "bps" + "e1000-82544gc" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "heads" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific head count.", - "optional" : 1, - "type" : "integer" + "e1000-82545em" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "serial" : { - "type" : "string", + "firewall" : { + "description" : "Whether this interface should be protected by the firewall.", "optional" : 1, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", - "maxLength" : 60, - "format" : "urlencoded" + "type" : "boolean" }, - "discard" : { - "enum" : [ - "ignore", - "on" - ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "optional" : 1, - "type" : "string", - "format_description" : "ignore|on" + "i82551" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number", - "optional" : 1, - "format_description" : "mbps" + "i82557b" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "mbps_rd" : { - "type" : "number", - "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", - "format_description" : "mbps" + "i82559er" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "mbps_wr" : { - "format_description" : "mbps", + "link_down" : { + "description" : "Whether this interface should be disconnected (like pulling the plug).", "optional" : 1, - "type" : "number", - "description" : "Maximum write speed speed in megabytes per second." - }, - "file" : { - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "default_key" : 1, - "description" : "The drive's backing volume.", - "type" : "string" + "type" : "boolean" }, - "iops" : { - "type" : "integer", + "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, - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops" - }, - "werror" : { - "format_description" : "enospc|ignore|report|stop", - "description" : "Write error action.", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "type" : "string", - "optional" : 1 + "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})", + "type" : "string" }, - "aio" : { - "format_description" : "native|threads", + "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" : [ - "native", - "threads" + "rtl8139", + "ne2k_pci", + "e1000", + "pcnet", + "virtio", + "ne2k_isa", + "i82551", + "i82557b", + "i82559er", + "vmxnet3", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em" ], - "description" : "AIO type to use.", - "optional" : 1, "type" : "string" }, - "iops_wr_max" : { - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "type" : "integer", - "optional" : 1, - "format_description" : "iops" + "ne2k_isa" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "backup" : { - "format_description" : "on|off", - "type" : "boolean", - "optional" : 1, - "description" : "Whether the drive should be included when making backups." + "ne2k_pci" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "bps_rd" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" + "pcnet" : { + "alias" : "macaddr", + "keyAlias" : "model" }, "queues" : { - "minimum" : 2, - "format_description" : "nbqueues", - "type" : "integer", + "description" : "Number of packet queues to be used on the device.", + "maximum" : 16, + "minimum" : 0, "optional" : 1, - "description" : "Number of queues." + "type" : "integer" }, - "cyls" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "rate" : { + "description" : "Rate limit in mbps (megabytes per second) as floating point number.", + "minimum" : 0, "optional" : 1, - "type" : "integer" + "type" : "number" }, - "mbps" : { - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "rtl8139" : { + "alias" : "macaddr", + "keyAlias" : "model" }, - "volume" : { - "alias" : "file" + "tag" : { + "description" : "VLAN tag to apply to packets on this interface.", + "maximum" : 4094, + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "trans" : { - "format_description" : "none|lba|auto", + "trunks" : { + "description" : "VLAN trunks to pass through this interface.", + "format_description" : "vlanid[;vlanid...]", "optional" : 1, - "type" : "string", - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" - ] + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" + }, + "virtio" : { + "alias" : "macaddr", + "keyAlias" : "model" + }, + "vmxnet3" : { + "alias" : "macaddr", + "keyAlias" : "model" } }, - "type" : "string", "optional" : 1, - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." + "type" : "string", + "typetext" : "[model=] [,bridge=] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=] [,queues=] [,rate=] [,tag=] [,trunks=] [,=]" }, - "virtio[n]" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", + "typetext" : "" + }, + "numa" : { + "default" : 0, + "description" : "Enable/disable NUMA.", "optional" : 1, - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "type" : "boolean", + "typetext" : "" + }, + "numa[n]" : { + "description" : "NUMA topology.", "format" : { - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1, - "type" : "integer", - "format_description" : "count" + "cpus" : { + "description" : "CPUs accessing this NUMA node.", + "format_description" : "id[-id];...", + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" }, - "mbps" : { - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number", + "hostnodes" : { + "description" : "Host NUMA nodes to use.", + "format_description" : "id[-id];...", "optional" : 1, - "format_description" : "mbps" + "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", + "type" : "string" }, - "bps_rd" : { - "description" : "Maximum read speed speed in bytes per second.", + "memory" : { + "description" : "Amount of memory this NUMA node provides.", "optional" : 1, - "type" : "integer", - "format_description" : "bps" + "type" : "number" }, - "trans" : { - "format_description" : "none|lba|auto", - "optional" : 1, - "type" : "string", + "policy" : { + "description" : "NUMA allocation policy.", "enum" : [ - "none", - "lba", - "auto" + "preferred", + "bind", + "interleave" ], - "description" : "Force disk geometry bios translation mode." - }, - "volume" : { - "alias" : "file" - }, - "file" : { - "default_key" : 1, - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "type" : "string", - "description" : "The drive's backing volume." - }, - "iops" : { - "format_description" : "iops", - "description" : "Maximum r/w I/O speed in operations per second.", - "type" : "integer", - "optional" : 1 - }, - "mbps_rd" : { - "type" : "number", "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", - "format_description" : "mbps" - }, - "mbps_wr" : { - "type" : "number", - "optional" : 1, - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps" - }, - "iops_wr_max" : { - "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "type" : "integer", - "optional" : 1 - }, - "backup" : { - "optional" : 1, - "type" : "boolean", - "description" : "Whether the drive should be included when making backups.", - "format_description" : "on|off" - }, + "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/2012r2\nwin10;; Microsoft Windows 10/2016\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" : "" + }, + "sata[n]" : { + "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", + "format" : { "aio" : { - "type" : "string", - "optional" : 1, "description" : "AIO type to use.", "enum" : [ "native", "threads" ], - "format_description" : "native|threads" - }, - "werror" : { - "type" : "string", "optional" : 1, - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action.", - "format_description" : "enospc|ignore|report|stop" + "type" : "string" }, - "iops_rd" : { - "description" : "Maximum read I/O speed in operations per second.", + "backup" : { + "description" : "Whether the drive should be included when making backups.", "optional" : 1, - "type" : "integer", - "format_description" : "iops" + "type" : "boolean" }, - "size" : { - "type" : "string", + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size" + "type" : "integer" }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "type" : "number", + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "format_description" : "mbps" + "type" : "integer" }, - "bps_wr" : { + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", "format_description" : "bps", - "type" : "integer", "optional" : 1, - "description" : "Maximum write speed speed in bytes per second." + "type" : "integer" }, - "discard" : { - "enum" : [ - "ignore", - "on" - ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "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" : "string", - "format_description" : "ignore|on" + "type" : "integer" }, - "mbps_rd_max" : { - "type" : "number", + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "heads" : { - "format_description" : "count", - "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, - "description" : "Force the drive's physical geometry to have a specific head count." + "type" : "integer" }, - "serial" : { - "format_description" : "serial", - "format" : "urlencoded", - "maxLength" : 60, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "cache" : { + "description" : "The drive's cache mode", + "enum" : [ + "none", + "writethrough", + "writeback", + "unsafe", + "directsync" + ], "optional" : 1, "type" : "string" }, - "iops_rd_max" : { - "type" : "integer", + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "format_description" : "iops" + "type" : "integer" }, - "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "type" : "number", + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", "optional" : 1, - "format_description" : "mbps" + "type" : "boolean" }, - "bps" : { - "format_description" : "bps", - "type" : "integer", + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], "optional" : 1, - "description" : "Maximum r/w speed speed in bytes per second." + "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" : { - "format_description" : "drive format", - "type" : "string", - "optional" : 1, + "description" : "The drive's backing file's data format.", "enum" : [ "raw", "cow", @@ -6024,451 +13283,268 @@ var pveapi = [ "vmdk", "cloop" ], - "description" : "The drive's backing file's data format." + "optional" : 1, + "type" : "string" }, - "secs" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, "type" : "integer" }, - "iops_wr" : { + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", - "type" : "integer", - "optional" : 1 - }, - "detect_zeroes" : { - "optional" : 1, - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes." - }, - "rerror" : { - "description" : "Read error action.", - "enum" : [ - "ignore", - "report", - "stop" - ], - "optional" : 1, - "type" : "string", - "format_description" : "ignore|report|stop" - }, - "cache" : { - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "type" : "string", - "optional" : 1, - "format_description" : "none|writethrough|writeback|unsafe|directsync" - }, - "iothread" : { - "format_description" : "off|on", - "description" : "Whether to use iothreads for this drive", - "optional" : 1, - "type" : "boolean" - }, - "media" : { - "enum" : [ - "cdrom", - "disk" - ], - "description" : "The drive's media type.", - "type" : "string", "optional" : 1, - "default" : "disk", - "format_description" : "cdrom|disk" - }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean", - "format_description" : "on|off" + "type" : "integer" }, "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", "format_description" : "iops", - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." - } - } - }, - "vga" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ], - "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal." - }, - "balloon" : { - "optional" : 1, - "type" : "integer", - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", - "minimum" : 0 - }, - "smp" : { - "description" : "The number of CPUs. Please use option -sockets instead.", - "default" : 1, - "optional" : 1, - "type" : "integer", - "minimum" : 1 - }, - "machine" : { - "description" : "Specific the Qemu machine type.", - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "optional" : 1, - "type" : "string", - "maxLength" : 40 - }, - "delete" : { - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "description" : "A list of settings you want to delete." - }, - "cores" : { - "minimum" : 1, - "description" : "The number of cores per socket.", - "type" : "integer", - "optional" : 1, - "default" : 1 - }, - "name" : { - "description" : "Set a name for the VM. Only used on the configuration web interface.", - "type" : "string", - "optional" : 1, - "format" : "dns-name" - }, - "agent" : { - "default" : 0, - "optional" : 1, - "type" : "boolean", - "description" : "Enable/disable Qemu GuestAgent." - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1 - }, - "startup" : { - "optional" : 1, - "type" : "string", - "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "format" : "pve-startup-order" - }, - "onboot" : { - "type" : "boolean", - "optional" : 1, - "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup." - }, - "freeze" : { - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", - "type" : "boolean", - "optional" : 1 - }, - "sockets" : { - "type" : "integer", - "optional" : 1, - "default" : 1, - "description" : "The number of CPU sockets.", - "minimum" : 1 - }, - "vcpus" : { - "description" : "Number of hotplugged vcpus.", - "default" : 0, - "optional" : 1, - "type" : "integer", - "minimum" : 1 - }, - "serial[n]" : { - "type" : "string", - "optional" : 1, - "pattern" : "(/dev/.+|socket)", - "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" - }, - "description" : { - "type" : "string", - "optional" : 1, - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file." - }, - "acpi" : { - "description" : "Enable/disable ACPI.", - "optional" : 1, - "type" : "boolean", - "default" : 1 - }, - "migrate_downtime" : { - "description" : "Set maximum tolerated downtime (in seconds) for migrations.", - "type" : "number", - "optional" : 1, - "default" : 0.1, - "minimum" : 0 - }, - "parallel[n]" : { - "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "type" : "string", - "optional" : 1 - }, - "hotplug" : { - "format" : "pve-hotplug-features", - "default" : "network,disk,usb", - "type" : "string", - "optional" : 1, - "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'." - }, - "watchdog" : { - "optional" : 1, - "type" : "string", - "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", - "format" : "pve-qm-watchdog" - }, - "ide[n]" : { - "optional" : 1, - "type" : "string", - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", - "format" : { - "volume" : { - "alias" : "file" + "optional" : 1, + "type" : "integer" }, - "trans" : { - "format_description" : "none|lba|auto", - "enum" : [ - "none", - "lba", - "auto" - ], - "description" : "Force disk geometry bios translation mode.", + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string" + "type" : "integer" }, - "bps_rd" : { - "format_description" : "bps", - "description" : "Maximum read speed speed in bytes per second.", - "type" : "integer", - "optional" : 1 + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "cyls" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "type" : "integer", - "optional" : 1 + "iops_rd_length" : { + "alias" : "iops_rd_max_length" }, - "mbps" : { - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "werror" : { - "format_description" : "enospc|ignore|report|stop", + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string", - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action." + "type" : "integer" }, - "aio" : { + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string", - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ], - "format_description" : "native|threads" + "type" : "integer" + }, + "iops_wr_length" : { + "alias" : "iops_wr_max_length" }, "iops_wr_max" : { - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "integer", - "format_description" : "iops" + "type" : "integer" }, - "backup" : { - "format_description" : "on|off", - "type" : "boolean", + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Whether the drive should be included when making backups." + "type" : "integer" }, - "mbps_rd" : { + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", "format_description" : "mbps", - "description" : "Maximum read speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "optional" : 1, + "type" : "number" }, - "mbps_wr" : { + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", "format_description" : "mbps", - "description" : "Maximum write speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "optional" : 1, + "type" : "number" }, - "model" : { - "type" : "string", + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", - "format_description" : "model", - "format" : "urlencoded", - "maxLength" : 120 + "type" : "number" }, - "file" : { - "type" : "string", - "description" : "The drive's backing volume.", - "default_key" : 1, - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume" + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "iops" : { - "description" : "Maximum r/w I/O speed in operations per second.", + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "integer", - "format_description" : "iops" + "type" : "number" }, "mbps_wr_max" : { - "description" : "Maximum unthrottled write pool speed in megabytes per second.", + "description" : "Maximum unthrottled write pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "number", - "format_description" : "mbps" + "type" : "number" }, - "format" : { - "format_description" : "drive format", - "description" : "The drive's backing file's data format.", + "media" : { + "default" : "disk", + "description" : "The drive's media type.", "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" + "cdrom", + "disk" ], "optional" : 1, "type" : "string" }, - "bps" : { - "type" : "integer", + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", "optional" : 1, - "description" : "Maximum r/w speed speed in bytes per second.", - "format_description" : "bps" + "type" : "boolean" }, - "iops_rd_max" : { - "format_description" : "iops", - "type" : "integer", + "rerror" : { + "description" : "Read error action.", + "enum" : [ + "ignore", + "report", + "stop" + ], "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second." + "type" : "string" }, - "heads" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific head count.", + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, "type" : "integer" }, "serial" : { - "format_description" : "serial", + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", "format" : "urlencoded", + "format_description" : "serial", "maxLength" : 60, - "type" : "string", "optional" : 1, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long." + "type" : "string" }, - "discard" : { - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "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", - "on" + "report", + "stop" ], "optional" : 1, - "type" : "string", - "format_description" : "ignore|on" + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<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" }, - "mbps_rd_max" : { - "format_description" : "mbps", + "backup" : { + "description" : "Whether the drive should be included when making backups.", "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second." + "type" : "boolean" }, - "bps_wr" : { + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", "optional" : 1, "type" : "integer" }, - "mbps_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "type" : "number", - "optional" : 1 - }, - "iops_rd" : { - "description" : "Maximum read I/O speed in operations per second.", + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "integer", - "format_description" : "iops" + "type" : "integer" }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "type" : "string", + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "format" : "disk-size" + "type" : "integer" }, - "iops_max" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" + "bps_rd_length" : { + "alias" : "bps_rd_max_length" }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean", + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "format_description" : "on|off" + "type" : "integer" }, - "media" : { - "format_description" : "cdrom|disk", - "type" : "string", + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "default" : "disk", - "enum" : [ - "cdrom", - "disk" - ], - "description" : "The drive's media type." + "type" : "integer" }, - "rerror" : { - "enum" : [ - "ignore", - "report", - "stop" - ], - "description" : "Read error action.", - "type" : "string", + "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, - "format_description" : "ignore|report|stop" + "type" : "integer" }, "cache" : { - "format_description" : "none|writethrough|writeback|unsafe|directsync", "description" : "The drive's cache mode", "enum" : [ "none", @@ -6480,387 +13556,178 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "iops_wr" : { - "type" : "integer", + "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, - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" + "type" : "string" }, - "secs" : { - "description" : "Force the drive's physical geometry to have a specific sector count.", + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "type" : "integer", - "format_description" : "count" + "type" : "integer" }, - "detect_zeroes" : { - "optional" : 1, - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes." - } - } - }, - "lock" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "description" : "Lock/unlock the VM." - }, - "hostpci[n]" : { - "format" : "pve-qm-hostpci", - "type" : "string", - "optional" : 1, - "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" - }, - "keyboard" : { - "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", - "enum" : [ - "da", - "sv", - "en-gb", - "lt", - "is", - "mk", - "pl", - "hu", - "fr-be", - "pt-br", - "de-ch", - "nl", - "no", - "tr", - "sl", - "de", - "fr-ca", - "ja", - "es", - "it", - "pt", - "fr", - "en-us", - "fi", - "fr-ch" - ], - "default" : "en-us", - "type" : "string", - "optional" : 1 - }, - "bootdisk" : { - "type" : "string", - "optional" : 1, - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "description" : "Enable booting from specified disk.", - "format" : "pve-qm-bootdisk" - }, - "revert" : { - "description" : "Revert a pending change.", - "optional" : 1, - "type" : "string", - "format" : "pve-configid-list" - }, - "reboot" : { - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "default" : 1, - "type" : "boolean", - "optional" : 1 - }, - "cpuunits" : { - "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "maximum" : 500000, - "default" : 1000, - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "numa" : { - "description" : "Enable/disable NUMA.", - "default" : 0, - "optional" : 1, - "type" : "boolean" - }, - "smbios1" : { - "description" : "Specify SMBIOS type 1 fields.", - "optional" : 1, - "type" : "string", - "format" : "pve-qm-smbios1", - "maxLength" : 256 - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - } - }, - "additionalProperties" : 0 - }, - "name" : "update_vm_async", - "protected" : 1 - }, - "GET" : { - "returns" : { - "type" : "object", - "properties" : { - "digest" : { - "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", - "type" : "string" - } - } - }, - "method" : "GET", - "name" : "vm_config", - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "current" : { - "description" : "Get current values (instead of pending values).", - "optional" : 1, - "type" : "boolean", - "default" : 0 - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : "node", - "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API)." - }, - "PUT" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "numa" : { - "description" : "Enable/disable NUMA.", - "type" : "boolean", - "optional" : 1, - "default" : 0 - }, - "cpuunits" : { - "type" : "integer", - "optional" : 1, - "maximum" : 500000, - "default" : 1000, - "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "minimum" : 0 - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, - "smbios1" : { - "format" : "pve-qm-smbios1", - "maxLength" : 256, - "type" : "string", - "optional" : 1, - "description" : "Specify SMBIOS type 1 fields." - }, - "bootdisk" : { - "format" : "pve-qm-bootdisk", - "description" : "Enable booting from specified disk.", - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "type" : "string", - "optional" : 1 - }, - "revert" : { - "format" : "pve-configid-list", - "description" : "Revert a pending change.", - "optional" : 1, - "type" : "string" - }, - "reboot" : { - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "default" : 1, - "optional" : 1, - "type" : "boolean" - }, - "lock" : { - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "description" : "Lock/unlock the VM.", - "optional" : 1, - "type" : "string" - }, - "hostpci[n]" : { - "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "type" : "string", - "optional" : 1, - "format" : "pve-qm-hostpci" - }, - "keyboard" : { - "enum" : [ - "da", - "sv", - "en-gb", - "lt", - "is", - "mk", - "pl", - "hu", - "fr-be", - "pt-br", - "de-ch", - "nl", - "no", - "tr", - "sl", - "de", - "fr-ca", - "ja", - "es", - "it", - "pt", - "fr", - "en-us", - "fi", - "fr-ch" - ], - "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", - "optional" : 1, - "type" : "string", - "default" : "en-us" - }, - "hotplug" : { - "format" : "pve-hotplug-features", - "description" : "Selectively enable hotplug features. This is a comma separated list of hotplug features: 'network', 'disk', 'cpu', 'memory' and 'usb'. Use '0' to disable hotplug completely. Value '1' is an alias for the default 'network,disk,usb'.", - "default" : "network,disk,usb", - "optional" : 1, - "type" : "string" - }, - "ide[n]" : { - "type" : "string", - "optional" : 1, - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", - "format" : { - "mbps_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "number" + "type" : "integer" }, - "size" : { - "format" : "disk-size", + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string", - "description" : "Disk size. This is purely informational and has no effect." + "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", - "type" : "integer", "optional" : 1, - "description" : "Maximum read I/O speed in operations per second." + "type" : "integer" }, - "bps_wr" : { - "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", - "type" : "integer", - "optional" : 1 + "iops_rd_length" : { + "alias" : "iops_rd_max_length" }, - "mbps_rd_max" : { + "iops_rd_max" : { + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "discard" : { - "format_description" : "ignore|on", - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ], - "type" : "string", - "optional" : 1 + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "bps" : { - "type" : "integer", + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "description" : "Maximum r/w speed speed in bytes per second.", - "format_description" : "bps" + "type" : "integer" }, - "mbps_wr_max" : { + "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", - "type" : "number", "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "type" : "number" }, - "format" : { - "format_description" : "drive format", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "description" : "The drive's backing file's data format.", - "type" : "string", - "optional" : 1 + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "type" : "integer", + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "format_description" : "iops" + "type" : "number" }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string", - "format" : "urlencoded", - "maxLength" : 60, - "format_description" : "serial" + "type" : "number" }, - "heads" : { - "format_description" : "count", + "mbps_wr" : { + "description" : "Maximum write speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific head count." + "type" : "number" }, - "cache" : { - "format_description" : "none|writethrough|writeback|unsafe|directsync", + "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" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" + "cdrom", + "disk" ], - "description" : "The drive's cache mode", - "type" : "string", - "optional" : 1 + "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.", + "optional" : 1, + "type" : "boolean" }, "rerror" : { - "format_description" : "ignore|report|stop", "description" : "Read error action.", "enum" : [ "ignore", @@ -6870,3883 +13737,4777 @@ var pveapi = [ "optional" : 1, "type" : "string" }, - "detect_zeroes" : { - "optional" : 1, - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes." - }, - "iops_wr" : { + "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" : "integer", - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" + "type" : "boolean" }, "secs" : { "description" : "Force the drive's physical geometry to have a specific sector count.", - "type" : "integer", "optional" : 1, - "format_description" : "count" + "type" : "integer" }, - "media" : { - "format_description" : "cdrom|disk", - "enum" : [ - "cdrom", - "disk" - ], - "description" : "The drive's media type.", + "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", - "default" : "disk" + "type" : "string" }, - "iops_max" : { - "type" : "integer", + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" - }, - "snapshot" : { - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots.", "type" : "boolean", - "optional" : 1 + "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!" }, - "mbps" : { - "format_description" : "mbps", - "type" : "number", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", "optional" : 1, - "description" : "Maximum r/w speed speed in megabytes per second." + "type" : "string" }, - "cyls" : { + "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", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "format_description" : "count" + "type" : "boolean" }, - "bps_rd" : { - "type" : "integer", + "ssd" : { + "description" : "Whether to expose this drive as an SSD, rather than a rotational hard disk.", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" - }, - "volume" : { - "alias" : "file" + "type" : "boolean" }, "trans" : { - "optional" : 1, - "type" : "string", "description" : "Force disk geometry bios translation mode.", "enum" : [ "none", "lba", "auto" ], - "format_description" : "none|lba|auto" - }, - "model" : { - "format" : "urlencoded", - "maxLength" : 120, - "format_description" : "model", - "type" : "string", - "optional" : 1, - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long." - }, - "iops" : { - "format_description" : "iops", - "optional" : 1, - "type" : "integer", - "description" : "Maximum r/w I/O speed in operations per second." - }, - "file" : { - "description" : "The drive's backing volume.", - "type" : "string", - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "default_key" : 1 - }, - "mbps_wr" : { - "format_description" : "mbps", - "optional" : 1, - "type" : "number", - "description" : "Maximum write speed speed in megabytes per second." - }, - "mbps_rd" : { - "description" : "Maximum read speed speed in megabytes per second.", - "type" : "number", - "optional" : 1, - "format_description" : "mbps" - }, - "backup" : { - "format_description" : "on|off", "optional" : 1, - "type" : "boolean", - "description" : "Whether the drive should be included when making backups." + "type" : "string" }, - "iops_wr_max" : { - "format_description" : "iops", - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second." + "volume" : { + "alias" : "file" }, "werror" : { + "description" : "Write error action.", "enum" : [ "enospc", "ignore", "report", "stop" ], - "description" : "Write error action.", - "type" : "string", "optional" : 1, - "format_description" : "enospc|ignore|report|stop" - }, - "aio" : { - "format_description" : "native|threads", - "enum" : [ - "native", - "threads" - ], - "description" : "AIO type to use.", - "type" : "string", - "optional" : 1 + "type" : "string" } - } - }, - "watchdog" : { - "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", + }, "optional" : 1, "type" : "string", - "format" : "pve-qm-watchdog" + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" }, - "acpi" : { - "default" : 1, + "scsihw" : { + "default" : "lsi", + "description" : "SCSI controller model", + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], "optional" : 1, - "type" : "boolean", - "description" : "Enable/disable ACPI." + "type" : "string" }, - "migrate_downtime" : { - "minimum" : 0, - "type" : "number", + "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, - "default" : 0.1, - "description" : "Set maximum tolerated downtime (in seconds) for migrations." - }, - "parallel[n]" : { - "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "type" : "string", - "optional" : 1 - }, - "description" : { - "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.", "type" : "string", - "optional" : 1 - }, - "vcpus" : { - "default" : 0, - "optional" : 1, - "type" : "integer", - "description" : "Number of hotplugged vcpus.", - "minimum" : 1 + "typetext" : "" }, "serial[n]" : { + "description" : "Create a serial device inside the VM (n is 0 to 3)", "optional" : 1, + "pattern" : "(/dev/.+|socket)", "type" : "string", - "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "pattern" : "(/dev/.+|socket)" + "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" }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", + "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, - "maxLength" : 40 + "type" : "integer", + "typetext" : " (0 - 50000)" }, - "startup" : { - "type" : "string", + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "format" : "pve-startup-order" - }, - "agent" : { "type" : "boolean", + "typetext" : "" + }, + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", + "format" : "pve-qm-smbios1", + "maxLength" : 256, "optional" : 1, - "default" : 0, - "description" : "Enable/disable Qemu GuestAgent." + "type" : "string", + "typetext" : "[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" }, - "sockets" : { - "minimum" : 1, + "smp" : { "default" : 1, + "description" : "The number of CPUs. Please use option -sockets instead.", + "minimum" : 1, "optional" : 1, "type" : "integer", - "description" : "The number of CPU sockets." + "typetext" : " (1 - N)" }, - "onboot" : { - "description" : "Specifies whether a VM will be started during system bootup.", - "type" : "boolean", + "sockets" : { + "default" : 1, + "description" : "The number of CPU sockets.", + "minimum" : 1, "optional" : 1, - "default" : 0 + "type" : "integer", + "typetext" : " (1 - N)" }, - "freeze" : { - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).", + "sshkeys" : { + "description" : "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).", + "format" : "urlencoded", "optional" : 1, - "type" : "boolean" + "type" : "string", + "typetext" : "" }, - "cores" : { - "default" : 1, - "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, - "description" : "The number of cores per socket.", - "minimum" : 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)" }, - "delete" : { - "description" : "A list of settings you want to delete.", + "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", - "format" : "pve-configid-list" + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " }, - "name" : { - "format" : "dns-name", - "description" : "Set a name for the VM. Only used on the configuration web interface.", + "tablet" : { + "default" : 1, + "description" : "Enable/disable the USB tablet device.", "optional" : 1, - "type" : "string" + "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)." }, - "smp" : { - "description" : "The number of CPUs. Please use option -sockets instead.", - "default" : 1, + "tdf" : { + "default" : 0, + "description" : "Enable/disable time drift fix.", "optional" : 1, - "type" : "integer", - "minimum" : 1 + "type" : "boolean", + "typetext" : "" }, - "machine" : { - "maxLength" : 40, - "type" : "string", + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", "optional" : 1, - "description" : "Specific the Qemu machine type.", - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)" + "type" : "boolean", + "typetext" : "" }, - "net[n]" : { - "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", + "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", - "format" : "pve-qm-net" + "typetext" : "" }, - "vga" : { - "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 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" + } + }, "optional" : 1, - "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ] - }, - "virtio[n]" : { "type" : "string", + "typetext" : "[host=] [,usb3=<1|0>]" + }, + "vcpus" : { + "default" : 0, + "description" : "Number of hotplugged vcpus.", + "minimum" : 1, "optional" : 1, - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", + "type" : "integer", + "typetext" : " (1 - N)" + }, + "vga" : { + "description" : "Configure the VGA hardware.", "format" : { - "bps_wr" : { - "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", + "memory" : { + "description" : "Sets the VGA memory (in MiB). Has no effect with serial display.", + "maximum" : 512, + "minimum" : 4, "optional" : 1, "type" : "integer" }, - "mbps_max" : { - "type" : "number", - "optional" : 1, - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "format_description" : "mbps" - }, - "iops_rd" : { - "format_description" : "iops", + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", + "enum" : [ + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "vmware" + ], "optional" : 1, - "type" : "integer", - "description" : "Maximum read I/O speed in operations per second." - }, - "size" : { + "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).", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads" + ], "optional" : 1, - "type" : "string", - "description" : "Disk size. This is purely informational and has no effect.", - "format" : "disk-size" + "type" : "string" }, - "mbps_wr_max" : { + "backup" : { + "description" : "Whether the drive should be included when making backups.", "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "boolean" }, "bps" : { + "description" : "Maximum r/w speed in bytes per second.", "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", "optional" : 1, "type" : "integer" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "type" : "integer", - "optional" : 1, - "format_description" : "iops" - }, - "format" : { - "format_description" : "drive format", - "description" : "The drive's backing file's data format.", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "optional" : 1, - "type" : "string" - }, - "heads" : { + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count" + "type" : "integer" }, - "serial" : { + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "string", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", - "format" : "urlencoded", - "maxLength" : 60 + "type" : "integer" }, - "discard" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "ignore", - "on" - ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "format_description" : "ignore|on" + "bps_rd_length" : { + "alias" : "bps_rd_max_length" }, - "mbps_rd_max" : { - "type" : "number", + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "media" : { - "format_description" : "cdrom|disk", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], - "default" : "disk", + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "string" + "type" : "integer" }, - "iothread" : { - "format_description" : "off|on", - "description" : "Whether to use iothreads for this drive", - "type" : "boolean", - "optional" : 1 + "bps_wr_length" : { + "alias" : "bps_wr_max_length" }, - "rerror" : { - "format_description" : "ignore|report|stop", + "bps_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string", - "description" : "Read error action.", - "enum" : [ - "ignore", - "report", - "stop" - ] + "type" : "integer" }, "cache" : { - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "optional" : 1, - "type" : "string", "description" : "The drive's cache mode", "enum" : [ "none", "writethrough", "writeback", "unsafe", - "directsync" - ] - }, - "secs" : { - "format_description" : "count", - "type" : "integer", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific sector count." - }, - "iops_wr" : { - "format_description" : "iops", - "type" : "integer", - "optional" : 1, - "description" : "Maximum write I/O speed in operations per second." - }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "type" : "boolean", - "optional" : 1 - }, - "iops_max" : { - "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" - }, - "snapshot" : { - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean", - "optional" : 1 - }, - "bps_rd" : { - "format_description" : "bps", - "optional" : 1, - "type" : "integer", - "description" : "Maximum read speed speed in bytes per second." - }, - "cyls" : { - "type" : "integer", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "format_description" : "count" - }, - "mbps" : { - "format_description" : "mbps", - "optional" : 1, - "type" : "number", - "description" : "Maximum r/w speed speed in megabytes per second." - }, - "volume" : { - "alias" : "file" - }, - "trans" : { - "description" : "Force disk geometry bios translation mode.", - "enum" : [ - "none", - "lba", - "auto" + "directsync" ], "optional" : 1, - "type" : "string", - "format_description" : "none|lba|auto" + "type" : "string" }, - "mbps_rd" : { - "type" : "number", + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "mbps_wr" : { - "type" : "number", + "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, - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps" + "type" : "string" }, "file" : { + "default_key" : 1, "description" : "The drive's backing volume.", - "type" : "string", "format" : "pve-volume-id-or-qm-path", "format_description" : "volume", - "default_key" : 1 - }, - "iops" : { - "format_description" : "iops", - "type" : "integer", - "optional" : 1, - "description" : "Maximum r/w I/O speed in operations per second." + "type" : "string" }, - "werror" : { - "optional" : 1, - "type" : "string", + "format" : { + "description" : "The drive's backing file's data format.", "enum" : [ - "enospc", - "ignore", - "report", - "stop" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], - "description" : "Write error action.", - "format_description" : "enospc|ignore|report|stop" + "optional" : 1, + "type" : "string" }, - "aio" : { - "format_description" : "native|threads", + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "type" : "string", - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ] + "type" : "integer" }, - "iops_wr_max" : { - "type" : "integer", + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "format_description" : "iops" + "type" : "integer" }, - "backup" : { - "type" : "boolean", + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "description" : "Whether the drive should be included when making backups.", - "format_description" : "on|off" - } - } - }, - "balloon" : { - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "scsi[n]" : { - "optional" : 1, - "type" : "string", - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).", - "format" : { - "heads" : { + "type" : "integer" + }, + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count" + "type" : "integer" }, - "serial" : { + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "string", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format_description" : "serial", - "maxLength" : 60, - "format" : "urlencoded" + "type" : "integer" + }, + "iops_rd_length" : { + "alias" : "iops_rd_max_length" }, "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "integer", - "format_description" : "iops" + "type" : "integer" }, - "bps" : { + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "integer", - "description" : "Maximum r/w speed speed in bytes per second.", - "format_description" : "bps" + "type" : "integer" }, - "mbps_wr_max" : { - "type" : "number", + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "format" : { - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "description" : "The drive's backing file's data format.", - "type" : "string", - "optional" : 1, - "format_description" : "drive format" + "iops_wr_length" : { + "alias" : "iops_wr_max_length" }, - "discard" : { - "format_description" : "ignore|on", - "type" : "string", + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ] + "type" : "integer" }, - "mbps_rd_max" : { - "format_description" : "mbps", + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second." - }, - "bps_wr" : { - "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", - "type" : "integer", - "optional" : 1 + "type" : "integer" }, - "iops_rd" : { - "format_description" : "iops", - "type" : "integer", + "iothread" : { + "description" : "Whether to use iothreads for this drive", "optional" : 1, - "description" : "Maximum read I/O speed in operations per second." + "type" : "boolean" }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string", - "format" : "disk-size" + "type" : "number" }, "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", "format_description" : "mbps", - "type" : "number", "optional" : 1, - "description" : "Maximum unthrottled r/w pool speed in megabytes per second." + "type" : "number" }, - "snapshot" : { + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "boolean", - "description" : "Whether the drive should be included when making snapshots.", - "format_description" : "on|off" + "type" : "number" }, - "iops_max" : { - "format_description" : "iops", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "type" : "integer", - "optional" : 1 + "mbps_rd_max" : { + "description" : "Maximum unthrottled read pool in megabytes per second.", + "format_description" : "mbps", + "optional" : 1, + "type" : "number" }, - "iothread" : { - "format_description" : "off|on", - "type" : "boolean", + "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, - "description" : "Whether to use iothreads for this drive" + "type" : "number" }, "media" : { - "format_description" : "cdrom|disk", + "default" : "disk", + "description" : "The drive's media type.", "enum" : [ "cdrom", "disk" ], - "description" : "The drive's media type.", - "type" : "string", "optional" : 1, - "default" : "disk" + "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.", - "type" : "integer", "optional" : 1, - "format_description" : "count" + "type" : "integer" }, - "iops_wr" : { - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", + "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" }, - "detect_zeroes" : { + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes." + "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!" }, - "cache" : { - "type" : "string", + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", "optional" : 1, - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "format_description" : "none|writethrough|writeback|unsafe|directsync" + "type" : "string" }, - "trans" : { + "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" : "string", + "type" : "boolean" + }, + "trans" : { "description" : "Force disk geometry bios translation mode.", "enum" : [ "none", "lba", "auto" ], - "format_description" : "none|lba|auto" - }, - "volume" : { - "alias" : "file" - }, - "bps_rd" : { - "format_description" : "bps", - "optional" : 1, - "type" : "integer", - "description" : "Maximum read speed speed in bytes per second." - }, - "queues" : { - "format_description" : "nbqueues", - "minimum" : 2, - "description" : "Number of queues.", - "optional" : 1, - "type" : "integer" - }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "type" : "integer", - "optional" : 1, - "format_description" : "count" - }, - "mbps" : { - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number", "optional" : 1, - "format_description" : "mbps" + "type" : "string" }, - "aio" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "native", - "threads" - ], - "description" : "AIO type to use.", - "format_description" : "native|threads" + "volume" : { + "alias" : "file" }, "werror" : { - "format_description" : "enospc|ignore|report|stop", - "type" : "string", - "optional" : 1, "description" : "Write error action.", "enum" : [ "enospc", "ignore", "report", "stop" - ] - }, - "iops_wr_max" : { - "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "type" : "integer", - "optional" : 1 - }, - "backup" : { - "format_description" : "on|off", - "description" : "Whether the drive should be included when making backups.", - "type" : "boolean", - "optional" : 1 - }, - "mbps_rd" : { - "format_description" : "mbps", - "optional" : 1, - "type" : "number", - "description" : "Maximum read speed speed in megabytes per second." - }, - "mbps_wr" : { - "format_description" : "mbps", - "type" : "number", + ], "optional" : 1, - "description" : "Maximum write speed speed in megabytes per second." - }, - "file" : { - "format_description" : "volume", - "format" : "pve-volume-id-or-qm-path", - "default_key" : 1, - "description" : "The drive's backing volume.", "type" : "string" - }, - "iops" : { - "optional" : 1, - "type" : "integer", - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops" } - } - }, - "protection" : { - "default" : 0, + }, "optional" : 1, - "type" : "boolean", - "description" : "Sets the protection flag of the VM. This will prevent the remove operation." - }, - "usb[n]" : { "type" : "string", - "optional" : 1, - "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", - "format" : { - "host" : { - "description" : "The Host USB device or port or the value spice", - "type" : "string", - "format_description" : "HOSTUSBDEVICE|spice", - "format" : "pve-qm-usb-device", - "default_key" : 1 - }, - "usb3" : { - "description" : "Specifies whether if given host option is a USB3 device or port", - "optional" : 1, - "type" : "boolean", - "format_description" : "yes|no" - } - } + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,trans=] [,werror=]" }, - "scsihw" : { - "description" : "scsi controller model", - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ], - "default" : "lsi", + "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" + "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 throug API/CLI create or update methods, but not when manually editing the config file." }, - "cdrom" : { + "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", - "description" : "This is an alias for option -ide2", - "typetext" : "volume", - "format" : "pve-qm-drive" + "typetext" : "" }, - "cpu" : { - "description" : "Emulated CPU type.", + "watchdog" : { + "description" : "Create a virtual hardware watchdog device.", + "format" : "pve-qm-watchdog", "optional" : 1, "type" : "string", - "format" : { - "cputype" : { - "default" : "kvm64", - "type" : "string", - "description" : "Emulated CPU type.", - "enum" : [ - "486", - "athlon", - "pentium", - "pentium2", - "pentium3", - "coreduo", - "core2duo", - "kvm32", - "kvm64", - "qemu32", - "qemu64", - "phenom", - "Conroe", - "Penryn", - "Nehalem", - "Westmere", - "SandyBridge", - "IvyBridge", - "Haswell", - "Haswell-noTSX", - "Broadwell", - "Broadwell-noTSX", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "host" - ], - "default_key" : 1, - "format_description" : "cputype" - }, - "hidden" : { - "description" : "Do not identify as a KVM virtual machine.", - "optional" : 1, - "type" : "boolean", - "default" : 0 - } + "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" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/config", + "text" : "config" + }, + { + "info" : { + "GET" : { + "description" : "Get virtual machine 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" : "" + }, + "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" } }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/pending", + "text" : "pending" + }, + { + "info" : { + "PUT" : { + "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", - "optional" : 1 + "typetext" : "" + }, + "idlist" : { + "description" : "A list of disk IDs you want to delete.", + "format" : "pve-configid-list", + "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.Config.Disk" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/unlink", + "text" : "unlink" + }, + { + "info" : { + "POST" : { + "description" : "Creates a TCP VNC proxy connections.", + "method" : "POST", + "name" : "vncproxy", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "memory" : { - "minimum" : 16, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "optional" : 1, - "default" : 512, - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device." + "typetext" : " (1 - N)" }, - "args" : { - "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", + "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" }, - "template" : { - "optional" : 1, - "type" : "boolean", - "default" : 0, - "description" : "Enable/disable Template." + "port" : { + "type" : "integer" }, - "bios" : { + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/vncproxy", + "text" : "vncproxy" + }, + { + "info" : { + "POST" : { + "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" : "" + }, + "serial" : { + "description" : "opens a serial terminal (defaults to display)", "enum" : [ - "seabios", - "ovmf" + "serial0", + "serial1", + "serial2", + "serial3" ], - "description" : "Select BIOS implementation.", - "type" : "string", "optional" : 1, - "default" : "seabios" + "type" : "string" }, - "shares" : { - "default" : 1000, - "maximum" : 50000, - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", - "minimum" : 0 + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" }, - "ostype" : { - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "l24", - "l26", - "solaris" - ], - "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", - "optional" : 1, + "ticket" : { "type" : "string" }, - "unused[n]" : { - "type" : "string", - "optional" : 1, - "description" : "Reference to unused volumes.", - "format" : "pve-volume-id" + "upid" : { + "type" : "string" }, - "boot" : { - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).", - "pattern" : "[acdn]{1,4}", - "default" : "cdn", - "optional" : 1, + "user" : { "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/termproxy", + "text" : "termproxy" + }, + { + "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" : "" }, - "numa[n]" : { - "description" : "numa topology", + "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", - "optional" : 1, - "format" : { - "hostnodes" : { - "format_description" : "id[-id];...", - "type" : "string", - "optional" : 1, - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "description" : "host numa nodes to use" - }, - "cpus" : { - "format_description" : "id[-id];...", - "type" : "string", - "description" : "CPUs accessing this numa node.", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" - }, - "policy" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "preferred", - "bind", - "interleave" - ], - "description" : "numa allocation policy.", - "format_description" : "preferred|bind|interleave" - }, - "memory" : { - "format_description" : "mb", - "description" : "Amount of memory this numa node provides.", - "optional" : 1, - "type" : "number" - } - } + "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" : { + "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" : "" }, - "autostart" : { - "default" : 0, - "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, - "description" : "Automatic restart after crash (currently ignored)." + "type" : "string", + "typetext" : "" }, - "tdf" : { - "optional" : 1, - "type" : "boolean", - "default" : 0, - "description" : "Enable/disable time drift fix." + "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" : { + "additionalProperties" : 1, + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", + "properties" : { + "host" : { + "type" : "string" }, - "tablet" : { - "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", - "default" : 1, - "type" : "boolean", - "optional" : 1 + "password" : { + "type" : "string" }, - "cpulimit" : { - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.", - "type" : "number", - "optional" : 1, - "default" : 0, - "maximum" : 128, - "minimum" : 0 + "proxy" : { + "type" : "string" }, - "kvm" : { - "default" : 1, - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable KVM hardware virtualization." + "tls-port" : { + "type" : "integer" }, - "sata[n]" : { - "format" : { - "file" : { + "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", - "description" : "The drive's backing volume.", - "default_key" : 1, - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume" + "typetext" : "" }, - "iops" : { - "description" : "Maximum r/w I/O speed in operations per second.", + "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, - "format_description" : "iops" + "type" : "boolean" }, - "mbps_rd" : { - "format_description" : "mbps", - "type" : "number", + "cpus" : { + "description" : "Maximum usable CPUs.", "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second." + "type" : "number" }, - "mbps_wr" : { - "description" : "Maximum write speed speed in megabytes per second.", + "ha" : { + "description" : "HA manager service status.", + "type" : "object" + }, + "maxdisk" : { + "description" : "Root disk size in bytes.", "optional" : 1, - "type" : "number", - "format_description" : "mbps" + "renderer" : "bytes", + "type" : "integer" }, - "iops_wr_max" : { - "type" : "integer", + "maxmem" : { + "description" : "Maximum memory in bytes.", "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", - "format_description" : "iops" + "renderer" : "bytes", + "type" : "integer" }, - "backup" : { - "format_description" : "on|off", - "description" : "Whether the drive should be included when making backups.", - "type" : "boolean", - "optional" : 1 + "name" : { + "description" : "VM name.", + "optional" : 1, + "type" : "string" }, - "aio" : { - "format_description" : "native|threads", + "pid" : { + "description" : "PID of running qemu process.", "optional" : 1, - "type" : "string", - "description" : "AIO type to use.", - "enum" : [ - "native", - "threads" - ] + "type" : "integer" }, - "werror" : { - "type" : "string", + "qmpstatus" : { + "description" : "Qemu QMP agent status.", "optional" : 1, - "description" : "Write error action.", + "type" : "string" + }, + "spice" : { + "description" : "Qemu VGA configuration supports spice.", + "optional" : 1, + "type" : "boolean" + }, + "status" : { + "description" : "Qemu process status.", "enum" : [ - "enospc", - "ignore", - "report", - "stop" + "stopped", + "running" ], - "format_description" : "enospc|ignore|report|stop" + "type" : "string" }, - "cyls" : { - "type" : "integer", + "uptime" : { + "description" : "Uptime.", "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "format_description" : "count" + "renderer" : "duration", + "type" : "integer" }, - "mbps" : { - "format_description" : "mbps", + "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" : { + "description" : "Start virtual machine.", + "method" : "POST", + "name" : "vm_start", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?|virt(?:-\\d+\\.\\d+)?)", + "type" : "string" + }, + "migratedfrom" : { + "description" : "The cluster node name.", + "format" : "pve-node", "optional" : 1, - "type" : "number", - "description" : "Maximum r/w speed speed in megabytes per second." + "type" : "string", + "typetext" : "" }, - "bps_rd" : { - "description" : "Maximum read speed speed in bytes per second.", - "type" : "integer", + "migration_network" : { + "description" : "CIDR of the (sub) network that is used for migration.", + "format" : "CIDR", "optional" : 1, - "format_description" : "bps" + "type" : "string", + "typetext" : "" }, - "trans" : { - "format_description" : "none|lba|auto", + "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" : [ - "none", - "lba", - "auto" + "secure", + "insecure" ], - "description" : "Force disk geometry bios translation mode.", - "type" : "string", - "optional" : 1 + "optional" : 1, + "type" : "string" }, - "volume" : { - "alias" : "file" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "iops_wr" : { - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "integer" + "type" : "boolean", + "typetext" : "" }, - "secs" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", + "stateuri" : { + "description" : "Some command save/restore state from this location.", + "maxLength" : 128, "optional" : 1, - "type" : "integer" - }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "type" : "boolean", - "optional" : 1 + "type" : "string", + "typetext" : "" }, - "rerror" : { - "format_description" : "ignore|report|stop", + "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", - "enum" : [ - "ignore", - "report", - "stop" - ], - "description" : "Read error action." + "typetext" : "" }, - "cache" : { - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "description" : "The drive's cache mode", + "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" : { + "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", - "format_description" : "none|writethrough|writeback|unsafe|directsync" + "typetext" : "" }, - "media" : { - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], - "default" : "disk", - "optional" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format_description" : "cdrom|disk" + "typetext" : "" }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", + "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, - "format_description" : "on|off" + "type" : "integer", + "typetext" : " (0 - N)" }, - "iops_max" : { + "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" : { + "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, - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" + "type" : "boolean", + "typetext" : "" }, - "iops_rd" : { - "format_description" : "iops", + "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" : { + "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, - "description" : "Maximum read I/O speed in operations per second." + "type" : "boolean", + "typetext" : "" }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", - "type" : "string", + "keepActive" : { + "default" : 0, + "description" : "Do not deactivate storage volumes.", "optional" : 1, - "format" : "disk-size" + "type" : "boolean", + "typetext" : "" }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "type" : "number", + "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, - "format_description" : "mbps" + "type" : "boolean", + "typetext" : "" }, - "bps_wr" : { - "description" : "Maximum write speed speed in bytes per second.", + "timeout" : { + "description" : "Wait maximal timeout seconds.", + "minimum" : 0, "optional" : 1, "type" : "integer", - "format_description" : "bps" + "typetext" : " (0 - N)" }, - "discard" : { - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ], + "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", - "optional" : 1, - "format_description" : "ignore|on" + "typetext" : "" }, - "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool speed in megabytes per second.", + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "number", - "format_description" : "mbps" + "type" : "boolean", + "typetext" : "" }, - "heads" : { + "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/suspend", + "text" : "suspend" + }, + { + "info" : { + "POST" : { + "description" : "Resume virtual machine.", + "method" : "POST", + "name" : "vm_resume", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "nocheck" : { "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count" - }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "optional" : 1, - "type" : "string", - "format" : "urlencoded", - "maxLength" : 60, - "format_description" : "serial" + "type" : "boolean", + "typetext" : "" }, - "format" : { - "format_description" : "drive format", - "description" : "The drive's backing file's data format.", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "optional" : 1 + "typetext" : "" }, - "bps" : { + "skiplock" : { + "description" : "Ignore locks - only root is allowed to use this option.", "optional" : 1, - "type" : "integer", - "description" : "Maximum r/w speed speed in bytes per second.", - "format_description" : "bps" + "type" : "boolean", + "typetext" : "" }, - "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "format_description" : "iops" - }, - "mbps_wr_max" : { - "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" + "typetext" : " (1 - N)" } - }, - "optional" : 1, - "type" : "string", - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5)." + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.PowerMgmt" + ] + ] }, - "localtime" : { - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.", - "type" : "boolean", - "optional" : 1 + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{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" : "" }, - "migrate_speed" : { - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", - "default" : 0, - "optional" : 1, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "minimum" : 0 + "typetext" : " (1 - N)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } }, - "startdate" : { - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)", + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/qemu/{vmid}/status", + "text" : "status" + }, + { + "info" : { + "PUT" : { + "description" : "Send key event to virtual machine.", + "method" : "PUT", + "name" : "vm_sendkey", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "key" : { + "description" : "The key (qemu monitor encoding).", "type" : "string", - "optional" : 1, - "default" : "now", - "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", - "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'." - }, - "force" : { - "requires" : "delete", - "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal.", - "type" : "boolean", - "optional" : 1 + "typetext" : "" }, "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "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)" } } }, - "name" : "update_vm", - "protected" : 1, - "method" : "PUT", "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 + "VM.Console" + ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.", "returns" : { "type" : "null" } } }, - "text" : "config" + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/sendkey", + "text" : "sendkey" }, { "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", + "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)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "properties" : { - "key" : { - "description" : "Configuration option name.", - "type" : "string" - }, - "value" : { - "description" : "Current value.", - "optional" : 1, + "properties" : { + "hasFeature" : { + "type" : "boolean" + }, + "nodes" : { + "items" : { "type" : "string" }, - "delete" : { - "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.", - "type" : "integer", - "optional" : 1, - "maximum" : 2, - "minimum" : 0 - }, - "pending" : { - "type" : "string", - "optional" : 1, - "description" : "Pending value." - } + "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. Only valid for full clone.", + "enum" : [ + "raw", + "qcow2", + "vmdk" + ], + "optional" : 1, + "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" : "" + }, + "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" : "" }, - "type" : "object" - } - }, - "method" : "GET", - "parameters" : { - "properties" : { - "node" : { + "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", - "description" : "The cluster node name.", - "type" : "string" + "optional" : 1, + "type" : "string", + "typetext" : "" }, "vmid" : { - "minimum" : 1, + "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", + "minimum" : 1, "type" : "integer", - "description" : "The (unique) ID of the VM." + "typetext" : " (1 - N)" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ - "perm", - "/vms/{vmid}", + "and", [ - "VM.Audit" - ] - ] - }, - "name" : "vm_pending", - "proxyto" : "node", - "description" : "Get virtual machine configuration, including pending changes." - } - }, - "text" : "pending", - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/pending" - }, - { - "text" : "unlink", - "info" : { - "PUT" : { - "returns" : { - "type" : "null" - }, - "description" : "Unlink/delete disk images.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", + "perm", + "/vms/{vmid}", + [ + "VM.Clone" + ] + ], [ - "VM.Config.Disk" + "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." }, - "method" : "PUT", "protected" : 1, - "name" : "unlink", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "force" : { - "type" : "boolean", - "optional" : 1, - "description" : "Force physical removal. Without this, we simple remove the disk from the config file and create an additional configuration entry called 'unused[n]', which contains the volume ID. Unlink of unused[n] always cause physical removal." - }, - "idlist" : { - "description" : "A list of disk IDs you want to delete.", - "type" : "string", - "format" : "pve-configid-list" - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - } - }, - "additionalProperties" : 0 + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "path" : "/nodes/{node}/qemu/{vmid}/unlink", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/clone", + "text" : "clone" }, { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/vncproxy", "info" : { "POST" : { - "protected" : 1, - "description" : "Creates a TCP VNC proxy connections.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ] - }, + "description" : "Move volume to different storage.", + "method" : "POST", + "name" : "move_vm_disk", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" + "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" : "" }, - "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", - "description" : "The cluster node name.", - "format" : "pve-node" + "typetext" : "" }, - "websocket" : { - "description" : "starts websockify instead of vncproxy", - "type" : "boolean", - "optional" : 1 - } - }, - "additionalProperties" : 0 - }, - "name" : "vncproxy", - "method" : "POST", - "returns" : { - "additionalProperties" : 0, - "properties" : { - "cert" : { + "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", + "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" }, - "upid" : { + "format" : { + "description" : "Target Format.", + "enum" : [ + "raw", + "qcow2", + "vmdk" + ], + "optional" : 1, "type" : "string" }, - "port" : { - "type" : "integer" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "ticket" : { - "type" : "string" + "storage" : { + "description" : "Target storage.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" }, - "user" : { - "type" : "string" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } - } - } - }, - "text" : "vncproxy" - }, - { - "info" : { - "GET" : { + }, "permissions" : { "check" : [ - "perm", - "/vms/{vmid}", + "and", [ - "VM.Console" + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ] + ], + [ + "perm", + "/storage/{storage}", + [ + "Datastore.AllocateSpace" + ] ] ], - "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." }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "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" : { - "port" : { - "minimum" : 5900, - "description" : "Port number returned by previous vncproxy call.", - "type" : "integer", - "maximum" : 5999 + "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" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "vncticket" : { - "maxLength" : 512, - "description" : "Ticket from previous call to vncproxy.", - "type" : "string" + "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", - "description" : "The (unique) ID of the VM." + "typetext" : " (1 - N)" + }, + "with-local-disks" : { + "description" : "Enable live storage migration for local disk", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "name" : "vncwebsocket", - "description" : "Opens a weksocket for VNC traffic.", - "method" : "GET", + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Migrate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "properties" : { - "port" : { - "type" : "string" - } - }, - "type" : "object" + "description" : "the task ID.", + "type" : "string" } } }, - "text" : "vncwebsocket", "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket" + "path" : "/nodes/{node}/qemu/{vmid}/migrate", + "text" : "migrate" }, { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy", "info" : { "POST" : { - "protected" : 1, - "name" : "spiceproxy", + "description" : "Execute Qemu monitor commands.", + "method" : "POST", + "name" : "monitor", "parameters" : { + "additionalProperties" : 0, "properties" : { - "proxy" : { - "format" : "address", + "command" : { + "description" : "The monitor command.", "type" : "string", - "optional" : 1, - "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." + "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", - "description" : "The (unique) ID of the VM." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "typetext" : " (1 - N)" } - }, - "additionalProperties" : 0 + } }, - "method" : "POST", - "description" : "Returns a SPICE configuration to connect to the VM.", - "proxyto" : "node", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Monitor" ] - ] + ], + "description" : "Sys.Modify is required for (sub)commands which are not read-only ('info *' and 'help')" }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "properties" : { - "proxy" : { - "type" : "string" - }, - "tls-port" : { - "type" : "integer" - }, - "password" : { - "type" : "string" - }, - "type" : { - "type" : "string" - }, - "host" : { - "type" : "string" - } - }, - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", - "additionalProperties" : 1 + "type" : "string" } } }, - "text" : "spiceproxy" + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/monitor", + "text" : "monitor" }, { "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ], - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - }, - "description" : "Directory index", - "proxyto" : "node", - "permissions" : { - "user" : "all" - }, + "PUT" : { + "description" : "Extend volume size.", + "method" : "PUT", + "name" : "resize_vm", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "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", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "name" : "vmcmdidx" - } - }, - "children" : [ - { - "info" : { - "GET" : { - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "typetext" : "" }, - "name" : "vm_status", - "protected" : 1, - "method" : "GET", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "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" : "" }, - "proxyto" : "node", - "description" : "Get virtual machine status.", - "returns" : { - "type" : "object" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } }, - "text" : "current", - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/current" - }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/resize", + "text" : "resize" + }, + { + "children" : [ { - "path" : "/nodes/{node}/qemu/{vmid}/status/start", - "leaf" : 1, - "text" : "start", - "info" : { - "POST" : { - "method" : "POST", - "protected" : 1, - "parameters" : { - "properties" : { - "stateuri" : { - "description" : "Some command save/restore state from this location.", - "type" : "string", - "optional" : 1, - "maxLength" : 128 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "machine" : { - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "description" : "Specific the Qemu machine type.", - "type" : "string", - "optional" : 1, - "maxLength" : 40 - }, - "skiplock" : { - "type" : "boolean", - "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." + "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)" + } + } }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM.", - "type" : "integer" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot", + "VM.Snapshot.Rollback" + ], + "any", + 1 + ] }, - "migratedfrom" : { - "description" : "The cluster node name.", - "type" : "string", - "optional" : 1, - "format" : "pve-node" + "proxyto" : "node", + "returns" : { + "type" : "object" } }, - "additionalProperties" : 0 - }, - "name" : "vm_start", - "returns" : { - "type" : "string" - }, - "proxyto" : "node", - "description" : "Start virtual machine.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - } - } - } - }, - { - "text" : "stop", - "info" : { - "POST" : { - "description" : "Stop virtual machine. The qemu process will exit immediately. Thisis akin to pulling the power plug of a running computer and may damage the VM data", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "returns" : { - "type" : "string" - }, - "protected" : 1, - "parameters" : { - "properties" : { - "timeout" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "description" : "Wait maximal timeout seconds." - }, - "migratedfrom" : { - "description" : "The cluster node name.", - "type" : "string", - "optional" : 1, - "format" : "pve-node" + "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)" + } + } }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM.", - "type" : "integer" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean" + "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)" + } + } }, - "keepActive" : { - "description" : "Do not decativate storage volumes.", - "type" : "boolean", - "optional" : 1, - "default" : 0 + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot", + "VM.Snapshot.Rollback" + ], + "any", + 1 + ] }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "name" : "vm_stop", - "method" : "POST" + "leaf" : 1, + "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback", + "text" : "rollback" } - }, - "path" : "/nodes/{node}/qemu/{vmid}/status/stop", - "leaf" : 1 - }, - { - "path" : "/nodes/{node}/qemu/{vmid}/status/reset", - "leaf" : 1, - "text" : "reset", + ], "info" : { - "POST" : { - "proxyto" : "node", - "description" : "Reset virtual machine.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "returns" : { - "type" : "string" - }, - "protected" : 1, + "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" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "skiplock" : { - "type" : "boolean", - "optional" : 1, - "description" : "Ignore locks - only root is allowed to use this option." + "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", - "description" : "The (unique) ID of the VM." + "typetext" : " (1 - N)" } } }, - "name" : "vm_reset", - "method" : "POST" - } - } - }, - { - "text" : "shutdown", - "info" : { - "POST" : { "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.PowerMgmt" + "VM.Snapshot" ] ] }, - "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.", + "protected" : 1, "proxyto" : "node", "returns" : { + "description" : "the task ID.", "type" : "string" - }, - "name" : "vm_shutdown", + } + }, + "GET" : { + "description" : "", + "method" : "GET", + "name" : "snapshot_cmd_idx", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - }, - "forceStop" : { - "default" : 0, - "optional" : 1, - "type" : "boolean", - "description" : "Make sure the VM stops." - }, - "keepActive" : { - "type" : "boolean", - "optional" : 1, - "default" : 0, - "description" : "Do not decativate storage volumes." + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "timeout" : { - "minimum" : 0, - "description" : "Wait maximal timeout seconds.", - "optional" : 1, - "type" : "integer" + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "type" : "string", + "typetext" : "" }, "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean" + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } }, - "protected" : 1, - "method" : "POST" - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown", - "leaf" : 1 - }, - { - "text" : "suspend", - "info" : { - "POST" : { - "method" : "POST", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "type" : "boolean", - "optional" : 1 - } - }, - "additionalProperties" : 0 + "permissions" : { + "user" : "all" }, - "name" : "vm_suspend", - "protected" : 1, "returns" : { - "type" : "string" - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + "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" : "List all snapshots.", + "method" : "GET", + "name" : "snapshot_list", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "description" : "Suspend virtual machine.", - "proxyto" : "node" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } } }, - "path" : "/nodes/{node}/qemu/{vmid}/status/suspend", - "leaf" : 1 - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/status/resume", - "info" : { - "POST" : { - "protected" : 1, - "name" : "vm_resume", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "type" : "boolean", - "optional" : 1 - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, - "nocheck" : { - "type" : "boolean", - "optional" : 1 - } + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "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" + }, + "vmstate" : { + "description" : "Snapshot includes RAM.", + "optional" : 1, + "type" : "boolean" } }, - "method" : "POST", - "description" : "Resume virtual machine.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "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" : "" }, - "returns" : { - "type" : "string" + "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" : "" } } }, - "text" : "resume" - } - ], - "text" : "status", - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/status" - }, - { - "text" : "sendkey", - "info" : { - "PUT" : { - "proxyto" : "node", - "description" : "Send key event to virtual machine.", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Console" + "VM.Snapshot" ] ] }, - "returns" : { - "type" : "null" - }, "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "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" : { - "key" : { - "description" : "The key (qemu monitor encoding).", + "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" }, - "skiplock" : { - "optional" : 1, - "type" : "boolean", - "description" : "Ignore locks - only root is allowed to use this option." + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } - }, - "additionalProperties" : 0 + } }, - "name" : "vm_sendkey", - "method" : "PUT" + "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}/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" : "" + }, + "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" : { + "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" : { + "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" + }, + "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" + }, + "status" : { + "description" : "Qemu process status.", + "enum" : [ + "stopped", + "running" + ], + "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" } }, - "path" : "/nodes/{node}/qemu/{vmid}/sendkey", - "leaf" : 1 + "type" : "object" }, - { - "info" : { - "GET" : { - "returns" : { - "type" : "object", - "properties" : { - "hasFeature" : { - "type" : "boolean" - }, - "nodes" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "description" : "Check if feature for virtual machine is available.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "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.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "agent" : { + "description" : "Enable/disable Qemu GuestAgent and its properties.", + "format" : { + "enabled" : { + "default" : 0, + "default_key" : 1, + "description" : "Enable/disable Qemu GuestAgent.", + "type" : "boolean" }, - "method" : "GET", - "protected" : 1, - "name" : "vm_feature", - "parameters" : { - "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "feature" : { - "enum" : [ - "snapshot", - "clone", - "copy" - ], - "description" : "Feature to check.", - "type" : "string" - }, - "snapname" : { - "maxLength" : 40, - "format" : "pve-configid", - "description" : "The name of the snapshot.", - "optional" : 1, - "type" : "string" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "fstrim_cloned_disks" : { + "default" : 0, + "description" : "Run fstrim after cloning/moving a disk.", + "optional" : 1, + "type" : "boolean" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[enabled=]<1|0> [,fstrim_cloned_disks=<1|0>]" }, - "text" : "feature", - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/feature" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/clone", - "info" : { - "POST" : { - "method" : "POST", - "protected" : 1, - "name" : "clone_vm", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "newid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "VMID for the clone.", - "type" : "integer" - }, - "storage" : { - "format" : "pve-storage-id", - "description" : "Target storage for full clone.", - "requires" : "full", - "optional" : 1, - "type" : "string" - }, - "target" : { - "format" : "pve-node", - "description" : "Target node. Only allowed if the original VM is on shared storage.", - "type" : "string", - "optional" : 1 - }, - "snapname" : { - "format" : "pve-configid", - "maxLength" : 40, - "description" : "The name of the snapshot.", - "type" : "string", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "name" : { - "optional" : 1, - "type" : "string", - "description" : "Set a name for the new VM.", - "format" : "dns-name" - }, - "pool" : { - "description" : "Add the new VM to the specified pool.", - "type" : "string", - "optional" : 1, - "format" : "pve-poolid" - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "format" : { - "enum" : [ - "raw", - "qcow2", - "vmdk" - ], - "description" : "Target format for file storage.", - "requires" : "full", - "optional" : 1, - "type" : "string" - }, - "full" : { - "optional" : 1, - "type" : "boolean", - "default" : 0, - "description" : "Create a full copy of all disk. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default." - }, - "description" : { - "description" : "Description for the new VM.", - "optional" : 1, - "type" : "string" - } - } + "arch" : { + "description" : "Virtual processor architecture. Defaults to the host.", + "enum" : [ + "x86_64", + "aarch64" + ], + "optional" : 1, + "type" : "string" + }, + "archive" : { + "description" : "The backup file.", + "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" + }, + "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" : { + "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" + }, + "bwlimit" : { + "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" : "" + }, + "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" + ], + "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" : { + "cputype" : { + "default" : "kvm64", + "default_key" : 1, + "description" : "Emulated CPU type.", + "enum" : [ + "486", + "athlon", + "Broadwell", + "Broadwell-IBRS", + "Broadwell-noTSX", + "Broadwell-noTSX-IBRS", + "Conroe", + "core2duo", + "coreduo", + "EPYC", + "EPYC-IBPB", + "Haswell", + "Haswell-IBRS", + "Haswell-noTSX", + "Haswell-noTSX-IBRS", + "host", + "IvyBridge", + "IvyBridge-IBRS", + "kvm32", + "kvm64", + "max", + "Nehalem", + "Nehalem-IBRS", + "Opteron_G1", + "Opteron_G2", + "Opteron_G3", + "Opteron_G4", + "Opteron_G5", + "Penryn", + "pentium", + "pentium2", + "pentium3", + "phenom", + "qemu32", + "qemu64", + "SandyBridge", + "SandyBridge-IBRS", + "Skylake-Client", + "Skylake-Client-IBRS", + "Skylake-Server", + "Skylake-Server-IBRS", + "Westmere", + "Westmere-IBRS" + ], + "type" : "string" }, - "returns" : { + "flags" : { + "description" : "List of additional CPU flags separated by ';'. Use '+FLAG' to enable, '-FLAG' to disable a flag. Currently supported flags: 'pcid', 'spec-ctrl', 'ibpb', 'ssbd', 'virt-ssbd', 'amd-ssbd', 'amd-no-ssb', 'pdpe1gb'.", + "format_description" : "+FLAG[;-FLAG...]", + "optional" : 1, + "pattern" : "(?^:(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb))(;(?^:[+-](pcid|spec-ctrl|ibpb|ssbd|virt-ssbd|amd-ssbd|amd-no-ssb|pdpe1gb)))*)", "type" : "string" }, - "description" : "Create a copy of virtual machine/template.", - "proxyto" : "node", - "permissions" : { - "description" : "You need 'VM.Clone' permissions on /vms/{vmid}, and 'VM.Allocate' permissions on /vms/{newid} (or on the VM pool /pool/{pool}). You also need 'Datastore.AllocateSpace' on any used storage.", - "check" : [ - "and", - [ - "perm", - "/vms/{vmid}", - [ - "VM.Clone" - ] - ], - [ - "or", - [ - "perm", - "/vms/{newid}", - [ - "VM.Allocate" - ] - ], - [ - "perm", - "/pool/{pool}", - [ - "VM.Allocate" - ], - "require_param", - "pool" - ] - ] - ] + "hidden" : { + "default" : 0, + "description" : "Do not identify as a KVM virtual machine.", + "optional" : 1, + "type" : "boolean" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[cputype=] [,flags=<+FLAG[;-FLAG...]>] [,hidden=<1|0>]" }, - "text" : "clone" - }, - { - "text" : "move_disk", - "info" : { - "POST" : { - "proxyto" : "node", - "description" : "Move volume to different storage.", - "permissions" : { - "check" : [ - "and", - [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ] - ], - [ - "perm", - "/storage/{storage}", - [ - "Datastore.AllocateSpace" - ] - ] - ], - "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage." + "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" : 262144, + "minimum" : 2, + "optional" : 1, + "type" : "integer", + "typetext" : " (2 - 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. Only used on the configuration web interface. This is saved as comment inside the configuration file.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "efidisk0" : { + "description" : "Configure a Disk for storing EFI vars", + "format" : { + "file" : { + "default_key" : 1, + "description" : "The drive's backing volume.", + "format" : "pve-volume-id-or-qm-path", + "format_description" : "volume", + "type" : "string" }, - "returns" : { - "type" : "string", - "description" : "the task ID." + "format" : { + "description" : "The drive's backing file's data format.", + "enum" : [ + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" + ], + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "delete" : { - "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.", - "type" : "boolean", - "optional" : 1, - "default" : 0 - }, - "storage" : { - "type" : "string", - "description" : "Target storage.", - "format" : "pve-storage-id" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "disk" : { - "type" : "string", - "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", - "virtio0", - "virtio1", - "virtio2", - "virtio3", - "virtio4", - "virtio5", - "virtio6", - "virtio7", - "virtio8", - "virtio9", - "virtio10", - "virtio11", - "virtio12", - "virtio13", - "virtio14", - "virtio15", - "sata0", - "sata1", - "sata2", - "sata3", - "sata4", - "sata5" - ] - }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "format" : { - "description" : "Target Format.", - "enum" : [ - "raw", - "qcow2", - "vmdk" - ], - "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" }, - "name" : "move_vm_disk", - "method" : "POST" - } + "volume" : { + "alias" : "file" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[file=] [,format=] [,size=]" }, - "path" : "/nodes/{node}/qemu/{vmid}/move_disk", - "leaf" : 1 - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/migrate", - "info" : { - "POST" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Migrate" - ] - ] + "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" : "" + }, + "hostpci[n]" : { + "description" : "Map host PCI devices into guest.", + "format" : "pve-qm-hostpci", + "optional" : 1, + "type" : "string", + "typetext" : "[host=] [,mdev=] [,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", + "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).", + "format" : { + "aio" : { + "description" : "AIO type to use.", + "enum" : [ + "native", + "threads" + ], + "optional" : 1, + "type" : "string" }, - "proxyto" : "node", - "description" : "Migrate virtual machine. Creates a new migration task.", - "returns" : { - "type" : "string", - "description" : "the task ID." + "backup" : { + "description" : "Whether the drive should be included when making backups.", + "optional" : 1, + "type" : "boolean" }, - "name" : "migrate_vm", - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "online" : { - "optional" : 1, - "type" : "boolean", - "description" : "Use online/live migration." - }, - "force" : { - "type" : "boolean", - "optional" : 1, - "description" : "Allow to migrate VMs which use local devices. Only root may use this option." - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "target" : { - "type" : "string", - "description" : "Target node.", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" }, - "protected" : 1, - "method" : "POST" - } - }, - "text" : "migrate" - }, - { - "path" : "/nodes/{node}/qemu/{vmid}/monitor", - "leaf" : 1, - "text" : "monitor", - "info" : { - "POST" : { - "method" : "POST", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "command" : { - "type" : "string", - "description" : "The monitor command." - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - } + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "name" : "monitor", - "protected" : 1, - "returns" : { - "type" : "string" + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", + "optional" : 1, + "type" : "integer" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Monitor" - ] - ] + "bps_rd_length" : { + "alias" : "bps_rd_max_length" }, - "description" : "Execute Qemu monitor commands.", - "proxyto" : "node" - } - } - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/resize", - "info" : { - "PUT" : { - "protected" : 1, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "size" : { - "description" : "The new size. With the '+' sign the value is added to the actual size of the volume and without it, the value is taken as an absolute one. Shrinking disk size is not supported.", - "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?", - "type" : "string" - }, - "disk" : { - "type" : "string", - "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" - ] - }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "optional" : 1, - "type" : "boolean" - } - }, - "additionalProperties" : 0 + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, + "optional" : 1, + "type" : "integer" }, - "name" : "resize_vm", - "method" : "PUT", - "description" : "Extend volume size.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk" - ] - ] + "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" }, - "returns" : { - "type" : "null" - } - } - }, - "text" : "resize" - }, - { - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot", - "info" : { - "POST" : { - "protected" : 1, - "name" : "snapshot", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmstate" : { - "description" : "Save the vmstate", - "optional" : 1, - "type" : "boolean" - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, - "snapname" : { - "type" : "string", - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40 - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "description" : { - "description" : "A textual description or comment.", - "optional" : 1, - "type" : "string" - } - } + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" }, - "method" : "POST", - "proxyto" : "node", - "description" : "Snapshot a VM.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", + "optional" : 1, + "type" : "boolean" }, - "returns" : { - "type" : "string", - "description" : "the task ID." - } - }, - "GET" : { - "method" : "GET", - "name" : "snapshot_list", - "parameters" : { - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], + "optional" : 1, + "type" : "string" }, - "protected" : 1, - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } + "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" ], - "type" : "array" + "optional" : 1, + "type" : "string" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", + "optional" : 1, + "type" : "integer" }, - "proxyto" : "node", - "description" : "List all snapshots." - } - }, - "children" : [ - { - "leaf" : 0, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{cmd}", - "rel" : "child" - } - ] - }, - "name" : "snapshot_cmd_idx", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "snapname" : { - "format" : "pve-configid", - "maxLength" : 40, - "description" : "The name of the snapshot.", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "description" : "" - }, - "DELETE" : { - "proxyto" : "node", - "description" : "Delete a VM snapshot.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "returns" : { - "type" : "string", - "description" : "the task ID." - }, - "protected" : 1, - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "snapname" : { - "maxLength" : 40, - "format" : "pve-configid", - "description" : "The name of the snapshot.", - "type" : "string" - }, - "force" : { - "description" : "For removal from config file, even if removing disk snapshots fails.", - "optional" : 1, - "type" : "boolean" - } - }, - "additionalProperties" : 0 - }, - "name" : "delsnapshot", - "method" : "DELETE" - } + "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" }, - "text" : "{snapname}", - "children" : [ - { - "text" : "config", - "info" : { - "PUT" : { - "protected" : 1, - "parameters" : { - "properties" : { - "description" : { - "type" : "string", - "optional" : 1, - "description" : "A textual description or comment." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "snapname" : { - "maxLength" : 40, - "format" : "pve-configid", - "type" : "string", - "description" : "The name of the snapshot." - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "name" : "update_snapshot_config", - "method" : "PUT", - "proxyto" : "node", - "description" : "Update snapshot metadata.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object" - }, - "proxyto" : "node", - "description" : "Get snapshot configuration", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "type" : "string", - "maxLength" : 40, - "format" : "pve-configid" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } - }, - "additionalProperties" : 0 - }, - "name" : "get_snapshot_config", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - } - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config", - "leaf" : 1 - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback", - "info" : { - "POST" : { - "method" : "POST", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "snapname" : { - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "description" : "The name of the snapshot." - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } - } - }, - "name" : "rollback", - "protected" : 1, - "returns" : { - "type" : "string", - "description" : "the task ID." - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "proxyto" : "node", - "description" : "Rollback VM state to specified snapshot." - } - }, - "text" : "rollback" - } - ] - } - ], - "text" : "snapshot" - }, - { - "text" : "template", - "info" : { - "POST" : { - "name" : "template", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "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" - ], - "optional" : 1, - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - } - } + "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" }, - "protected" : 1, - "method" : "POST", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] + "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" ], - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}" + "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" + } + }, + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" + }, + "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 gateway should be provided.\nFor IPv6 the special string 'auto' can be used to use stateless autoconfiguration.\n\nIf cloud-init is enabled and neither an IPv4 nor an IPv6 address is specified, it defaults to using dhcp on IPv4.\n", + "format" : "pve-qm-ipconfig", + "optional" : 1, + "type" : "string", + "typetext" : "[gw=] [,gw6=] [,ip=] [,ip6=]" + }, + "keyboard" : { + "default" : null, + "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.cfg' configuration file.It should not be necessary to set it.", + "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", + "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" + ], + "optional" : 1, + "type" : "string" + }, + "machine" : { + "description" : "Specifies the Qemu machine type.", + "maxLength" : 40, + "optional" : 1, + "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?|virt(?:-\\d+\\.\\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_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).", + "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'.", + "enum" : [ + "rtl8139", + "ne2k_pci", + "e1000", + "pcnet", + "virtio", + "ne2k_isa", + "i82551", + "i82557b", + "i82559er", + "vmxnet3", + "e1000-82540em", + "e1000-82544gc", + "e1000-82545em" + ], + "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=] [,=]" + }, + "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" }, - "proxyto" : "node", - "description" : "Create a Template.", - "returns" : { - "type" : "null" - } - } - }, - "path" : "/nodes/{node}/qemu/{vmid}/template", - "leaf" : 1 - } - ], - "info" : { - "GET" : { - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "subdir" : { - "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" } }, - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } + "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" ], - "type" : "array" + "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\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n" }, - "method" : "GET", - "permissions" : { - "user" : "all" + "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" }, - "name" : "vmdiridx", - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 + "pool" : { + "description" : "Add the VM to the specified pool.", + "format" : "pve-poolid", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "description" : "Directory index", - "proxyto" : "node" - }, - "DELETE" : { - "proxyto" : "node", - "description" : "Destroy the vm (also delete all used/owned volumes).", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Allocate" - ] - ] + "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" : "" }, - "returns" : { - "type" : "string" + "reboot" : { + "default" : 1, + "description" : "Allow reboot. If set to '0' the VM exit on reboot.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "protected" : 1, - "parameters" : { - "properties" : { - "vmid" : { + "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" + ], + "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, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "optional" : 1, + "type" : "integer" }, - "skiplock" : { + "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", - "description" : "Ignore locks - only root is allowed to use this option." + "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!" }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "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" } }, - "additionalProperties" : 0 - }, - "name" : "destroy_vm", - "method" : "DELETE" - } - } - } - ], - "text" : "qemu", - "info" : { - "POST" : { - "method" : "POST", - "parameters" : { - "properties" : { - "serial[n]" : { - "type" : "string", - "optional" : 1, - "description" : "Create a serial device inside the VM (n is 0 to 3), and pass through a host serial device (i.e. /dev/ttyS0), or create a unix socket on the host side (use 'qm terminal' to open a terminal connection).\n\nNOTE: If you pass through a host serial device, it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "pattern" : "(/dev/.+|socket)" - }, - "vcpus" : { - "minimum" : 1, - "default" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Number of hotplugged vcpus." - }, - "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" - }, - "parallel[n]" : { - "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+", - "description" : "Map host parallel devices (n is 0 to 2).\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n", - "type" : "string", - "optional" : 1 - }, - "acpi" : { - "description" : "Enable/disable ACPI.", - "default" : 1, - "optional" : 1, - "type" : "boolean" - }, - "migrate_downtime" : { - "minimum" : 0, - "default" : 0.1, - "optional" : 1, - "type" : "number", - "description" : "Set maximum tolerated downtime (in seconds) for migrations." - }, - "name" : { - "description" : "Set a name for the VM. Only used on the configuration web interface.", - "type" : "string", - "optional" : 1, - "format" : "dns-name" - }, - "pool" : { - "format" : "pve-poolid", - "description" : "Add the VM to the specified pool.", - "type" : "string", - "optional" : 1 - }, - "cores" : { - "minimum" : 1, - "default" : 1, - "optional" : 1, - "type" : "integer", - "description" : "The number of cores per socket." - }, - "sockets" : { - "description" : "The number of CPU sockets.", - "default" : 1, - "optional" : 1, - "type" : "integer", - "minimum" : 1 - }, - "storage" : { - "type" : "string", - "optional" : 1, - "description" : "Default storage.", - "format" : "pve-storage-id" - }, - "freeze" : { - "optional" : 1, - "type" : "boolean", - "description" : "Freeze CPU at startup (use 'c' monitor command to start execution)." - }, - "onboot" : { - "optional" : 1, - "type" : "boolean", - "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup." - }, - "startup" : { - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] ", - "format" : "pve-startup-order", - "type" : "string", - "optional" : 1, - "description" : "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." - }, - "agent" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable Qemu GuestAgent." - }, - "reboot" : { - "description" : "Allow reboot. If set to '0' the VM exit on reboot.", - "type" : "boolean", - "optional" : 1, - "default" : 1 - }, - "bootdisk" : { - "description" : "Enable booting from specified disk.", - "pattern" : "(ide|sata|scsi|virtio)\\d+", - "type" : "string", "optional" : 1, - "format" : "pve-qm-bootdisk" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "smbios1" : { - "description" : "Specify SMBIOS type 1 fields.", "type" : "string", - "optional" : 1, - "maxLength" : 256, - "format" : "pve-qm-smbios1" - }, - "numa" : { - "description" : "Enable/disable NUMA.", - "default" : 0, - "optional" : 1, - "type" : "boolean" - }, - "cpuunits" : { - "minimum" : 0, - "default" : 1000, - "maximum" : 500000, - "type" : "integer", - "optional" : 1, - "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" }, - "ide[n]" : { + "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", + "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", - "type" : "integer", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second." + "type" : "integer" }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "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", - "format_description" : "count" + "type" : "integer" }, - "mbps" : { - "description" : "Maximum r/w speed speed in megabytes per second.", - "type" : "number", + "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, - "format_description" : "mbps" + "type" : "integer" }, - "trans" : { + "cache" : { + "description" : "The drive's cache mode", "enum" : [ "none", - "lba", - "auto" + "writethrough", + "writeback", + "unsafe", + "directsync" ], - "description" : "Force disk geometry bios translation mode.", - "type" : "string", "optional" : 1, - "format_description" : "none|lba|auto" + "type" : "string" }, - "volume" : { - "alias" : "file" + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", + "optional" : 1, + "type" : "integer" }, - "mbps_rd" : { - "description" : "Maximum read speed speed in megabytes per second.", - "type" : "number", + "detect_zeroes" : { + "description" : "Controls whether to detect and try to optimize writes of zeroes.", "optional" : 1, - "format_description" : "mbps" + "type" : "boolean" }, - "mbps_wr" : { - "format_description" : "mbps", - "type" : "number", + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], "optional" : 1, - "description" : "Maximum write speed speed in megabytes per second." + "type" : "string" }, "file" : { + "default_key" : 1, "description" : "The drive's backing volume.", - "type" : "string", "format" : "pve-volume-id-or-qm-path", "format_description" : "volume", - "default_key" : 1 - }, - "iops" : { - "format_description" : "iops", - "description" : "Maximum r/w I/O speed in operations per second.", - "type" : "integer", - "optional" : 1 - }, - "model" : { - "maxLength" : 120, - "format" : "urlencoded", - "format_description" : "model", - "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.", - "optional" : 1, "type" : "string" }, - "aio" : { - "format_description" : "native|threads", + "format" : { + "description" : "The drive's backing file's data format.", "enum" : [ - "native", - "threads" + "raw", + "cow", + "qcow", + "qed", + "qcow2", + "vmdk", + "cloop" ], - "description" : "AIO type to use.", "optional" : 1, "type" : "string" }, - "werror" : { - "format_description" : "enospc|ignore|report|stop", - "type" : "string", + "heads" : { + "description" : "Force the drive's physical geometry to have a specific head count.", "optional" : 1, - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action." + "type" : "integer" }, - "iops_wr_max" : { + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", "format_description" : "iops", - "type" : "integer", "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second." + "type" : "integer" }, - "backup" : { - "type" : "boolean", + "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "description" : "Whether the drive should be included when making backups.", - "format_description" : "on|off" + "type" : "integer" }, - "bps_wr" : { - "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", - "type" : "integer", - "optional" : 1 + "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", - "description" : "Maximum read I/O speed in operations per second.", - "type" : "integer", - "optional" : 1 + "optional" : 1, + "type" : "integer" }, - "size" : { - "format" : "disk-size", - "description" : "Disk size. This is purely informational and has no effect.", + "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" + "type" : "integer" }, - "mbps_max" : { - "format_description" : "mbps", - "type" : "number", + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Maximum unthrottled r/w pool speed in megabytes per second." + "type" : "integer" }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "integer", - "format_description" : "count" + "type" : "integer" }, - "serial" : { + "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" : "string", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "format" : "urlencoded", - "maxLength" : 60, - "format_description" : "serial" + "type" : "integer" }, - "mbps_wr_max" : { - "format_description" : "mbps", - "type" : "number", + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "type" : "integer" }, - "format" : { + "iothread" : { + "description" : "Whether to use iothreads for this drive", "optional" : 1, - "type" : "string", - "description" : "The drive's backing file's data format.", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "format_description" : "drive format" + "type" : "boolean" }, - "iops_rd_max" : { + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "format_description" : "iops" + "type" : "number" }, - "bps" : { - "description" : "Maximum r/w speed speed in bytes per second.", - "type" : "integer", + "mbps_max" : { + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "format_description" : "bps" + "type" : "number" }, - "discard" : { - "format_description" : "ignore|on", - "type" : "string", + "mbps_rd" : { + "description" : "Maximum read speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ] + "type" : "number" }, "mbps_rd_max" : { - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number", + "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, - "format_description" : "mbps" + "type" : "number" }, "media" : { + "default" : "disk", + "description" : "The drive's media type.", "enum" : [ "cdrom", "disk" ], - "description" : "The drive's media type.", "optional" : 1, - "type" : "string", - "default" : "disk", - "format_description" : "cdrom|disk" + "type" : "string" }, - "secs" : { + "queues" : { + "description" : "Number of queues.", + "minimum" : 2, "optional" : 1, - "type" : "integer", + "type" : "integer" + }, + "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" + }, + "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.", - "format_description" : "count" + "optional" : 1, + "type" : "integer" }, - "iops_wr" : { - "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, - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" + "type" : "string" }, - "detect_zeroes" : { + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes." + "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" }, - "rerror" : { - "format_description" : "ignore|report|stop", - "type" : "string", - "optional" : 1, - "description" : "Read error action.", + "werror" : { + "description" : "Write error action.", "enum" : [ + "enospc", "ignore", "report", "stop" - ] - }, - "cache" : { - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "optional" : 1, - "type" : "string", - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ] - }, - "snapshot" : { - "format_description" : "on|off", - "optional" : 1, - "type" : "boolean", - "description" : "Whether the drive should be included when making snapshots." - }, - "iops_max" : { + ], "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "format_description" : "iops" + "type" : "string" } }, - "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).", "optional" : 1, - "type" : "string" + "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=] [,shared=<1|0>] [,size=] [,snapshot=<1|0>] [,ssd=<1|0>] [,trans=] [,werror=]" }, - "archive" : { - "maxLength" : 255, - "description" : "The backup file.", + "scsihw" : { + "default" : "lsi", + "description" : "SCSI controller model", + "enum" : [ + "lsi", + "lsi53c810", + "virtio-scsi-pci", + "virtio-scsi-single", + "megasas", + "pvscsi" + ], "optional" : 1, "type" : "string" }, - "watchdog" : { - "description" : "Create a virtual hardware watchdog device. Once enabled (by a guest action), the watchdog must be periodically polled by an agent inside the guest or else the watchdog will reset the guest (or execute the respective action specified)", - "type" : "string", + "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, - "format" : "pve-qm-watchdog" + "type" : "string", + "typetext" : "" }, - "hotplug" : { + "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. Auto-ballooning is done by pvestatd.", + "maximum" : 50000, + "minimum" : 0, "optional" : 1, - "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" + "type" : "integer", + "typetext" : " (0 - 50000)" }, - "keyboard" : { - "description" : "Keybord layout for vnc server. Default is read from the datacenter configuration file.", - "enum" : [ - "da", - "sv", - "en-gb", - "lt", - "is", - "mk", - "pl", - "hu", - "fr-be", - "pt-br", - "de-ch", - "nl", - "no", - "tr", - "sl", - "de", - "fr-ca", - "ja", - "es", - "it", - "pt", - "fr", - "en-us", - "fi", - "fr-ch" - ], - "default" : "en-us", + "smbios1" : { + "description" : "Specify SMBIOS type 1 fields.", + "format" : "pve-qm-smbios1", + "maxLength" : 256, + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "[family=] [,manufacturer=] [,product=] [,serial=] [,sku=] [,uuid=] [,version=]" }, - "hostpci[n]" : { - "format" : "pve-qm-hostpci", + "smp" : { + "default" : 1, + "description" : "The number of CPUs. Please use option -sockets instead.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "description" : "Map host pci devices. HOSTPCIDEVICE syntax is:\n\n'bus:dev.func' (hexadecimal numbers)\n\nYou can us the 'lspci' command to list existing pci devices.\n\nThe 'rombar' option determines whether or not the device's ROM will be visible in the guest's memory map (default is 'on').\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nExperimental: user reported problems with this option.\n" + "type" : "integer", + "typetext" : " (1 - N)" }, - "lock" : { + "sockets" : { + "default" : 1, + "description" : "The number of CPU sockets.", + "minimum" : 1, "optional" : 1, - "type" : "string", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "description" : "Lock/unlock the VM." + "type" : "integer", + "typetext" : " (1 - N)" }, - "autostart" : { - "description" : "Automatic restart after crash (currently ignored).", - "default" : 0, + "sshkeys" : { + "description" : "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).", + "format" : "urlencoded", "optional" : 1, - "type" : "boolean" + "type" : "string", + "typetext" : "" }, - "tdf" : { - "description" : "Enable/disable time drift fix.", + "start" : { "default" : 0, + "description" : "Start VM after it was created successfully.", + "optional" : 1, "type" : "boolean", - "optional" : 1 + "typetext" : "" }, - "numa[n]" : { - "format" : { - "hostnodes" : { - "description" : "host numa nodes to use", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)", - "optional" : 1, - "type" : "string", - "format_description" : "id[-id];..." - }, - "cpus" : { - "format_description" : "id[-id];...", - "type" : "string", - "description" : "CPUs accessing this numa node.", - "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)" - }, - "policy" : { - "description" : "numa allocation policy.", - "enum" : [ - "preferred", - "bind", - "interleave" - ], - "type" : "string", - "optional" : 1, - "format_description" : "preferred|bind|interleave" - }, - "memory" : { - "format_description" : "mb", - "type" : "number", - "optional" : 1, - "description" : "Amount of memory this numa node provides." - } - }, + "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", - "description" : "numa topology" + "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" }, - "boot" : { - "default" : "cdn", + "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", - "pattern" : "[acdn]{1,4}", - "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)." - }, - "unused[n]" : { - "format" : "pve-volume-id", - "description" : "Reference to unused volumes.", - "type" : "string", - "optional" : 1 + "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " }, - "ostype" : { - "type" : "string", + "storage" : { + "description" : "Default storage.", + "format" : "pve-storage-id", "optional" : 1, - "description" : "Used to enable special optimization/features for specific\noperating systems:\n\nother => unspecified OS\nwxp => Microsoft Windows XP\nw2k => Microsoft Windows 2000\nw2k3 => Microsoft Windows 2003\nw2k8 => Microsoft Windows 2008\nwvista => Microsoft Windows Vista\nwin7 => Microsoft Windows 7\nwin8 => Microsoft Windows 8/2012\nl24 => Linux 2.4 Kernel\nl26 => Linux 2.6/3.X Kernel\nsolaris => solaris/opensolaris/openindiania kernel\n\nother|l24|l26|solaris ... no special behaviour\nwxp|w2k|w2k3|w2k8|wvista|win7|win8 ... use --localtime switch\n", - "enum" : [ - "other", - "wxp", - "w2k", - "w2k3", - "w2k8", - "wvista", - "win7", - "win8", - "l24", - "l26", - "solaris" - ] + "type" : "string", + "typetext" : "" }, - "unique" : { - "requires" : "archive", - "description" : "Assign a unique random ethernet address.", + "tablet" : { + "default" : 1, + "description" : "Enable/disable the USB tablet device.", "optional" : 1, - "type" : "boolean" + "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)." }, - "migrate_speed" : { - "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.", + "tdf" : { "default" : 0, + "description" : "Enable/disable time drift fix.", "optional" : 1, - "type" : "integer", - "minimum" : 0 + "type" : "boolean", + "typetext" : "" }, - "startdate" : { - "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)", - "description" : "Set the initial date of the real time clock. Valid format for date are: 'now' or '2006-06-17T16:01:21' or '2006-06-17'.", - "default" : "now", + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", "optional" : 1, - "type" : "string", - "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)" + "type" : "boolean", + "typetext" : "" }, - "localtime" : { + "unique" : { + "description" : "Assign a unique random ethernet address.", "optional" : 1, + "requires" : "archive", "type" : "boolean", - "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS." + "typetext" : "" }, - "kvm" : { - "description" : "Enable/disable KVM hardware virtualization.", - "default" : 1, - "type" : "boolean", - "optional" : 1 + "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" : "" }, - "sata[n]" : { + "usb[n]" : { + "description" : "Configure an USB device (n is 0 to 4).", "format" : { - "mbps_rd" : { - "format_description" : "mbps", - "description" : "Maximum read speed speed in megabytes per second.", - "optional" : 1, - "type" : "number" + "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" }, - "mbps_wr" : { - "type" : "number", + "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, - "description" : "Maximum write speed speed in megabytes per second.", - "format_description" : "mbps" - }, - "file" : { - "description" : "The drive's backing volume.", - "type" : "string", - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "default_key" : 1 - }, - "iops" : { - "type" : "integer", + "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, - "description" : "Maximum r/w I/O speed in operations per second.", - "format_description" : "iops" + "type" : "integer" }, - "werror" : { - "description" : "Write error action.", + "type" : { + "default" : "std", + "default_key" : 1, + "description" : "Select the VGA type.", "enum" : [ - "enospc", - "ignore", - "report", - "stop" + "cirrus", + "qxl", + "qxl2", + "qxl3", + "qxl4", + "serial0", + "serial1", + "serial2", + "serial3", + "std", + "virtio", + "vmware" ], - "type" : "string", "optional" : 1, - "format_description" : "enospc|ignore|report|stop" - }, + "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).", + "format" : { "aio" : { + "description" : "AIO type to use.", "enum" : [ "native", "threads" ], - "description" : "AIO type to use.", - "type" : "string", - "optional" : 1, - "format_description" : "native|threads" - }, - "iops_wr_max" : { - "format_description" : "iops", "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled write I/O pool speed in operations per second." + "type" : "string" }, "backup" : { - "type" : "boolean", - "optional" : 1, "description" : "Whether the drive should be included when making backups.", - "format_description" : "on|off" + "optional" : 1, + "type" : "boolean" }, - "bps_rd" : { - "type" : "integer", + "bps" : { + "description" : "Maximum r/w speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "description" : "Maximum read speed speed in bytes per second.", - "format_description" : "bps" + "type" : "integer" }, - "cyls" : { + "bps_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "integer", - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "format_description" : "count" + "type" : "integer" }, - "mbps" : { + "bps_rd" : { + "description" : "Maximum read speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "type" : "number", - "description" : "Maximum r/w speed speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "volume" : { - "alias" : "file" + "bps_rd_length" : { + "alias" : "bps_rd_max_length" }, - "trans" : { - "format_description" : "none|lba|auto", - "type" : "string", + "bps_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "enum" : [ - "none", - "lba", - "auto" - ], - "description" : "Force disk geometry bios translation mode." + "type" : "integer" }, - "media" : { - "format_description" : "cdrom|disk", - "type" : "string", + "bps_wr" : { + "description" : "Maximum write speed in bytes per second.", + "format_description" : "bps", "optional" : 1, - "default" : "disk", - "enum" : [ - "cdrom", - "disk" - ], - "description" : "The drive's media type." + "type" : "integer" }, - "rerror" : { - "description" : "Read error action.", - "enum" : [ - "ignore", - "report", - "stop" - ], + "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" : "string", - "format_description" : "ignore|report|stop" + "type" : "integer" }, "cache" : { - "type" : "string", - "optional" : 1, "description" : "The drive's cache mode", "enum" : [ "none", @@ -10755,17 +18516,11 @@ var pveapi = [ "unsafe", "directsync" ], - "format_description" : "none|writethrough|writeback|unsafe|directsync" - }, - "secs" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", - "type" : "integer", - "optional" : 1 + "optional" : 1, + "type" : "string" }, - "iops_wr" : { - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", + "cyls" : { + "description" : "Force the drive's physical geometry to have a specific cylinder count.", "optional" : 1, "type" : "integer" }, @@ -10774,61 +18529,24 @@ var pveapi = [ "optional" : 1, "type" : "boolean" }, - "iops_max" : { - "format_description" : "iops", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.", - "type" : "integer", - "optional" : 1 - }, - "snapshot" : { - "format_description" : "on|off", - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean" - }, - "bps_wr" : { - "format_description" : "bps", - "type" : "integer", - "optional" : 1, - "description" : "Maximum write speed speed in bytes per second." - }, - "mbps_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "type" : "number", - "optional" : 1 - }, - "iops_rd" : { - "format_description" : "iops", - "optional" : 1, - "type" : "integer", - "description" : "Maximum read I/O speed in operations per second." - }, - "size" : { - "format" : "disk-size", - "type" : "string", - "optional" : 1, - "description" : "Disk size. This is purely informational and has no effect." - }, - "iops_rd_max" : { - "format_description" : "iops", - "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled read I/O pool speed in operations per second." - }, - "mbps_wr_max" : { - "format_description" : "mbps", + "discard" : { + "description" : "Controls whether to pass discard/trim requests to the underlying storage.", + "enum" : [ + "ignore", + "on" + ], "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled write pool speed in megabytes per second." + "type" : "string" }, - "bps" : { - "format_description" : "bps", - "description" : "Maximum r/w speed speed in bytes per second.", - "optional" : 1, - "type" : "integer" + "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", @@ -10838,1297 +18556,3158 @@ var pveapi = [ "vmdk", "cloop" ], - "description" : "The drive's backing file's data format.", - "type" : "string", "optional" : 1, - "format_description" : "drive format" + "type" : "string" }, "heads" : { - "optional" : 1, - "type" : "integer", "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count" - }, - "serial" : { - "format_description" : "serial", - "format" : "urlencoded", - "maxLength" : 60, - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "type" : "string", - "optional" : 1 - }, - "discard" : { - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "enum" : [ - "ignore", - "on" - ], - "type" : "string", "optional" : 1, - "format_description" : "ignore|on" + "type" : "integer" }, - "mbps_rd_max" : { - "format_description" : "mbps", - "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second." - } - }, - "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).", - "type" : "string", - "optional" : 1 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "force" : { - "requires" : "archive", - "description" : "Allow to overwrite existing VM.", - "type" : "boolean", - "optional" : 1 - }, - "cpulimit" : { - "minimum" : 0, - "default" : 0, - "maximum" : 128, - "type" : "number", - "optional" : 1, - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit." - }, - "tablet" : { - "description" : "Enable/disable the USB tablet device. This device is usually needed to allow absolute mouse positioning with VNC. Else the mouse runs out of sync with normal VNC clients. If you're running lots of console-only guests on one host, you may consider disabling this to save some context switches. This is turned off by default if you use spice (-vga=qxl).", - "optional" : 1, - "type" : "boolean", - "default" : 1 - }, - "vga" : { - "type" : "string", - "optional" : 1, - "description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal.", - "enum" : [ - "std", - "cirrus", - "vmware", - "qxl", - "serial0", - "serial1", - "serial2", - "serial3", - "qxl2", - "qxl3", - "qxl4" - ] - }, - "virtio[n]" : { - "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).", - "optional" : 1, - "type" : "string", - "format" : { - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "type" : "boolean", + "iops" : { + "description" : "Maximum r/w I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "format_description" : "on|off" + "type" : "integer" }, "iops_max" : { + "description" : "Maximum unthrottled r/w I/O pool in operations per second.", "format_description" : "iops", "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." - }, - "iothread" : { - "format_description" : "off|on", - "type" : "boolean", - "optional" : 1, - "description" : "Whether to use iothreads for this drive" - }, - "media" : { - "format_description" : "cdrom|disk", - "default" : "disk", - "optional" : 1, - "type" : "string", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ] - }, - "secs" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", - "optional" : 1, "type" : "integer" }, - "iops_wr" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum write I/O speed in operations per second.", - "format_description" : "iops" - }, - "detect_zeroes" : { - "optional" : 1, - "type" : "boolean", - "description" : "Controls whether to detect and try to optimize writes of zeroes." - }, - "rerror" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "ignore", - "report", - "stop" - ], - "description" : "Read error action.", - "format_description" : "ignore|report|stop" - }, - "cache" : { - "format_description" : "none|writethrough|writeback|unsafe|directsync", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "description" : "The drive's cache mode", - "optional" : 1, - "type" : "string" - }, - "heads" : { - "type" : "integer", + "iops_max_length" : { + "description" : "Maximum length of I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific head count.", - "format_description" : "count" + "type" : "integer" }, - "serial" : { - "format_description" : "serial", - "maxLength" : 60, - "format" : "urlencoded", - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "type" : "string", - "optional" : 1 + "iops_rd" : { + "description" : "Maximum read I/O in operations per second.", + "format_description" : "iops", + "optional" : 1, + "type" : "integer" }, - "mbps_wr_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "iops_rd_length" : { + "alias" : "iops_rd_max_length" }, "iops_rd_max" : { - "description" : "Maximum unthrottled read I/O pool speed in operations per second.", - "type" : "integer", + "description" : "Maximum unthrottled read I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "format_description" : "iops" + "type" : "integer" }, - "format" : { - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "description" : "The drive's backing file's data format.", + "iops_rd_max_length" : { + "description" : "Maximum length of read I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "type" : "string", - "format_description" : "drive format" + "type" : "integer" }, - "bps" : { - "format_description" : "bps", + "iops_wr" : { + "description" : "Maximum write I/O in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "integer", - "description" : "Maximum r/w speed speed in bytes per second." + "type" : "integer" }, - "discard" : { - "format_description" : "ignore|on", - "enum" : [ - "ignore", - "on" - ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "type" : "string", - "optional" : 1 + "iops_wr_length" : { + "alias" : "iops_wr_max_length" }, - "mbps_rd_max" : { + "iops_wr_max" : { + "description" : "Maximum unthrottled write I/O pool in operations per second.", + "format_description" : "iops", "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "format_description" : "mbps" + "type" : "integer" }, - "bps_wr" : { - "description" : "Maximum write speed speed in bytes per second.", - "type" : "integer", + "iops_wr_max_length" : { + "description" : "Maximum length of write I/O bursts in seconds.", + "format_description" : "seconds", + "minimum" : 1, "optional" : 1, - "format_description" : "bps" + "type" : "integer" }, - "iops_rd" : { - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second.", - "type" : "integer", - "optional" : 1 + "iothread" : { + "description" : "Whether to use iothreads for this drive", + "optional" : 1, + "type" : "boolean" }, - "size" : { - "description" : "Disk size. This is purely informational and has no effect.", + "mbps" : { + "description" : "Maximum r/w speed in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "string", - "format" : "disk-size" + "type" : "number" }, "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", + "description" : "Maximum unthrottled r/w pool in megabytes per second.", + "format_description" : "mbps", "optional" : 1, - "type" : "number", - "format_description" : "mbps" + "type" : "number" }, - "aio" : { - "type" : "string", + "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" : [ - "native", - "threads" + "cdrom", + "disk" ], - "description" : "AIO type to use.", - "format_description" : "native|threads" + "optional" : 1, + "type" : "string" }, - "werror" : { + "replicate" : { + "default" : 1, + "description" : "Whether the drive should considered for replication jobs.", "optional" : 1, - "type" : "string", - "description" : "Write error action.", + "type" : "boolean" + }, + "rerror" : { + "description" : "Read error action.", "enum" : [ - "enospc", "ignore", "report", "stop" ], - "format_description" : "enospc|ignore|report|stop" + "optional" : 1, + "type" : "string" }, - "iops_wr_max" : { - "format_description" : "iops", - "description" : "Maximum unthrottled write I/O pool speed in operations per second.", + "secs" : { + "description" : "Force the drive's physical geometry to have a specific sector count.", "optional" : 1, "type" : "integer" }, - "backup" : { - "format_description" : "on|off", - "type" : "boolean", + "serial" : { + "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", + "format" : "urlencoded", + "format_description" : "serial", + "maxLength" : 60, "optional" : 1, - "description" : "Whether the drive should be included when making backups." - }, - "mbps_rd" : { - "format_description" : "mbps", - "description" : "Maximum read speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 + "type" : "string" }, - "mbps_wr" : { - "format_description" : "mbps", - "type" : "number", + "shared" : { + "default" : 0, + "description" : "Mark this locally-managed volume as available on all nodes", "optional" : 1, - "description" : "Maximum write speed speed in megabytes per second." + "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!" }, - "file" : { - "type" : "string", - "description" : "The drive's backing volume.", - "default_key" : 1, - "format_description" : "volume", - "format" : "pve-volume-id-or-qm-path" + "size" : { + "description" : "Disk size. This is purely informational and has no effect.", + "format" : "disk-size", + "format_description" : "DiskSize", + "optional" : 1, + "type" : "string" }, - "iops" : { - "format_description" : "iops", - "type" : "integer", + "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, - "description" : "Maximum r/w I/O speed in operations per second." + "type" : "boolean" }, "trans" : { - "type" : "string", - "optional" : 1, "description" : "Force disk geometry bios translation mode.", "enum" : [ "none", "lba", "auto" ], - "format_description" : "none|lba|auto" + "optional" : 1, + "type" : "string" }, "volume" : { "alias" : "file" }, - "bps_rd" : { - "description" : "Maximum read speed speed in bytes per second.", - "type" : "integer", + "werror" : { + "description" : "Write error action.", + "enum" : [ + "enospc", + "ignore", + "report", + "stop" + ], "optional" : 1, - "format_description" : "bps" + "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=] [,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 throug 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" : { + "description" : "Get container configuration.", + "method" : "GET", + "name" : "vm_config", + "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)" + } + } }, - "cyls" : { - "type" : "integer", - "optional" : 1, - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "format_description" : "count" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "mbps" : { - "description" : "Maximum r/w speed speed in megabytes per second.", - "optional" : 1, - "type" : "number", - "format_description" : "mbps" + "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" : 128, + "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" : 128, + "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" + }, + "description" : { + "description" : "Container description. Only used on the configuration web interface.", + "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" : { + "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" + }, + "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" + }, + "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", + "disk", + "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.", + "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" + }, + "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" + }, + "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" : "(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", + "ubuntu", + "centos", + "fedora", + "opensuse", + "archlinux", + "alpine", + "gentoo", + "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" + }, + "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" + }, + "template" : { + "default" : 0, + "description" : "Enable/disable Template.", + "optional" : 1, + "type" : "boolean" + }, + "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" : "pve-volume-id", + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" } - } - }, - "balloon" : { - "optional" : 1, - "type" : "integer", - "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.", - "minimum" : 0 - }, - "scsi[n]" : { - "format" : { - "volume" : { - "alias" : "file" - }, - "trans" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "none", - "lba", - "auto" - ], - "description" : "Force disk geometry bios translation mode.", - "format_description" : "none|lba|auto" - }, - "queues" : { - "minimum" : 2, - "format_description" : "nbqueues", - "optional" : 1, - "type" : "integer", - "description" : "Number of queues." - }, - "bps_rd" : { - "format_description" : "bps", - "type" : "integer", - "optional" : 1, - "description" : "Maximum read speed speed in bytes per second." - }, - "mbps" : { - "format_description" : "mbps", - "description" : "Maximum r/w speed speed in megabytes per second.", - "optional" : 1, - "type" : "number" - }, - "cyls" : { - "description" : "Force the drive's physical geometry to have a specific cylinder count.", - "optional" : 1, - "type" : "integer", - "format_description" : "count" - }, - "werror" : { - "enum" : [ - "enospc", - "ignore", - "report", - "stop" - ], - "description" : "Write error action.", - "optional" : 1, - "type" : "string", - "format_description" : "enospc|ignore|report|stop" - }, - "aio" : { - "format_description" : "native|threads", - "optional" : 1, - "type" : "string", - "enum" : [ - "native", - "threads" - ], - "description" : "AIO type to use." - }, - "backup" : { - "format_description" : "on|off", - "optional" : 1, - "type" : "boolean", - "description" : "Whether the drive should be included when making backups." - }, - "iops_wr_max" : { - "format_description" : "iops", - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled write I/O pool speed in operations per second." - }, - "mbps_wr" : { - "format_description" : "mbps", - "description" : "Maximum write speed speed in megabytes per second.", - "type" : "number", - "optional" : 1 - }, - "mbps_rd" : { - "format_description" : "mbps", - "type" : "number", - "optional" : 1, - "description" : "Maximum read speed speed in megabytes per second." - }, - "iops" : { - "format_description" : "iops", - "description" : "Maximum r/w I/O speed in operations per second.", - "optional" : 1, - "type" : "integer" - }, - "file" : { - "format" : "pve-volume-id-or-qm-path", - "format_description" : "volume", - "default_key" : 1, - "description" : "The drive's backing volume.", - "type" : "string" - }, - "bps" : { - "type" : "integer", - "optional" : 1, - "description" : "Maximum r/w speed speed in bytes per second.", - "format_description" : "bps" - }, - "mbps_wr_max" : { - "optional" : 1, - "type" : "number", - "description" : "Maximum unthrottled write pool speed in megabytes per second.", - "format_description" : "mbps" - }, - "format" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "raw", - "cow", - "qcow", - "qed", - "qcow2", - "vmdk", - "cloop" - ], - "description" : "The drive's backing file's data format.", - "format_description" : "drive format" - }, - "iops_rd_max" : { - "format_description" : "iops", - "type" : "integer", - "optional" : 1, - "description" : "Maximum unthrottled read I/O pool speed in operations per second." - }, - "serial" : { - "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.", - "optional" : 1, - "type" : "string", - "format_description" : "serial", - "format" : "urlencoded", - "maxLength" : 60 - }, - "heads" : { - "description" : "Force the drive's physical geometry to have a specific head count.", - "type" : "integer", - "optional" : 1, - "format_description" : "count" - }, - "mbps_rd_max" : { - "format_description" : "mbps", - "description" : "Maximum unthrottled read pool speed in megabytes per second.", - "type" : "number", - "optional" : 1 + }, + "PUT" : { + "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" : 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)" + }, + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "description" : { + "description" : "Container description. Only used on the configuration web interface.", + "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" : { + "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" + }, + "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" : "[fuse=<1|0>] [,keyctl=<1|0>] [,mount=] [,nesting=<1|0>]" + }, + "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", + "disk", + "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.", + "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" : "(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", + "ubuntu", + "centos", + "fedora", + "opensuse", + "archlinux", + "alpine", + "gentoo", + "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" : "" + }, + "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" + } + }, + "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" : "" + }, + "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)" + }, + "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" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } + } }, - "discard" : { - "enum" : [ - "ignore", - "on" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk", + "VM.Config.CPU", + "VM.Config.Memory", + "VM.Config.Network", + "VM.Config.Options" + ], + "any", + 1 ], - "description" : "Controls whether to pass discard/trim requests to the underlying storage.", - "type" : "string", - "optional" : 1, - "format_description" : "ignore|on" - }, - "bps_wr" : { - "format_description" : "bps", - "description" : "Maximum write speed speed in bytes per second.", - "optional" : 1, - "type" : "integer" - }, - "mbps_max" : { - "description" : "Maximum unthrottled r/w pool speed in megabytes per second.", - "type" : "number", - "optional" : 1, - "format_description" : "mbps" + "description" : "non-volume mount points in rootfs and mp[n] are restricted to root@pam" }, - "size" : { - "format" : "disk-size", - "description" : "Disk size. This is purely informational and has no effect.", - "type" : "string", - "optional" : 1 - }, - "iops_rd" : { - "format_description" : "iops", - "description" : "Maximum read I/O speed in operations per second.", - "optional" : 1, - "type" : "integer" - }, - "iops_max" : { - "format_description" : "iops", - "optional" : 1, - "type" : "integer", - "description" : "Maximum unthrottled r/w I/O pool speed in operations per second." - }, - "snapshot" : { - "description" : "Whether the drive should be included when making snapshots.", - "optional" : 1, - "type" : "boolean", - "format_description" : "on|off" - }, - "media" : { - "format_description" : "cdrom|disk", - "description" : "The drive's media type.", - "enum" : [ - "cdrom", - "disk" - ], - "default" : "disk", - "type" : "string", - "optional" : 1 + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "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" : { + "properties" : { + "cpus" : { + "description" : "Maximum usable CPUs.", + "optional" : 1, + "type" : "number" + }, + "ha" : { + "description" : "HA manager service status.", + "type" : "object" + }, + "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" + }, + "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" + } + } }, - "iothread" : { - "format_description" : "off|on", - "description" : "Whether to use iothreads for this drive", - "type" : "boolean", - "optional" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/current", + "text" : "current" + }, + { + "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" + } + } }, - "cache" : { - "description" : "The drive's cache mode", - "enum" : [ - "none", - "writethrough", - "writeback", - "unsafe", - "directsync" - ], - "optional" : 1, - "type" : "string", - "format_description" : "none|writethrough|writeback|unsafe|directsync" + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/start", + "text" : "start" + }, + { + "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" + } + } }, - "detect_zeroes" : { - "description" : "Controls whether to detect and try to optimize writes of zeroes.", - "type" : "boolean", - "optional" : 1 + "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" + } + } }, - "iops_wr" : { - "format_description" : "iops", - "description" : "Maximum write I/O speed in operations per second.", - "type" : "integer", - "optional" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", + "text" : "shutdown" + }, + { + "info" : { + "POST" : { + "description" : "Suspend the container.", + "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" + } + } }, - "secs" : { - "format_description" : "count", - "description" : "Force the drive's physical geometry to have a specific sector count.", - "type" : "integer", - "optional" : 1 - } + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", + "text" : "suspend" }, - "type" : "string", - "optional" : 1, - "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13)." - }, - "net[n]" : { - "optional" : 1, - "type" : "string", - "description" : "Specify network devices.\n\nMODEL is one of: e1000 e1000-82540em e1000-82544gc e1000-82545em i82551 i82557b i82559er ne2k_isa ne2k_pci pcnet rtl8139 virtio vmxnet3\n\nXX:XX:XX:XX:XX:XX should be an unique MAC address. This is\nautomatically generated if not specified.\n\nThe bridge parameter can be used to automatically add the interface to a bridge device. The Proxmox VE standard bridge is called 'vmbr0'.\n\nOption 'rate' is used to limit traffic bandwidth from and to this interface. It is specified as floating point number, unit is 'Megabytes per second'.\n\nIf you specify no bridge, we create a kvm 'user' (NATed) network device, which provides DHCP and DNS services. The following addresses are used:\n\n10.0.2.2 Gateway\n10.0.2.3 DNS Server\n10.0.2.4 SMB Server\n\nThe DHCP server assign addresses to the guest starting from 10.0.2.15.\n\n", - "format" : "pve-qm-net" - }, - "machine" : { - "maxLength" : 40, - "description" : "Specific the Qemu machine type.", - "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)", - "optional" : 1, - "type" : "string" - }, - "smp" : { - "description" : "The number of CPUs. Please use option -sockets instead.", - "optional" : 1, - "type" : "integer", - "default" : 1, - "minimum" : 1 - }, - "bios" : { - "description" : "Select BIOS implementation.", - "enum" : [ - "seabios", - "ovmf" - ], - "default" : "seabios", - "optional" : 1, - "type" : "string" - }, - "shares" : { - "description" : "Amount of memory shares for auto-ballooning. The larger the number is, the more memory this VM gets. Number is relative to weights of all other running VMs. Using zero disables auto-ballooning", - "type" : "integer", - "optional" : 1, - "default" : 1000, - "maximum" : 50000, - "minimum" : 0 - }, - "template" : { - "description" : "Enable/disable Template.", - "default" : 0, - "optional" : 1, - "type" : "boolean" - }, - "scsihw" : { - "enum" : [ - "lsi", - "lsi53c810", - "virtio-scsi-pci", - "virtio-scsi-single", - "megasas", - "pvscsi" - ], - "description" : "scsi controller model", - "type" : "string", - "optional" : 1, - "default" : "lsi" + { + "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" + } + } }, - "usb[n]" : { - "type" : "string", - "optional" : 1, - "description" : "Configure an USB device (n is 0 to 4). This can be used to\npass-through usb devices to the guest. HOSTUSBDEVICE syntax is:\n\n'bus-port(.port)*' (decimal numbers) or\n'vendor_id:product_id' (hexadeciaml numbers) or\n'spice'\n\nYou can use the 'lsusb -t' command to list existing usb devices.\n\nNOTE: This option allows direct access to host hardware. So it is no longer possible to migrate such machines - use with special care.\n\nThe value 'spice' can be used to add a usb redirection devices for spice.\n\nThe 'usb3' option determines whether the device is a USB3 device or not (this does currently not work reliably with spice redirection and is then ignored).\n\n", - "format" : { - "host" : { - "default_key" : 1, - "format_description" : "HOSTUSBDEVICE|spice", - "format" : "pve-qm-usb-device", - "type" : "string", - "description" : "The Host USB device or port or the value spice" + "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", + "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" : { + "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" + ], + "any", + 1 + ] + }, + "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", + "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" + } + } }, - "usb3" : { - "format_description" : "yes|no", - "description" : "Specifies whether if given host option is a USB3 device or port", - "optional" : 1, - "type" : "boolean" - } + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", + "text" : "{snapname}" } - }, - "cpu" : { - "format" : { - "hidden" : { - "description" : "Do not identify as a KVM virtual machine.", - "type" : "boolean", - "optional" : 1, - "default" : 0 + ], + "info" : { + "GET" : { + "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)" + } + } }, - "cputype" : { - "description" : "Emulated CPU type.", - "enum" : [ - "486", - "athlon", - "pentium", - "pentium2", - "pentium3", - "coreduo", - "core2duo", - "kvm32", - "kvm64", - "qemu32", - "qemu64", - "phenom", - "Conroe", - "Penryn", - "Nehalem", - "Westmere", - "SandyBridge", - "IvyBridge", - "Haswell", - "Haswell-noTSX", - "Broadwell", - "Broadwell-noTSX", - "Opteron_G1", - "Opteron_G2", - "Opteron_G3", - "Opteron_G4", - "Opteron_G5", - "host" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "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" + } ], - "default" : "kvm64", - "type" : "string", - "format_description" : "cputype", - "default_key" : 1 + "type" : "array" } }, - "type" : "string", - "optional" : 1, - "description" : "Emulated CPU type." - }, - "cdrom" : { - "format" : "pve-qm-drive", - "typetext" : "volume", - "description" : "This is an alias for option -ide2", - "type" : "string", - "optional" : 1 - }, - "memory" : { - "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.", - "default" : 512, - "optional" : 1, - "type" : "integer", - "minimum" : 16 - }, - "args" : { - "description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n", - "type" : "string", - "optional" : 1 - }, - "protection" : { - "description" : "Sets the protection flag of the VM. This will prevent the remove operation.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - } - }, - "additionalProperties" : 0 - }, - "name" : "create_vm", - "protected" : 1, - "returns" : { - "type" : "string" - }, - "permissions" : { - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore (option 'archive'), it is enough if the user has 'VM.Backup' permission and the VM already exists. If you create disks you need 'Datastore.AllocateSpace' on any used storage.", - "user" : "all" - }, - "description" : "Create or restore a virtual machine.", - "proxyto" : "node" - }, - "GET" : { - "protected" : 1, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "full" : { - "optional" : 1, - "type" : "boolean", - "description" : "Determine the full status of active VMs." - } - }, - "additionalProperties" : 0 - }, - "name" : "vmlist", - "method" : "GET", - "description" : "Virtual machine index (per node).", - "proxyto" : "node", - "permissions" : { - "user" : "all", - "description" : "Only list VMs where you have VM.Audit permissons on /vms/." - }, - "returns" : { - "type" : "array", - "links" : [ - { - "href" : "{vmid}", - "rel" : "child" - } - ], - "items" : { - "properties" : {}, - "type" : "object" - } - } - } - }, - "path" : "/nodes/{node}/qemu", - "leaf" : 0 - }, - { - "path" : "/nodes/{node}/lxc", - "leaf" : 0, - "text" : "lxc", - "children" : [ - { - "path" : "/nodes/{node}/lxc/{vmid}", - "leaf" : 0, - "children" : [ + "POST" : { + "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)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Snapshot" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/snapshot", + "text" : "snapshot" + }, { - "text" : "config", - "info" : { - "PUT" : { - "protected" : 1, - "parameters" : { - "properties" : { - "cmode" : { - "optional" : 1, - "type" : "string", - "default" : "tty", - "enum" : [ - "shell", - "console", - "tty" - ], - "description" : "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login)." + "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" : { + "action" : { + "type" : "string" + }, + "comment" : { + "optional" : 1, + "type" : "string" + }, + "dest" : { + "optional" : 1, + "type" : "string" + }, + "dport" : { + "optional" : 1, + "type" : "string" + }, + "enable" : { + "optional" : 1, + "type" : "integer" + }, + "iface" : { + "optional" : 1, + "type" : "string" + }, + "ipversion" : { + "optional" : 1, + "type" : "integer" + }, + "macro" : { + "optional" : 1, + "type" : "integer" + }, + "pos" : { + "type" : "integer" + }, + "proto" : { + "optional" : 1, + "type" : "string" + }, + "source" : { + "optional" : 1, + "type" : "string" + }, + "sport" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "type" : "string" + } + }, + "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" + } + } }, - "description" : { - "type" : "string", - "optional" : 1, - "description" : "Container description. Only used on the configuration web interface." + "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)" + } + } }, - "swap" : { - "minimum" : 0, - "description" : "Amount of SWAP for the VM in MB.", - "optional" : 1, - "type" : "integer", - "default" : 512 + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "ostype" : { - "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", - "enum" : [ - "debian", - "ubuntu", - "centos", - "fedora", - "opensuse", - "archlinux", - "alpine", - "unmanaged" + "proxyto" : null, + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } ], - "type" : "string", - "optional" : 1 - }, - "unprivileged" : { - "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)", - "type" : "boolean", - "optional" : 1, - "default" : 0 - }, - "unused[n]" : { - "type" : "string", - "optional" : 1, - "description" : "Reference to unused volumes.", - "format" : "pve-volume-id" - }, - "delete" : { - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "description" : "A list of settings you want to delete." + "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)" + } + } }, - "console" : { - "description" : "Attach a console device (/dev/console) to the container.", - "default" : 1, - "optional" : 1, - "type" : "boolean" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] }, - "mp[n]" : { - "format" : { - "ro" : { - "format_description" : "ro", - "description" : "Read-only mountpoint (not supported with bind mounts)", - "type" : "boolean", - "optional" : 1 + "protected" : 1, + "proxyto" : null, + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", + "text" : "rules" + }, + { + "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)" + } + } }, - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "type" : "boolean", - "optional" : 1, - "format_description" : "acl" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] }, - "size" : { - "format_description" : "DiskSize", - "format" : "disk-size", - "optional" : 1, - "type" : "string", - "description" : "Volume size (read only value)." + "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)" + } + } }, - "backup" : { - "description" : "Whether to include the mountpoint in backups.", - "optional" : 1, - "type" : "boolean", - "format_description" : "[1|0]" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "quota" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "format_description" : "[0|1]" + "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)" + } + } }, - "volume" : { - "default_key" : 1, - "format_description" : "volume", - "format" : "pve-lxc-mp-string", - "type" : "string", - "description" : "Volume, device or directory to mount into the container." + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] }, - "mp" : { - "description" : "Path to the mountpoint as seen from inside the container.", - "type" : "string", - "format" : "pve-lxc-mp-string", - "format_description" : "Path" + "protected" : 1, + "returns" : { + "type" : "null" } - }, - "type" : "string", - "optional" : 1, - "description" : "Use volume as container mount point (experimental feature)." - }, - "cpulimit" : { - "optional" : 1, - "type" : "number", - "maximum" : 128, - "default" : 0, - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit.", - "minimum" : 0 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "startup" : { - "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", - "type" : "string", - "optional" : 1, - "format" : "pve-startup-order", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " - }, - "digest" : { - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "onboot" : { - "description" : "Specifies whether a VM will be started during system bootup.", - "default" : 0, - "type" : "boolean", - "optional" : 1 + } }, - "tty" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "default" : 2, - "maximum" : 6, - "description" : "Specify the number of tty available to the container" + "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)" + } + } }, - "arch" : { - "description" : "OS architecture type.", - "enum" : [ - "amd64", - "i386" - ], - "default" : "amd64", - "type" : "string", - "optional" : 1 + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "net[n]" : { - "format" : { - "firewall" : { - "format_description" : "[1|0]", - "optional" : 1, - "type" : "boolean", - "description" : "Controls whether this interface's firewall rules should be used." + "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" : { + "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", - "optional" : 1, - "enum" : [ - "veth" - ], - "description" : "Network interface type." + "typetext" : "" }, - "ip" : { - "description" : "IPv4 address in CIDR format.", + "comment" : { "optional" : 1, "type" : "string", - "format_description" : "IPv4Format/CIDR", - "format" : "pve-ipv4-config" - }, - "trunks" : { - "type" : "string", - "optional" : 1, - "description" : "VLAN ids to pass through the interface", - "pattern" : "(?^:\\d+(?:;\\d+)*)", - "format_description" : "vlanid[;vlanid...]" + "typetext" : "" }, - "gw6" : { - "format_description" : "GatewayIPv6", - "format" : "ipv6", - "description" : "Default gateway for IPv6 traffic.", - "optional" : 1, + "name" : { + "description" : "Alias name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "type" : "string" }, - "tag" : { - "format_description" : "VlanNo", - "minimum" : "2", - "description" : "VLAN tag for this interface.", - "optional" : 1, - "type" : "integer", - "maximum" : "4094" - }, - "ip6" : { - "optional" : 1, - "type" : "string", - "description" : "IPv6 address in CIDR format.", - "format" : "pve-ipv6-config", - "format_description" : "IPv6Format/CIDR" - }, - "gw" : { - "format" : "ipv4", - "format_description" : "GatewayIPv4", - "optional" : 1, - "type" : "string", - "description" : "Default gateway for IPv4 traffic." - }, - "bridge" : { - "format_description" : "vmbr", - "optional" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "description" : "Bridge to attach the network device to.", - "pattern" : "[-_.\\w\\d]+" + "typetext" : "" }, - "name" : { - "format_description" : "String", - "type" : "string", - "pattern" : "[-_.\\w\\d]+", - "description" : "Name of the network device as seen from inside the container. (lxc.network.name)" + "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/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" + } + } }, - "hwaddr" : { - "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", - "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", - "optional" : 1, - "type" : "string", - "format_description" : "MAC" + "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)" + } + } }, - "mtu" : { - "minimum" : 64, - "format_description" : "Number", - "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", - "optional" : 1, - "type" : "integer" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] }, - "rate" : { - "description" : "Apply rate limiting to the interface", - "type" : "number", - "optional" : 1, - "format_description" : "mbps" + "protected" : 1, + "returns" : { + "type" : "null" } }, - "description" : "Specifies network interfaces for the container.", - "optional" : 1, - "type" : "string" - }, - "searchdomain" : { - "type" : "string", - "optional" : 1, - "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", - "format" : "dns-name-list" - }, - "cpuunits" : { - "minimum" : 0, - "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.", - "type" : "integer", - "optional" : 1, - "default" : 1024, - "maximum" : 500000 - }, - "nameserver" : { - "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", - "type" : "string", - "optional" : 1, - "format" : "address-list" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "hostname" : { - "maxLength" : 255, - "format" : "dns-name", - "type" : "string", - "optional" : 1, - "description" : "Set a host name for the container." - }, - "rootfs" : { - "description" : "Use volume as container root.", - "optional" : 1, - "type" : "string", - "format" : { - "acl" : { - "format_description" : "acl", - "type" : "boolean", - "optional" : 1, - "description" : "Explicitly enable or disable ACL support." - }, - "ro" : { - "format_description" : "ro", - "description" : "Read-only mountpoint (not supported with bind mounts)", - "optional" : 1, - "type" : "boolean" - }, - "backup" : { - "format_description" : "[1|0]", - "description" : "Whether to include the mountpoint in backups.", - "optional" : 1, - "type" : "boolean" - }, - "size" : { - "optional" : 1, - "type" : "string", - "description" : "Volume size (read only value).", - "format_description" : "DiskSize", - "format" : "disk-size" + "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)" + } + } }, - "quota" : { - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "optional" : 1, - "type" : "boolean", - "format_description" : "[0|1]" + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] }, - "volume" : { - "format" : "pve-lxc-mp-string", - "format_description" : "volume", - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "type" : "string" + "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" } - } - }, - "template" : { - "description" : "Enable/disable Template.", - "optional" : 1, - "type" : "boolean", - "default" : 0 - }, - "lock" : { - "description" : "Lock/unlock the VM.", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "type" : "string", - "optional" : 1 - }, - "protection" : { - "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.", - "type" : "boolean", - "optional" : 1, - "default" : 0 - }, - "memory" : { - "description" : "Amount of RAM for the VM in MB.", - "default" : 512, - "type" : "integer", - "optional" : 1, - "minimum" : 16 - } - }, - "additionalProperties" : 0 - }, - "name" : "update_vm", - "method" : "PUT", - "proxyto" : "node", - "description" : "Set container options.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Disk", - "VM.Config.CPU", - "VM.Config.Memory", - "VM.Config.Network", - "VM.Config.Options" - ], - "any", - 1 - ] - }, - "returns" : { - "type" : "null" - } - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object", - "properties" : { - "digest" : { - "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.", - "type" : "string" - } - } - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "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)" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}", + "text" : "{name}" } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "name" : "vm_config", - "description" : "Get container configuration.", - "proxyto" : "node" - } - }, - "path" : "/nodes/{node}/lxc/{vmid}/config", - "leaf" : 1 - }, - { - "path" : "/nodes/{node}/lxc/{vmid}/status", - "leaf" : 0, - "text" : "status", - "children" : [ - { - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/current", + ], "info" : { "GET" : { + "description" : "List IPSets", "method" : "GET", + "name" : "ipset_index", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, "vmid" : { "description" : "The (unique) ID of the VM.", - "type" : "integer", + "format" : "pve-vmid", "minimum" : 1, - "format" : "pve-vmid" + "type" : "integer", + "typetext" : " (1 - N)" } - }, - "additionalProperties" : 0 - }, - "name" : "vm_status", - "protected" : 1, - "returns" : { - "type" : "object" + } }, "permissions" : { "check" : [ @@ -12139,540 +21718,607 @@ var pveapi = [ ] ] }, - "proxyto" : "node", - "description" : "Get virtual machine status." - } - }, - "text" : "current" - }, - { - "info" : { - "POST" : { - "proxyto" : "node", - "description" : "Start the container.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, "returns" : { - "type" : "string" - }, - "protected" : 1, - "name" : "vm_start", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "skiplock" : { - "optional" : 1, - "type" : "boolean", - "description" : "Ignore locks - only root is allowed to use this option." + "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" + } }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" } - } - }, - "method" : "POST" - } - }, - "text" : "start", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/start" - }, - { - "info" : { + ], + "type" : "array" + } + }, "POST" : { - "returns" : { - "type" : "string" - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "description" : "Stop the container. This will abruptly stop all processes running in the container.", - "proxyto" : "node", + "description" : "Create new IPSet", "method" : "POST", - "name" : "vm_stop", + "name" : "create_ipset", "parameters" : { + "additionalProperties" : 0, "properties" : { - "skiplock" : { - "description" : "Ignore locks - only root is allowed to use this option.", - "type" : "boolean", - "optional" : 1 + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" + "digest" : { + "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "name" : { + "description" : "IP set name.", + "maxLength" : 64, + "minLength" : 2, + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "protected" : 1 - } - }, - "text" : "stop", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/stop" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown", - "info" : { - "POST" : { - "protected" : 1, - "name" : "vm_shutdown", - "parameters" : { - "properties" : { + }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - }, - "forceStop" : { - "description" : "Make sure the Container stops.", - "optional" : 1, - "type" : "boolean", - "default" : 0 + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "timeout" : { - "description" : "Wait maximal timeout seconds.", - "default" : 60, - "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, "optional" : 1, - "minimum" : 0 + "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "type" : "string" }, "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", "description" : "The (unique) ID of the VM.", - "type" : "integer" + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } - }, - "additionalProperties" : 0 - }, - "method" : "POST", - "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.", - "proxyto" : "node", + } + }, "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.PowerMgmt" + "VM.Config.Network" ] ] }, + "protected" : 1, "returns" : { - "type" : "string" + "type" : "null" } } }, - "text" : "shutdown" + "leaf" : 0, + "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", + "text" : "ipset" }, { - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/suspend", "info" : { - "POST" : { - "returns" : { - "type" : "string" - }, - "proxyto" : "node", - "description" : "Suspend the container.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.PowerMgmt" - ] - ] - }, - "method" : "POST", - "protected" : 1, - "name" : "vm_suspend", + "GET" : { + "description" : "Get VM firewall options.", + "method" : "GET", + "name" : "get_options", "parameters" : { "additionalProperties" : 0, "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" + }, + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } - } - } - }, - "text" : "suspend" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/status/resume", - "info" : { - "POST" : { - "returns" : { - "type" : "string" }, - "description" : "Resume the container.", - "proxyto" : "node", "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.PowerMgmt" + "VM.Audit" ] ] }, - "method" : "POST", - "protected" : 1, - "parameters" : { + "proxyto" : "node", + "returns" : { "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "dhcp" : { + "description" : "Enable DHCP.", + "optional" : 1, + "type" : "boolean" }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 + "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" } }, - "additionalProperties" : 0 - }, - "name" : "vm_resume" - } - }, - "text" : "resume" - } - ], - "info" : { - "GET" : { - "proxyto" : "node", - "description" : "Directory index", - "name" : "vmcmdidx", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." + "type" : "object" } - } - }, - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" }, - "links" : [ - { - "rel" : "child", - "href" : "{subdir}" - } - ] - } - } - } - }, - { - "path" : "/nodes/{node}/lxc/{vmid}/snapshot", - "leaf" : 0, - "text" : "snapshot", - "children" : [ - { - "text" : "{snapname}", - "children" : [ - { - "info" : { - "POST" : { - "returns" : { + "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", - "description" : "the task ID." + "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" }, - "proxyto" : "node", - "description" : "Rollback LXC state to specified snapshot.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] + "log_level_out" : { + "description" : "Log level for outgoing traffic.", + "enum" : [ + "emerg", + "alert", + "crit", + "err", + "warning", + "notice", + "info", + "debug", + "nolog" + ], + "optional" : 1, + "type" : "string" }, - "method" : "POST", - "protected" : 1, - "parameters" : { - "properties" : { - "snapname" : { - "format" : "pve-configid", - "maxLength" : 40, - "description" : "The name of the snapshot.", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 + "macfilter" : { + "description" : "Enable/disable MAC address filter.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "name" : "rollback" - } - }, - "text" : "rollback", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback" - }, - { - "text" : "config", - "info" : { - "GET" : { - "returns" : { - "type" : "object" + "ndp" : { + "description" : "Enable NDP.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "method" : "GET", - "description" : "Get snapshot configuration", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "snapname" : { - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "description" : "The name of the snapshot." - } - } + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] + "policy_in" : { + "description" : "Input policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" }, - "name" : "get_snapshot_config" - }, - "PUT" : { - "protected" : 1, - "name" : "update_snapshot_config", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "snapname" : { - "description" : "The name of the snapshot.", - "type" : "string", - "format" : "pve-configid", - "maxLength" : 40 - }, - "description" : { - "description" : "A textual description or comment.", - "type" : "string", - "optional" : 1 - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - } + "policy_out" : { + "description" : "Output policy.", + "enum" : [ + "ACCEPT", + "REJECT", + "DROP" + ], + "optional" : 1, + "type" : "string" }, - "method" : "PUT", - "description" : "Update snapshot metadata.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] + "radv" : { + "description" : "Allow sending Router Advertisement.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "returns" : { - "type" : "null" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config", - "leaf" : 1 + "permissions" : { + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Network" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } } - ], + }, + "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" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", + "limit" : { + "minimum" : 0, + "optional" : 1, "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - }, - "snapname" : { - "type" : "string", - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40 + "typetext" : " (0 - N)" }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "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)" } - }, - "additionalProperties" : 0 + } }, - "name" : "snapshot_cmd_idx", "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/vms/{vmid}", + [ + "VM.Console" + ] + ] }, - "description" : "", + "protected" : 1, + "proxyto" : "node", "returns" : { "items" : { - "properties" : {}, + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "type" : "string" + } + }, "type" : "object" }, - "links" : [ - { - "href" : "{cmd}", - "rel" : "child" + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{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" : "" + }, + "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)" } - ], - "type" : "array" + } }, - "method" : "GET" - }, - "DELETE" : { "permissions" : { "check" : [ "perm", "/vms/{vmid}", [ - "VM.Snapshot" + "VM.Audit" ] ] }, - "proxyto" : "node", - "description" : "Delete a LXC snapshot.", "returns" : { - "description" : "the task ID.", - "type" : "string" - }, - "name" : "delsnapshot", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "force" : { - "description" : "For removal from config file, even if removing disk snapshots fails.", - "type" : "boolean", - "optional" : 1 + "items" : { + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, + "name" : { + "type" : "string" + }, + "type" : { + "enum" : [ + "alias", + "ipset" + ], + "type" : "string" + } }, - "snapname" : { - "maxLength" : 40, - "format" : "pve-configid", - "type" : "string", - "description" : "The name of the snapshot." - } - } - }, - "protected" : 1, - "method" : "DELETE" + "type" : "object" + }, + "type" : "array" + } } }, - "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}", - "leaf" : 0 + "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)" + } + } + }, + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "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", @@ -12682,3313 +22328,5272 @@ var pveapi = [ ] ] }, - "description" : "List all snapshots.", - "proxyto" : "node", + "protected" : 1, "returns" : { - "links" : [ - { - "href" : "{name}", - "rel" : "child" + "properties" : { + "filename" : { + "type" : "string" } - ], + }, + "type" : "object" + } + } + }, + "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", + "/vms/{vmid}", + [ + "VM.Audit" + ] + ] + }, + "protected" : 1, + "returns" : { "items" : { "properties" : {}, "type" : "object" }, "type" : "array" - }, + } + } + }, + "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", - "description" : "The cluster node name." + "typetext" : "" }, "vmid" : { + "description" : "The (unique) ID of the VM.", "format" : "pve-vmid", "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - } - }, - "additionalProperties" : 0 - }, - "name" : "list", - "protected" : 1, - "method" : "GET" - }, - "POST" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 + "typetext" : " (1 - N)" }, - "description" : { - "type" : "string", + "websocket" : { + "description" : "use websocket instead of standard VNC.", "optional" : 1, - "description" : "A textual description or comment." - }, - "snapname" : { - "description" : "The name of the snapshot.", - "type" : "string", - "maxLength" : 40, - "format" : "pve-configid" + "type" : "boolean", + "typetext" : "" }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "width" : { + "description" : "sets the width of the console in pixels.", + "maximum" : 4096, + "minimum" : 16, + "optional" : 1, + "type" : "integer", + "typetext" : " (16 - 4096)" } } }, - "name" : "snapshot", - "protected" : 1, - "method" : "POST", "permissions" : { "check" : [ "perm", - "/vms/{vmid}", - [ - "VM.Snapshot" - ] - ] - }, - "description" : "Snapshot a container.", - "proxyto" : "node", - "returns" : { - "description" : "the task ID.", - "type" : "string" - } - } - } - }, - { - "children" : [ - { - "text" : "rules", - "children" : [ - { - "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}", - "leaf" : 1, - "text" : "{pos}", - "info" : { - "GET" : { - "returns" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "method" : "GET", - "parameters" : { - "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, - "pos" : { - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position .", - "minimum" : 0 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 - }, - "name" : "get_rule", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "proxyto" : null, - "description" : "Get single rule data." - }, - "PUT" : { - "parameters" : { - "properties" : { - "dest" : { - "type" : "string", - "optional" : 1, - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "format" : "pve-fw-addr-spec" - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "type" : "string", - "optional" : 1 - }, - "source" : { - "format" : "pve-fw-addr-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." - }, - "moveto" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Move rule to new position . Other arguments are ignored." - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "delete" : { - "type" : "string", - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list" - }, - "dport" : { - "format" : "pve-fw-dport-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." - }, - "type" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "in", - "out", - "group" - ] - }, - "sport" : { - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "optional" : 1, - "type" : "string", - "format" : "pve-fw-sport-spec" - }, - "iface" : { - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "optional" : 1, - "type" : "string" - }, - "pos" : { - "optional" : 1, - "type" : "integer", - "description" : "Update rule at position .", - "minimum" : 0 - }, - "proto" : { - "type" : "string", - "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "macro" : { - "optional" : 1, - "type" : "string", - "maxLength" : 128 - }, - "enable" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, - "action" : { - "type" : "string", - "optional" : 1, - "minLength" : 2, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 20 - } - }, - "additionalProperties" : 0 - }, - "name" : "update_rule", - "protected" : 1, - "method" : "PUT", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "description" : "Modify rule data.", - "proxyto" : null, - "returns" : { - "type" : "null" - } - }, - "DELETE" : { - "name" : "delete_rule", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "pos" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position ." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - } - } - }, - "protected" : 1, - "method" : "DELETE", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "proxyto" : null, - "description" : "Delete rule.", - "returns" : { - "type" : "null" - } - } + "/vms/{vmid}", + [ + "VM.Console" + ] + ] + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "cert" : { + "type" : "string" + }, + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" } } - ], - "info" : { - "GET" : { - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } - }, - "additionalProperties" : 0 + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/vncproxy", + "text" : "vncproxy" + }, + { + "info" : { + "POST" : { + "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" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "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, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" }, - "name" : "get_rules", - "proxyto" : null, - "description" : "List rules.", - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "pos" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{pos}" - } - ] + "ticket" : { + "type" : "string" }, - "method" : "GET" - }, - "POST" : { - "protected" : 1, - "name" : "create_rule", - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "proto" : { - "optional" : 1, - "type" : "string", - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", - "format" : "pve-fw-protocol-spec" - }, - "pos" : { - "minimum" : 0, - "description" : "Update rule at position .", - "optional" : 1, - "type" : "integer" - }, - "macro" : { - "type" : "string", - "optional" : 1, - "maxLength" : 128 - }, - "action" : { - "maxLength" : 20, - "type" : "string", - "optional" : 0, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "minLength" : 2 - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - }, - "enable" : { - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "dport" : { - "format" : "pve-fw-dport-spec", - "optional" : 1, - "type" : "string", - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." - }, - "sport" : { - "format" : "pve-fw-sport-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." - }, - "dest" : { - "optional" : 1, - "type" : "string", - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "format" : "pve-fw-addr-spec" - }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "source" : { - "format" : "pve-fw-addr-spec", - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "optional" : 1, - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "iface" : { - "maxLength" : 20, - "format" : "pve-iface", - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", - "minLength" : 2, - "optional" : 1, - "type" : "string" - } - }, - "additionalProperties" : 0 + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/termproxy", + "text" : "termproxy" + }, + { + "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", + "/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" : { + "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" : "" }, - "method" : "POST", - "description" : "Create new rule.", - "proxyto" : null, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "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" : "" }, - "returns" : { - "type" : "null" + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules", - "leaf" : 0 - }, - { - "children" : [ - { - "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}", - "leaf" : 1, - "text" : "{name}", - "info" : { - "GET" : { - "returns" : { - "type" : "object" - }, - "method" : "GET", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "parameters" : { - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "name" : { - "type" : "string", - "minLength" : 2, - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "maxLength" : 64 - } - }, - "additionalProperties" : 0 - }, - "name" : "read_alias", - "description" : "Read alias." - }, - "PUT" : { - "protected" : 1, - "description" : "Update IP or Network alias.", - "parameters" : { - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "rename" : { - "maxLength" : 64, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rename an existing alias.", - "minLength" : 2, - "optional" : 1, - "type" : "string" - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Alias name." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "digest" : { - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "cidr" : { - "type" : "string", - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - } - }, - "additionalProperties" : 0 - }, - "name" : "update_alias", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "returns" : { - "type" : "null" - }, - "method" : "PUT" - }, - "DELETE" : { - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "maxLength" : 64, - "type" : "string", - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - } - } - }, - "name" : "remove_alias", - "protected" : 1, - "description" : "Remove IP or Network alias." - } + "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" + }, + "password" : { + "type" : "string" + }, + "proxy" : { + "type" : "string" + }, + "tls-port" : { + "type" : "integer" + }, + "type" : { + "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)" } } - ], - "text" : "aliases", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 0, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "cidr" : { - "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "name" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } + }, + "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" : { + "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" : "array" + "type" : "string" }, - "description" : "List aliases", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - } - } + "snapname" : { + "description" : "The name of the snapshot.", + "format" : "pve-configid", + "maxLength" : 40, + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "name" : "get_aliases" + "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" + } }, - "POST" : { - "returns" : { - "type" : "null" - }, - "method" : "POST", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "comment" : { - "optional" : 1, - "type" : "string" - }, - "name" : { - "type" : "string", - "description" : "Alias name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "maxLength" : 64 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "cidr" : { - "type" : "string", - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDR" - } - } + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/feature", + "text" : "feature" + }, + { + "info" : { + "POST" : { + "description" : "Create a Template.", + "method" : "POST", + "name" : "template", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "name" : "create_alias", - "description" : "Create IP or Network Alias.", - "protected" : 1 + "vmid" : { + "description" : "The (unique) ID of the VM.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases", - "leaf" : 0 - }, - { - "leaf" : 0, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset", - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "name" : "ipset_index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - } - } + "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" : { + "description" : "Create a container clone/copy", + "method" : "POST", + "name" : "clone_vm", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "description" : { + "description" : "Description for the new CT.", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "description" : "List IPSets", - "method" : "GET", - "returns" : { - "type" : "array", - "links" : [ - { - "href" : "{name}", - "rel" : "child" - } - ], - "items" : { - "type" : "object", - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "name" : { - "maxLength" : 64, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, - "digest" : { - "type" : "string", - "optional" : 0, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - } - } - } - } - }, - "POST" : { - "method" : "POST", - "returns" : { - "type" : "null" + "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" : "" }, - "protected" : 1, - "description" : "Create new IPSet", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] + "hostname" : { + "description" : "Set a hostname for the new CT.", + "format" : "dns-name", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "rename" : { - "minLength" : 2, - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.", - "type" : "string", - "optional" : 1, - "maxLength" : 64 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "name" : { - "minLength" : 2, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string", - "maxLength" : 64 - } - } + "newid" : { + "description" : "VMID for the clone.", + "format" : "pve-vmid", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" }, - "name" : "create_ipset" - } - }, - "text" : "ipset", - "children" : [ - { - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}", - "leaf" : 0, - "children" : [ - { - "info" : { - "DELETE" : { - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "cidr" : { - "type" : "string", - "description" : "Network/IP specification in CIDR format.", - "format" : "IPorCIDRorAlias" - }, - "name" : { - "maxLength" : 64, - "minLength" : 2, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - } - }, - "name" : "remove_ip", - "protected" : 1, - "description" : "Remove IP or Network from IPSet." - }, - "PUT" : { - "returns" : { - "type" : "null" - }, - "method" : "PUT", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "cidr" : { - "format" : "IPorCIDRorAlias", - "description" : "Network/IP specification in CIDR format.", - "type" : "string" - }, - "digest" : { - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "minimum" : 1, - "format" : "pve-vmid" - }, - "nomatch" : { - "optional" : 1, - "type" : "boolean" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "name" : { - "maxLength" : 64, - "minLength" : 2, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "name" : "update_ip", - "description" : "Update IP or Network settings", - "protected" : 1 - }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object" - }, - "name" : "read_ip", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "parameters" : { - "properties" : { - "cidr" : { - "format" : "IPorCIDRorAlias", - "type" : "string", - "description" : "Network/IP specification in CIDR format." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "name" : { - "maxLength" : 64, - "type" : "string", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "IP set name.", - "minLength" : 2 - } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "description" : "Read IP or Network settings from IPSet." - } - }, - "text" : "{cidr}", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}" - } + "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, + "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" + ] ], - "text" : "{name}", - "info" : { - "GET" : { - "description" : "List IPSet content", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "name" : { - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string", - "maxLength" : 64 - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" - } - } - }, - "name" : "get_ipset", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "cidr" : { - "type" : "string" - }, - "digest" : { - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 0, - "type" : "string", - "maxLength" : 40 - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "nomatch" : { - "type" : "boolean", - "optional" : 1 - } - } - }, - "links" : [ - { - "rel" : "child", - "href" : "{cidr}" - } - ] - }, - "method" : "GET" - }, - "DELETE" : { - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "name" : "delete_ipset", - "parameters" : { - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "name" : { - "minLength" : 2, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "type" : "string", - "maxLength" : 64 - } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "protected" : 1, - "description" : "Delete IPSet" - }, - "POST" : { - "description" : "Add IP or Network to IPSet.", - "protected" : 1, - "name" : "create_ip", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Config.Network" - ] - ] - }, - "parameters" : { - "properties" : { - "nomatch" : { - "type" : "boolean", - "optional" : 1 - }, - "name" : { - "maxLength" : 64, - "description" : "IP set name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "minLength" : 2, - "type" : "string" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "comment" : { - "optional" : 1, - "type" : "string" - }, - "cidr" : { - "description" : "Network/IP specification in CIDR format.", - "type" : "string", - "format" : "IPorCIDRorAlias" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - } - }, - "additionalProperties" : 0 - }, - "returns" : { - "type" : "null" - }, - "method" : "POST" - } + [ + "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" : { + "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" : "" + }, + "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.", + "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 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "description" : "the task ID.", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/resize", + "text" : "resize" + }, + { + "info" : { + "POST" : { + "description" : "Move a rootfs-/mp-volume to a different storage", + "method" : "POST", + "name" : "move_volume", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "delete" : { + "default" : 0, + "description" : "Delete the original volume after successful copy. By default the original is kept as an unused volume entry.", + "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" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "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", + "minimum" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "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" + ], + "type" : "string" + } + } + }, + "permissions" : { + "check" : [ + "and", + [ + "perm", + "/vms/{vmid}", + [ + "VM.Config.Disk" + ] + ], + [ + "perm", + "/storage/{storage}", + [ + "Datastore.AllocateSpace" + ] + ] + ], + "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage." + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/lxc/{vmid}/move_volume", + "text" : "move_volume" + } + ], + "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", + "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" : { + "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" + }, + "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" + }, + "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" : { + "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" : { + "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" : 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" : "" + }, + "features" : { + "description" : "Allow containers access to advanced features.", + "format" : { + "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" + }, + "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" : "[fuse=<1|0>] [,keyctl=<1|0>] [,mount=] [,nesting=<1|0>]" + }, + "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" : [ + "backup", + "disk", + "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.", + "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" : "(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" : "" + }, + "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!" + }, + "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" + } }, - { - "text" : "options", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object", - "properties" : { - "log_level_in" : { - "optional" : 1, - "type" : "string", - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ] - }, - "policy_out" : { - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "description" : "Output policy.", - "optional" : 1, - "type" : "string" - }, - "radv" : { - "description" : "Allow sending Router Advertisement.", - "type" : "boolean", - "optional" : 1 - }, - "ipfilter" : { - "optional" : 1, - "type" : "boolean", - "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added." - }, - "policy_in" : { - "description" : "Input policy.", - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "type" : "string", - "optional" : 1 - }, - "macfilter" : { - "description" : "Enable/disable MAC address filter.", - "optional" : 1, - "type" : "boolean" - }, - "ndp" : { - "optional" : 1, - "type" : "boolean", - "description" : "Enable NDP." - }, - "dhcp" : { - "description" : "Enable DHCP.", - "optional" : 1, - "type" : "boolean" - }, - "log_level_out" : { - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for outgoing traffic.", - "optional" : 1, - "type" : "string" - }, - "enable" : { - "description" : "Enable/disable firewall rules.", - "optional" : 1, - "type" : "boolean" - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, + "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" : "" + }, + "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)" + }, + "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" : "" + }, + "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" : "ceph osd in", + "method" : "POST", + "name" : "in", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "name" : "get_options", - "description" : "Get VM firewall options.", - "proxyto" : "node" - }, - "PUT" : { - "protected" : 1, - "name" : "set_options", - "parameters" : { - "properties" : { - "enable" : { - "description" : "Enable/disable firewall rules.", - "optional" : 1, - "type" : "boolean" - }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], + "format" : "pve-node", "type" : "string", - "optional" : 1 + "typetext" : "" }, - "vmid" : { + "osdid" : { + "description" : "OSD ID", "type" : "integer", - "description" : "The (unique) ID of the VM.", - "format" : "pve-vmid", - "minimum" : 1 - }, - "delete" : { - "type" : "string", - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list" - }, - "policy_out" : { - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "description" : "Output policy.", - "type" : "string", - "optional" : 1 - }, - "log_level_in" : { - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for incoming traffic.", - "type" : "string", - "optional" : 1 - }, - "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" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "radv" : { - "description" : "Allow sending Router Advertisement.", - "type" : "boolean", - "optional" : 1 - }, - "macfilter" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable MAC address filter." - }, - "policy_in" : { - "enum" : [ - "ACCEPT", - "REJECT", - "DROP" - ], - "description" : "Input policy.", - "type" : "string", - "optional" : 1 - }, - "ndp" : { - "description" : "Enable NDP.", - "type" : "boolean", - "optional" : 1 - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "dhcp" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable DHCP." + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "method" : "PUT", - "proxyto" : "node", - "description" : "Set Firewall options.", "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Config.Network" + "Sys.Modify" ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { "type" : "null" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/options", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/ceph/osd/{osdid}/in", + "text" : "in" }, { "info" : { - "GET" : { - "method" : "GET", - "name" : "log", + "POST" : { + "description" : "ceph osd out", + "method" : "POST", + "name" : "out", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" }, - "limit" : { - "optional" : 1, + "osdid" : { + "description" : "OSD ID", "type" : "integer", - "minimum" : 0 - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer" + "typetext" : "" } } }, - "protected" : 1, - "returns" : { - "items" : { - "properties" : { - "t" : { - "description" : "Line text", - "type" : "string" - }, - "n" : { - "description" : "Line number", - "type" : "integer" - } - }, - "type" : "object" - }, - "type" : "array" - }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Console" + "Sys.Modify" ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Read firewall log" - } - }, - "text" : "log", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/log" - }, - { - "text" : "refs", - "info" : { - "GET" : { - "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Audit" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "type" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "alias", - "ipset" - ], - "description" : "Only list references of specified type." - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - } - }, - "name" : "refs", - "method" : "GET", "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "type" : { - "type" : "string", - "enum" : [ - "alias", - "ipset" - ] - }, - "name" : { - "type" : "string" - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - } - } + "type" : "null" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/ceph/osd/{osdid}/out", + "text" : "out" } ], - "text" : "firewall", "info" : { - "GET" : { - "description" : "Directory index.", - "permissions" : { - "user" : "all" - }, + "DELETE" : { + "description" : "Destroy OSD", + "method" : "DELETE", + "name" : "destroyosd", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "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", - "description" : "The cluster node name." + "typetext" : "" + }, + "osdid" : { + "description" : "OSD ID", + "type" : "integer", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "name" : "index", - "method" : "GET", + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" - } - ] + "type" : "string" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/firewall", - "leaf" : 0 + "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" : 1, + "description" : "Use bluestore instead of filestore. This is the default.", + "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" + ], + "optional" : 1, + "type" : "string" + }, + "journal_dev" : { + "description" : "Block device name for journal (filestore) or block.db (bluestore).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "wal_dev" : { + "description" : "Block device name for block.wal (bluestore only).", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/osd", + "text" : "osd" + }, + { + "children" : [ { - "text" : "rrd", "info" : { - "GET" : { - "description" : "Read VM RRD statistics (returns PNG)", - "protected" : 1, - "name" : "rrd", + "DELETE" : { + "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", - "format" : "pve-node" - }, - "timeframe" : { - "type" : "string", - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ] - }, - "ds" : { - "description" : "The list of datasources you want to display.", - "type" : "string", - "format" : "pve-configid-list" - }, - "cf" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "AVERAGE", - "MAX" - ], - "description" : "The RRD consolidation function" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Audit" + "Sys.Modify" ] ] }, - "method" : "GET", + "protected" : 1, + "proxyto" : "node", "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, - "type" : "object" + "type" : "string" } - } - }, - "path" : "/nodes/{node}/lxc/{vmid}/rrd", - "leaf" : 1 - }, - { - "text" : "rrddata", - "info" : { - "GET" : { + }, + "POST" : { + "description" : "Create Ceph Metadata Server (MDS)", + "method" : "POST", + "name" : "createmds", "parameters" : { "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "timeframe" : { - "type" : "string", - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ] + "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" : "" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" + "name" : { + "default" : "nodename", + "description" : "The ID for the mds, when omitted the same as the nodename", + "optional" : 1, + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" }, - "cf" : { - "enum" : [ - "AVERAGE", - "MAX" - ], - "description" : "The RRD consolidation function", + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "optional" : 1 + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Audit" + "Sys.Modify" ] ] }, - "name" : "rrddata", - "description" : "Read VM RRD statistics", "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/mds/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "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" } }, - "method" : "GET" - } - }, - "path" : "/nodes/{node}/lxc/{vmid}/rrddata", - "leaf" : 1 - }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/mds", + "text" : "mds" + }, + { + "children" : [ { - "text" : "vncproxy", "info" : { "POST" : { - "protected" : 1, - "description" : "Creates a TCP VNC proxy connections.", + "description" : "Create a Ceph filesystem", + "method" : "POST", + "name" : "createfs", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "websocket" : { + "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, - "description" : "use websocket instead of standard VNC." + "type" : "string", + "typetext" : "" }, "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "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" : " (8 - 32768)" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Console" + "Sys.Modify" ] ] }, - "name" : "vncproxy", - "method" : "POST", + "protected" : 1, + "proxyto" : "node", "returns" : { - "additionalProperties" : 0, - "properties" : { - "cert" : { - "type" : "string" - }, - "upid" : { - "type" : "string" - }, - "user" : { - "type" : "string" - }, - "ticket" : { - "type" : "string" - }, - "port" : { - "type" : "integer" - } - } + "type" : "string" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/vncproxy", - "leaf" : 1 - }, - { - "text" : "vncwebsocket", - "info" : { - "GET" : { - "parameters" : { - "properties" : { - "vncticket" : { - "type" : "string", - "description" : "Ticket from previous call to vncproxy.", - "maxLength" : 512 - }, - "port" : { - "minimum" : 5900, - "maximum" : 5999, - "type" : "integer", - "description" : "Port number returned by previous vncproxy call." - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 - } + "leaf" : 1, + "path" : "/nodes/{node}/ceph/fs/{name}", + "text" : "{name}" + } + ], + "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" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "returns" : { + "items" : { + "properties" : { + "data_pool" : { + "description" : "The name of the data pool.", + "type" : "string" }, - "additionalProperties" : 0 + "metadata_pool" : { + "description" : "The name of the metadata pool.", + "type" : "string" + }, + "name" : { + "description" : "The ceph filesystem name.", + "type" : "string" + } }, - "name" : "vncwebsocket", - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Console" - ] - ], - "description" : "You also need to pass a valid ticket (vncticket)." + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/fs", + "text" : "fs" + }, + { + "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" : "" }, - "description" : "Opens a weksocket for VNC traffic.", - "returns" : { - "type" : "object", - "properties" : { - "port" : { - "type" : "string" - } + "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" } }, - "method" : "GET" + "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" : "" + } } }, - "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket", - "leaf" : 1 - }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/config", + "text" : "config" + }, + { + "children" : [ { - "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy", - "leaf" : 1, - "text" : "spiceproxy", "info" : { - "POST" : { - "protected" : 1, + "DELETE" : { + "description" : "Destroy Ceph Monitor and Manager.", + "method" : "DELETE", + "name" : "destroymon", "parameters" : { "additionalProperties" : 0, "properties" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "type" : "integer", - "description" : "The (unique) ID of the VM." - }, - "proxy" : { + "exclude-manager" : { + "default" : 0, + "description" : "When set, removes only the monitor, not the manager", "optional" : 1, - "type" : "string", - "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI).", - "format" : "address" + "type" : "boolean", + "typetext" : "" + }, + "monid" : { + "description" : "Monitor ID", + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "name" : "spiceproxy", - "method" : "POST", - "description" : "Returns a SPICE configuration to connect to the CT.", - "proxyto" : "node", "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Console" + "Sys.Modify" ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", - "additionalProperties" : 1, - "properties" : { - "type" : { - "type" : "string" - }, - "host" : { - "type" : "string" - }, - "proxy" : { - "type" : "string" - }, - "tls-port" : { - "type" : "integer" - }, - "password" : { - "type" : "string" - } - } + "type" : "string" } } - } - }, - { + }, "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/migrate", - "info" : { - "POST" : { - "method" : "POST", - "parameters" : { - "properties" : { - "target" : { - "format" : "pve-node", - "description" : "Target node.", - "type" : "string" - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "online" : { - "description" : "Use online/live migration.", - "type" : "boolean", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "force" : { - "optional" : 1, - "type" : "boolean", - "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node." - } + "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" }, - "additionalProperties" : 0 + "name" : { + "type" : "string" + } }, - "name" : "migrate_vm", - "protected" : 1, - "returns" : { + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "description" : "Create Ceph Monitor and Manager", + "method" : "POST", + "name" : "createmon", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "exclude-manager" : { + "default" : 0, + "description" : "When set, only a monitor will be created.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "id" : { + "description" : "The ID for the monitor, when omitted the same as the nodename", + "optional" : 1, + "pattern" : "[a-zA-Z0-9]([a-zA-Z0-9\\-]*[a-zA-Z0-9])?", + "type" : "string" + }, + "mon-address" : { + "description" : "Overwrites autodetected monitor IP address. Must be in the public network of ceph.", + "format" : "ip", + "optional" : 1, "type" : "string", - "description" : "the task ID." + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/vms/{vmid}", - [ - "VM.Migrate" - ] - ] + "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" : { + "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 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" : "" }, - "proxyto" : "node", - "description" : "Migrate the container to another node. Creates a new migration task." + "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)" + } } }, - "text" : "migrate" - }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/init", + "text" : "init" + }, + { + "children" : [ { "info" : { - "GET" : { - "name" : "vm_feature", + "DELETE" : { + "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", - "description" : "The cluster node name." - }, - "snapname" : { - "type" : "string", - "optional" : 1, - "description" : "The name of the snapshot.", - "format" : "pve-configid", - "maxLength" : 40 - }, - "feature" : { - "enum" : [ - "snapshot" - ], - "description" : "Feature to check.", - "type" : "string" - }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "minimum" : 1, - "format" : "pve-vmid" + "typetext" : "" } } }, - "protected" : 1, - "method" : "GET", "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Audit" + "Sys.Modify" ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Check if feature for virtual machine is available.", "returns" : { - "properties" : { - "hasFeature" : { - "type" : "boolean" - } - }, - "type" : "object" + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/mgr/{id}", + "text" : "{id}" + } + ], + "info" : { + "POST" : { + "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", + "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" : 0, + "path" : "/nodes/{node}/ceph/mgr", + "text" : "mgr" + }, + { + "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" : "" + }, + "service" : { + "default" : "ceph.target", + "description" : "Ceph service name.", + "optional" : 1, + "pattern" : "(mon|mds|osd|mgr)\\.[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" : "" + }, + "service" : { + "default" : "ceph.target", + "description" : "Ceph service name.", + "optional" : 1, + "pattern" : "(mon|mds|osd|mgr)\\.[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" : { + "POST" : { + "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\\-]{1,32}", + "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" : { + "description" : "Get ceph status.", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "text" : "feature", - "leaf" : 1, - "path" : "/nodes/{node}/lxc/{vmid}/feature" - }, + "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" : [ { - "text" : "template", "info" : { - "POST" : { - "name" : "template", + "DELETE" : { + "description" : "Destroy pool", + "method" : "DELETE", + "name" : "destroypool", "parameters" : { "additionalProperties" : 0, "properties" : { - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "The (unique) ID of the VM." + "force" : { + "default" : 0, + "description" : "If true, destroys pool even if in use", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "name" : { + "description" : "The name of the pool. It must be unique.", + "type" : "string", + "typetext" : "" }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "experimental" : { + "remove_storages" : { "default" : 0, + "description" : "Remove all pveceph-managed storages configured for this pool", + "optional" : 1, "type" : "boolean", - "description" : "The template feature is experimental, set this flag if you know what you are doing." + "typetext" : "" } } }, - "protected" : 1, - "method" : "POST", "permissions" : { - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}", "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Allocate" + "Sys.Modify" ] ] }, - "description" : "Create a Template.", + "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "null" + "type" : "string" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/template", - "leaf" : 1 + "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" + } }, + "POST" : { + "description" : "Create POOL", + "method" : "POST", + "name" : "createpool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "add_storages" : { + "description" : "Configure VM and CT storage using the new pool.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "application" : { + "description" : "The application of the pool, 'rbd' by default.", + "enum" : [ + "rbd", + "cephfs", + "rgw" + ], + "optional" : 1, + "type" : "string" + }, + "crush_rule" : { + "description" : "The rule to use for mapping object placement in the cluster.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "min_size" : { + "default" : 2, + "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" : 128, + "description" : "Number of placement groups.", + "maximum" : 32768, + "minimum" : 8, + "optional" : 1, + "type" : "integer", + "typetext" : " (8 - 32768)" + }, + "size" : { + "default" : 3, + "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" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/ceph/pools", + "text" : "pools" + }, + { + "children" : [ { - "path" : "/nodes/{node}/lxc/{vmid}/clone", - "leaf" : 1, - "text" : "clone", "info" : { - "POST" : { - "name" : "clone_vm", + "DELETE" : { + "description" : "Unset a ceph flag", + "method" : "DELETE", + "name" : "unset_flag", "parameters" : { "additionalProperties" : 0, "properties" : { - "full" : { - "optional" : 1, - "type" : "boolean", - "default" : 0, - "description" : "Create a full copy of all disk. This is always done when you clone a normal CT. For CT templates, we try to create a linked clone by default." - }, - "experimental" : { - "type" : "boolean", - "default" : 0, - "description" : "The clone feature is experimental, set this flag if you know what you are doing." - }, - "description" : { - "description" : "Description for the new CT.", - "optional" : 1, + "flag" : { + "description" : "The ceph flag to set/unset", + "enum" : [ + "full", + "pause", + "noup", + "nodown", + "noout", + "noin", + "nobackfill", + "norebalance", + "norecover", + "noscrub", + "nodeep-scrub", + "notieragent" + ], "type" : "string" }, - "hostname" : { - "format" : "dns-name", - "type" : "string", - "optional" : 1, - "description" : "Set a hostname for the new CT." - }, - "vmid" : { - "minimum" : 1, - "format" : "pve-vmid", - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, "node" : { "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "snapname" : { - "format" : "pve-configid", - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "The name of the snapshot." - }, - "pool" : { - "optional" : 1, - "type" : "string", - "description" : "Add the new CT to the specified pool.", - "format" : "pve-poolid" - }, - "newid" : { - "minimum" : 1, - "format" : "pve-vmid", - "type" : "integer", - "description" : "VMID for the clone." - }, - "storage" : { - "format" : "pve-storage-id", - "optional" : 1, - "type" : "string", - "requires" : "full", - "description" : "Target storage for full clone." - } - } - }, - "protected" : 1, - "method" : "POST", - "permissions" : { - "check" : [ - "and", - [ - "perm", - "/vms/{vmid}", - [ - "VM.Clone" - ] - ], - [ - "or", - [ - "perm", - "/vms/{newid}", - [ - "VM.Allocate" - ] - ], - [ - "perm", - "/pool/{pool}", - [ - "VM.Allocate" - ], - "require_param", - "pool" - ] + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" ] - ], - "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", - "description" : "Create a container clone/copy", "returns" : { - "type" : "string" + "type" : "null" } - } - } - }, - { - "text" : "resize", - "info" : { - "PUT" : { + }, + "POST" : { + "description" : "Set a ceph flag", + "method" : "POST", + "name" : "set_flag", "parameters" : { + "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "size" : { - "type" : "string", - "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]?" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" - }, - "disk" : { - "description" : "The disk you want to resize.", + "flag" : { + "description" : "The ceph flag to set/unset", "enum" : [ - "rootfs", - "mp0", - "mp1", - "mp2", - "mp3", - "mp4", - "mp5", - "mp6", - "mp7", - "mp8", - "mp9" + "full", + "pause", + "noup", + "nodown", + "noout", + "noin", + "nobackfill", + "norebalance", + "norecover", + "noscrub", + "nodeep-scrub", + "notieragent" ], "type" : "string" }, - "digest" : { - "optional" : 1, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "name" : "resize_vm", - "protected" : 1, - "method" : "PUT", "permissions" : { "check" : [ "perm", - "/vms/{vmid}", + "/", [ - "VM.Config.Disk" - ], - "any", - 1 + "Sys.Modify" + ] ] }, - "description" : "Resize a container mountpoint.", + "protected" : 1, "proxyto" : "node", "returns" : { - "description" : "the task ID.", - "type" : "string" + "type" : "null" } } }, - "path" : "/nodes/{node}/lxc/{vmid}/resize", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/ceph/flags/{flag}", + "text" : "{flag}" } ], - "text" : "{vmid}", "info" : { - "DELETE" : { - "description" : "Destroy the container (also delete all uses files).", - "proxyto" : "node", + "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", - "/vms/{vmid}", + "/", [ - "VM.Allocate" + "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, - "name" : "destroy_vm", + "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" : { - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, + "limit" : { + "minimum" : 0, + "optional" : 1, "type" : "integer", - "description" : "The (unique) ID of the VM." + "typetext" : " (0 - N)" }, "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "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" }, - "additionalProperties" : 0 + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/ceph/log", + "text" : "log" + }, + { + "info" : { + "GET" : { + "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 + ] }, - "method" : "DELETE" + "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" : { + "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" : { - "returns" : { - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{subdir}" - } - ], - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - } - }, + "description" : "Extract configuration from vzdump backup archive.", "method" : "GET", - "proxyto" : "node", - "description" : "Directory index", - "name" : "vmdiridx", + "name" : "extractconfig", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "vmid" : { - "description" : "The (unique) ID of the VM.", - "type" : "integer", - "format" : "pve-vmid", - "minimum" : 1 + "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" : { + "description" : "Create backup.", "method" : "POST", - "name" : "create_vm", + "name" : "vzdump", "parameters" : { "additionalProperties" : 0, "properties" : { - "storage" : { - "description" : "Default Storage.", - "default" : "local", - "type" : "string", - "optional" : 1, - "format" : "pve-storage-id" - }, - "onboot" : { - "type" : "boolean", - "optional" : 1, + "all" : { "default" : 0, - "description" : "Specifies whether a VM will be started during system bootup." - }, - "startup" : { - "description" : "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped.", - "type" : "string", - "optional" : 1, - "format" : "pve-startup-order", - "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] " - }, - "console" : { - "description" : "Attach a console device (/dev/console) to the container.", - "default" : 1, + "description" : "Backup all known guest systems on this host.", "optional" : 1, - "type" : "boolean" + "type" : "boolean", + "typetext" : "" }, - "pool" : { + "bwlimit" : { + "default" : 0, + "description" : "Limit I/O bandwidth (KBytes per second).", + "minimum" : 0, "optional" : 1, - "type" : "string", - "description" : "Add the VM to the specified pool.", - "format" : "pve-poolid" + "type" : "integer", + "typetext" : " (0 - N)" }, - "cmode" : { + "compress" : { + "default" : "0", + "description" : "Compress dump file.", "enum" : [ - "shell", - "console", - "tty" + "0", + "1", + "gzip", + "lzo" ], - "description" : "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login).", - "type" : "string", "optional" : 1, - "default" : "tty" + "type" : "string" }, - "description" : { - "type" : "string", + "dumpdir" : { + "description" : "Store resulting files to specified directory.", "optional" : 1, - "description" : "Container description. Only used on the configuration web interface." + "type" : "string", + "typetext" : "" }, - "lock" : { + "exclude" : { + "description" : "Exclude specified guest systems (assumes --all)", + "format" : "pve-vmid-list", "optional" : 1, "type" : "string", - "enum" : [ - "migrate", - "backup", - "snapshot", - "rollback" - ], - "description" : "Lock/unlock the VM." + "typetext" : "" }, - "rootfs" : { - "type" : "string", + "exclude-path" : { + "description" : "Exclude certain files/directories (shell globs).", + "format" : "string-alist", "optional" : 1, - "description" : "Use volume as container root.", - "format" : { - "ro" : { - "type" : "boolean", - "optional" : 1, - "description" : "Read-only mountpoint (not supported with bind mounts)", - "format_description" : "ro" - }, - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "optional" : 1, - "type" : "boolean", - "format_description" : "acl" - }, - "backup" : { - "description" : "Whether to include the mountpoint in backups.", - "type" : "boolean", - "optional" : 1, - "format_description" : "[1|0]" - }, - "size" : { - "format" : "disk-size", - "format_description" : "DiskSize", - "description" : "Volume size (read only value).", - "optional" : 1, - "type" : "string" - }, - "volume" : { - "default_key" : 1, - "format" : "pve-lxc-mp-string", - "format_description" : "volume", - "type" : "string", - "description" : "Volume, device or directory to mount into the container." - }, - "quota" : { - "format_description" : "[0|1]", - "optional" : 1, - "type" : "boolean", - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)" - } - } - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "The (unique) ID of the VM.", - "type" : "integer" + "type" : "string", + "typetext" : "" }, - "cpuunits" : { + "ionice" : { + "default" : 7, + "description" : "Set CFQ ionice priority.", + "maximum" : 8, "minimum" : 0, - "maximum" : 500000, - "default" : 1024, - "type" : "integer", "optional" : 1, - "description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to the weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0." + "type" : "integer", + "typetext" : " (0 - 8)" }, - "tty" : { + "lockwait" : { + "default" : 180, + "description" : "Maximal time to wait for the global lock (minutes).", "minimum" : 0, - "description" : "Specify the number of tty available to the container", - "default" : 2, - "maximum" : 6, "optional" : 1, - "type" : "integer" + "type" : "integer", + "typetext" : " (0 - N)" }, - "arch" : { - "default" : "amd64", - "type" : "string", - "optional" : 1, - "description" : "OS architecture type.", + "mailnotification" : { + "default" : "always", + "description" : "Specify when to send an email", "enum" : [ - "amd64", - "i386" - ] - }, - "ostemplate" : { - "maxLength" : 255, - "description" : "The OS template or backup file.", - "type" : "string" - }, - "force" : { - "type" : "boolean", - "optional" : 1, - "description" : "Allow to overwrite existing container." - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "cpulimit" : { - "minimum" : 0, - "type" : "number", - "optional" : 1, - "default" : 0, - "maximum" : 128, - "description" : "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit." - }, - "mp[n]" : { - "format" : { - "backup" : { - "optional" : 1, - "type" : "boolean", - "description" : "Whether to include the mountpoint in backups.", - "format_description" : "[1|0]" - }, - "size" : { - "format_description" : "DiskSize", - "format" : "disk-size", - "type" : "string", - "optional" : 1, - "description" : "Volume size (read only value)." - }, - "acl" : { - "description" : "Explicitly enable or disable ACL support.", - "type" : "boolean", - "optional" : 1, - "format_description" : "acl" - }, - "ro" : { - "format_description" : "ro", - "description" : "Read-only mountpoint (not supported with bind mounts)", - "type" : "boolean", - "optional" : 1 - }, - "volume" : { - "format_description" : "volume", - "format" : "pve-lxc-mp-string", - "default_key" : 1, - "description" : "Volume, device or directory to mount into the container.", - "type" : "string" - }, - "quota" : { - "optional" : 1, - "type" : "boolean", - "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)", - "format_description" : "[0|1]" - }, - "mp" : { - "type" : "string", - "description" : "Path to the mountpoint as seen from inside the container.", - "format_description" : "Path", - "format" : "pve-lxc-mp-string" - } - }, - "description" : "Use volume as container mount point (experimental feature).", + "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", - "optional" : 1 + "typetext" : "" }, - "unprivileged" : { - "type" : "boolean", + "maxfiles" : { + "default" : 1, + "description" : "Maximal number of backup files per guest system.", + "minimum" : 1, "optional" : 1, - "default" : 0, - "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)" + "type" : "integer", + "typetext" : " (1 - N)" }, - "unused[n]" : { - "description" : "Reference to unused volumes.", - "type" : "string", + "mode" : { + "default" : "snapshot", + "description" : "Backup mode.", + "enum" : [ + "snapshot", + "suspend", + "stop" + ], "optional" : 1, - "format" : "pve-volume-id" + "type" : "string" }, - "swap" : { - "description" : "Amount of SWAP for the VM in MB.", - "default" : 512, + "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", - "minimum" : 0 + "typetext" : "" }, - "ostype" : { - "type" : "string", + "quiet" : { + "default" : 0, + "description" : "Be quiet.", "optional" : 1, - "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.", - "enum" : [ - "debian", - "ubuntu", - "centos", - "fedora", - "opensuse", - "archlinux", - "alpine", - "unmanaged" - ] + "type" : "boolean", + "typetext" : "" }, - "memory" : { - "description" : "Amount of RAM for the VM in MB.", - "type" : "integer", + "remove" : { + "default" : 1, + "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", "optional" : 1, - "default" : 512, - "minimum" : 16 + "type" : "boolean", + "typetext" : "" }, - "ssh-public-keys" : { - "description" : "Setup public SSH keys (one key per line, OpenSSH format).", + "script" : { + "description" : "Use specified hook script.", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "protection" : { - "type" : "boolean", + "size" : { + "default" : 1024, + "description" : "Unused, will be removed in a future release.", + "minimum" : 500, "optional" : 1, - "default" : 0, - "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation." + "type" : "integer", + "typetext" : " (500 - N)" }, - "ignore-unpack-errors" : { - "type" : "boolean", + "stdexcludes" : { + "default" : 1, + "description" : "Exclude temporary files and logs.", "optional" : 1, - "description" : "Ignore errors when extracting the template." + "type" : "boolean", + "typetext" : "" }, - "template" : { - "description" : "Enable/disable Template.", + "stdout" : { + "description" : "Write tar to stdout, not to a file.", "optional" : 1, "type" : "boolean", - "default" : 0 + "typetext" : "" }, - "restore" : { + "stop" : { + "default" : 0, + "description" : "Stop runnig backup jobs on this host.", "optional" : 1, "type" : "boolean", - "description" : "Mark this as restore task." + "typetext" : "" }, - "hostname" : { - "format" : "dns-name", - "maxLength" : 255, - "description" : "Set a host name for the container.", + "stopwait" : { + "default" : 10, + "description" : "Maximal time to wait until a guest system is stopped (minutes).", + "minimum" : 0, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (0 - N)" }, - "password" : { + "storage" : { + "description" : "Store resulting file to this storage.", + "format" : "pve-storage-id", "optional" : 1, "type" : "string", - "description" : "Sets root password inside container.", - "minLength" : 5 + "typetext" : "" }, - "searchdomain" : { - "format" : "dns-name-list", + "tmpdir" : { + "description" : "Store temporary files to specified directory.", "optional" : 1, "type" : "string", - "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver." + "typetext" : "" }, - "nameserver" : { - "format" : "address-list", - "description" : "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.", + "vmid" : { + "description" : "The ID of the guest system you want to backup.", + "format" : "pve-vmid-list", + "optional" : 1, "type" : "string", - "optional" : 1 - }, - "net[n]" : { - "format" : { - "gw6" : { - "format" : "ipv6", - "format_description" : "GatewayIPv6", - "description" : "Default gateway for IPv6 traffic.", - "type" : "string", - "optional" : 1 + "typetext" : "" + } + } + }, + "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.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/vzdump", + "text" : "vzdump" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "GET" : { + "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" : "" + }, + "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" + } + } }, - "tag" : { - "description" : "VLAN tag for this interface.", - "type" : "integer", - "optional" : 1, - "maximum" : "4094", - "format_description" : "VlanNo", - "minimum" : "2" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] }, - "firewall" : { - "format_description" : "[1|0]", - "description" : "Controls whether this interface's firewall rules should be used.", - "optional" : 1, - "type" : "boolean" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/state", + "text" : "state" + }, + { + "info" : { + "POST" : { + "description" : "Start service.", + "method" : "POST", + "name" : "service_start", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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" + } + } }, - "type" : { - "type" : "string", - "optional" : 1, - "description" : "Network interface type.", - "enum" : [ - "veth" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] ] }, - "trunks" : { - "format_description" : "vlanid[;vlanid...]", - "type" : "string", - "optional" : 1, - "pattern" : "(?^:\\d+(?:;\\d+)*)", - "description" : "VLAN ids to pass through the interface" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/start", + "text" : "start" + }, + { + "info" : { + "POST" : { + "description" : "Stop service.", + "method" : "POST", + "name" : "service_stop", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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" + } + } }, - "ip" : { - "format" : "pve-ipv4-config", - "format_description" : "IPv4Format/CIDR", - "description" : "IPv4 address in CIDR format.", - "type" : "string", - "optional" : 1 + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "rate" : { - "description" : "Apply rate limiting to the interface", - "optional" : 1, - "type" : "number", - "format_description" : "mbps" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/stop", + "text" : "stop" + }, + { + "info" : { + "POST" : { + "description" : "Restart service.", + "method" : "POST", + "name" : "service_restart", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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" + } + } }, - "ip6" : { - "type" : "string", - "optional" : 1, - "description" : "IPv6 address in CIDR format.", - "format" : "pve-ipv6-config", - "format_description" : "IPv6Format/CIDR" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "gw" : { - "format" : "ipv4", - "format_description" : "GatewayIPv4", - "description" : "Default gateway for IPv4 traffic.", - "optional" : 1, + "protected" : 1, + "proxyto" : "node", + "returns" : { "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/restart", + "text" : "restart" + }, + { + "info" : { + "POST" : { + "description" : "Reload service.", + "method" : "POST", + "name" : "service_reload", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "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" + } + } }, - "bridge" : { - "format_description" : "vmbr", - "optional" : 1, - "type" : "string", - "description" : "Bridge to attach the network device to.", - "pattern" : "[-_.\\w\\d]+" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "name" : { + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/services/{service}/reload", + "text" : "reload" + } + ], + "info" : { + "GET" : { + "description" : "Directory index", + "method" : "GET", + "name" : "srvcmdidx", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "description" : "Name of the network device as seen from inside the container. (lxc.network.name)", - "pattern" : "[-_.\\w\\d]+", - "format_description" : "String" + "typetext" : "" }, - "mtu" : { - "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)", - "type" : "integer", - "optional" : 1, - "format_description" : "Number", - "minimum" : 64 + "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" + ] + ] + }, + "returns" : { + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } }, - "hwaddr" : { - "format_description" : "MAC", - "description" : "Bridge to attach the network device to. (lxc.network.hwaddr)", - "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})", - "type" : "string", - "optional" : 1 - } + "type" : "object" }, - "description" : "Specifies network interfaces for the container.", - "optional" : 1, - "type" : "string" + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" } } }, - "protected" : 1, - "returns" : { - "type" : "string" - }, - "permissions" : { - "description" : "You need 'VM.Allocate' permissions on /vms/{vmid} or on the VM pool /pool/{pool}. For restore, it is enough if the user has 'VM.Backup' permission and the VM already exists. You also need 'Datastore.AllocateSpace' permissions on the storage.", - "user" : "all" - }, - "proxyto" : "node", - "description" : "Create or restore a container." - }, + "leaf" : 0, + "path" : "/nodes/{node}/services/{service}", + "text" : "{service}" + } + ], + "info" : { "GET" : { - "name" : "vmlist", + "description" : "Service list.", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "protected" : 1, - "method" : "GET", "permissions" : { - "description" : "Only list CTs where you have VM.Audit permissons on /vms/.", - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] }, + "protected" : 1, "proxyto" : "node", - "description" : "LXC container index (per node).", "returns" : { "items" : { - "type" : "object", - "properties" : {} + "properties" : {}, + "type" : "object" }, "links" : [ { - "rel" : "child", - "href" : "{vmid}" + "href" : "{service}", + "rel" : "child" } ], "type" : "array" } } - } + }, + "leaf" : 0, + "path" : "/nodes/{node}/services", + "text" : "services" }, { "info" : { "GET" : { - "description" : "Directory index.", + "description" : "Read subscription info.", + "method" : "GET", + "name" : "get", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" } - }, - "additionalProperties" : 0 + } + }, + "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" : "" + } + } }, "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 + "Sys.Modify" + ] ] }, - "name" : "index", - "method" : "GET", + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "href" : "{name}", - "rel" : "child" + "type" : "null" + } + }, + "PUT" : { + "description" : "Set subscription key.", + "method" : "PUT", + "name" : "set", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "key" : { + "description" : "Proxmox VE subscription key", + "maxLength" : 32, + "pattern" : "pve([124])([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" : { - "POST" : { - "name" : "createosd", + "DELETE" : { + "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" : { + "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" : { + "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_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" }, - "fstype" : { + "bond_xmit_hash_policy" : { + "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.", "enum" : [ - "xfs", - "ext4", - "btrfs" + "layer2", + "layer2+3", + "layer3+4" ], - "description" : "File system type.", + "optional" : 1, + "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, - "default" : "xfs" + "type" : "boolean", + "typetext" : "" }, - "journal_dev" : { + "comments" : { + "description" : "Comments", + "optional" : 1, "type" : "string", + "typetext" : "" + }, + "comments6" : { + "description" : "Comments", "optional" : 1, - "description" : "Block device name for journal." + "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)" }, - "dev" : { - "description" : "Block device name.", - "type" : "string" - } - } - }, - "proxyto" : "node", - "description" : "Create OSD", - "protected" : 1, - "method" : "POST", - "returns" : { - "type" : "string" - } - }, - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "proxyto" : "node", - "description" : "Get Ceph osd list/tree.", - "returns" : { - "type" : "object" - }, - "name" : "index", - "parameters" : { - "properties" : { "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "method" : "GET" - } - }, - "children" : [ - { - "leaf" : 0, - "path" : "/nodes/{node}/ceph/osd/{osdid}", - "info" : { - "DELETE" : { - "name" : "destroyosd", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "osdid" : { - "type" : "integer", - "description" : "OSD ID" - }, - "cleanup" : { - "description" : "If set, we remove partition table entries.", - "optional" : 1, - "type" : "boolean", - "default" : 0 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "protected" : 1, - "description" : "Destroy OSD", - "proxyto" : "node", - "method" : "DELETE", - "returns" : { - "type" : "string" - } - } - }, - "children" : [ - { - "text" : "in", - "info" : { - "POST" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "description" : "ceph osd in", - "proxyto" : "node", - "returns" : { - "type" : "null" - }, - "name" : "in", - "parameters" : { - "properties" : { - "osdid" : { - "type" : "integer", - "description" : "OSD ID" - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "method" : "POST" - } + "ovs_bonds" : { + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "path" : "/nodes/{node}/ceph/osd/{osdid}/in", - "leaf" : 1 - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/ceph/osd/{osdid}/out", - "info" : { - "POST" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - }, - "proxyto" : "node", - "description" : "ceph osd out", - "returns" : { - "type" : "null" - }, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "osdid" : { - "type" : "integer", - "description" : "OSD ID" - } - }, - "additionalProperties" : 0 - }, - "name" : "out", - "protected" : 1, - "method" : "POST" - } + "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" : "" }, - "text" : "out" + "type" : { + "description" : "Network interface type", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "unknown" + ], + "type" : "string" + } } - ], - "text" : "{osdid}" - } - ], - "text" : "osd", - "leaf" : 0, - "path" : "/nodes/{node}/ceph/osd" - }, - { - "path" : "/nodes/{node}/ceph/disks", - "leaf" : 1, - "text" : "disks", - "info" : { - "GET" : { - "proxyto" : "node", - "description" : "List local disks.", + }, "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 + "Sys.Modify" + ] ] }, - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "vendor" : { - "type" : "string", - "optional" : 1 - }, - "osdid" : { - "type" : "integer" - }, - "serial" : { - "type" : "string", - "optional" : 1 - }, - "model" : { - "type" : "string", - "optional" : 1 - }, - "used" : { - "optional" : 1, - "type" : "string" - }, - "size" : { - "type" : "integer" - }, - "dev" : { - "type" : "string" - }, - "gpt" : { - "type" : "boolean" - } - }, - "type" : "object" - } + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "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" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, + "GET" : { + "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" : { + "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_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 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)" }, - "protected" : 1, - "name" : "disks", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "type" : { - "optional" : 1, - "type" : "string", - "description" : "Only list specific types of disks.", - "enum" : [ - "unused", - "journal_disks" - ] - } - } + "slaves" : { + "description" : "Specify the interfaces used by the bonding device.", + "format" : "pve-iface-list", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "method" : "GET" + "type" : { + "description" : "Network interface type", + "enum" : [ + "bridge", + "bond", + "eth", + "alias", + "vlan", + "OVSBridge", + "OVSBond", + "OVSPort", + "OVSIntPort", + "unknown" + ], + "type" : "string" + } } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" } }, - { - "path" : "/nodes/{node}/ceph/config", - "leaf" : 1, - "text" : "config", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "string" - }, - "description" : "Get Ceph configuration.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - } - } - }, - "name" : "config", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] + "PUT" : { + "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" : [ { - "path" : "/nodes/{node}/ceph/mon", - "leaf" : 0, - "text" : "mon", "children" : [ { - "path" : "/nodes/{node}/ceph/mon/{monid}", - "leaf" : 1, - "text" : "{monid}", "info" : { - "DELETE" : { - "proxyto" : "node", - "description" : "Destroy Ceph monitor.", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] + "GET" : { + "description" : "Read task log.", + "method" : "GET", + "name" : "read_task_log", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "limit" : { + "default" : 50, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "start" : { + "default" : 0, + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "upid" : { + "type" : "string", + "typetext" : "" + } + } }, - "returns" : { - "type" : "string" + "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" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" + }, + "t" : { + "description" : "Line text", + "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" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "monid" : { - "description" : "Monitor ID", - "type" : "integer" + "upid" : { + "type" : "string", + "typetext" : "" } } }, - "name" : "destroymon", - "method" : "DELETE" + "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" + }, + "status" : { + "enum" : [ + "running", + "stopped" + ], + "type" : "string" + } + }, + "type" : "object" + } } - } + }, + "leaf" : 1, + "path" : "/nodes/{node}/tasks/{upid}/status", + "text" : "status" } ], "info" : { + "DELETE" : { + "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 the task does not belong to him.", + "user" : "all" + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + }, "GET" : { + "description" : "", "method" : "GET", + "name" : "upid_index", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "upid" : { + "type" : "string", + "typetext" : "" } } }, - "name" : "listmon", - "protected" : 1, + "permissions" : { + "user" : "all" + }, "returns" : { "items" : { - "properties" : { - "name" : { - "type" : "string" - }, - "addr" : { - "type" : "string" - } - }, + "properties" : {}, "type" : "object" }, "links" : [ @@ -15998,295 +27603,539 @@ var pveapi = [ } ], "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/tasks/{upid}", + "text" : "{upid}" + } + ], + "info" : { + "GET" : { + "description" : "Read task list for one node (finished tasks).", + "method" : "GET", + "name" : "node_tasks", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "errors" : { + "default" : 0, + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] + "limit" : { + "default" : 50, + "description" : "Only list this amount of tasks.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "description" : "Get Ceph monitor list.", - "proxyto" : "node" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "start" : { + "default" : 0, + "description" : "List tasks beginning from this offset.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" + }, + "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" : { + "optional" : 1, + "title" : "ID", + "type" : "string" + }, + "node" : { + "optional" : 1, + "title" : "Node", + "type" : "string" + }, + "pid" : { + "optional" : 1, + "title" : "PID", + "type" : "integer" + }, + "pstart" : { + "optional" : 1, + "type" : "integer" + }, + "starttime" : { + "optional" : 1, + "title" : "Starttime", + "type" : "integer" + }, + "status" : { + "optional" : 1, + "title" : "Status", + "type" : "string" + }, + "type" : { + "optional" : 1, + "title" : "Type", + "type" : "string" + }, + "upid" : { + "title" : "UPID", + "type" : "string" + }, + "user" : { + "optional" : 1, + "title" : "User", + "type" : "string" + } + }, + "type" : "object" }, - "POST" : { + "links" : [ + { + "href" : "{upid}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/tasks", + "text" : "tasks" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "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" : "" + } + } + }, "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Modify" + "Datastore.Allocate" ] ] }, - "description" : "Create Ceph Monitor", + "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "string" - }, + "items" : { + "properties" : { + "pool" : { + "description" : "ZFS pool name.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/zfs", + "text" : "zfs" + }, + { + "info" : { + "GET" : { + "description" : "Scan remote NFS server.", + "method" : "GET", + "name" : "nfsscan", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" + }, + "server" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "name" : "createmon", - "protected" : 1, - "method" : "POST" - } - } - }, - { - "info" : { - "POST" : { - "returns" : { - "type" : "null" + } }, - "proxyto" : "node", - "description" : "Create initial ceph default configuration and setup symlinks.", "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Modify" + "Datastore.Allocate" ] ] }, - "method" : "POST", - "protected" : 1, - "name" : "init", - "parameters" : { - "properties" : { - "pg_bits" : { - "description" : "Placement group bits, used to specify the default number of placement groups.\n\nNOTE: 'osd pool default pg num' does not work for default pools.", - "default" : 6, - "maximum" : 14, - "optional" : 1, - "type" : "integer", - "minimum" : 6 - }, - "size" : { - "minimum" : 1, - "maximum" : 3, - "default" : 2, - "type" : "integer", - "optional" : 1, - "description" : "Number of replicas per object" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "options" : { + "description" : "NFS export options.", + "type" : "string" + }, + "path" : { + "description" : "The exported path.", + "type" : "string" + } }, - "network" : { - "optional" : 1, - "type" : "string", - "description" : "Use specific network for all ceph related traffic", - "format" : "CIDR", - "maxLength" : 128 - } + "type" : "object" }, - "additionalProperties" : 0 + "type" : "array" } } }, - "text" : "init", "leaf" : 1, - "path" : "/nodes/{node}/ceph/init" + "path" : "/nodes/{node}/scan/nfs", + "text" : "nfs" }, { - "path" : "/nodes/{node}/ceph/stop", - "leaf" : 1, - "text" : "stop", "info" : { - "POST" : { - "method" : "POST", - "name" : "stop", + "GET" : { + "description" : "Scan remote CIFS server.", + "method" : "GET", + "name" : "cifsscan", "parameters" : { + "additionalProperties" : 0, "properties" : { + "domain" : { + "description" : "SMB domain (Workgroup).", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "service" : { + "password" : { + "description" : "User password.", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "server" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", "type" : "string", + "typetext" : "" + }, + "username" : { + "description" : "User name.", "optional" : 1, - "description" : "Ceph service name.", - "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}" + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "returns" : { - "type" : "string" + } }, "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Modify" + "Datastore.Allocate" ] ] }, - "description" : "Stop ceph services.", - "proxyto" : "node" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "description" : { + "description" : "Descriptive text from server.", + "type" : "string" + }, + "share" : { + "description" : "The cifs share name.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } } - } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/cifs", + "text" : "cifs" }, { - "path" : "/nodes/{node}/ceph/start", - "leaf" : 1, - "text" : "start", "info" : { - "POST" : { + "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" : { + "description" : "The server address (name or IP).", + "format" : "pve-storage-server", + "type" : "string", + "typetext" : "" + } + } + }, "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Modify" + "Datastore.Allocate" ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Start ceph services.", "returns" : { - "type" : "string" - }, - "name" : "start", + "items" : { + "properties" : { + "volname" : { + "description" : "The volume name.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/glusterfs", + "text" : "glusterfs" + }, + { + "info" : { + "GET" : { + "description" : "Scan remote iSCSI server.", + "method" : "GET", + "name" : "iscsiscan", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "service" : { - "description" : "Ceph service name.", - "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}", + "portal" : { + "description" : "The iSCSI portal (IP or DNS name with optional port).", + "format" : "pve-storage-portal-dns", "type" : "string", - "optional" : 1 + "typetext" : "" } } }, + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, "protected" : 1, - "method" : "POST" + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "portal" : { + "description" : "The iSCSI portal name.", + "type" : "string" + }, + "target" : { + "description" : "The iSCSI target name.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" + } } - } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/iscsi", + "text" : "iscsi" }, { - "text" : "status", "info" : { "GET" : { - "protected" : 1, + "description" : "List local LVM volume groups.", + "method" : "GET", + "name" : "lvmscan", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "name" : "status", - "method" : "GET", - "description" : "Get ceph status.", - "proxyto" : "node", "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 + "Datastore.Allocate" + ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "object" + "items" : { + "properties" : { + "vg" : { + "description" : "The LVM logical volume group name.", + "type" : "string" + } + }, + "type" : "object" + }, + "type" : "array" } } }, - "path" : "/nodes/{node}/ceph/status", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/scan/lvm", + "text" : "lvm" }, { "info" : { "GET" : { - "protected" : 1, + "description" : "List local LVM Thin Pools.", + "method" : "GET", + "name" : "lvmthinscan", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" + }, + "vg" : { + "maxLength" : 100, + "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+", + "type" : "string" } } }, - "name" : "lspools", - "method" : "GET", - "proxyto" : "node", - "description" : "List all pools.", "permissions" : { "check" : [ "perm", - "/", + "/storage", [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 + "Datastore.Allocate" + ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{pool_name}" - } - ], "items" : { - "type" : "object", "properties" : { - "pool_name" : { + "lv" : { + "description" : "The LVM Thin Pool name (LVM logical volume).", "type" : "string" - }, - "pool" : { - "type" : "integer" - }, - "size" : { - "type" : "integer" } - } + }, + "type" : "object" }, "type" : "array" } - }, - "POST" : { - "returns" : { - "type" : "null" + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/lvmthin", + "text" : "lvmthin" + }, + { + "info" : { + "GET" : { + "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" : "" + } + } }, - "proxyto" : "node", - "description" : "Create POOL", "permissions" : { "check" : [ "perm", @@ -16296,2774 +28145,2955 @@ var pveapi = [ ] ] }, - "method" : "POST", "protected" : 1, - "name" : "createpool", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "size" : { - "maximum" : 3, - "default" : 2, - "optional" : 1, - "type" : "integer", - "description" : "Number of replicas per object", - "minimum" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "name" : { - "description" : "The name of the pool. It must be unique.", - "type" : "string" - }, - "crush_ruleset" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "default" : 0, - "maximum" : 32768, - "description" : "The ruleset to use for mapping object placement in the cluster." - }, - "pg_num" : { - "optional" : 1, - "type" : "integer", - "maximum" : 32768, - "default" : 64, - "description" : "Number of placement groups.", - "minimum" : 8 + "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" + } }, - "min_size" : { - "optional" : 1, - "type" : "integer", - "maximum" : 3, - "default" : 1, - "description" : "Minimum number of replicas per object", - "minimum" : 1 - } - } + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/scan/usb", + "text" : "usb" + } + ], + "info" : { + "GET" : { + "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" : [ { - "path" : "/nodes/{node}/ceph/pools/{name}", - "leaf" : 1, - "text" : "{name}", + "children" : [ + { + "info" : { + "GET" : { + "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" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "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" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/hardware/pci/{pciid}/mdev", + "text" : "mdev" + } + ], "info" : { - "DELETE" : { - "method" : "DELETE", - "protected" : 1, + "GET" : { + "description" : "Index of available pci methods", + "method" : "GET", + "name" : "pciindex", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - }, - "name" : { + "format" : "pve-node", "type" : "string", - "description" : "The name of the pool. It must be unique." + "typetext" : "" + }, + "pciid" : { + "pattern" : "(?:[0-9a-fA-F]{4}:)?[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\\.[0-9a-fA-F]", + "type" : "string" } - }, - "additionalProperties" : 0 - }, - "name" : "destroypool", - "returns" : { - "type" : "null" + } }, - "proxyto" : "node", - "description" : "Destroy pool", "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Modify" - ] - ] - } - } - } - } - ], - "text" : "pools", - "leaf" : 0, - "path" : "/nodes/{node}/ceph/pools" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/ceph/crush", - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/", - [ - "Sys.Audit", - "Datastore.Audit" - ], - "any", - 1 - ] - }, - "description" : "Get OSD crush map", - "proxyto" : "node", - "returns" : { - "type" : "string" - }, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "method" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{method}", + "rel" : "child" + } + ], + "type" : "array" } - }, - "additionalProperties" : 0 + } }, - "name" : "crush", - "protected" : 1, - "method" : "GET" + "leaf" : 0, + "path" : "/nodes/{node}/hardware/pci/{pciid}", + "text" : "{pciid}" } - }, - "text" : "crush" - }, - { + ], "info" : { "GET" : { - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "t" : { - "type" : "string", - "description" : "Line text" - }, - "n" : { - "type" : "integer", - "description" : "Line number" - } - }, - "type" : "object" - } - }, - "description" : "Read ceph log", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Syslog" - ] - ] - }, + "description" : "List local PCI devices.", "method" : "GET", - "protected" : 1, - "name" : "log", + "name" : "pciscan", "parameters" : { + "additionalProperties" : 0, "properties" : { - "start" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - }, "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" }, - "limit" : { - "type" : "integer", + "pci-class-blacklist" : { + "default" : "05;06;08;0b", + "description" : "A list of blacklisted PCI classes, which will not be returned. Following are filtered by default: Memory Controller (05), Bridge (06), Generic System Peripheral (08) 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, - "minimum" : 0 + "type" : "boolean", + "typetext" : "" } - }, - "additionalProperties" : 0 - } - } - }, - "text" : "log", - "leaf" : 1, - "path" : "/nodes/{node}/ceph/log" - } - ], - "text" : "ceph", - "leaf" : 0, - "path" : "/nodes/{node}/ceph" - }, - { - "text" : "vzdump", - "info" : { - "POST" : { - "permissions" : { - "user" : "all", - "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage." - }, - "description" : "Create backup.", - "proxyto" : "node", - "returns" : { - "type" : "string" - }, - "name" : "vzdump", - "parameters" : { - "properties" : { - "exclude" : { - "format" : "pve-vmid-list", - "description" : "Exclude specified guest systems (assumes --all)", - "type" : "string", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "optional" : 1, - "description" : "Only run if executed on this node." - }, - "size" : { - "description" : "Unused, will be removed in a future release.", - "type" : "integer", - "optional" : 1, - "default" : 1024, - "minimum" : 500 - }, - "pigz" : { - "type" : "integer", - "optional" : 1, - "default" : 0, - "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count." - }, - "storage" : { - "format" : "pve-storage-id", - "description" : "Store resulting file to this storage.", - "type" : "string", - "optional" : 1 - }, - "stdexcludes" : { - "default" : 1, - "type" : "boolean", - "optional" : 1, - "description" : "Exclude temporary files and logs." - }, - "exclude-path" : { - "format" : "string-alist", - "type" : "string", - "optional" : 1, - "description" : "Exclude certain files/directories (shell globs)." - }, - "quiet" : { - "description" : "Be quiet.", - "optional" : 1, - "type" : "boolean", - "default" : 0 - }, - "stopwait" : { - "optional" : 1, - "type" : "integer", - "default" : 10, - "description" : "Maximal time to wait until a guest system is stopped (minutes).", - "minimum" : 0 - }, - "remove" : { - "description" : "Remove old backup files if there are more than 'maxfiles' backup files.", - "type" : "boolean", - "optional" : 1, - "default" : 1 - }, - "stdout" : { - "description" : "Write tar to stdout, not to a file.", - "type" : "boolean", - "optional" : 1 - }, - "all" : { - "default" : 0, - "type" : "boolean", - "optional" : 1, - "description" : "Backup all known guest systems on this host." - }, - "mailnotification" : { - "description" : "Specify when to send an email", - "enum" : [ - "always", - "failure" - ], - "default" : "always", - "type" : "string", - "optional" : 1 - }, - "lockwait" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "default" : 180, - "description" : "Maximal time to wait for the global lock (minutes)." - }, - "script" : { - "type" : "string", - "optional" : 1, - "description" : "Use specified hook script." - }, - "dumpdir" : { - "type" : "string", - "optional" : 1, - "description" : "Store resulting files to specified directory." - }, - "mailto" : { - "optional" : 1, - "type" : "string", - "description" : "Comma-separated list of email addresses that should receive email notifications.", - "format" : "string-list" + } }, - "compress" : { - "default" : "0", - "type" : "string", - "optional" : 1, - "description" : "Compress dump file.", - "enum" : [ - "0", - "1", - "gzip", - "lzo" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] ] }, - "tmpdir" : { - "optional" : 1, - "type" : "string", - "description" : "Store temporary files to specified directory." - }, - "mode" : { - "description" : "Backup mode.", - "enum" : [ - "snapshot", - "suspend", - "stop" - ], - "default" : "snapshot", - "type" : "string", - "optional" : 1 - }, - "maxfiles" : { - "default" : 1, - "optional" : 1, - "type" : "integer", - "description" : "Maximal number of backup files per guest system.", - "minimum" : 1 - }, - "stop" : { - "type" : "boolean", - "optional" : 1, - "default" : 0, - "description" : "Stop runnig backup jobs on this host." - }, - "ionice" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "default" : 7, - "maximum" : 8, - "description" : "Set CFQ ionice priority." - }, - "bwlimit" : { - "optional" : 1, - "type" : "integer", - "default" : 0, - "description" : "Limit I/O bandwidth (KBytes per second).", - "minimum" : 0 - }, - "vmid" : { - "format" : "pve-vmid-list", - "description" : "The ID of the guest system you want to backup.", - "optional" : 1, - "type" : "string" + "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" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, - "method" : "POST" + "leaf" : 0, + "path" : "/nodes/{node}/hardware/pci", + "text" : "pci" } - }, - "path" : "/nodes/{node}/vzdump", - "leaf" : 1 - }, - { + ], "info" : { "GET" : { + "description" : "Index of hardware types", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "name" : "index", - "protected" : 1, - "method" : "GET", "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "user" : "all" }, - "proxyto" : "node", - "description" : "Service list.", "returns" : { + "items" : { + "properties" : { + "type" : { + "type" : "string" + } + }, + "type" : "object" + }, "links" : [ { - "rel" : "child", - "href" : "{service}" + "href" : "{type}", + "rel" : "child" } ], - "items" : { - "type" : "object", - "properties" : {} - }, "type" : "array" } } }, - "text" : "services", + "leaf" : 0, + "path" : "/nodes/{node}/hardware", + "text" : "hardware" + }, + { "children" : [ { - "leaf" : 0, - "path" : "/nodes/{node}/services/{service}", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "links" : [ - { - "rel" : "child", - "href" : "{subdir}" - } - ], - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" - }, - "description" : "Directory index", - "name" : "srvcmdidx", - "parameters" : { - "properties" : { - "service" : { - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID", - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - } - } - }, "children" : [ { - "leaf" : 1, - "path" : "/nodes/{node}/services/{service}/state", - "info" : { - "GET" : { - "returns" : { - "properties" : {}, - "type" : "object" - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, - "proxyto" : "node", - "description" : "Read service properties", - "method" : "GET", - "name" : "service_state", - "parameters" : { - "properties" : { - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "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" : "" + } + } }, - "service" : { - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID", + "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" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/content/{volume}", + "text" : "{volume}" } - }, - "text" : "state" - }, - { - "text" : "start", + ], "info" : { - "POST" : { - "returns" : { - "type" : "string" - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "description" : "Start service.", - "proxyto" : "node", - "method" : "POST", - "name" : "service_start", + "GET" : { + "description" : "List storage content.", + "method" : "GET", + "name" : "index", "parameters" : { + "additionalProperties" : 0, "properties" : { - "service" : { + "content" : { + "description" : "Only list content of this type.", + "format" : "pve-storage-content", + "optional" : 1, "type" : "string", - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID" + "typetext" : "" }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "protected" : 1 - } - }, - "path" : "/nodes/{node}/services/{service}/start", - "leaf" : 1 - }, - { - "text" : "stop", - "info" : { - "POST" : { - "returns" : { - "type" : "string" - }, - "description" : "Stop service.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "method" : "POST", - "protected" : 1, - "name" : "service_stop", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, - "service" : { - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID", - "type" : "string" + "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)" } } - } - } - }, - "path" : "/nodes/{node}/services/{service}/stop", - "leaf" : 1 - }, - { - "path" : "/nodes/{node}/services/{service}/restart", - "leaf" : 1, - "text" : "restart", - "info" : { - "POST" : { - "proxyto" : "node", - "description" : "Restart service.", + }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/storage/{storage}", [ - "Sys.Modify" - ] + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 ] }, - "returns" : { - "type" : "string" - }, "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "format" : { + "description" : "Format identifier ('raw', 'qcow2', 'subvol', 'iso', 'tgz' ...)", + "type" : "string" + }, + "parent" : { + "description" : "Volume identifier of parent (for linked cloned).", + "optional" : 1, + "type" : "string" + }, + "size" : { + "description" : "Volume size in bytes.", + "renderer" : "bytes", + "type" : "integer" + }, + "used" : { + "description" : "Used space. Please note that most storage plugins does not report anything useful here.", + "optional" : 1, + "renderer" : "bytes", + "type" : "integer" + }, + "vmid" : { + "description" : "Associated Owner VMID.", + "optional" : 1, + "type" : "integer" + }, + "volid" : { + "description" : "Volume identifier.", + "type" : "string" + } }, - "service" : { - "enum" : [ - "pveproxy", - "pvedaemon", - "spiceproxy", - "pvestatd", - "pve-cluster", - "corosync", - "pve-firewall", - "pvefw-logger", - "pve-ha-crm", - "pve-ha-lrm", - "sshd", - "syslog", - "cron", - "postfix", - "ksmtuned", - "systemd-timesyncd" - ], - "description" : "Service ID", - "type" : "string" + "type" : "object" + }, + "links" : [ + { + "href" : "{volid}", + "rel" : "child" } - } - }, - "name" : "service_restart", - "method" : "POST" - } - } - }, - { - "path" : "/nodes/{node}/services/{service}/reload", - "leaf" : 1, - "text" : "reload", - "info" : { + ], + "type" : "array" + } + }, "POST" : { - "name" : "service_reload", + "description" : "Allocate disk images.", + "method" : "POST", + "name" : "create", "parameters" : { "additionalProperties" : 0, "properties" : { - "service" : { + "filename" : { + "description" : "The name of the file to create.", "type" : "string", - "description" : "Service ID", + "typetext" : "" + }, + "format" : { "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" - ] + "raw", + "qcow2", + "subvol" + ], + "optional" : 1, + "requires" : "size", + "type" : "string" }, "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "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)" } } }, - "protected" : 1, - "method" : "POST", "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/storage/{storage}", [ - "Sys.Modify" + "Datastore.AllocateSpace" ] ] }, - "description" : "Reload service.", + "protected" : 1, "proxyto" : "node", "returns" : { + "description" : "Volume identifier", "type" : "string" } } - } - } - ], - "text" : "{service}" - } - ], - "leaf" : 0, - "path" : "/nodes/{node}/services" - }, - { - "text" : "subscription", - "info" : { - "GET" : { - "permissions" : { - "user" : "all" - }, - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "name" : "get", - "description" : "Read subscription info.", - "proxyto" : "node", - "returns" : { - "type" : "object" - }, - "method" : "GET" - }, - "PUT" : { - "returns" : { - "type" : "null" - }, - "method" : "PUT", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "key" : { - "description" : "Proxmox VE subscription key", - "type" : "string" - } - } - }, - "name" : "set", - "protected" : 1, - "description" : "Set subscription key.", - "proxyto" : "node" - }, - "POST" : { - "proxyto" : "node", - "protected" : 1, - "description" : "Update subscription info.", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "force" : { - "description" : "Always connect to server, even if we have up to date info inside local cache.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - } - }, - "name" : "update", - "returns" : { - "type" : "null" - }, - "method" : "POST" - } - }, - "path" : "/nodes/{node}/subscription", - "leaf" : 1 - }, - { - "path" : "/nodes/{node}/network", - "leaf" : 0, - "children" : [ - { - "info" : { - "DELETE" : { - "returns" : { - "type" : "null" - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] }, - "proxyto" : "node", - "description" : "Delete network device configuration", - "method" : "DELETE", - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "iface" : { - "maxLength" : 20, - "format" : "pve-iface", - "description" : "Network interface name.", - "minLength" : 2, - "type" : "string" - } - }, - "additionalProperties" : 0 - }, - "name" : "delete_network", - "protected" : 1 + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}/content", + "text" : "content" }, - "PUT" : { - "returns" : { - "type" : "null" - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "proxyto" : "node", - "description" : "Update network device configuration", - "method" : "PUT", - "name" : "update_network", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "slaves" : { - "optional" : 1, - "type" : "string", - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list" - }, - "netmask" : { - "format" : "ipv4mask", - "optional" : 1, - "type" : "string", - "description" : "Network mask.", - "requires" : "address" - }, - "address" : { - "format" : "ipv4", - "requires" : "netmask", - "description" : "IP address.", - "type" : "string", - "optional" : 1 - }, - "bridge_ports" : { - "format" : "pve-iface-list", - "description" : "Specify the iterfaces you want to add to your bridge.", - "type" : "string", - "optional" : 1 - }, - "autostart" : { - "optional" : 1, - "type" : "boolean", - "description" : "Automatically start interface on boot." - }, - "type" : { - "type" : "string", - "description" : "Network interface type", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "unknown" - ] - }, - "gateway6" : { - "type" : "string", - "optional" : 1, - "description" : "Default ipv6 gateway address.", - "format" : "ipv6" - }, - "gateway" : { - "format" : "ipv4", - "optional" : 1, - "type" : "string", - "description" : "Default gateway address." - }, - "ovs_bridge" : { - "type" : "string", - "optional" : 1, - "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", - "format" : "pve-iface" - }, - "delete" : { - "type" : "string", - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list" - }, - "comments" : { - "description" : "Comments", - "type" : "string", - "optional" : 1 - }, - "ovs_tag" : { - "optional" : 1, - "type" : "integer", - "maximum" : 4094, - "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", - "minimum" : 1 - }, - "ovs_options" : { - "description" : "OVS interface options.", - "optional" : 1, - "type" : "string", - "maxLength" : 1024 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "comments6" : { - "type" : "string", - "optional" : 1, - "description" : "Comments" + { + "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" : "" + } + } }, - "bridge_vlan_aware" : { - "optional" : 1, - "type" : "boolean", - "description" : "Enable bridge vlan support." + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] }, - "address6" : { - "format" : "ipv6", - "optional" : 1, - "type" : "string", - "description" : "IP address.", - "requires" : "netmask6" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/status", + "text" : "status" + }, + { + "info" : { + "GET" : { + "description" : "Read storage 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" : "" + }, + "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" + } + } }, - "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" + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 + ] }, - "ovs_bonds" : { - "format" : "pve-iface-list", - "description" : "Specify the interfaces used by the bonding device.", - "optional" : 1, - "type" : "string" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "filename" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/rrd", + "text" : "rrd" + }, + { + "info" : { + "GET" : { + "description" : "Read storage 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" : "" + }, + "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" + } + } }, - "bond_mode" : { - "optional" : 1, - "type" : "string", - "description" : "Bonding mode.", - "enum" : [ - "balance-rr", - "active-backup", - "balance-xor", - "broadcast", - "802.3ad", - "balance-tlb", - "balance-alb", - "balance-slb", - "lacp-balance-slb", - "lacp-balance-tcp" + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 ] }, - "iface" : { - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "description" : "Network interface name.", - "type" : "string" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/rrddata", + "text" : "rrddata" + }, + { + "info" : { + "POST" : { + "description" : "Upload templates and ISO images.", + "method" : "POST", + "name" : "upload", + "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" : "" + }, + "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" : "" + } + } }, - "ovs_ports" : { - "format" : "pve-iface-list", - "optional" : 1, - "type" : "string", - "description" : "Specify the iterfaces you want to add to your bridge." + "permissions" : { + "check" : [ + "perm", + "/storage/{storage}", + [ + "Datastore.AllocateTemplate" + ] + ] }, - "netmask6" : { - "maximum" : 128, - "type" : "integer", - "optional" : 1, - "requires" : "address6", - "description" : "Network mask.", - "minimum" : 0 + "protected" : 1, + "returns" : { + "type" : "string" } } }, - "protected" : 1 - }, + "leaf" : 1, + "path" : "/nodes/{node}/storage/{storage}/upload", + "text" : "upload" + } + ], + "info" : { "GET" : { - "description" : "Read network device configuration", - "proxyto" : "node", + "description" : "", + "method" : "GET", + "name" : "diridx", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, - "iface" : { + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", "type" : "string", - "description" : "Network interface name.", - "minLength" : 2, - "maxLength" : 20, - "format" : "pve-iface" + "typetext" : "" } } }, - "name" : "network_config", "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/storage/{storage}", [ - "Sys.Audit" - ] + "Datastore.Audit", + "Datastore.AllocateSpace" + ], + "any", + 1 ] }, "returns" : { - "properties" : { - "method" : { - "type" : "string" + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } }, - "type" : { - "type" : "string" - } + "type" : "object" }, - "type" : "object" - }, - "method" : "GET" + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" + } } }, - "text" : "{iface}", - "leaf" : 1, - "path" : "/nodes/{node}/network/{iface}" + "leaf" : 0, + "path" : "/nodes/{node}/storage/{storage}", + "text" : "{storage}" } ], - "text" : "network", "info" : { "GET" : { - "returns" : { - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{iface}" - } - ], - "type" : "array" - }, + "description" : "Get status for all datastores.", "method" : "GET", - "proxyto" : "node", - "description" : "List available networks", - "permissions" : { - "user" : "all" - }, "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { - "type" : { - "optional" : 1, - "type" : "string", - "description" : "Only list specific interface types.", - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "any_bridge" - ] - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - } - } - } - }, - "DELETE" : { - "proxyto" : "node", - "description" : "Revert network configuration changes.", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "returns" : { - "type" : "null" - }, - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - } - }, - "name" : "revert_network_changes", - "method" : "DELETE" - }, - "POST" : { - "protected" : 1, - "name" : "create_network", - "parameters" : { - "properties" : { - "ovs_bridge" : { - "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.", - "type" : "string", - "optional" : 1, - "format" : "pve-iface" - }, - "gateway" : { - "type" : "string", - "optional" : 1, - "description" : "Default gateway address.", - "format" : "ipv4" - }, - "gateway6" : { - "format" : "ipv6", - "description" : "Default ipv6 gateway address.", - "type" : "string", - "optional" : 1 - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "ovs_options" : { - "maxLength" : 1024, - "description" : "OVS interface options.", - "type" : "string", - "optional" : 1 - }, - "comments" : { - "optional" : 1, - "type" : "string", - "description" : "Comments" - }, - "ovs_tag" : { - "optional" : 1, - "type" : "integer", - "maximum" : 4094, - "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)", - "minimum" : 1 - }, - "netmask" : { + "content" : { + "description" : "Only list stores which support this content type.", + "format" : "pve-storage-content-list", "optional" : 1, "type" : "string", - "requires" : "address", - "description" : "Network mask.", - "format" : "ipv4mask" + "typetext" : "" }, - "slaves" : { - "type" : "string", + "enabled" : { + "default" : 0, + "description" : "Only list stores which are enabled (not disabled in config).", "optional" : 1, - "description" : "Specify the interfaces used by the bonding device.", - "format" : "pve-iface-list" - }, - "type" : { - "enum" : [ - "bridge", - "bond", - "eth", - "alias", - "vlan", - "OVSBridge", - "OVSBond", - "OVSPort", - "OVSIntPort", - "unknown" - ], - "description" : "Network interface type", - "type" : "string" - }, - "autostart" : { - "description" : "Automatically start interface on boot.", "type" : "boolean", - "optional" : 1 - }, - "bridge_ports" : { - "format" : "pve-iface-list", - "type" : "string", - "optional" : 1, - "description" : "Specify the iterfaces you want to add to your bridge." - }, - "address" : { - "requires" : "netmask", - "description" : "IP address.", - "type" : "string", - "optional" : 1, - "format" : "ipv4" - }, - "bond_mode" : { - "description" : "Bonding mode.", - "enum" : [ - "balance-rr", - "active-backup", - "balance-xor", - "broadcast", - "802.3ad", - "balance-tlb", - "balance-alb", - "balance-slb", - "lacp-balance-slb", - "lacp-balance-tcp" - ], - "optional" : 1, - "type" : "string" - }, - "ovs_bonds" : { - "format" : "pve-iface-list", - "type" : "string", - "optional" : 1, - "description" : "Specify the interfaces used by the bonding device." - }, - "netmask6" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer", - "maximum" : 128, - "description" : "Network mask.", - "requires" : "address6" - }, - "ovs_ports" : { - "optional" : 1, - "type" : "string", - "description" : "Specify the iterfaces you want to add to your bridge.", - "format" : "pve-iface-list" + "typetext" : "" }, - "iface" : { - "format" : "pve-iface", - "maxLength" : 20, - "type" : "string", - "description" : "Network interface name.", - "minLength" : 2 - }, - "comments6" : { + "format" : { + "default" : 0, + "description" : "Include information about formats", "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "description" : "Comments" + "typetext" : "" }, - "bridge_vlan_aware" : { - "description" : "Enable bridge vlan support.", + "storage" : { + "description" : "Only list status for specified storage", + "format" : "pve-storage-id", "optional" : 1, - "type" : "boolean" + "type" : "string", + "typetext" : "" }, - "address6" : { - "format" : "ipv6", - "description" : "IP address.", - "requires" : "netmask6", + "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" - }, - "bond_xmit_hash_policy" : { "type" : "string", - "optional" : 1, - "enum" : [ - "layer2", - "layer2+3", - "layer3+4" - ], - "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes." + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "method" : "POST", - "proxyto" : "node", - "description" : "Create network device configuration", "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", + "user" : "all" }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "null" + "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}/storage", + "text" : "storage" }, { - "path" : "/nodes/{node}/tasks", - "leaf" : 0, - "text" : "tasks", "children" : [ { - "leaf" : 0, - "path" : "/nodes/{node}/tasks/{upid}", "info" : { - "DELETE" : { - "returns" : { - "type" : "null" - }, - "permissions" : { - "user" : "all", - "description" : "The user needs 'Sys.Modify' permissions on '/nodes/' if the task does not belong to him." - }, - "description" : "Stop a task.", - "proxyto" : "node", - "method" : "DELETE", - "name" : "stop_task", + "GET" : { + "description" : "List LVM Volume Groups", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" - }, - "upid" : { - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "protected" : 1 - }, - "GET" : { - "method" : "GET", + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "links" : [ - { - "href" : "{name}", - "rel" : "child" + "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" } - ], - "items" : { - "type" : "object", - "properties" : {} }, - "type" : "array" - }, - "description" : "", + "type" : "object" + } + }, + "POST" : { + "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" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - }, - "upid" : { - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } }, - "name" : "upid_index", "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/", + [ + "Sys.Modify", + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "children" : [ - { - "info" : { - "GET" : { - "method" : "GET", - "name" : "read_task_log", - "parameters" : { - "properties" : { - "start" : { - "optional" : 1, - "type" : "integer", - "minimum" : 0 - }, - "upid" : { - "type" : "string" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "limit" : { - "type" : "integer", - "optional" : 1, - "minimum" : 0 - } + "leaf" : 1, + "path" : "/nodes/{node}/disks/lvm", + "text" : "lvm" + }, + { + "info" : { + "GET" : { + "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" }, - "additionalProperties" : 0 - }, - "protected" : 1, - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "n" : { - "type" : "integer", - "description" : "Line number" - }, - "t" : { - "type" : "string", - "description" : "Line text" - } - } + "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" } }, - "permissions" : { - "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", - "user" : "all" - }, - "proxyto" : "node", - "description" : "Read task log." - } - }, - "text" : "log", - "leaf" : 1, - "path" : "/nodes/{node}/tasks/{upid}/log" + "type" : "object" + }, + "type" : "array" + } }, - { - "path" : "/nodes/{node}/tasks/{upid}/status", - "leaf" : 1, - "text" : "status", - "info" : { - "GET" : { - "name" : "read_task_status", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "upid" : { - "type" : "string" - } - } + "POST" : { + "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" : "" }, - "protected" : 1, - "method" : "GET", - "permissions" : { - "description" : "The user needs 'Sys.Audit' permissions on '/nodes/' if the task does not belong to him.", - "user" : "all" + "device" : { + "description" : "The block device you want to create the thinpool on.", + "type" : "string", + "typetext" : "" }, - "proxyto" : "node", - "description" : "Read task status.", - "returns" : { - "properties" : { - "pid" : { - "type" : "integer" - }, - "status" : { - "type" : "string", - "enum" : [ - "running", - "stopped" - ] - } - }, - "type" : "object" + "name" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" } } - } - } - ], - "text" : "{upid}" - } - ], - "info" : { - "GET" : { - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "upid" : { - "type" : "string" - } - } - }, - "links" : [ - { - "rel" : "child", - "href" : "{upid}" - } - ] - }, - "method" : "GET", - "proxyto" : "node", - "description" : "Read task list for one node (finished tasks).", - "permissions" : { - "user" : "all", - "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/ (the the task runs on)." - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "vmid" : { - "description" : "Only list tasks for this VM.", - "type" : "integer", - "optional" : 1, - "format" : "pve-vmid", - "minimum" : 1 - }, - "start" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer" }, - "errors" : { - "optional" : 1, - "type" : "boolean" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "limit" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify", + "Datastore.Allocate" + ] + ] }, - "userfilter" : { - "type" : "string", - "optional" : 1 - } - } - }, - "name" : "node_tasks" - } - } - }, - { - "leaf" : 0, - "path" : "/nodes/{node}/scan", - "info" : { - "GET" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "permissions" : { - "user" : "all" - }, - "name" : "index", - "description" : "Index of available scan methods", - "method" : "GET", - "returns" : { - "type" : "array", - "items" : { - "properties" : { - "method" : { - "type" : "string" - } - }, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{method}" - } - ] - } - } - }, - "children" : [ + "leaf" : 1, + "path" : "/nodes/{node}/disks/lvmthin", + "text" : "lvmthin" + }, { "info" : { "GET" : { + "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", - "description" : "Scan zfs pool list on local 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" : { + "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", - "/storage", + "/", [ + "Sys.Modify", "Datastore.Allocate" ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "properties" : { - "pool" : { - "type" : "string" + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/disks/directory", + "text" : "directory" + }, + { + "children" : [ + { + "info" : { + "GET" : { + "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" : "" + } } }, - "type" : "object" + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "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.", + "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" + } } }, - "protected" : 1, + "leaf" : 1, + "path" : "/nodes/{node}/disks/zfs/{name}", + "text" : "{name}" + } + ], + "info" : { + "GET" : { + "description" : "List Zpools.", + "method" : "GET", + "name" : "index", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "name" : "zfsscan", - "method" : "GET" - } - }, - "text" : "zfs", - "leaf" : 1, - "path" : "/nodes/{node}/scan/zfs" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/scan/nfs", - "info" : { - "GET" : { - "description" : "Scan remote NFS server.", - "proxyto" : "node", "permissions" : { "check" : [ "perm", - "/storage", + "/", [ - "Datastore.Allocate" - ] + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", "items" : { - "type" : "object", "properties" : { - "path" : { + "alloc" : { + "description" : "", + "type" : "integer" + }, + "dedup" : { + "description" : "", + "type" : "number" + }, + "frag" : { + "description" : "", + "type" : "integer" + }, + "free" : { + "description" : "", + "type" : "integer" + }, + "health" : { + "description" : "", "type" : "string" }, - "options" : { + "name" : { + "description" : "", "type" : "string" + }, + "size" : { + "description" : "", + "type" : "integer" } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" } - } - }, - "protected" : 1, - "name" : "nfsscan", + ], + "type" : "array" + } + }, + "POST" : { + "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" + ], + "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" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "server" : { - "format" : "pve-storage-server", + "raidlevel" : { + "description" : "The RAID level to use.", + "enum" : [ + "single", + "mirror", + "raid10", + "raidz", + "raidz2", + "raidz3" + ], "type" : "string" } - }, - "additionalProperties" : 0 - }, - "method" : "GET" - } - }, - "text" : "nfs" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/scan/glusterfs", - "info" : { - "GET" : { - "returns" : { - "items" : { - "properties" : { - "volname" : { - "type" : "string" - } - }, - "type" : "object" - }, - "type" : "array" + } }, "permissions" : { "check" : [ "perm", - "/storage", + "/", [ + "Sys.Modify", "Datastore.Allocate" ] ] }, - "description" : "Scan remote GlusterFS server.", + "protected" : 1, "proxyto" : "node", + "returns" : { + "type" : "string" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/disks/zfs", + "text" : "zfs" + }, + { + "info" : { + "GET" : { + "description" : "List local disks.", "method" : "GET", - "name" : "glusterfsscan", + "name" : "list", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, - "server" : { - "format" : "pve-storage-server", + "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" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1 - } - }, - "text" : "glusterfs" - }, - { - "text" : "iscsi", - "info" : { - "GET" : { - "proxyto" : "node", - "description" : "Scan remote iSCSI server.", "permissions" : { "check" : [ "perm", - "/storage", + "/", [ - "Datastore.Allocate" - ] + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", "items" : { "properties" : { - "target" : { + "devpath" : { + "description" : "The device path", "type" : "string" }, - "portal" : { + "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" } }, "type" : "object" - } - }, - "protected" : 1, - "parameters" : { - "properties" : { - "portal" : { - "type" : "string", - "format" : "pve-storage-portal-dns" - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } }, - "additionalProperties" : 0 - }, - "name" : "iscsiscan", - "method" : "GET" + "type" : "array" + } } }, - "path" : "/nodes/{node}/scan/iscsi", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/disks/list", + "text" : "list" }, { "info" : { "GET" : { - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "vg" : { - "type" : "string" - } + "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" : "" } } }, - "proxyto" : "node", - "description" : "List local LVM volume groups.", "permissions" : { "check" : [ "perm", - "/storage", + "/", [ - "Datastore.Allocate" - ] + "Sys.Audit", + "Datastore.Audit" + ], + "any", + 1 ] }, - "method" : "GET", "protected" : 1, - "name" : "lvmscan", - "parameters" : { - "additionalProperties" : 0, + "proxyto" : "node", + "returns" : { "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", + "attributes" : { + "optional" : 1, + "type" : "array" + }, + "health" : { + "type" : "string" + }, + "text" : { + "optional" : 1, + "type" : "string" + }, + "type" : { + "optional" : 1, "type" : "string" } - } + }, + "type" : "object" } } }, - "text" : "lvm", "leaf" : 1, - "path" : "/nodes/{node}/scan/lvm" + "path" : "/nodes/{node}/disks/smart", + "text" : "smart" }, { "info" : { - "GET" : { + "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" + }, "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, - "vg" : { - "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+", - "type" : "string", - "maxLength" : 100 + "uuid" : { + "description" : "UUID for the GPT table", + "maxLength" : 36, + "optional" : 1, + "pattern" : "[a-fA-F0-9\\-]+", + "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "name" : "lvmthinscan", - "protected" : 1, - "method" : "GET", "permissions" : { "check" : [ "perm", - "/storage", + "/", [ - "Datastore.Allocate" + "Sys.Modify" ] ] }, - "description" : "List local LVM Thin Pools.", + "protected" : 1, "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "properties" : { - "lv" : { - "type" : "string" - } - }, - "type" : "object" - } + "type" : "string" } } }, - "text" : "lvmthin", "leaf" : 1, - "path" : "/nodes/{node}/scan/lvmthin" - }, + "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" : "" + } + } + }, + "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" : [ { - "path" : "/nodes/{node}/scan/usb", - "leaf" : 1, - "text" : "usb", "info" : { "GET" : { + "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" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "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" : "" + } + } + }, "permissions" : { "check" : [ "perm", - "/", + "/nodes/{node}", [ "Sys.Modify" ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "List local USB devices.", "returns" : { - "items" : { - "properties" : { - "speed" : { - "type" : "string" - }, - "serial" : { - "optional" : 1, - "type" : "string" - }, - "product" : { - "type" : "string", - "optional" : 1 - }, - "devnum" : { - "type" : "integer" - }, - "vendid" : { - "type" : "string" - }, - "busnum" : { - "type" : "integer" - }, - "class" : { - "type" : "integer" - }, - "usbpath" : { - "optional" : 1, - "type" : "string" - }, - "prodid" : { - "type" : "string" - }, - "level" : { - "type" : "integer" - }, - "manufacturer" : { - "optional" : 1, - "type" : "string" - }, - "port" : { - "type" : "integer" - } - }, - "type" : "object" - }, - "type" : "array" - }, - "name" : "usbscan", + "type" : "string" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/update", + "text" : "update" + }, + { + "info" : { + "GET" : { + "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", - "description" : "The cluster node name." + "typetext" : "" + }, + "version" : { + "description" : "Package version.", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, - "protected" : 1, - "method" : "GET" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "string" + } } - } - } - ], - "text" : "scan" - }, - { - "path" : "/nodes/{node}/storage", - "leaf" : 0, - "text" : "storage", - "children" : [ + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/changelog", + "text" : "changelog" + }, { - "leaf" : 0, - "path" : "/nodes/{node}/storage/{storage}", "info" : { "GET" : { - "returns" : { - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" - } - ], - "items" : { - "type" : "object", - "properties" : { - "subdir" : { - "type" : "string" - } - } - }, - "type" : "array" - }, + "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", - "format" : "pve-node" - }, - "storage" : { - "description" : "The storage identifier.", - "type" : "string", - "format" : "pve-storage-id" + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/storage/{storage}", + "/nodes/{node}", [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 + "Sys.Audit" + ] ] }, - "name" : "diridx", - "description" : "" + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/apt/versions", + "text" : "versions" + } + ], + "info" : { + "GET" : { + "description" : "Directory index for apt (Advanced Package Tool).", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } } }, - "text" : "{storage}", + "permissions" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "id" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/apt", + "text" : "apt" + }, + { + "children" : [ + { "children" : [ { "info" : { - "GET" : { - "method" : "GET", + "DELETE" : { + "description" : "Delete rule.", + "method" : "DELETE", + "name" : "delete_rule", "parameters" : { "additionalProperties" : 0, "properties" : { - "storage" : { - "description" : "The storage identifier.", - "type" : "string", - "format" : "pve-storage-id" - }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "Only list images for this VM", + "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" + "type" : "string", + "typetext" : "" }, "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, - "content" : { - "description" : "Only list content of this type.", + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, "optional" : 1, - "type" : "string", - "format" : "pve-storage-content" + "type" : "integer", + "typetext" : " (0 - N)" } } }, - "name" : "index", + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, "protected" : 1, + "proxyto" : "node", "returns" : { - "type" : "array", - "items" : { - "properties" : { - "volid" : { - "type" : "string" - } + "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" : "" }, - "type" : "object" - }, - "links" : [ - { - "href" : "{volid}", - "rel" : "child" + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } - ] + } }, "permissions" : { "check" : [ "perm", - "/storage/{storage}", + "/nodes/{node}", [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 + "Sys.Audit" + ] ] }, "proxyto" : "node", - "description" : "List storage content." - }, - "POST" : { "returns" : { - "description" : "Volume identifier", - "type" : "string" - }, - "description" : "Allocate disk images.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.AllocateSpace" - ] - ] - }, - "method" : "POST", - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, "properties" : { - "format" : { - "requires" : "size", - "enum" : [ - "raw", - "qcow2", - "subvol" - ], - "type" : "string", - "optional" : 1 + "action" : { + "type" : "string" }, - "vmid" : { - "format" : "pve-vmid", - "minimum" : 1, - "description" : "Specify owner VM", - "type" : "integer" + "comment" : { + "optional" : 1, + "type" : "string" }, - "storage" : { - "format" : "pve-storage-id", - "description" : "The storage identifier.", + "dest" : { + "optional" : 1, "type" : "string" }, - "size" : { - "pattern" : "\\d+[MG]?", - "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)", + "dport" : { + "optional" : 1, "type" : "string" }, - "filename" : { - "type" : "string", - "description" : "The name of the file to create." + "enable" : { + "optional" : 1, + "type" : "integer" }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - } - }, - "name" : "create" - } - }, - "children" : [ - { - "info" : { - "GET" : { - "returns" : { - "type" : "object" + "iface" : { + "optional" : 1, + "type" : "string" }, - "proxyto" : "node", - "description" : "Get volume attributes", - "permissions" : { - "description" : "You need read access for the volume.", - "user" : "all" + "ipversion" : { + "optional" : 1, + "type" : "integer" }, - "method" : "GET", - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "type" : "string", - "optional" : 1, - "description" : "The storage identifier.", - "format" : "pve-storage-id" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "volume" : { - "description" : "Volume identifier", - "type" : "string" - } - } + "macro" : { + "optional" : 1, + "type" : "integer" }, - "name" : "info" - }, - "DELETE" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "volume" : { - "type" : "string", - "description" : "Volume identifier" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "storage" : { - "format" : "pve-storage-id", - "description" : "The storage identifier.", - "optional" : 1, - "type" : "string" - } - } + "pos" : { + "type" : "integer" }, - "name" : "delete", - "protected" : 1, - "method" : "DELETE", - "permissions" : { - "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).", - "user" : "all" + "proto" : { + "optional" : 1, + "type" : "string" }, - "proxyto" : "node", - "description" : "Delete volume", - "returns" : { - "type" : "null" - } - }, - "POST" : { - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "target" : { - "type" : "string", - "description" : "Target volume identifier" - }, - "target_node" : { - "type" : "string", - "optional" : 1, - "description" : "Target node. Default is local node.", - "format" : "pve-node" - }, - "storage" : { - "format" : "pve-storage-id", - "description" : "The storage identifier.", - "type" : "string", - "optional" : 1 - }, - "volume" : { - "type" : "string", - "description" : "Source volume identifier" - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - } + "source" : { + "optional" : 1, + "type" : "string" }, - "name" : "copy", - "description" : "Copy a volume. This is experimental code - do not use.", - "protected" : 1, - "proxyto" : "node", - "returns" : { + "sport" : { + "optional" : 1, "type" : "string" }, - "method" : "POST" - } - }, - "text" : "{volume}", - "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/content/{volume}" - } - ], - "text" : "content", - "leaf" : 0, - "path" : "/nodes/{node}/storage/{storage}/content" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/status", - "info" : { - "GET" : { - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] - }, - "description" : "Read storage status.", - "proxyto" : "node", - "returns" : { - "properties" : {}, + "type" : { + "type" : "string" + } + }, "type" : "object" - }, + } + }, + "PUT" : { + "description" : "Modify rule data.", + "method" : "PUT", + "name" : "update_rule", "parameters" : { + "additionalProperties" : 0, "properties" : { - "storage" : { - "description" : "The storage identifier.", + "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", - "format" : "pve-storage-id" + "typetext" : "" }, - "node" : { - "description" : "The cluster node name.", + "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", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 - }, - "name" : "read_status", - "protected" : 1, - "method" : "GET" - } - }, - "text" : "status" - }, - { - "info" : { - "GET" : { - "protected" : 1, - "parameters" : { - "properties" : { - "ds" : { + "typetext" : "" + }, + "macro" : { + "description" : "Use predefined standard macro.", + "maxLength" : 128, + "optional" : 1, "type" : "string", - "description" : "The list of datasources you want to display.", - "format" : "pve-configid-list" + "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", - "format" : "pve-node" + "typetext" : "" }, - "timeframe" : { - "type" : "string", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "description" : "Specify the time frame you are interested in." + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "storage" : { + "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", - "description" : "The storage identifier.", - "format" : "pve-storage-id" + "typetext" : "" }, - "cf" : { + "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" : [ - "AVERAGE", - "MAX" + "in", + "out", + "group" ], - "description" : "The RRD consolidation function" + "optional" : 1, + "type" : "string" } - }, - "additionalProperties" : 0 + } }, - "name" : "rrd", - "method" : "GET", - "proxyto" : "node", - "description" : "Read storage RRD statistics (returns PNG).", "permissions" : { "check" : [ "perm", - "/storage/{storage}", + "/nodes/{node}", [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 + "Sys.Modify" + ] ] }, + "protected" : 1, + "proxyto" : "node", "returns" : { - "properties" : { - "filename" : { - "type" : "string" - } - }, - "type" : "object" + "type" : "null" } } }, - "text" : "rrd", "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/rrd" + "path" : "/nodes/{node}/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" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "pos" : { + "type" : "integer" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{pos}", + "rel" : "child" + } + ], + "type" : "array" + } }, - { - "info" : { - "GET" : { - "protected" : 1, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - }, - "timeframe" : { - "type" : "string", - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ] - }, - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "description" : "The storage identifier." - }, - "cf" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "AVERAGE", - "MAX" - ], - "description" : "The RRD consolidation function" - } - }, - "additionalProperties" : 0 + "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" }, - "name" : "rrddata", - "method" : "GET", - "proxyto" : "node", - "description" : "Read storage RRD statistics.", - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Audit", - "Datastore.AllocateSpace" - ], - "any", - 1 - ] + "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" : "" }, - "returns" : { - "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array" - } - } - }, - "text" : "rrddata", - "leaf" : 1, - "path" : "/nodes/{node}/storage/{storage}/rrddata" - }, - { - "path" : "/nodes/{node}/storage/{storage}/upload", - "leaf" : 1, - "text" : "upload", - "info" : { - "POST" : { - "returns" : { - "type" : "string" + "pos" : { + "description" : "Update rule at position .", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "method" : "POST", - "description" : "Upload templates and ISO images.", - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "format" : "pve-storage-id", - "description" : "The storage identifier.", - "type" : "string" - }, - "tmpfilename" : { - "optional" : 1, - "type" : "string", - "description" : "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trustet port on localhost." - }, - "content" : { - "description" : "Content type.", - "type" : "string", - "format" : "pve-storage-content" - }, - "filename" : { - "type" : "string", - "description" : "The name of the file to create." - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - } + "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" : "" }, - "name" : "upload", - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.AllocateTemplate" - ] - ] + "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" } } - } - } - ] - } - ], - "info" : { - "GET" : { - "permissions" : { - "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", - "user" : "all" - }, - "proxyto" : "node", - "description" : "Get status for all datastores.", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "storage" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{storage}", - "rel" : "child" - } - ] - }, - "parameters" : { - "properties" : { - "target" : { - "format" : "pve-node", - "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.", - "type" : "string", - "optional" : 1 - }, - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "optional" : 1, - "description" : "Only list status for specified storage" - }, - "enabled" : { - "description" : "Only list stores which are enabled (not disabled in config).", - "type" : "boolean", - "optional" : 1, - "default" : 0 }, - "content" : { - "format" : "pve-storage-content-list", - "type" : "string", - "optional" : 1, - "description" : "Only list stores which support this content type." + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" } - }, - "additionalProperties" : 0 + } }, - "name" : "index", - "protected" : 1, - "method" : "GET" - } - } - }, - { - "text" : "apt", - "children" : [ + "leaf" : 0, + "path" : "/nodes/{node}/firewall/rules", + "text" : "rules" + }, { "info" : { - "POST" : { - "returns" : { - "type" : "string" + "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.Modify" + "Sys.Audit" ] ] }, - "description" : "This is used to resynchronize the package index files from their sources (apt-get update).", "proxyto" : "node", - "method" : "POST", - "name" : "update_database", + "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" : { - "notify" : { - "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').", - "default" : 0, + "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", - "optional" : 1 + "typetext" : "" }, - "quiet" : { - "default" : 0, + "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", - "description" : "Only produces output suitable for logging, omitting progress indicators." + "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" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" - } - } - }, - "protected" : 1 - }, - "GET" : { - "method" : "GET", - "name" : "list_updates", - "parameters" : { - "properties" : { - "node" : { + "format" : "pve-node", "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" + "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" : "" } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} } }, "permissions" : { @@ -19075,937 +31105,1539 @@ var pveapi = [ ] ] }, - "description" : "List available updates.", - "proxyto" : "node" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } } }, - "text" : "update", "leaf" : 1, - "path" : "/nodes/{node}/apt/update" + "path" : "/nodes/{node}/firewall/options", + "text" : "options" }, { - "leaf" : 1, - "path" : "/nodes/{node}/apt/changelog", "info" : { "GET" : { + "description" : "Read firewall log", "method" : "GET", - "returns" : { - "type" : "string" - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, - "name" : "changelog", + "name" : "log", "parameters" : { + "additionalProperties" : 0, "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "name" : { - "description" : "Package name.", - "type" : "string" + "limit" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "version" : { - "description" : "Package version.", - "type" : "string", - "optional" : 1 - } - }, - "additionalProperties" : 0 - }, - "description" : "Get package changelogs.", - "proxyto" : "node" - } - }, - "text" : "changelog" - }, - { - "text" : "versions", - "info" : { - "GET" : { - "name" : "versions", - "parameters" : { - "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" + }, + "start" : { + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Syslog" ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Get package information for important Proxmox packages.", - "method" : "GET", "returns" : { - "type" : "array", "items" : { - "properties" : {}, - "type" : "object" - } - } - } - }, - "path" : "/nodes/{node}/apt/versions", - "leaf" : 1 - } - ], - "info" : { - "GET" : { - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{id}", - "rel" : "child" + "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" + } + ], + "info" : { + "GET" : { + "description" : "Directory index.", "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" } } }, - "name" : "index", "permissions" : { "user" : "all" }, - "description" : "Directory index for apt (Advanced Package Tool)." + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } } }, - "path" : "/nodes/{node}/apt", - "leaf" : 0 + "leaf" : 0, + "path" : "/nodes/{node}/firewall", + "text" : "firewall" }, { "children" : [ { - "text" : "rules", "children" : [ { - "text" : "{pos}", "info" : { - "DELETE" : { - "method" : "DELETE", - "protected" : 1, + "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", - "format" : "pve-node" - }, - "digest" : { - "maxLength" : 40, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "optional" : 1, - "type" : "string" - }, - "pos" : { - "type" : "integer", - "optional" : 1, - "description" : "Update rule at position .", - "minimum" : 0 + "typetext" : "" } } }, - "name" : "delete_rule", - "returns" : { - "type" : "null" + "permissions" : { + "description" : "Requires the VM.Audit permission on /vms/.", + "user" : "all" }, + "protected" : 1, "proxyto" : "node", - "description" : "Delete rule.", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "returns" : { + "type" : "object" } - }, - "PUT" : { - "name" : "update_rule", + } + }, + "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" : { - "dest" : { - "type" : "string", - "optional" : 1, - "description" : "Restrict packet destination address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "format" : "pve-fw-addr-spec" - }, - "digest" : { - "maxLength" : 40, - "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "source" : { - "format" : "pve-fw-addr-spec", - "optional" : 1, - "type" : "string", - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists." + "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" }, - "comment" : { + "limit" : { + "minimum" : 0, "optional" : 1, - "type" : "string" + "type" : "integer", + "typetext" : " (0 - N)" }, "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" }, - "moveto" : { + "start" : { "minimum" : 0, - "description" : "Move rule to new position . Other arguments are ignored.", - "optional" : 1, - "type" : "integer" - }, - "delete" : { - "type" : "string", - "optional" : 1, - "description" : "A list of settings you want to delete.", - "format" : "pve-configid-list" - }, - "type" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "in", - "out", - "group" - ] - }, - "dport" : { - "format" : "pve-fw-dport-spec", - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "type" : "string", - "optional" : 1 - }, - "sport" : { - "optional" : 1, - "type" : "string", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", - "format" : "pve-fw-sport-spec" - }, - "iface" : { - "maxLength" : 20, - "format" : "pve-iface", - "type" : "string", - "optional" : 1, - "minLength" : 2, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings." - }, - "proto" : { - "format" : "pve-fw-protocol-spec", - "type" : "string", "optional" : 1, - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'." - }, - "pos" : { - "minimum" : 0, "type" : "integer", - "optional" : 1, - "description" : "Update rule at position ." + "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" + } }, - "macro" : { - "maxLength" : 128, - "optional" : 1, + "type" : "object" + }, + "type" : "array" + } + } + }, + "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" }, - "action" : { - "minLength" : 2, - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", + "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" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/replication/{id}/schedule_now", + "text" : "schedule_now" + } + ], + "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" : { + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "links" : [ + { + "href" : "{name}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/replication/{id}", + "text" : "{id}" + } + ], + "info" : { + "GET" : { + "description" : "List status of all replication jobs on this node.", + "method" : "GET", + "name" : "status", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "guest" : { + "description" : "Only list replication jobs for this guest.", + "format" : "pve-vmid", + "minimum" : 1, + "optional" : 1, + "type" : "integer", + "typetext" : " (1 - N)" + }, + "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" : { + "items" : { + "properties" : { + "id" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{id}", + "rel" : "child" + } + ], + "type" : "array" + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/replication", + "text" : "replication" + }, + { + "children" : [ + { + "children" : [ + { + "info" : { + "DELETE" : { + "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", - "optional" : 1, - "maxLength" : 20 - }, - "enable" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, "protected" : 1, - "method" : "PUT", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] - }, "proxyto" : "node", - "description" : "Modify rule data.", "returns" : { - "type" : "null" + "type" : "string" } }, - "GET" : { - "method" : "GET", - "returns" : { - "type" : "object", + "POST" : { + "description" : "Order a new certificate from ACME-compatible CA.", + "method" : "POST", + "name" : "new_certificate", + "parameters" : { + "additionalProperties" : 0, "properties" : { - "pos" : { - "type" : "integer" + "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" : "" } } }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" + } + }, + "PUT" : { + "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", - "format" : "pve-node" - }, - "pos" : { - "minimum" : 0, - "description" : "Update rule at position .", - "type" : "integer", - "optional" : 1 + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + } }, - "name" : "get_rule", + "protected" : 1, "proxyto" : "node", - "description" : "Get single rule data." + "returns" : { + "type" : "string" + } } }, - "path" : "/nodes/{node}/firewall/rules/{pos}", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/certificates/acme/certificate", + "text" : "certificate" } ], "info" : { "GET" : { + "description" : "ACME 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" : { - "type" : "object", - "properties" : { - "pos" : { - "type" : "integer" - } - } + "properties" : {}, + "type" : "object" }, "links" : [ { - "href" : "{pos}", + "href" : "{name}", "rel" : "child" } ], "type" : "array" - }, + } + } + }, + "leaf" : 0, + "path" : "/nodes/{node}/certificates/acme", + "text" : "acme" + }, + { + "info" : { + "GET" : { + "description" : "Get information about node's certificates.", "method" : "GET", - "description" : "List rules.", - "proxyto" : "node", + "name" : "info", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "user" : "all" }, + "proxyto" : "node", + "returns" : { + "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" + }, + "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}/certificates/info", + "text" : "info" + }, + { + "info" : { + "DELETE" : { + "description" : "DELETE custom certificate chain and key.", + "method" : "DELETE", + "name" : "remove_custom_cert", "parameters" : { "additionalProperties" : 0, "properties" : { "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" + }, + "restart" : { + "default" : 0, + "description" : "Restart pveproxy.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } } }, - "name" : "get_rules" + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } }, "POST" : { + "description" : "Upload or update custom certificate chain and key.", "method" : "POST", - "name" : "create_rule", + "name" : "upload_custom_cert", "parameters" : { - "properties" : { - "dport" : { - "format" : "pve-fw-dport-spec", - "type" : "string", - "optional" : 1, - "description" : "Restrict TCP/UDP destination port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges." - }, - "enable" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer" - }, - "type" : { - "enum" : [ - "in", - "out", - "group" - ], - "optional" : 0, - "type" : "string" - }, - "action" : { - "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+", - "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.", - "minLength" : 2, - "optional" : 0, + "additionalProperties" : 0, + "properties" : { + "certificates" : { + "description" : "PEM encoded certificate (chain).", + "format" : "pem-certificate-chain", "type" : "string", - "maxLength" : 20 - }, - "pos" : { - "minimum" : 0, - "description" : "Update rule at position .", - "type" : "integer", - "optional" : 1 + "typetext" : "" }, - "proto" : { - "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.", + "force" : { + "default" : 0, + "description" : "Overwrite existing custom or ACME certificate files.", "optional" : 1, - "type" : "string", - "format" : "pve-fw-protocol-spec" + "type" : "boolean", + "typetext" : "" }, - "macro" : { - "type" : "string", + "key" : { + "description" : "PEM encoded private key.", + "format" : "pem-string", "optional" : 1, - "maxLength" : 128 + "type" : "string", + "typetext" : "" }, "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "comment" : { + "restart" : { + "default" : 0, + "description" : "Restart pveproxy.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "filename" : { "optional" : 1, "type" : "string" }, - "iface" : { - "format" : "pve-iface", - "maxLength" : 20, - "minLength" : 2, - "description" : "Network interface name. You have to use network configuration key names for VMs and containers ('net\\d+'). Host related rules can use arbitrary strings.", + "fingerprint" : { + "description" : "Certificate SHA 256 fingerprint.", "optional" : 1, + "pattern" : "([A-Fa-f0-9]{2}:){31}[A-Fa-f0-9]{2}", "type" : "string" }, - "sport" : { - "format" : "pve-fw-sport-spec", - "description" : "Restrict TCP/UDP source port. You can use service names or simple numbers (0-65535), as defined in '/etc/services'. Port ranges can be specified with '\\d+:\\d+', for example '80:85', and you can use comma separated list to match several ports or ranges.", + "issuer" : { + "description" : "Certificate issuer name.", "optional" : 1, "type" : "string" }, - "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.", - "type" : "string", + "notafter" : { + "description" : "Certificate's notAfter timestamp (UNIX epoch).", "optional" : 1, - "format" : "pve-fw-addr-spec" + "renderer" : "timestamp", + "type" : "integer" }, - "source" : { - "format" : "pve-fw-addr-spec", - "description" : "Restrict packet source address. This can refer to a single IP address, an IP set ('+ipsetname') or an IP alias definition. You can also specify an address range like '20.34.101.207-201.3.9.99', or a list of IP addresses and networks (entries are separated by comma). Please do not mix IPv4 and IPv6 addresses inside such lists.", - "type" : "string", - "optional" : 1 + "notbefore" : { + "description" : "Certificate's notBefore timestamp (UNIX epoch).", + "optional" : 1, + "renderer" : "timestamp", + "type" : "integer" }, - "digest" : { - "maxLength" : 40, + "pem" : { + "description" : "Certificate in PEM format", + "format" : "pem-certificate", "optional" : 1, - "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." + "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" } }, - "additionalProperties" : 0 + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/certificates/custom", + "text" : "custom" + } + ], + "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}/certificates", + "text" : "certificates" + }, + { + "info" : { + "GET" : { + "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" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Audit" + ] + ] + }, + "proxyto" : "node", + "returns" : { + "type" : "object" + } + }, + "PUT" : { + "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;...]", + "type" : "string" + } + }, + "optional" : 1, + "type" : "string", + "typetext" : "domains= [,account=]" }, - "protected" : 1, - "returns" : { - "type" : "null" + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "description" : { + "description" : "Node description/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" : "" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/config", + "text" : "config" + }, + { + "info" : { + "GET" : { + "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" : { + "type" : "string" + }, + "repoid" : { + "type" : "string" + }, + "version" : { + "type" : "string" + } + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/version", + "text" : "version" + }, + { + "info" : { + "GET" : { + "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" : { + "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" }, - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "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" : { + "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" : { + "description" : "Execute multiple commands in order.", + "method" : "POST", + "name" : "execute", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "commands" : { + "description" : "JSON encoded array of commands.", + "type" : "string", + "typetext" : "" }, - "description" : "Create new rule.", - "proxyto" : "node" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" + } } }, - "path" : "/nodes/{node}/firewall/rules", - "leaf" : 0 - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/firewall/options", - "info" : { - "PUT" : { - "protected" : 1, - "name" : "set_options", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "digest" : { - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 - }, - "nf_conntrack_max" : { - "minimum" : 32768, - "type" : "integer", - "optional" : 1, - "description" : "Maximum number of tracked connections." - }, - "ndp" : { - "optional" : 1, - "type" : "boolean", - "description" : "Enable NDP." - }, - "nf_conntrack_tcp_timeout_established" : { - "minimum" : 7875, - "optional" : 1, - "type" : "integer", - "description" : "Conntrack established timeout." - }, - "nosmurfs" : { - "description" : "Enable SMURFS filter.", - "type" : "boolean", - "optional" : 1 - }, - "tcp_flags_log_level" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for illegal tcp flags filter." - }, - "log_level_in" : { - "optional" : 1, - "type" : "string", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for incoming traffic." - }, - "smurf_log_level" : { - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for SMURFS filter.", - "optional" : 1, - "type" : "string" - }, - "delete" : { - "description" : "A list of settings you want to delete.", - "type" : "string", - "optional" : 1, - "format" : "pve-configid-list" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "tcpflags" : { - "optional" : 1, - "type" : "boolean", - "description" : "Filter illegal combinations of TCP flags." - }, - "log_level_out" : { - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for outgoing traffic.", - "type" : "string", - "optional" : 1 - }, - "enable" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable host firewall rules." - } - } + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Audit" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/execute", + "text" : "execute" + }, + { + "info" : { + "GET" : { + "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" : "" }, - "method" : "PUT", - "proxyto" : "node", - "description" : "Set Firewall options.", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "returns" : { - "type" : "null" + "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" } }, - "GET" : { - "proxyto" : "node", - "description" : "Get host firewall options.", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/rrd", + "text" : "rrd" + }, + { + "info" : { + "GET" : { + "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" }, - "parameters" : { - "properties" : { - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "name" : "get_options", - "returns" : { - "type" : "object", - "properties" : { - "nf_conntrack_tcp_timeout_established" : { - "description" : "Conntrack established timeout.", - "type" : "integer", - "optional" : 1, - "minimum" : 7875 - }, - "nosmurfs" : { - "description" : "Enable SMURFS filter.", - "type" : "boolean", - "optional" : 1 - }, - "tcp_flags_log_level" : { - "type" : "string", - "optional" : 1, - "description" : "Log level for illegal tcp flags filter.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ] - }, - "nf_conntrack_max" : { - "description" : "Maximum number of tracked connections.", - "type" : "integer", - "optional" : 1, - "minimum" : 32768 - }, - "ndp" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable NDP." - }, - "smurf_log_level" : { - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "description" : "Log level for SMURFS filter.", - "optional" : 1, - "type" : "string" - }, - "log_level_in" : { - "optional" : 1, - "type" : "string", - "description" : "Log level for incoming traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ] - }, - "tcpflags" : { - "description" : "Filter illegal combinations of TCP flags.", - "type" : "boolean", - "optional" : 1 - }, - "log_level_out" : { - "description" : "Log level for outgoing traffic.", - "enum" : [ - "emerg", - "alert", - "crit", - "err", - "warning", - "notice", - "info", - "debug", - "nolog" - ], - "type" : "string", - "optional" : 1 - }, - "enable" : { - "description" : "Enable host firewall rules.", - "optional" : 1, - "type" : "boolean" - } - } + "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" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/rrddata", + "text" : "rrddata" + }, + { + "info" : { + "GET" : { + "description" : "Read system log", + "method" : "GET", + "name" : "syslog", + "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" : "" + }, + "service" : { + "description" : "Service ID", + "maxLength" : 128, + "optional" : 1, + "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)" }, - "method" : "GET" + "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" + } } }, - "text" : "options" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/firewall/log", - "info" : { - "GET" : { - "protected" : 1, - "name" : "log", - "parameters" : { - "properties" : { - "start" : { - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "limit" : { - "type" : "integer", - "optional" : 1, - "minimum" : 0 - }, - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - } + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Syslog" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : { + "n" : { + "description" : "Line number", + "type" : "integer" }, - "additionalProperties" : 0 + "t" : { + "description" : "Line text", + "type" : "string" + } }, - "method" : "GET", - "description" : "Read firewall log", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Syslog" - ] - ] + "type" : "object" + }, + "type" : "array" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/syslog", + "text" : "syslog" + }, + { + "info" : { + "POST" : { + "description" : "Creates a VNC Shell proxy.", + "method" : "POST", + "name" : "vncshell", + "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)" }, - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "n" : { - "type" : "integer", - "description" : "Line number" - }, - "t" : { - "type" : "string", - "description" : "Line text" - } - } - }, - "type" : "array" + "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)" } } }, - "text" : "log" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'" + }, + "protected" : 1, + "returns" : { + "additionalProperties" : 0, + "properties" : { + "cert" : { + "type" : "string" + }, + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" + } + } + } } - ], - "text" : "firewall", + }, + "leaf" : 1, + "path" : "/nodes/{node}/vncshell", + "text" : "vncshell" + }, + { "info" : { - "GET" : { + "POST" : { + "description" : "Creates a VNC Shell proxy.", + "method" : "POST", + "name" : "termproxy", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" + }, + "upgrade" : { + "default" : 0, + "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'" }, - "name" : "index", - "description" : "Directory index.", + "protected" : 1, "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" - }, - "links" : [ - { - "rel" : "child", - "href" : "{name}" + "additionalProperties" : 0, + "properties" : { + "port" : { + "type" : "integer" + }, + "ticket" : { + "type" : "string" + }, + "upid" : { + "type" : "string" + }, + "user" : { + "type" : "string" } - ] - }, - "method" : "GET" + } + } } }, - "path" : "/nodes/{node}/firewall", - "leaf" : 0 + "leaf" : 1, + "path" : "/nodes/{node}/termproxy", + "text" : "termproxy" }, { "info" : { "GET" : { + "description" : "Opens a weksocket for VNC traffic.", + "method" : "GET", + "name" : "vncwebsocket", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "format" : "pve-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" } - }, - "additionalProperties" : 0 + }, + "type" : "object" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/vncwebsocket", + "text" : "vncwebsocket" + }, + { + "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 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" : "" + }, + "upgrade" : { + "default" : 0, + "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + } + } }, - "name" : "version", "permissions" : { - "user" : "all" + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Console" + ] + ], + "description" : "Restricted to users on realm 'pam'" }, + "protected" : 1, "proxyto" : "node", - "description" : "API version details", - "method" : "GET", "returns" : { - "type" : "object", + "additionalProperties" : 1, + "description" : "Returned values can be directly passed to the 'remote-viewer' application.", "properties" : { - "repoid" : { + "host" : { "type" : "string" }, - "release" : { + "password" : { "type" : "string" }, - "version" : { + "proxy" : { + "type" : "string" + }, + "tls-port" : { + "type" : "integer" + }, + "type" : { "type" : "string" } } } } }, - "text" : "version", "leaf" : 1, - "path" : "/nodes/{node}/version" + "path" : "/nodes/{node}/spiceshell", + "text" : "spiceshell" }, { "info" : { "GET" : { + "description" : "Read DNS settings.", "method" : "GET", - "returns" : { - "properties" : {}, - "type" : "object" - }, - "description" : "Read node status", - "proxyto" : "node", - "name" : "status", + "name" : "dns", "parameters" : { + "additionalProperties" : 0, "properties" : { "node" : { - "type" : "string", "description" : "The cluster node name.", - "format" : "pve-node" + "format" : "pve-node", + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ @@ -20015,63 +32647,113 @@ var pveapi = [ "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" } }, - "POST" : { - "name" : "node_cmd", + "PUT" : { + "description" : "Write DNS settings.", + "method" : "PUT", + "name" : "update_dns", "parameters" : { + "additionalProperties" : 0, "properties" : { - "node" : { + "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" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "command" : { - "description" : "Specify the command.", - "enum" : [ - "reboot", - "shutdown" - ], - "type" : "string" + "search" : { + "description" : "Search domain for host-name lookup.", + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "protected" : 1, - "method" : "POST", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.PowerMgmt" + "Sys.Modify" ] ] }, + "protected" : 1, "proxyto" : "node", - "description" : "Reboot or shutdown a node.", "returns" : { "type" : "null" } } }, - "text" : "status", "leaf" : 1, - "path" : "/nodes/{node}/status" + "path" : "/nodes/{node}/dns", + "text" : "dns" }, { - "leaf" : 1, - "path" : "/nodes/{node}/netstat", "info" : { "GET" : { - "returns" : { - "type" : "array", - "items" : { - "properties" : {}, - "type" : "object" + "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" : "" + } } }, - "method" : "GET", "permissions" : { "check" : [ "perm", @@ -20081,1787 +32763,1897 @@ var pveapi = [ ] ] }, + "proxyto" : "node", + "returns" : { + "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" + } + }, + "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" : "" + }, + "timezone" : { + "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.", "type" : "string", - "format" : "pve-node" + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "name" : "netstat", - "proxyto" : "node", - "description" : "Read tap/vm network device interface counters" - } - }, - "text" : "netstat" - }, - { - "info" : { - "POST" : { - "returns" : { - "properties" : {}, - "type" : "array" + } }, - "proxyto" : "node", - "description" : "Execute multiple commands in order.", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Audit" + "Sys.Modify" ] ] }, - "method" : "POST", "protected" : 1, - "name" : "execute", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "commands" : { - "description" : "JSON encoded array of commands.", - "type" : "string" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - } + "proxyto" : "node", + "returns" : { + "type" : "null" } } }, - "text" : "execute", "leaf" : 1, - "path" : "/nodes/{node}/execute" + "path" : "/nodes/{node}/time", + "text" : "time" }, { - "text" : "rrd", "info" : { "GET" : { - "name" : "rrd", + "description" : "Get list of appliances.", + "method" : "GET", + "name" : "aplinfo", "parameters" : { "additionalProperties" : 0, "properties" : { - "ds" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "description" : "The list of datasources you want to display.", - "format" : "pve-configid-list" - }, - "timeframe" : { - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ], - "type" : "string" - }, + "typetext" : "" + } + } + }, + "permissions" : { + "user" : "all" + }, + "proxyto" : "node", + "returns" : { + "items" : { + "properties" : {}, + "type" : "object" + }, + "type" : "array" + } + }, + "POST" : { + "description" : "Download appliance templates.", + "method" : "POST", + "name" : "apl_download", + "parameters" : { + "additionalProperties" : 0, + "properties" : { "node" : { "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "format" : "pve-node" + "typetext" : "" }, - "cf" : { + "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, "type" : "string", - "optional" : 1, - "enum" : [ - "AVERAGE", - "MAX" - ], - "description" : "The RRD consolidation function" + "typetext" : "" } } }, "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/storage/{storage}", [ - "Sys.Audit" + "Datastore.AllocateTemplate" ] ] }, "protected" : 1, - "description" : "Read node RRD statistics (returns PNG)", + "proxyto" : "node", "returns" : { - "type" : "object", - "properties" : { - "filename" : { - "type" : "string" - } - } - }, - "method" : "GET" + "type" : "string" + } } }, - "path" : "/nodes/{node}/rrd", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/aplinfo", + "text" : "aplinfo" }, { - "leaf" : 1, - "path" : "/nodes/{node}/rrddata", "info" : { "GET" : { - "name" : "rrddata", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - }, + "description" : "Gather various systems information about a node", + "method" : "GET", + "name" : "report", "parameters" : { + "additionalProperties" : 0, "properties" : { - "cf" : { - "optional" : 1, - "type" : "string", - "description" : "The RRD consolidation function", - "enum" : [ - "AVERAGE", - "MAX" - ] - }, "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." - }, - "timeframe" : { - "type" : "string", - "description" : "Specify the time frame you are interested in.", - "enum" : [ - "hour", - "day", - "week", - "month", - "year" - ] + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "description" : "Read node RRD statistics", - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : {} } }, - "method" : "GET" - } - }, - "text" : "rrddata" - }, - { - "leaf" : 1, - "path" : "/nodes/{node}/syslog", - "info" : { - "GET" : { - "description" : "Read system log", - "proxyto" : "node", "permissions" : { "check" : [ "perm", "/nodes/{node}", [ - "Sys.Syslog" + "Sys.Audit" ] ] }, - "returns" : { - "items" : { - "properties" : { - "t" : { - "type" : "string", - "description" : "Line text" - }, - "n" : { - "description" : "Line number", - "type" : "integer" - } - }, - "type" : "object" - }, - "type" : "array" - }, "protected" : 1, - "parameters" : { - "properties" : { - "since" : { - "optional" : 1, - "type" : "string", - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "description" : "Display all log since this date-time string." - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "limit" : { - "minimum" : 0, - "optional" : 1, - "type" : "integer" - }, - "until" : { - "description" : "Display all log until this date-time string.", - "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$", - "optional" : 1, - "type" : "string" - }, - "start" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1 - } - }, - "additionalProperties" : 0 - }, - "name" : "syslog", - "method" : "GET" + "proxyto" : "node", + "returns" : { + "type" : "string" + } } }, - "text" : "syslog" + "leaf" : 1, + "path" : "/nodes/{node}/report", + "text" : "report" }, { "info" : { "POST" : { - "returns" : { + "description" : "Start all VMs and containers (when onboot=1).", + "method" : "POST", + "name" : "startall", + "parameters" : { + "additionalProperties" : 0, "properties" : { - "user" : { - "type" : "string" - }, - "port" : { - "type" : "integer" - }, - "ticket" : { - "type" : "string" + "force" : { + "description" : "force if onboot=0.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "upid" : { - "type" : "string" + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "cert" : { - "type" : "string" + "vms" : { + "description" : "Only consider Guests with these IDs.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "method" : "POST", "permissions" : { - "description" : "Restricted to users on realm 'pam'", "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Console" + "VM.PowerMgmt" ] ] }, - "parameters" : { - "properties" : { - "upgrade" : { - "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - }, - "websocket" : { - "optional" : 1, - "type" : "boolean", - "description" : "use websocket instead of standard vnc." - } - }, - "additionalProperties" : 0 - }, - "name" : "vncshell", "protected" : 1, - "description" : "Creates a VNC Shell proxy." + "proxyto" : "node", + "returns" : { + "type" : "string" + } } }, - "text" : "vncshell", "leaf" : 1, - "path" : "/nodes/{node}/vncshell" + "path" : "/nodes/{node}/startall", + "text" : "startall" }, { - "text" : "vncwebsocket", "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "properties" : { - "port" : { - "type" : "string" - } - }, - "type" : "object" - }, - "description" : "Opens a weksocket for VNC traffic.", + "POST" : { + "description" : "Stop all VMs and Containers.", + "method" : "POST", + "name" : "stopall", "parameters" : { + "additionalProperties" : 0, "properties" : { - "vncticket" : { - "maxLength" : 512, - "description" : "Ticket from previous call to vncproxy.", - "type" : "string" - }, "node" : { - "format" : "pve-node", "description" : "The cluster node name.", - "type" : "string" + "format" : "pve-node", + "type" : "string", + "typetext" : "" }, - "port" : { - "minimum" : 5900, - "description" : "Port number returned by previous vncproxy call.", - "maximum" : 5999, - "type" : "integer" + "vms" : { + "description" : "Only consider Guests with these IDs.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "name" : "vncwebsocket", "permissions" : { - "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket).", "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Console" + "VM.PowerMgmt" ] ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "path" : "/nodes/{node}/vncwebsocket", - "leaf" : 1 + "leaf" : 1, + "path" : "/nodes/{node}/stopall", + "text" : "stopall" }, { "info" : { "POST" : { + "description" : "Migrate all VMs and Containers.", "method" : "POST", - "protected" : 1, + "name" : "migrateall", "parameters" : { "additionalProperties" : 0, "properties" : { - "upgrade" : { - "description" : "Run 'apt-get dist-upgrade' instead of normal shell.", - "default" : 0, - "type" : "boolean", - "optional" : 1 - }, - "proxy" : { - "format" : "address", + "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" : "integer", + "typetext" : " (1 - N)" + }, + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "description" : "SPICE proxy server. This can be used by the client to specify the proxy server. All nodes in a cluster runs 'spiceproxy', so it is up to the client to choose one. By default, we return the node where the VM is currently running. As resonable setting is to use same node you use to connect to the API (This is window.location.hostname for the JS GUI)." + "typetext" : "" }, - "node" : { + "target" : { + "description" : "Target node.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." - } - } - }, - "name" : "spiceshell", - "returns" : { - "description" : "Returned values can be directly passed to the 'remote-viewer' application.", - "additionalProperties" : 1, - "properties" : { - "proxy" : { - "type" : "string" - }, - "tls-port" : { - "type" : "integer" + "typetext" : "" }, - "password" : { - "type" : "string" - }, - "type" : { - "type" : "string" - }, - "host" : { - "type" : "string" + "vms" : { + "description" : "Only consider Guests with these IDs.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" } } }, - "proxyto" : "node", - "description" : "Creates a SPICE shell.", "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ - "Sys.Console" + "VM.Migrate" ] - ], - "description" : "Restricted to users on realm 'pam'" + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "string" } } }, - "text" : "spiceshell", "leaf" : 1, - "path" : "/nodes/{node}/spiceshell" + "path" : "/nodes/{node}/migrateall", + "text" : "migrateall" }, { - "path" : "/nodes/{node}/dns", - "leaf" : 1, - "text" : "dns", "info" : { "GET" : { + "description" : "Get the content of /etc/hosts.", "method" : "GET", - "returns" : { - "type" : "object", + "name" : "get_etc_hosts", + "parameters" : { "additionalProperties" : 0, "properties" : { - "search" : { - "description" : "Search domain for host-name lookup.", - "type" : "string", - "optional" : 1 - }, - "dns3" : { - "optional" : 1, - "type" : "string", - "description" : "Third name server IP address." - }, - "dns2" : { - "description" : "Second name server IP address.", - "type" : "string", - "optional" : 1 - }, - "dns1" : { + "node" : { + "description" : "The cluster node name.", + "format" : "pve-node", "type" : "string", - "optional" : 1, - "description" : "First name server IP address." + "typetext" : "" } } }, - "name" : "dns", "permissions" : { "check" : [ "perm", - "/nodes/{node}", + "/", [ "Sys.Audit" ] ] }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "properties" : { + "data" : { + "description" : "The content of /etc/hosts.", + "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" + } + }, + "type" : "object" + } + }, + "POST" : { + "description" : "Write /etc/hosts.", + "method" : "POST", + "name" : "write_etc_hosts", "parameters" : { "additionalProperties" : 0, "properties" : { + "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" : "string", + "typetext" : "" + }, "node" : { + "description" : "The cluster node name.", "format" : "pve-node", "type" : "string", - "description" : "The cluster node name." + "typetext" : "" } } }, - "description" : "Read DNS settings.", - "proxyto" : "node" - }, - "PUT" : { - "name" : "update_dns", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "search" : { - "description" : "Search domain for host-name lookup.", - "type" : "string" + "permissions" : { + "check" : [ + "perm", + "/nodes/{node}", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, + "proxyto" : "node", + "returns" : { + "type" : "null" + } + } + }, + "leaf" : 1, + "path" : "/nodes/{node}/hosts", + "text" : "hosts" + } + ], + "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" : { + "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" : "string" + }, + "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" + }, + "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.", + "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" : { + "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 MiB/s for cloning disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" }, - "dns3" : { - "description" : "Third name server IP address.", - "type" : "string", + "default" : { + "description" : "default bandwidth limit in MiB/s", + "format_description" : "LIMIT", + "minimum" : "0", "optional" : 1, - "format" : "ip" + "type" : "number" }, - "dns2" : { - "type" : "string", + "migration" : { + "description" : "bandwidth limit in MiB/s for migrating guests", + "format_description" : "LIMIT", + "minimum" : "0", "optional" : 1, - "description" : "Second name server IP address.", - "format" : "ip" + "type" : "number" }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." + "move" : { + "description" : "bandwidth limit in MiB/s for moving disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" }, - "dns1" : { - "description" : "First name server IP address.", + "restore" : { + "description" : "bandwidth limit in MiB/s for restoring guests from backups", + "format_description" : "LIMIT", + "minimum" : "0", "optional" : 1, - "type" : "string", - "format" : "ip" + "type" : "number" } - } + }, + "optional" : 1, + "type" : "string", + "typetext" : "[clone=] [,default=] [,migration=] [,move=] [,restore=]" }, - "protected" : 1, - "method" : "PUT", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "comstar_hg" : { + "description" : "host group for comstar views", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "description" : "Write DNS settings.", - "proxyto" : "node", - "returns" : { - "type" : "null" - } - } - } - }, - { - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "properties" : { - "localtime" : { - "minimum" : 1297163644, - "type" : "integer", - "description" : "Seconds since 1970-01-01 00:00:00 (local time)" - }, - "time" : { - "minimum" : 1297163644, - "type" : "integer", - "description" : "Seconds since 1970-01-01 00:00:00 UTC." - }, - "timezone" : { - "type" : "string", - "description" : "Time zone" - } - }, - "type" : "object", - "additionalProperties" : 0 + "comstar_tg" : { + "description" : "target group for comstar views", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "proxyto" : "node", - "description" : "Read server time and time zone settings.", - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 + "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" : "" }, - "name" : "time", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] - } - }, - "PUT" : { - "returns" : { - "type" : "null" + "delete" : { + "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", + "maxLength" : 4096, + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "description" : "Set time zone.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Modify" - ] - ] + "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" : "" }, - "method" : "PUT", - "protected" : 1, - "parameters" : { - "properties" : { - "timezone" : { - "type" : "string", - "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names." - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "disable" : { + "description" : "Flag to disable the storage.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "name" : "set_timezone" - } - }, - "text" : "time", - "leaf" : 1, - "path" : "/nodes/{node}/time" - }, - { - "info" : { - "POST" : { - "protected" : 1, - "name" : "apl_download", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "description" : "Only list status for specified storage", - "type" : "string", - "format" : "pve-storage-id" - }, - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - }, - "template" : { - "type" : "string", - "description" : "The template wich will downloaded", - "maxLength" : 255 - } - } + "domain" : { + "description" : "CIFS domain.", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "method" : "POST", - "proxyto" : "node", - "description" : "Download appliance templates.", - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.AllocateTemplate" - ] - ] + "format" : { + "description" : "Default image format.", + "format" : "pve-storage-format", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "returns" : { - "type" : "string" - } - }, - "GET" : { - "returns" : { - "items" : { - "type" : "object", - "properties" : {} - }, - "type" : "array" + "fuse" : { + "description" : "Mount CephFS through FUSE.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "method" : "GET", - "description" : "Get list of appliances.", - "proxyto" : "node", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - } - } + "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" : "" + }, + "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" : "" + }, + "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" : "IP addresses of monitors (for external clusters).", + "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" : "" + }, + "password" : { + "description" : "Password for CIFS share.", + "maxLength" : 256, + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "pool" : { + "description" : "Pool.", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "name" : "aplinfo", - "permissions" : { - "user" : "all" - } - } - }, - "text" : "aplinfo", - "leaf" : 1, - "path" : "/nodes/{node}/aplinfo" - }, - { - "info" : { - "GET" : { - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "description" : "The cluster node name.", - "type" : "string" - } - }, - "additionalProperties" : 0 + "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)" }, - "name" : "report", - "protected" : 1, - "method" : "GET", - "permissions" : { - "check" : [ - "perm", - "/nodes/{node}", - [ - "Sys.Audit" - ] - ] + "saferemove" : { + "description" : "Zero-out data when removing LVs.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "description" : "Gather various systems information about a node", - "proxyto" : "node", - "returns" : { - "type" : "string" - } - } - }, - "text" : "report", - "leaf" : 1, - "path" : "/nodes/{node}/report" - }, - { - "text" : "startall", - "info" : { - "POST" : { - "method" : "POST", - "protected" : 1, - "parameters" : { - "properties" : { - "force" : { - "optional" : 1, - "type" : "boolean", - "description" : "force if onboot=0." - }, - "node" : { - "type" : "string", - "description" : "The cluster node name.", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "saferemove_throughput" : { + "description" : "Wipe throughput (cstream -t parameter value).", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "name" : "startall", - "returns" : { - "type" : "string" + "server" : { + "description" : "Server IP or DNS name.", + "format" : "pve-storage-server", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "proxyto" : "node", - "description" : "Start all VMs and containers (when onboot=1).", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "VM.PowerMgmt" - ] - ] - } - } - }, - "path" : "/nodes/{node}/startall", - "leaf" : 1 - }, - { - "text" : "stopall", - "info" : { - "POST" : { - "description" : "Stop all VMs and Containers.", - "proxyto" : "node", - "permissions" : { - "check" : [ - "perm", - "/", - [ - "VM.PowerMgmt" - ] - ] + "server2" : { + "description" : "Backup volfile server IP or DNS name.", + "format" : "pve-storage-server", + "optional" : 1, + "requires" : "server", + "type" : "string", + "typetext" : "" }, - "returns" : { + "shared" : { + "description" : "Mark storage as shared.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "smbversion" : { + "description" : "SMB protocol version", + "enum" : [ + "2.0", + "2.1", + "3.0" + ], + "optional" : 1, "type" : "string" }, - "protected" : 1, - "parameters" : { - "properties" : { - "node" : { - "format" : "pve-node", - "type" : "string", - "description" : "The cluster node name." - } - }, - "additionalProperties" : 0 + "sparse" : { + "description" : "use sparse volumes", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "name" : "stopall", - "method" : "POST" - } - }, - "path" : "/nodes/{node}/stopall", - "leaf" : 1 - }, - { - "info" : { - "POST" : { - "returns" : { - "type" : "string" + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", + "type" : "string", + "typetext" : "" }, - "permissions" : { - "check" : [ - "perm", - "/", - [ - "VM.Migrate" - ] - ] + "subdir" : { + "description" : "Subdir to mount.", + "format" : "pve-storage-path", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "proxyto" : "node", - "description" : "Migrate all VMs and Containers.", - "method" : "POST", - "parameters" : { - "properties" : { - "maxworkers" : { - "optional" : 1, - "type" : "integer", - "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!", - "minimum" : 1 - }, - "node" : { - "description" : "The cluster node name.", - "type" : "string", - "format" : "pve-node" - }, - "target" : { - "description" : "Target node.", - "type" : "string", - "format" : "pve-node" - } - }, - "additionalProperties" : 0 + "tagged_only" : { + "description" : "Only use logical volumes tagged with 'pve-vm-ID'.", + "optional" : 1, + "type" : "boolean", + "typetext" : "" }, - "name" : "migrateall", - "protected" : 1 - } + "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" }, - "text" : "migrateall", - "leaf" : 1, - "path" : "/nodes/{node}/migrateall" + "permissions" : { + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } } - ], - "text" : "{node}", - "leaf" : 0, - "path" : "/nodes/{node}" + }, + "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" : [ + "cephfs", + "cifs", + "dir", + "drbd", + "fake", + "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" }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "index", - "description" : "Cluster node index.", - "method" : "GET", "returns" : { + "items" : { + "properties" : { + "storage" : { + "type" : "string" + } + }, + "type" : "object" + }, "links" : [ { - "href" : "{node}", + "href" : "{storage}", "rel" : "child" } ], - "items" : { - "properties" : {}, - "type" : "object" - }, "type" : "array" } - } - } - }, - { - "info" : { + }, "POST" : { - "returns" : { - "type" : "null" - }, - "method" : "POST", "description" : "Create a new storage.", - "protected" : 1, + "method" : "POST", "name" : "create", "parameters" : { "additionalProperties" : 0, - "type" : "object", "properties" : { - "volume" : { - "description" : "Glusterfs Volume.", + "authsupported" : { + "description" : "Authsupported.", + "optional" : 1, "type" : "string", - "optional" : 1 - }, - "sparse" : { - "description" : "use sparse volumes", - "type" : "boolean", - "optional" : 1 + "typetext" : "" }, - "type" : { - "description" : "Storage type.", - "enum" : [ - "zfspool", - "lvm", - "iscsi", - "rbd", - "dir", - "iscsidirect", - "nfs", - "glusterfs", - "zfs", - "lvmthin", - "sheepdog", - "drbd" - ], - "type" : "string" + "base" : { + "description" : "Base volume. This volume is automatically activated.", + "format" : "pve-volume-id", + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "iscsiprovider" : { - "description" : "iscsi provider", + "blocksize" : { + "description" : "block size", + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "" }, - "saferemove" : { + "bwlimit" : { + "description" : "Set bandwidth/io limits various operations.", + "format" : { + "clone" : { + "description" : "bandwidth limit in MiB/s for cloning disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "default" : { + "description" : "default bandwidth limit in MiB/s", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "migration" : { + "description" : "bandwidth limit in MiB/s for migrating guests", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "move" : { + "description" : "bandwidth limit in MiB/s for moving disks", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + }, + "restore" : { + "description" : "bandwidth limit in MiB/s for restoring guests from backups", + "format_description" : "LIMIT", + "minimum" : "0", + "optional" : 1, + "type" : "number" + } + }, "optional" : 1, - "type" : "boolean", - "description" : "Zero-out data when removing LVs." + "type" : "string", + "typetext" : "[clone=] [,default=] [,migration=] [,move=] [,restore=]" }, - "storage" : { + "comstar_hg" : { + "description" : "host group for comstar views", + "optional" : 1, "type" : "string", - "description" : "The storage identifier.", - "format" : "pve-storage-id" + "typetext" : "" }, - "redundancy" : { - "minimum" : 1, + "comstar_tg" : { + "description" : "target group for comstar views", "optional" : 1, - "type" : "integer", - "maximum" : 16, - "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." + "type" : "string", + "typetext" : "" }, - "pool" : { + "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, - "description" : "Pool." + "type" : "boolean", + "typetext" : "" }, - "path" : { - "description" : "File system path.", + "domain" : { + "description" : "CIFS domain.", + "maxLength" : 256, "optional" : 1, "type" : "string", - "format" : "pve-storage-path" + "typetext" : "" }, - "server" : { + "export" : { + "description" : "NFS export path.", + "format" : "pve-storage-path", "optional" : 1, "type" : "string", - "description" : "Server IP or DNS name.", - "format" : "pve-storage-server" + "typetext" : "" }, - "comstar_tg" : { + "format" : { + "description" : "Default image format.", + "format" : "pve-storage-format", "optional" : 1, "type" : "string", - "description" : "target group for comstar views" + "typetext" : "" }, - "saferemove_throughput" : { - "type" : "string", + "fuse" : { + "description" : "Mount CephFS through FUSE.", "optional" : 1, - "description" : "Wipe throughput (cstream -t parameter value)." + "type" : "boolean", + "typetext" : "" }, - "maxfiles" : { - "type" : "integer", + "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, - "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", - "minimum" : 0 + "type" : "string", + "typetext" : "" }, - "options" : { + "iscsiprovider" : { + "description" : "iscsi provider", + "optional" : 1, "type" : "string", + "typetext" : "" + }, + "krbd" : { + "description" : "Always access rbd through krbd kernel module.", "optional" : 1, - "description" : "NFS mount options (see 'man nfs')", - "format" : "pve-storage-options" + "type" : "boolean", + "typetext" : "" }, - "comstar_hg" : { + "lio_tpg" : { + "description" : "target portal group for Linux LIO targets", "optional" : 1, "type" : "string", - "description" : "host group for comstar views" + "typetext" : "" }, - "username" : { - "description" : "RBD Id.", - "type" : "string", - "optional" : 1 + "maxfiles" : { + "description" : "Maximal number of backup files per VM. Use '0' for unlimted.", + "minimum" : 0, + "optional" : 1, + "type" : "integer", + "typetext" : " (0 - N)" }, - "authsupported" : { + "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", - "description" : "Authsupported." + "typetext" : "" }, - "server2" : { - "description" : "Backup volfile server IP or DNS name.", - "requires" : "server", + "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, - "format" : "pve-storage-server" + "type" : "boolean", + "typetext" : "" }, - "content" : { - "format" : "pve-storage-content-list", + "options" : { + "description" : "NFS mount options (see 'man nfs')", + "format" : "pve-storage-options", "optional" : 1, "type" : "string", - "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n" + "typetext" : "" }, - "base" : { - "description" : "Base volume. This volume is automatically activated.", + "password" : { + "description" : "Password for CIFS share.", + "maxLength" : 256, + "optional" : 1, "type" : "string", + "typetext" : "" + }, + "path" : { + "description" : "File system path.", + "format" : "pve-storage-path", "optional" : 1, - "format" : "pve-volume-id" + "type" : "string", + "typetext" : "" }, - "monhost" : { - "description" : "Monitors daemon ips.", + "pool" : { + "description" : "Pool.", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "format" : { + "portal" : { + "description" : "iSCSI portal (IP or DNS name with optional port).", + "format" : "pve-storage-portal-dns", "optional" : 1, "type" : "string", - "description" : "Default image format.", - "format" : "pve-storage-format" + "typetext" : "" }, - "nowritecache" : { - "type" : "boolean", + "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, - "description" : "disable write caching on the target" + "type" : "integer", + "typetext" : " (1 - 16)" }, - "target" : { - "description" : "iSCSI target.", + "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", - "optional" : 1 + "typetext" : "" }, - "thinpool" : { + "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, - "description" : "LVM thin pool LV name.", - "format" : "pve-storage-vgname" + "requires" : "server", + "type" : "string", + "typetext" : "" }, - "krbd" : { - "type" : "boolean", + "share" : { + "description" : "CIFS share.", "optional" : 1, - "description" : "Access rbd through krbd kernel module." + "type" : "string", + "typetext" : "" }, "shared" : { "description" : "Mark storage as shared.", "optional" : 1, - "type" : "boolean" + "type" : "boolean", + "typetext" : "" }, - "transport" : { + "smbversion" : { + "description" : "SMB protocol version", "enum" : [ - "tcp", - "rdma", - "unix" + "2.0", + "2.1", + "3.0" ], - "description" : "Gluster transport: tcp or rdma", "optional" : 1, "type" : "string" }, - "vgname" : { - "description" : "Volume group name.", + "sparse" : { + "description" : "use sparse volumes", "optional" : 1, - "type" : "string", - "format" : "pve-storage-vgname" + "type" : "boolean", + "typetext" : "" }, - "blocksize" : { - "optional" : 1, + "storage" : { + "description" : "The storage identifier.", + "format" : "pve-storage-id", "type" : "string", - "description" : "block size" + "typetext" : "" }, - "export" : { + "subdir" : { + "description" : "Subdir to mount.", + "format" : "pve-storage-path", "optional" : 1, "type" : "string", - "description" : "NFS export path.", - "format" : "pve-storage-path" + "typetext" : "" }, - "portal" : { - "type" : "string", + "tagged_only" : { + "description" : "Only use logical volumes tagged with 'pve-vm-ID'.", "optional" : 1, - "description" : "iSCSI portal (IP or DNS name with optional port).", - "format" : "pve-storage-portal-dns" + "type" : "boolean", + "typetext" : "" }, - "nodes" : { - "format" : "pve-node-list", - "description" : "List of cluster node names.", + "target" : { + "description" : "iSCSI target.", + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "" }, - "disable" : { - "type" : "boolean", + "thinpool" : { + "description" : "LVM thin pool LV name.", + "format" : "pve-storage-vgname", "optional" : 1, - "description" : "Flag to disable the storage." - } - } - }, - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - } - }, - "GET" : { - "returns" : { - "type" : "array", - "items" : { - "type" : "object", - "properties" : { - "storage" : { - "type" : "string" - } - } - }, - "links" : [ - { - "rel" : "child", - "href" : "{storage}" - } - ] - }, - "method" : "GET", - "parameters" : { - "properties" : { - "type" : { "type" : "string", - "optional" : 1, - "description" : "Only list storage of specific type", + "typetext" : "" + }, + "transport" : { + "description" : "Gluster transport: tcp or rdma", "enum" : [ - "zfspool", - "lvm", - "iscsi", - "rbd", + "tcp", + "rdma", + "unix" + ], + "optional" : 1, + "type" : "string" + }, + "type" : { + "description" : "Storage type.", + "enum" : [ + "cephfs", + "cifs", "dir", - "iscsidirect", - "nfs", + "drbd", + "fake", "glusterfs", - "zfs", + "iscsi", + "iscsidirect", + "lvm", "lvmthin", + "nfs", + "rbd", "sheepdog", - "drbd" - ] + "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" : "" } }, - "additionalProperties" : 0 + "type" : "object" }, "permissions" : { - "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/'", - "user" : "all" + "check" : [ + "perm", + "/storage", + [ + "Datastore.Allocate" + ] + ] }, - "name" : "index", - "description" : "Storage index." + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "text" : "storage", + "leaf" : 0, + "path" : "/storage", + "text" : "storage" + }, + { "children" : [ { - "leaf" : 1, - "path" : "/storage/{storage}", - "info" : { - "GET" : { - "name" : "read", - "permissions" : { - "check" : [ - "perm", - "/storage/{storage}", - [ - "Datastore.Allocate" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "format" : "pve-storage-id", - "description" : "The storage identifier.", - "type" : "string" + "children" : [ + { + "info" : { + "DELETE" : { + "description" : "Delete user.", + "method" : "DELETE", + "name" : "delete_user", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "and", + [ + "userid-param", + "Realm.AllocateUser" + ], + [ + "userid-group", + [ + "User.Modify" + ] + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" } - } - }, - "description" : "Read storage configuration.", - "returns" : {}, - "method" : "GET" - }, - "DELETE" : { - "returns" : { - "type" : "null" - }, - "method" : "DELETE", - "permissions" : { - "check" : [ - "perm", - "/storage", - [ - "Datastore.Allocate" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "storage" : { - "format" : "pve-storage-id", - "type" : "string", - "description" : "The storage identifier." + }, + "GET" : { + "description" : "Get user configuration.", + "method" : "GET", + "name" : "read_user", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "userid-group", + [ + "User.Modify", + "Sys.Audit" + ] + ] + }, + "returns" : { + "additionalProperties" : 0, + "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" : { + "type" : "array" + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, + "type" : "string" + }, + "lastname" : { + "optional" : 1, + "type" : "string" + } + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update user configuration.", + "method" : "PUT", + "name" : "update_user", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "append" : { + "optional" : 1, + "requires" : "groups", + "type" : "boolean", + "typetext" : "" + }, + "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" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "userid-group", + [ + "User.Modify" + ], + "groups_param", + 1 + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" } } }, - "name" : "delete", - "protected" : 1, - "description" : "Delete storage configuration." - }, - "PUT" : { - "method" : "PUT", - "returns" : { - "type" : "null" - }, + "leaf" : 1, + "path" : "/access/users/{userid}", + "text" : "{userid}" + } + ], + "info" : { + "GET" : { + "description" : "User index.", + "method" : "GET", + "name" : "index", "parameters" : { "additionalProperties" : 0, - "type" : "object", "properties" : { - "delete" : { - "maxLength" : 4096, - "format" : "pve-configid-list", - "optional" : 1, - "type" : "string", - "description" : "A list of settings you want to delete." - }, - "transport" : { - "type" : "string", - "optional" : 1, - "enum" : [ - "tcp", - "rdma", - "unix" - ], - "description" : "Gluster transport: tcp or rdma" - }, - "shared" : { - "description" : "Mark storage as shared.", - "type" : "boolean", - "optional" : 1 - }, - "krbd" : { - "optional" : 1, - "type" : "boolean", - "description" : "Access rbd through krbd kernel module." - }, - "pool" : { - "description" : "Pool.", - "type" : "string", - "optional" : 1 - }, - "redundancy" : { - "description" : "The redundancy count specifies the number of nodes to which the resource should be deployed. It must be at least 1 and at most the number of nodes in the cluster.", - "type" : "integer", - "optional" : 1, - "maximum" : 16, - "default" : 2, - "minimum" : 1 - }, - "server" : { - "description" : "Server IP or DNS name.", - "type" : "string", - "optional" : 1, - "format" : "pve-storage-server" - }, - "saferemove" : { - "type" : "boolean", - "optional" : 1, - "description" : "Zero-out data when removing LVs." - }, - "digest" : { - "maxLength" : 40, - "type" : "string", - "optional" : 1, - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications." - }, - "storage" : { - "format" : "pve-storage-id", - "description" : "The storage identifier.", - "type" : "string" - }, - "sparse" : { - "description" : "use sparse volumes", - "type" : "boolean", - "optional" : 1 - }, - "nowritecache" : { - "description" : "disable write caching on the target", - "type" : "boolean", - "optional" : 1 - }, - "format" : { - "description" : "Default image format.", - "optional" : 1, - "type" : "string", - "format" : "pve-storage-format" - }, - "content" : { - "format" : "pve-storage-content-list", - "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n", - "type" : "string", - "optional" : 1 - }, - "server2" : { - "format" : "pve-storage-server", - "type" : "string", + "enabled" : { + "description" : "Optional filter for enable property.", "optional" : 1, - "description" : "Backup volfile server IP or DNS name.", - "requires" : "server" - }, - "disable" : { - "description" : "Flag to disable the storage.", "type" : "boolean", - "optional" : 1 - }, - "nodes" : { - "format" : "pve-node-list", - "optional" : 1, - "type" : "string", - "description" : "List of cluster node names." - }, - "comstar_hg" : { - "type" : "string", - "optional" : 1, - "description" : "host group for comstar views" - }, - "options" : { - "format" : "pve-storage-options", - "description" : "NFS mount options (see 'man nfs')", - "type" : "string", - "optional" : 1 - }, - "saferemove_throughput" : { - "optional" : 1, - "type" : "string", - "description" : "Wipe throughput (cstream -t parameter value)." - }, - "maxfiles" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Maximal number of backup files per VM. Use '0' for unlimted." - }, - "blocksize" : { - "optional" : 1, - "type" : "string", - "description" : "block size" - }, - "username" : { - "description" : "RBD Id.", - "type" : "string", - "optional" : 1 - }, - "comstar_tg" : { - "description" : "target group for comstar views", - "type" : "string", - "optional" : 1 + "typetext" : "" } } }, "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" }, - "name" : "update", - "description" : "Update storage configuration.", - "protected" : 1 - } - }, - "text" : "{storage}" - } - ], - "leaf" : 0, - "path" : "/storage" - }, - { - "leaf" : 0, - "path" : "/access", - "info" : { - "GET" : { - "method" : "GET", - "returns" : { - "type" : "array", - "links" : [ - { - "href" : "{subdir}", - "rel" : "child" + "returns" : { + "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" + }, + "keys" : { + "description" : "Keys for two factor auth (yubico).", + "optional" : 1, + "type" : "string" + }, + "lastname" : { + "optional" : 1, + "type" : "string" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{userid}", + "rel" : "child" + } + ], + "type" : "array" } - ], - "items" : { - "properties" : { - "subdir" : { - "type" : "string" - } - }, - "type" : "object" - } - }, - "name" : "index", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0 - }, - "description" : "Directory index." - } - }, - "text" : "access", - "children" : [ - { - "info" : { + }, "POST" : { - "method" : "POST", - "returns" : { - "type" : "null" - }, - "protected" : 1, "description" : "Create new user.", + "method" : "POST", "name" : "create_user", - "permissions" : { - "check" : [ - "and", - [ - "userid-param", - "Realm.AllocateUser" - ], - [ - "userid-group", - [ - "User.Modify" - ], - "groups_param", - 1 - ] - ], - "description" : "You need 'Realm.AllocateUser' on '/access/realm/' on the realm of user , and 'User.Modify' permissions to '/access/groups/' for any group specified (or 'User.Modify' on '/access/groups' if you pass no groups." - }, "parameters" : { + "additionalProperties" : 0, "properties" : { + "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, - "default" : 1, - "description" : "Enable the account (default). You can set this to '0' to disable the accout" + "type" : "integer", + "typetext" : " (0 - N)" }, - "lastname" : { + "firstname" : { + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "" }, - "keys" : { + "groups" : { + "format" : "pve-groupid-list", "optional" : 1, "type" : "string", - "description" : "Keys for two factor auth (yubico)." + "typetext" : "" }, - "firstname" : { + "keys" : { + "description" : "Keys for two factor auth (yubico).", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "groups" : { + "lastname" : { "optional" : 1, "type" : "string", - "format" : "pve-groupid-list" + "typetext" : "" }, "password" : { - "optional" : 1, - "type" : "string", "description" : "Initial password.", + "maxLength" : 64, "minLength" : 5, - "maxLength" : 64 - }, - "email" : { - "format" : "email-opt", "optional" : 1, - "type" : "string" - }, - "comment" : { "type" : "string", - "optional" : 1 + "typetext" : "" }, "userid" : { - "type" : "string", "description" : "User ID", "format" : "pve-userid", - "maxLength" : 64 - }, - "expire" : { - "minimum" : 0, - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.", - "type" : "integer", - "optional" : 1 - } - }, - "additionalProperties" : 0 - } - }, - "GET" : { - "returns" : { - "items" : { - "type" : "object", - "properties" : { - "userid" : { - "type" : "string" - } - } - }, - "links" : [ - { - "href" : "{userid}", - "rel" : "child" - } - ], - "type" : "array" - }, - "method" : "GET", - "name" : "index", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "enabled" : { - "description" : "Optional filter for enable property.", - "type" : "boolean", - "optional" : 1 + "maxLength" : 64, + "type" : "string", + "typetext" : "" } } }, "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" + "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." }, - "description" : "User index." + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "text" : "users", + "leaf" : 0, + "path" : "/access/users", + "text" : "users" + }, + { "children" : [ { - "leaf" : 1, - "path" : "/access/users/{userid}", "info" : { - "PUT" : { - "protected" : 1, - "description" : "Update user configuration.", - "name" : "update_user", + "DELETE" : { + "description" : "Delete group.", + "method" : "DELETE", + "name" : "delete_group", "parameters" : { "additionalProperties" : 0, "properties" : { - "expire" : { - "minimum" : 0, - "type" : "integer", - "optional" : 1, - "description" : "Account expiration date (seconds since epoch). '0' means no expiration date." - }, - "comment" : { - "type" : "string", - "optional" : 1 - }, - "email" : { - "format" : "email-opt", - "optional" : 1, - "type" : "string" - }, - "userid" : { - "description" : "User ID", - "type" : "string", - "format" : "pve-userid", - "maxLength" : 64 - }, - "keys" : { - "description" : "Keys for two factor auth (yubico).", - "optional" : 1, - "type" : "string" - }, - "groups" : { - "format" : "pve-groupid-list", + "groupid" : { + "format" : "pve-groupid", "type" : "string", - "optional" : 1 - }, - "firstname" : { - "optional" : 1, - "type" : "string" - }, - "enable" : { - "type" : "boolean", - "optional" : 1, - "description" : "Enable/disable the account." - }, - "append" : { - "optional" : 1, - "type" : "boolean", - "requires" : "groups" - }, - "lastname" : { - "optional" : 1, - "type" : "string" + "typetext" : "" } } }, "permissions" : { "check" : [ - "userid-group", + "perm", + "/access/groups", [ - "User.Modify" - ], - "groups_param", - 1 + "Group.Allocate" + ] ] }, + "protected" : 1, "returns" : { "type" : "null" - }, - "method" : "PUT" + } }, - "DELETE" : { - "protected" : 1, - "description" : "Delete user.", + "GET" : { + "description" : "Get group configuration.", + "method" : "GET", + "name" : "read_group", "parameters" : { "additionalProperties" : 0, "properties" : { - "userid" : { - "maxLength" : 64, - "format" : "pve-userid", + "groupid" : { + "format" : "pve-groupid", "type" : "string", - "description" : "User ID" + "typetext" : "" } } }, "permissions" : { "check" : [ - "and", + "perm", + "/access/groups", [ - "userid-param", - "Realm.AllocateUser" + "Sys.Audit", + "Group.Allocate" ], - [ - "userid-group", - [ - "User.Modify" - ] - ] + "any", + 1 ] }, - "name" : "delete_user", - "method" : "DELETE", - "returns" : { - "type" : "null" - } - }, - "GET" : { - "method" : "GET", "returns" : { "additionalProperties" : 0, "properties" : { - "keys" : { - "type" : "string", - "optional" : 1 - }, - "firstname" : { - "type" : "string", - "optional" : 1 - }, - "groups" : { - "type" : "array" - }, - "enable" : { - "type" : "boolean" - }, - "lastname" : { + "comment" : { "optional" : 1, "type" : "string" }, - "expire" : { - "type" : "integer", - "optional" : 1 - }, - "email" : { - "type" : "string", - "optional" : 1 - }, - "comment" : { - "type" : "string", - "optional" : 1 + "members" : { + "items" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string" + }, + "type" : "array" } - } - }, + }, + "type" : "object" + } + }, + "PUT" : { + "description" : "Update group data.", + "method" : "PUT", + "name" : "update_group", "parameters" : { + "additionalProperties" : 0, "properties" : { - "userid" : { - "description" : "User ID", + "comment" : { + "optional" : 1, "type" : "string", - "format" : "pve-userid", - "maxLength" : 64 + "typetext" : "" + }, + "groupid" : { + "format" : "pve-groupid", + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, - "name" : "read_user", "permissions" : { "check" : [ - "userid-group", + "perm", + "/access/groups", [ - "User.Modify", - "Sys.Audit" + "Group.Allocate" ] ] }, - "description" : "Get user configuration." + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "text" : "{userid}" + "leaf" : 1, + "path" : "/access/groups/{groupid}", + "text" : "{groupid}" } ], - "leaf" : 0, - "path" : "/access/users" - }, - { "info" : { "GET" : { + "description" : "Group index.", + "method" : "GET", "name" : "index", - "permissions" : { - "user" : "all", - "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/." - }, "parameters" : { "additionalProperties" : 0 }, - "description" : "Group index.", - "method" : "GET", + "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" : { - "links" : [ - { - "href" : "{groupid}", - "rel" : "child" - } - ], "items" : { "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, "groupid" : { + "format" : "pve-groupid", "type" : "string" } }, "type" : "object" }, + "links" : [ + { + "href" : "{groupid}", + "rel" : "child" + } + ], "type" : "array" } }, "POST" : { - "returns" : { - "type" : "null" - }, + "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", @@ -21871,173 +34663,223 @@ var pveapi = [ ] ] }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "groupid" : { - "format" : "pve-groupid", - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - } - } - }, - "description" : "Create new group.", - "protected" : 1 + "protected" : 1, + "returns" : { + "type" : "null" + } } }, + "leaf" : 0, + "path" : "/access/groups", + "text" : "groups" + }, + { "children" : [ { "info" : { "DELETE" : { - "permissions" : { - "check" : [ - "perm", - "/access/groups", - [ - "Group.Allocate" - ] - ] - }, - "name" : "delete_group", + "description" : "Delete role.", + "method" : "DELETE", + "name" : "delete_role", "parameters" : { + "additionalProperties" : 0, "properties" : { - "groupid" : { + "roleid" : { + "format" : "pve-roleid", "type" : "string", - "format" : "pve-groupid" + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "protected" : 1, - "description" : "Delete group.", - "returns" : { - "type" : "null" - }, - "method" : "DELETE" - }, - "PUT" : { - "method" : "PUT", - "returns" : { - "type" : "null" + } }, - "description" : "Update group data.", - "protected" : 1, "permissions" : { "check" : [ "perm", - "/access/groups", + "/access", [ - "Group.Allocate" + "Sys.Modify" ] ] }, - "name" : "update_group", - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "groupid" : { - "type" : "string", - "format" : "pve-groupid" - }, - "comment" : { - "type" : "string", - "optional" : 1 - } - } + "protected" : 1, + "returns" : { + "type" : "null" } }, "GET" : { - "returns" : { - "properties" : { - "comment" : { - "type" : "string", - "optional" : 1 - }, - "members" : { - "items" : { - "type" : "string" - }, - "type" : "array" - } - }, - "type" : "object", - "additionalProperties" : 0 - }, + "description" : "Get role configuration.", "method" : "GET", - "name" : "read_group", + "name" : "read_role", "parameters" : { + "additionalProperties" : 0, "properties" : { - "groupid" : { - "format" : "pve-groupid", - "type" : "string" + "roleid" : { + "format" : "pve-roleid", + "type" : "string", + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, "permissions" : { - "check" : [ - "perm", - "/access/groups", - [ - "Sys.Audit", - "Group.Allocate" - ], - "any", - 1 - ] + "user" : "all" }, - "description" : "Get group configuration." - } - }, - "text" : "{groupid}", - "leaf" : 1, - "path" : "/access/groups/{groupid}" - } - ], - "text" : "groups", - "leaf" : 0, - "path" : "/access/groups" - }, - { - "children" : [ - { - "text" : "{roleid}", - "info" : { - "GET" : { - "returns" : {}, - "method" : "GET", - "name" : "read_role", - "parameters" : { + "returns" : { + "additionalProperties" : 0, "properties" : { - "roleid" : { - "format" : "pve-roleid", - "type" : "string" + "Datastore.Allocate" : { + "optional" : 1, + "type" : "boolean" + }, + "Datastore.AllocateSpace" : { + "optional" : 1, + "type" : "boolean" + }, + "Datastore.AllocateTemplate" : { + "optional" : 1, + "type" : "boolean" + }, + "Datastore.Audit" : { + "optional" : 1, + "type" : "boolean" + }, + "Group.Allocate" : { + "optional" : 1, + "type" : "boolean" + }, + "Permissions.Modify" : { + "optional" : 1, + "type" : "boolean" + }, + "Pool.Allocate" : { + "optional" : 1, + "type" : "boolean" + }, + "Realm.Allocate" : { + "optional" : 1, + "type" : "boolean" + }, + "Realm.AllocateUser" : { + "optional" : 1, + "type" : "boolean" + }, + "Sys.Audit" : { + "optional" : 1, + "type" : "boolean" + }, + "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.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" } }, - "additionalProperties" : 0 - }, - "permissions" : { - "user" : "all" - }, - "description" : "Get role configuration." + "type" : "object" + } }, - "DELETE" : { - "method" : "DELETE", - "returns" : { - "type" : "null" - }, - "description" : "Delete role.", - "protected" : 1, - "name" : "delete_role", + "PUT" : { + "description" : "Update an existing role.", + "method" : "PUT", + "name" : "update_role", "parameters" : { "additionalProperties" : 0, "properties" : { + "append" : { + "optional" : 1, + "requires" : "privs", + "type" : "boolean", + "typetext" : "" + }, + "privs" : { + "format" : "pve-priv-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, "roleid" : { "format" : "pve-roleid", - "type" : "string" + "type" : "string", + "typetext" : "" } } }, @@ -22049,53 +34891,22 @@ var pveapi = [ "Sys.Modify" ] ] - } - }, - "PUT" : { - "permissions" : { - "check" : [ - "perm", - "/access", - [ - "Sys.Modify" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "append" : { - "requires" : "privs", - "type" : "boolean", - "optional" : 1 - }, - "roleid" : { - "format" : "pve-roleid", - "type" : "string" - }, - "privs" : { - "format" : "pve-priv-list", - "type" : "string" - } - } }, - "name" : "update_role", - "description" : "Create new role.", "protected" : 1, - "method" : "PUT", "returns" : { "type" : "null" } } }, + "leaf" : 1, "path" : "/access/roles/{roleid}", - "leaf" : 1 + "text" : "{roleid}" } ], - "text" : "roles", "info" : { "GET" : { "description" : "Role index.", + "method" : "GET", "name" : "index", "parameters" : { "additionalProperties" : 0 @@ -22104,76 +34915,101 @@ var pveapi = [ "user" : "all" }, "returns" : { - "type" : "array", - "links" : [ - { - "href" : "{roleid}", - "rel" : "child" - } - ], "items" : { - "type" : "object", "properties" : { + "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" : "{roleid}", + "rel" : "child" } - } - }, - "method" : "GET" + ], + "type" : "array" + } }, "POST" : { "description" : "Create new role.", - "protected" : 1, - "permissions" : { - "check" : [ - "perm", - "/access", - [ - "Sys.Modify" - ] - ] - }, + "method" : "POST", + "name" : "create_role", "parameters" : { "additionalProperties" : 0, "properties" : { - "roleid" : { - "type" : "string", - "format" : "pve-roleid" - }, "privs" : { "format" : "pve-priv-list", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" + }, + "roleid" : { + "format" : "pve-roleid", + "type" : "string", + "typetext" : "" } } }, - "name" : "create_role", - "method" : "POST", + "permissions" : { + "check" : [ + "perm", + "/access", + [ + "Sys.Modify" + ] + ] + }, + "protected" : 1, "returns" : { "type" : "null" } } }, + "leaf" : 0, "path" : "/access/roles", - "leaf" : 0 + "text" : "roles" }, { "info" : { "GET" : { - "permissions" : { - "user" : "all", - "description" : "The returned list is restricted to objects where you have rights to modify permissions." - }, + "description" : "Get Access Control List (ACLs).", + "method" : "GET", + "name" : "read_acl", "parameters" : { "additionalProperties" : 0 }, - "name" : "read_acl", - "description" : "Get Access Control List (ACLs).", + "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" : { @@ -22183,180 +35019,279 @@ var pveapi = [ ], "type" : "string" }, - "propagate" : { - "type" : "boolean" - }, - "roleid" : { - "type" : "string" - }, "ugid" : { "type" : "string" } }, - "type" : "object", - "additionalProperties" : 0 + "type" : "object" }, "type" : "array" - }, - "method" : "GET" + } }, "PUT" : { + "description" : "Update Access Control List (add or remove permissions).", + "method" : "PUT", "name" : "update_acl", "parameters" : { "additionalProperties" : 0, "properties" : { "delete" : { - "type" : "boolean", + "description" : "Remove permissions (instead of adding it).", "optional" : 1, - "description" : "Remove permissions (instead of adding it)." + "type" : "boolean", + "typetext" : "" }, - "users" : { - "format" : "pve-userid-list", - "type" : "string", + "groups" : { + "description" : "List of groups.", + "format" : "pve-groupid-list", "optional" : 1, - "description" : "List of users." + "type" : "string", + "typetext" : "" }, "path" : { "description" : "Access control path", - "type" : "string" - }, - "roles" : { - "description" : "List of roles.", "type" : "string", - "format" : "pve-roleid-list" + "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, - "default" : 1 + "type" : "string", + "typetext" : "" + } + } + }, + "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", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/access/realm", + [ + "Realm.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + }, + "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 + ] }, - "groups" : { - "description" : "List of groups.", - "optional" : 1, - "type" : "string", - "format" : "pve-groupid-list" - } - } - }, - "permissions" : { - "check" : [ - "perm-modify", - "{path}" - ] - }, - "description" : "Update Access Control List (add or remove permissions).", - "protected" : 1, - "returns" : { - "type" : "null" - }, - "method" : "PUT" - } - }, - "text" : "acl", - "leaf" : 1, - "path" : "/access/acl" - }, - { - "text" : "domains", - "children" : [ - { - "path" : "/access/domains/{realm}", - "leaf" : 1, - "text" : "{realm}", - "info" : { + "returns" : {} + }, "PUT" : { + "description" : "Update authentication server settings.", + "method" : "PUT", + "name" : "update", "parameters" : { + "additionalProperties" : 0, "properties" : { "base_dn" : { + "description" : "LDAP base domain name", "maxLength" : 256, - "type" : "string", "optional" : 1, - "description" : "LDAP base domain name", - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*" - }, - "realm" : { - "description" : "Authentication domain ID", - "type" : "string", - "format" : "pve-realm", - "maxLength" : 32 + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" }, - "user_attr" : { + "bind_dn" : { + "description" : "LDAP bind domain name", "maxLength" : 256, - "pattern" : "\\S{2,}", - "description" : "LDAP user attribute name", "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", "type" : "string" }, - "secure" : { - "type" : "boolean", + "capath" : { + "default" : "/etc/ssl/certs", + "description" : "Path to the CA certificate store", "optional" : 1, - "description" : "Use secure LDAPS protocol." + "type" : "string", + "typetext" : "" }, - "server1" : { - "format" : "address", - "maxLength" : 256, + "cert" : { + "description" : "Path to the client certificate", "optional" : 1, "type" : "string", - "description" : "Server IP address (or DNS name)" + "typetext" : "" }, - "domain" : { - "maxLength" : 256, - "description" : "AD domain name", - "pattern" : "\\S+", + "certkey" : { + "description" : "Path to the client certificate key", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "server2" : { - "maxLength" : 256, - "format" : "address", + "comment" : { + "description" : "Description.", + "maxLength" : 4096, + "optional" : 1, "type" : "string", + "typetext" : "" + }, + "default" : { + "description" : "Use this as default realm", "optional" : 1, - "description" : "Fallback Server IP address (or DNS name)" + "type" : "boolean", + "typetext" : "" }, "delete" : { - "type" : "string", - "optional" : 1, "description" : "A list of settings you want to delete.", + "format" : "pve-configid-list", "maxLength" : 4096, - "format" : "pve-configid-list" + "optional" : 1, + "type" : "string", + "typetext" : "" }, - "comment" : { - "maxLength" : 4096, + "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", - "description" : "Description." + "typetext" : "" }, - "default" : { - "description" : "Use this as default realm", - "type" : "boolean", - "optional" : 1 + "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, - "minimum" : 1 + "type" : "boolean", + "typetext" : "" }, - "digest" : { + "server1" : { + "description" : "Server IP address (or DNS name)", + "format" : "address", + "maxLength" : 256, "optional" : 1, "type" : "string", - "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.", - "maxLength" : 40 + "typetext" : "" }, - "tfa" : { + "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, - "format" : "pve-tfa-config" + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "user_attr" : { + "description" : "LDAP user attribute name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\S{2,}", + "type" : "string" + }, + "verify" : { + "default" : 0, + "description" : "Verify the server's SSL certificate", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } }, - "type" : "object", - "additionalProperties" : 0 + "type" : "object" }, - "name" : "update", "permissions" : { "check" : [ "perm", @@ -22367,86 +35302,33 @@ var pveapi = [ ] }, "protected" : 1, - "description" : "Update authentication server settings.", - "returns" : { - "type" : "null" - }, - "method" : "PUT" - }, - "DELETE" : { - "method" : "DELETE", "returns" : { "type" : "null" - }, - "protected" : 1, - "description" : "Delete an authentication server.", - "parameters" : { - "properties" : { - "realm" : { - "format" : "pve-realm", - "maxLength" : 32, - "type" : "string", - "description" : "Authentication domain ID" - } - }, - "additionalProperties" : 0 - }, - "name" : "delete", - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate" - ] - ] } - }, - "GET" : { - "parameters" : { - "properties" : { - "realm" : { - "type" : "string", - "description" : "Authentication domain ID", - "format" : "pve-realm", - "maxLength" : 32 - } - }, - "additionalProperties" : 0 - }, - "name" : "read", - "permissions" : { - "check" : [ - "perm", - "/access/realm", - [ - "Realm.Allocate", - "Sys.Audit" - ], - "any", - 1 - ] - }, - "description" : "Get auth server configuration.", - "method" : "GET", - "returns" : {} } - } + }, + "leaf" : 1, + "path" : "/access/domains/{realm}", + "text" : "{realm}" } ], "info" : { "GET" : { + "description" : "Authentication domain index.", + "method" : "GET", + "name" : "index", + "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" + }, "returns" : { - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{realm}" - } - ], "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" }, @@ -22459,117 +35341,151 @@ var pveapi = [ "yubico", "oath" ], - "type" : "string", - "optional" : 1 + "optional" : 1, + "type" : "string" } }, "type" : "object" - } - }, - "method" : "GET", - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "index", - "permissions" : { - "user" : "world", - "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated)." - }, - "description" : "Authentication domain index." + }, + "links" : [ + { + "href" : "{realm}", + "rel" : "child" + } + ], + "type" : "array" + } }, "POST" : { - "method" : "POST", - "returns" : { - "type" : "null" - }, "description" : "Add an authentication server.", - "protected" : 1, + "method" : "POST", "name" : "create", "parameters" : { + "additionalProperties" : 0, "properties" : { - "server1" : { - "optional" : 1, - "type" : "string", - "description" : "Server IP address (or DNS name)", + "base_dn" : { + "description" : "LDAP base domain name", "maxLength" : 256, - "format" : "address" - }, - "secure" : { - "description" : "Use secure LDAPS protocol.", - "type" : "boolean", - "optional" : 1 + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", + "type" : "string" }, - "type" : { - "description" : "Realm type.", - "enum" : [ - "ldap", - "pam", - "pve", - "ad" - ], + "bind_dn" : { + "description" : "LDAP bind domain name", + "maxLength" : 256, + "optional" : 1, + "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", "type" : "string" }, - "user_attr" : { - "pattern" : "\\S{2,}", - "description" : "LDAP user attribute name", + "capath" : { + "default" : "/etc/ssl/certs", + "description" : "Path to the CA certificate store", "optional" : 1, "type" : "string", - "maxLength" : 256 + "typetext" : "" }, - "realm" : { - "format" : "pve-realm", - "maxLength" : 32, + "cert" : { + "description" : "Path to the client certificate", + "optional" : 1, "type" : "string", - "description" : "Authentication domain ID" + "typetext" : "" }, - "base_dn" : { - "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*", - "description" : "LDAP base domain name", + "certkey" : { + "description" : "Path to the client certificate key", "optional" : 1, "type" : "string", - "maxLength" : 256 + "typetext" : "" }, - "tfa" : { - "description" : "Use Two-factor authentication.", + "comment" : { + "description" : "Description.", + "maxLength" : 4096, "optional" : 1, "type" : "string", - "maxLength" : 128, - "format" : "pve-tfa-config" + "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" : { - "minimum" : 1, + "description" : "Server port.", "maximum" : 65535, - "type" : "integer", + "minimum" : 1, "optional" : 1, - "description" : "Server port." + "type" : "integer", + "typetext" : " (1 - 65535)" }, - "default" : { + "realm" : { + "description" : "Authentication domain ID", + "format" : "pve-realm", + "maxLength" : 32, + "type" : "string", + "typetext" : "" + }, + "secure" : { + "description" : "Use secure LDAPS protocol.", "optional" : 1, "type" : "boolean", - "description" : "Use this as default realm" + "typetext" : "" }, - "comment" : { - "maxLength" : 4096, - "description" : "Description.", + "server1" : { + "description" : "Server IP address (or DNS name)", + "format" : "address", + "maxLength" : 256, + "optional" : 1, "type" : "string", - "optional" : 1 + "typetext" : "" }, - "domain" : { + "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, - "pattern" : "\\S+", - "description" : "AD domain name" + "type" : "string", + "typetext" : "" }, - "server2" : { + "type" : { + "description" : "Realm type.", + "enum" : [ + "ad", + "ldap", + "pam", + "pve" + ], + "type" : "string" + }, + "user_attr" : { + "description" : "LDAP user attribute name", "maxLength" : 256, - "format" : "address", - "type" : "string", "optional" : 1, - "description" : "Fallback Server IP address (or DNS name)" + "pattern" : "\\S{2,}", + "type" : "string" + }, + "verify" : { + "default" : 0, + "description" : "Verify the server's SSL certificate", + "optional" : 1, + "type" : "boolean", + "typetext" : "" } }, - "additionalProperties" : 0, "type" : "object" }, "permissions" : { @@ -22580,109 +35496,141 @@ var pveapi = [ "Realm.Allocate" ] ] + }, + "protected" : 1, + "returns" : { + "type" : "null" } } }, + "leaf" : 0, "path" : "/access/domains", - "leaf" : 0 + "text" : "domains" }, { "info" : { + "GET" : { + "description" : "Dummy. Useful for formatters which want to provide a login page.", + "method" : "GET", + "name" : "get_ticket", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "world" + }, + "returns" : { + "type" : "null" + } + }, "POST" : { + "description" : "Create or verify authentication ticket.", "method" : "POST", - "returns" : { - "type" : "object", + "name" : "create_ticket", + "parameters" : { + "additionalProperties" : 0, "properties" : { - "CSRFPreventionToken" : { - "optional" : 1, - "type" : "string" - }, - "ticket" : { + "otp" : { + "description" : "One-time password for Two-factor authentication.", "optional" : 1, - "type" : "string" + "type" : "string", + "typetext" : "" }, - "username" : { - "type" : "string" - } - } - }, - "parameters" : { - "properties" : { "password" : { "description" : "The secret password. This can also be a valid ticket.", - "type" : "string" - }, - "privs" : { - "maxLength" : 64, - "format" : "pve-priv-list", - "optional" : 1, "type" : "string", - "requires" : "path", - "description" : "Verify ticket, and check if user have access 'privs' on 'path'" + "typetext" : "" }, - "otp" : { + "path" : { + "description" : "Verify ticket, and check if user have access 'privs' on 'path'", + "maxLength" : 64, "optional" : 1, + "requires" : "privs", "type" : "string", - "description" : "One-time password for Two-factor authentication." + "typetext" : "" }, - "path" : { - "requires" : "privs", + "privs" : { "description" : "Verify ticket, and check if user have access 'privs' on 'path'", + "format" : "pve-priv-list", + "maxLength" : 64, "optional" : 1, + "requires" : "path", "type" : "string", - "maxLength" : 64 + "typetext" : "" }, "realm" : { "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username @.", + "format" : "pve-realm", + "maxLength" : 32, "optional" : 1, "type" : "string", - "maxLength" : 32, - "format" : "pve-realm" + "typetext" : "" }, "username" : { "description" : "User name", + "maxLength" : 64, "type" : "string", - "maxLength" : 64 + "typetext" : "" } - }, - "additionalProperties" : 0 - }, - "name" : "create_ticket", - "permissions" : { - "user" : "world", - "description" : "You need to pass valid credientials." - }, - "description" : "Create or verify authentication ticket.", - "protected" : 1 - }, - "GET" : { - "parameters" : { - "additionalProperties" : 0 + } }, "permissions" : { + "description" : "You need to pass valid credientials.", "user" : "world" }, - "name" : "get_ticket", - "description" : "Dummy. Useful for formaters which want to priovde a login page.", + "protected" : 1, "returns" : { - "type" : "null" - }, - "method" : "GET" + "properties" : { + "CSRFPreventionToken" : { + "optional" : 1, + "type" : "string" + }, + "clustername" : { + "optional" : 1, + "type" : "string" + }, + "ticket" : { + "optional" : 1, + "type" : "string" + }, + "username" : { + "type" : "string" + } + }, + "type" : "object" + } } }, - "text" : "ticket", "leaf" : 1, - "path" : "/access/ticket" + "path" : "/access/ticket", + "text" : "ticket" }, { "info" : { "PUT" : { - "returns" : { - "type" : "null" - }, + "description" : "Change user password.", "method" : "PUT", + "name" : "change_password", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "password" : { + "description" : "The new password.", + "maxLength" : 64, + "minLength" : 5, + "type" : "string", + "typetext" : "" + }, + "userid" : { + "description" : "User ID", + "format" : "pve-userid", + "maxLength" : 64, + "type" : "string", + "typetext" : "" + } + } + }, "permissions" : { - "description" : "Each user is allowed to change his own password. A user can change the password of another user if he has 'Realm.AllocateUser' (on the realm of user ) and 'User.Modify' permission on /access/groups/ on a group where user is member of.", "check" : [ "or", [ @@ -22702,136 +35650,69 @@ var pveapi = [ ] ] ] - ] - }, - "parameters" : { - "properties" : { - "password" : { - "maxLength" : 64, - "type" : "string", - "description" : "The new password.", - "minLength" : 5 - }, - "userid" : { - "format" : "pve-userid", - "maxLength" : 64, - "description" : "User ID", - "type" : "string" - } - }, - "additionalProperties" : 0 + ], + "description" : "Each user is allowed to change his own password. A user can change the password of another user if he has 'Realm.AllocateUser' (on the realm of user ) and 'User.Modify' permission on /access/groups/ on a group where user is member of." }, - "name" : "change_passsword", - "description" : "Change user password.", - "protected" : 1 + "protected" : 1, + "returns" : { + "type" : "null" + } } }, - "text" : "password", "leaf" : 1, - "path" : "/access/password" + "path" : "/access/password", + "text" : "password" } - ] - }, - { + ], "info" : { "GET" : { - "description" : "Pool index.", + "description" : "Directory index.", + "method" : "GET", "name" : "index", "parameters" : { "additionalProperties" : 0 }, "permissions" : { - "user" : "all", - "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/." - }, - "returns" : { - "type" : "array", - "links" : [ - { - "rel" : "child", - "href" : "{poolid}" - } - ], - "items" : { - "properties" : { - "poolid" : { - "type" : "string" - } - }, - "type" : "object" - } - }, - "method" : "GET" - }, - "POST" : { - "name" : "create_pool", - "permissions" : { - "check" : [ - "perm", - "/pool/{poolid}", - [ - "Pool.Allocate" - ] - ] - }, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "poolid" : { - "format" : "pve-poolid", - "type" : "string" - }, - "comment" : { - "optional" : 1, - "type" : "string" - } - } + "user" : "all" }, - "protected" : 1, - "description" : "Create new pool.", - "method" : "POST", "returns" : { - "type" : "null" + "items" : { + "properties" : { + "subdir" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{subdir}", + "rel" : "child" + } + ], + "type" : "array" } } }, + "leaf" : 0, + "path" : "/access", + "text" : "access" + }, + { "children" : [ { - "leaf" : 1, - "path" : "/pools/{poolid}", "info" : { - "PUT" : { - "method" : "PUT", - "returns" : { - "type" : "null" - }, + "DELETE" : { + "description" : "Delete pool.", + "method" : "DELETE", + "name" : "delete_pool", "parameters" : { "additionalProperties" : 0, "properties" : { - "storage" : { - "type" : "string", - "optional" : 1, - "description" : "List of storage IDs.", - "format" : "pve-storage-id-list" - }, - "vms" : { - "format" : "pve-vmid-list", - "type" : "string", - "optional" : 1, - "description" : "List of virtual machines." - }, - "delete" : { - "description" : "Remove vms/storage (instead of adding it).", - "optional" : 1, - "type" : "boolean" - }, "poolid" : { "format" : "pve-poolid", - "type" : "string" - }, - "comment" : { "type" : "string", - "optional" : 1 + "typetext" : "" } } }, @@ -22843,51 +35724,26 @@ var pveapi = [ "Pool.Allocate" ] ], - "description" : "You also need the right to modify permissions on any object you add/delete." + "description" : "You can only delete empty pools (no members)." }, - "name" : "update_pool", - "description" : "Update pool data.", - "protected" : 1 - }, - "DELETE" : { + "protected" : 1, "returns" : { "type" : "null" - }, - "method" : "DELETE", - "description" : "Delete pool.", - "protected" : 1, - "parameters" : { - "additionalProperties" : 0, - "properties" : { - "poolid" : { - "format" : "pve-poolid", - "type" : "string" - } - } - }, - "name" : "delete_pool", - "permissions" : { - "description" : "You can only delete empty pools (no members).", - "check" : [ - "perm", - "/pool/{poolid}", - [ - "Pool.Allocate" - ] - ] } }, "GET" : { "description" : "Get pool configuration.", + "method" : "GET", "name" : "read_pool", "parameters" : { + "additionalProperties" : 0, "properties" : { "poolid" : { + "format" : "pve-poolid", "type" : "string", - "format" : "pve-poolid" + "typetext" : "" } - }, - "additionalProperties" : 0 + } }, "permissions" : { "check" : [ @@ -22898,88 +35754,207 @@ var pveapi = [ ] ] }, - "method" : "GET", "returns" : { + "additionalProperties" : 0, "properties" : { + "comment" : { + "optional" : 1, + "type" : "string" + }, "members" : { - "type" : "array", "items" : { "additionalProperties" : 1, - "type" : "object", "properties" : { - "vmid" : { - "optional" : 1, - "type" : "integer" - }, - "storage" : { - "type" : "string", - "optional" : 1 - }, "id" : { "type" : "string" }, "node" : { "type" : "string" }, + "storage" : { + "optional" : 1, + "type" : "string" + }, "type" : { - "type" : "string", "enum" : [ "qemu", "lxc", "openvz", "storage" - ] + ], + "type" : "string" + }, + "vmid" : { + "optional" : 1, + "type" : "integer" } - } - } - }, - "comment" : { - "optional" : 1, - "type" : "string" + }, + "type" : "object" + }, + "type" : "array" } }, - "additionalProperties" : 0, "type" : "object" } + }, + "PUT" : { + "description" : "Update pool data.", + "method" : "PUT", + "name" : "update_pool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "delete" : { + "description" : "Remove vms/storage (instead of adding it).", + "optional" : 1, + "type" : "boolean", + "typetext" : "" + }, + "poolid" : { + "format" : "pve-poolid", + "type" : "string", + "typetext" : "" + }, + "storage" : { + "description" : "List of storage IDs.", + "format" : "pve-storage-id-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "vms" : { + "description" : "List of virtual machines.", + "format" : "pve-vmid-list", + "optional" : 1, + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/pool/{poolid}", + [ + "Pool.Allocate" + ] + ], + "description" : "You also need the right to modify permissions on any object you add/delete." + }, + "protected" : 1, + "returns" : { + "type" : "null" + } } }, + "leaf" : 1, + "path" : "/pools/{poolid}", "text" : "{poolid}" } ], - "text" : "pools", + "info" : { + "GET" : { + "description" : "Pool index.", + "method" : "GET", + "name" : "index", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/.", + "user" : "all" + }, + "returns" : { + "items" : { + "properties" : { + "poolid" : { + "type" : "string" + } + }, + "type" : "object" + }, + "links" : [ + { + "href" : "{poolid}", + "rel" : "child" + } + ], + "type" : "array" + } + }, + "POST" : { + "description" : "Create new pool.", + "method" : "POST", + "name" : "create_pool", + "parameters" : { + "additionalProperties" : 0, + "properties" : { + "comment" : { + "optional" : 1, + "type" : "string", + "typetext" : "" + }, + "poolid" : { + "format" : "pve-poolid", + "type" : "string", + "typetext" : "" + } + } + }, + "permissions" : { + "check" : [ + "perm", + "/pool/{poolid}", + [ + "Pool.Allocate" + ] + ] + }, + "protected" : 1, + "returns" : { + "type" : "null" + } + } + }, "leaf" : 0, - "path" : "/pools" + "path" : "/pools", + "text" : "pools" }, { - "leaf" : 1, - "path" : "/version", "info" : { "GET" : { + "description" : "API version details. The result also includes the global datacenter confguration.", + "method" : "GET", + "name" : "version", + "parameters" : { + "additionalProperties" : 0 + }, + "permissions" : { + "user" : "all" + }, "returns" : { - "type" : "object", "properties" : { - "version" : { + "release" : { "type" : "string" }, "repoid" : { "type" : "string" }, - "release" : { + "version" : { "type" : "string" } - } - }, - "method" : "GET", - "description" : "API version details. The result also includes the global datacenter confguration.", - "permissions" : { - "user" : "all" - }, - "parameters" : { - "additionalProperties" : 0 - }, - "name" : "version" + }, + "type" : "object" + } } }, + "leaf" : 1, + "path" : "/version", "text" : "version" } ]