]> git.proxmox.com Git - pve-docs.git/blame - api-viewer/apidata.js
api-viewer: use verbose_description if available
[pve-docs.git] / api-viewer / apidata.js
CommitLineData
56122987
DM
1var pveapi = [
2 {
56122987
DM
3 "children" : [
4 {
56122987
DM
5 "children" : [
6 {
56122987
DM
7 "children" : [
8 {
44660702
DM
9 "children" : [
10 {
11 "info" : {
12 "DELETE" : {
13 "description" : "Delete rule.",
14 "method" : "DELETE",
15 "name" : "delete_rule",
16 "parameters" : {
17 "additionalProperties" : 0,
18 "properties" : {
19 "digest" : {
20 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
21 "maxLength" : 40,
22 "optional" : 1,
23 "type" : "string"
24 },
25 "group" : {
26 "description" : "Security Group name.",
4bd7df8b 27 "maxLength" : 18,
44660702
DM
28 "minLength" : 2,
29 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
30 "type" : "string"
31 },
32 "pos" : {
33 "description" : "Update rule at position <pos>.",
34 "minimum" : 0,
35 "optional" : 1,
4bd7df8b
DM
36 "type" : "integer",
37 "typetext" : "integer (0- N)"
44660702
DM
38 }
39 }
40 },
41 "permissions" : {
42 "check" : [
43 "perm",
44 "/",
45 [
46 "Sys.Modify"
47 ]
48 ]
49 },
50 "protected" : 1,
51 "proxyto" : null,
52 "returns" : {
53 "type" : "null"
7aacca6f
DM
54 }
55 },
44660702
DM
56 "GET" : {
57 "description" : "Get single rule data.",
58 "method" : "GET",
59 "name" : "get_rule",
60 "parameters" : {
61 "additionalProperties" : 0,
62 "properties" : {
63 "group" : {
64 "description" : "Security Group name.",
4bd7df8b 65 "maxLength" : 18,
44660702
DM
66 "minLength" : 2,
67 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
68 "type" : "string"
69 },
70 "pos" : {
71 "description" : "Update rule at position <pos>.",
72 "minimum" : 0,
73 "optional" : 1,
4bd7df8b
DM
74 "type" : "integer",
75 "typetext" : "integer (0- N)"
44660702 76 }
7aacca6f 77 }
56122987 78 },
44660702
DM
79 "permissions" : {
80 "check" : [
81 "perm",
82 "/",
83 [
84 "Sys.Audit"
85 ]
86 ]
87 },
88 "proxyto" : null,
89 "returns" : {
90 "properties" : {
91 "pos" : {
92 "type" : "integer"
93 }
94 },
95 "type" : "object"
56122987 96 }
44660702 97 },
7aacca6f 98 "PUT" : {
44660702
DM
99 "description" : "Modify rule data.",
100 "method" : "PUT",
101 "name" : "update_rule",
7aacca6f
DM
102 "parameters" : {
103 "additionalProperties" : 0,
104 "properties" : {
44660702
DM
105 "action" : {
106 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 107 "maxLength" : 20,
44660702 108 "minLength" : 2,
7aacca6f 109 "optional" : 1,
44660702 110 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
111 "type" : "string"
112 },
44660702 113 "comment" : {
7aacca6f 114 "optional" : 1,
44660702 115 "type" : "string"
7aacca6f 116 },
44660702
DM
117 "delete" : {
118 "description" : "A list of settings you want to delete.",
119 "format" : "pve-configid-list",
7aacca6f 120 "optional" : 1,
44660702 121 "type" : "string"
7aacca6f 122 },
44660702
DM
123 "dest" : {
124 "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.",
125 "format" : "pve-fw-addr-spec",
7aacca6f 126 "optional" : 1,
44660702 127 "type" : "string"
7aacca6f
DM
128 },
129 "digest" : {
130 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 131 "maxLength" : 40,
7aacca6f 132 "optional" : 1,
44660702 133 "type" : "string"
7aacca6f 134 },
44660702
DM
135 "dport" : {
136 "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.",
137 "format" : "pve-fw-dport-spec",
7aacca6f 138 "optional" : 1,
44660702 139 "type" : "string"
7aacca6f 140 },
44660702
DM
141 "enable" : {
142 "minimum" : 0,
7aacca6f 143 "optional" : 1,
4bd7df8b
DM
144 "type" : "integer",
145 "typetext" : "integer (0- N)"
7aacca6f 146 },
44660702
DM
147 "group" : {
148 "description" : "Security Group name.",
4bd7df8b 149 "maxLength" : 18,
44660702
DM
150 "minLength" : 2,
151 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
152 "type" : "string"
153 },
154 "iface" : {
155 "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.",
156 "format" : "pve-iface",
157 "maxLength" : 20,
158 "minLength" : 2,
7aacca6f 159 "optional" : 1,
44660702 160 "type" : "string"
7aacca6f 161 },
44660702
DM
162 "macro" : {
163 "maxLength" : 128,
164 "optional" : 1,
165 "type" : "string"
7aacca6f
DM
166 },
167 "moveto" : {
168 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
44660702 169 "minimum" : 0,
7aacca6f 170 "optional" : 1,
4bd7df8b
DM
171 "type" : "integer",
172 "typetext" : "integer (0- N)"
7aacca6f 173 },
44660702
DM
174 "pos" : {
175 "description" : "Update rule at position <pos>.",
176 "minimum" : 0,
177 "optional" : 1,
4bd7df8b
DM
178 "type" : "integer",
179 "typetext" : "integer (0- N)"
7aacca6f 180 },
44660702
DM
181 "proto" : {
182 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
183 "format" : "pve-fw-protocol-spec",
7aacca6f 184 "optional" : 1,
44660702
DM
185 "type" : "string"
186 },
187 "source" : {
188 "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.",
189 "format" : "pve-fw-addr-spec",
190 "optional" : 1,
191 "type" : "string"
192 },
193 "sport" : {
194 "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.",
195 "format" : "pve-fw-sport-spec",
196 "optional" : 1,
197 "type" : "string"
7aacca6f
DM
198 },
199 "type" : {
200 "enum" : [
201 "in",
202 "out",
203 "group"
204 ],
205 "optional" : 1,
206 "type" : "string"
207 }
208 }
209 },
7aacca6f
DM
210 "permissions" : {
211 "check" : [
212 "perm",
213 "/",
214 [
215 "Sys.Modify"
216 ]
217 ]
218 },
44660702 219 "protected" : 1,
7aacca6f
DM
220 "proxyto" : null,
221 "returns" : {
222 "type" : "null"
223 }
7aacca6f
DM
224 }
225 },
44660702 226 "leaf" : 1,
7aacca6f 227 "path" : "/cluster/firewall/groups/{group}/{pos}",
44660702 228 "text" : "{pos}"
7aacca6f
DM
229 }
230 ],
44660702
DM
231 "info" : {
232 "DELETE" : {
233 "description" : "Delete security group.",
234 "method" : "DELETE",
235 "name" : "delete_security_group",
236 "parameters" : {
237 "additionalProperties" : 0,
238 "properties" : {
239 "group" : {
240 "description" : "Security Group name.",
4bd7df8b 241 "maxLength" : 18,
44660702
DM
242 "minLength" : 2,
243 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
244 "type" : "string"
245 }
56122987 246 }
7aacca6f 247 },
44660702
DM
248 "permissions" : {
249 "check" : [
250 "perm",
251 "/",
252 [
253 "Sys.Modify"
254 ]
7aacca6f 255 ]
56122987 256 },
44660702
DM
257 "protected" : 1,
258 "returns" : {
259 "type" : "null"
56122987 260 }
7aacca6f 261 },
7aacca6f 262 "GET" : {
44660702 263 "description" : "List rules.",
7aacca6f 264 "method" : "GET",
44660702
DM
265 "name" : "get_rules",
266 "parameters" : {
267 "additionalProperties" : 0,
7aacca6f 268 "properties" : {
44660702
DM
269 "group" : {
270 "description" : "Security Group name.",
4bd7df8b 271 "maxLength" : 18,
44660702
DM
272 "minLength" : 2,
273 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
274 "type" : "string"
7aacca6f 275 }
44660702 276 }
7aacca6f
DM
277 },
278 "permissions" : {
279 "check" : [
280 "perm",
281 "/",
282 [
283 "Sys.Audit"
284 ]
285 ]
286 },
44660702
DM
287 "proxyto" : null,
288 "returns" : {
289 "items" : {
290 "properties" : {
291 "pos" : {
292 "type" : "integer"
293 }
294 },
295 "type" : "object"
296 },
297 "links" : [
298 {
299 "href" : "{pos}",
300 "rel" : "child"
301 }
302 ],
303 "type" : "array"
304 }
305 },
306 "POST" : {
307 "description" : "Create new rule.",
308 "method" : "POST",
309 "name" : "create_rule",
7aacca6f
DM
310 "parameters" : {
311 "additionalProperties" : 0,
312 "properties" : {
44660702
DM
313 "action" : {
314 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
315 "maxLength" : 20,
56122987 316 "minLength" : 2,
44660702
DM
317 "optional" : 0,
318 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 319 "type" : "string"
56122987 320 },
44660702 321 "comment" : {
56122987 322 "optional" : 1,
7aacca6f 323 "type" : "string"
56122987 324 },
44660702
DM
325 "dest" : {
326 "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.",
56122987
DM
327 "format" : "pve-fw-addr-spec",
328 "optional" : 1,
44660702 329 "type" : "string"
56122987 330 },
44660702
DM
331 "digest" : {
332 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
333 "maxLength" : 40,
7aacca6f 334 "optional" : 1,
44660702 335 "type" : "string"
56122987 336 },
44660702
DM
337 "dport" : {
338 "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.",
339 "format" : "pve-fw-dport-spec",
56122987 340 "optional" : 1,
44660702 341 "type" : "string"
56122987 342 },
7aacca6f 343 "enable" : {
44660702 344 "minimum" : 0,
7aacca6f 345 "optional" : 1,
4bd7df8b
DM
346 "type" : "integer",
347 "typetext" : "integer (0- N)"
56122987 348 },
44660702
DM
349 "group" : {
350 "description" : "Security Group name.",
4bd7df8b 351 "maxLength" : 18,
44660702 352 "minLength" : 2,
7aacca6f 353 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702
DM
354 "type" : "string"
355 },
356 "iface" : {
357 "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.",
358 "format" : "pve-iface",
359 "maxLength" : 20,
7aacca6f 360 "minLength" : 2,
44660702
DM
361 "optional" : 1,
362 "type" : "string"
56122987 363 },
7aacca6f 364 "macro" : {
44660702 365 "maxLength" : 128,
7aacca6f 366 "optional" : 1,
44660702 367 "type" : "string"
7aacca6f
DM
368 },
369 "pos" : {
370 "description" : "Update rule at position <pos>.",
44660702 371 "minimum" : 0,
56122987 372 "optional" : 1,
4bd7df8b
DM
373 "type" : "integer",
374 "typetext" : "integer (0- N)"
7aacca6f
DM
375 },
376 "proto" : {
377 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
44660702 378 "format" : "pve-fw-protocol-spec",
7aacca6f 379 "optional" : 1,
44660702
DM
380 "type" : "string"
381 },
382 "source" : {
383 "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.",
384 "format" : "pve-fw-addr-spec",
385 "optional" : 1,
386 "type" : "string"
387 },
388 "sport" : {
389 "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.",
390 "format" : "pve-fw-sport-spec",
391 "optional" : 1,
392 "type" : "string"
393 },
394 "type" : {
395 "enum" : [
396 "in",
397 "out",
398 "group"
399 ],
400 "optional" : 0,
401 "type" : "string"
56122987 402 }
44660702 403 }
56122987 404 },
56122987
DM
405 "permissions" : {
406 "check" : [
407 "perm",
408 "/",
409 [
410 "Sys.Modify"
411 ]
412 ]
413 },
44660702
DM
414 "protected" : 1,
415 "proxyto" : null,
56122987
DM
416 "returns" : {
417 "type" : "null"
7aacca6f 418 }
44660702
DM
419 }
420 },
421 "leaf" : 0,
422 "path" : "/cluster/firewall/groups/{group}",
423 "text" : "{group}"
424 }
425 ],
426 "info" : {
427 "GET" : {
428 "description" : "List security groups.",
429 "method" : "GET",
430 "name" : "list_security_groups",
431 "parameters" : {
432 "additionalProperties" : 0
433 },
434 "permissions" : {
435 "user" : "all"
436 },
437 "returns" : {
438 "items" : {
439 "properties" : {
440 "comment" : {
441 "optional" : 1,
442 "type" : "string"
443 },
444 "digest" : {
445 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
446 "maxLength" : 40,
447 "optional" : 0,
448 "type" : "string"
449 },
450 "group" : {
451 "description" : "Security Group name.",
4bd7df8b 452 "maxLength" : 18,
44660702
DM
453 "minLength" : 2,
454 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
455 "type" : "string"
456 }
457 },
458 "type" : "object"
56122987 459 },
44660702
DM
460 "links" : [
461 {
462 "href" : "{group}",
463 "rel" : "child"
464 }
465 ],
466 "type" : "array"
467 }
468 },
469 "POST" : {
470 "description" : "Create new security group.",
471 "method" : "POST",
472 "name" : "create_security_group",
473 "parameters" : {
474 "additionalProperties" : 0,
475 "properties" : {
476 "comment" : {
477 "optional" : 1,
478 "type" : "string"
479 },
480 "digest" : {
481 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
482 "maxLength" : 40,
483 "optional" : 1,
484 "type" : "string"
485 },
486 "group" : {
487 "description" : "Security Group name.",
4bd7df8b 488 "maxLength" : 18,
44660702
DM
489 "minLength" : 2,
490 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
491 "type" : "string"
492 },
493 "rename" : {
494 "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.",
4bd7df8b 495 "maxLength" : 18,
44660702
DM
496 "minLength" : 2,
497 "optional" : 1,
498 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
499 "type" : "string"
500 }
501 }
502 },
503 "permissions" : {
504 "check" : [
505 "perm",
506 "/",
507 [
508 "Sys.Modify"
509 ]
510 ]
511 },
512 "protected" : 1,
513 "returns" : {
514 "type" : "null"
515 }
516 }
517 },
518 "leaf" : 0,
519 "path" : "/cluster/firewall/groups",
520 "text" : "groups"
521 },
522 {
523 "children" : [
524 {
525 "info" : {
7aacca6f 526 "DELETE" : {
44660702
DM
527 "description" : "Delete rule.",
528 "method" : "DELETE",
529 "name" : "delete_rule",
530 "parameters" : {
531 "additionalProperties" : 0,
532 "properties" : {
533 "digest" : {
534 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
535 "maxLength" : 40,
536 "optional" : 1,
537 "type" : "string"
538 },
539 "pos" : {
540 "description" : "Update rule at position <pos>.",
541 "minimum" : 0,
542 "optional" : 1,
4bd7df8b
DM
543 "type" : "integer",
544 "typetext" : "integer (0- N)"
44660702
DM
545 }
546 }
547 },
56122987
DM
548 "permissions" : {
549 "check" : [
550 "perm",
551 "/",
552 [
7aacca6f 553 "Sys.Modify"
56122987
DM
554 ]
555 ]
556 },
44660702 557 "protected" : 1,
56122987
DM
558 "proxyto" : null,
559 "returns" : {
7aacca6f 560 "type" : "null"
44660702
DM
561 }
562 },
563 "GET" : {
564 "description" : "Get single rule data.",
565 "method" : "GET",
566 "name" : "get_rule",
56122987
DM
567 "parameters" : {
568 "additionalProperties" : 0,
569 "properties" : {
570 "pos" : {
7aacca6f 571 "description" : "Update rule at position <pos>.",
44660702 572 "minimum" : 0,
56122987 573 "optional" : 1,
4bd7df8b
DM
574 "type" : "integer",
575 "typetext" : "integer (0- N)"
7aacca6f
DM
576 }
577 }
578 },
7aacca6f
DM
579 "permissions" : {
580 "check" : [
581 "perm",
582 "/",
583 [
584 "Sys.Audit"
585 ]
586 ]
56122987 587 },
44660702
DM
588 "proxyto" : null,
589 "returns" : {
7aacca6f 590 "properties" : {
44660702
DM
591 "pos" : {
592 "type" : "integer"
7aacca6f 593 }
44660702
DM
594 },
595 "type" : "object"
596 }
56122987 597 },
44660702
DM
598 "PUT" : {
599 "description" : "Modify rule data.",
600 "method" : "PUT",
601 "name" : "update_rule",
7aacca6f
DM
602 "parameters" : {
603 "additionalProperties" : 0,
604 "properties" : {
44660702
DM
605 "action" : {
606 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
607 "maxLength" : 20,
608 "minLength" : 2,
609 "optional" : 1,
610 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
611 "type" : "string"
7aacca6f 612 },
44660702
DM
613 "comment" : {
614 "optional" : 1,
615 "type" : "string"
7aacca6f 616 },
44660702
DM
617 "delete" : {
618 "description" : "A list of settings you want to delete.",
619 "format" : "pve-configid-list",
620 "optional" : 1,
621 "type" : "string"
622 },
623 "dest" : {
624 "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.",
625 "format" : "pve-fw-addr-spec",
626 "optional" : 1,
627 "type" : "string"
628 },
629 "digest" : {
630 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
631 "maxLength" : 40,
632 "optional" : 1,
633 "type" : "string"
634 },
635 "dport" : {
636 "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.",
637 "format" : "pve-fw-dport-spec",
638 "optional" : 1,
639 "type" : "string"
640 },
641 "enable" : {
642 "minimum" : 0,
643 "optional" : 1,
4bd7df8b
DM
644 "type" : "integer",
645 "typetext" : "integer (0- N)"
44660702
DM
646 },
647 "iface" : {
648 "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.",
649 "format" : "pve-iface",
650 "maxLength" : 20,
7aacca6f 651 "minLength" : 2,
44660702
DM
652 "optional" : 1,
653 "type" : "string"
7aacca6f 654 },
44660702
DM
655 "macro" : {
656 "maxLength" : 128,
657 "optional" : 1,
658 "type" : "string"
659 },
660 "moveto" : {
661 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
662 "minimum" : 0,
663 "optional" : 1,
4bd7df8b
DM
664 "type" : "integer",
665 "typetext" : "integer (0- N)"
44660702
DM
666 },
667 "pos" : {
668 "description" : "Update rule at position <pos>.",
669 "minimum" : 0,
670 "optional" : 1,
4bd7df8b
DM
671 "type" : "integer",
672 "typetext" : "integer (0- N)"
44660702
DM
673 },
674 "proto" : {
675 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
676 "format" : "pve-fw-protocol-spec",
677 "optional" : 1,
678 "type" : "string"
679 },
680 "source" : {
681 "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.",
682 "format" : "pve-fw-addr-spec",
683 "optional" : 1,
684 "type" : "string"
685 },
686 "sport" : {
687 "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.",
688 "format" : "pve-fw-sport-spec",
689 "optional" : 1,
690 "type" : "string"
691 },
692 "type" : {
693 "enum" : [
694 "in",
695 "out",
696 "group"
697 ],
698 "optional" : 1,
699 "type" : "string"
7aacca6f 700 }
56122987
DM
701 }
702 },
7aacca6f
DM
703 "permissions" : {
704 "check" : [
705 "perm",
706 "/",
707 [
708 "Sys.Modify"
709 ]
710 ]
711 },
44660702
DM
712 "protected" : 1,
713 "proxyto" : null,
714 "returns" : {
715 "type" : "null"
716 }
7aacca6f 717 }
56122987 718 },
44660702
DM
719 "leaf" : 1,
720 "path" : "/cluster/firewall/rules/{pos}",
721 "text" : "{pos}"
7aacca6f
DM
722 }
723 ],
7aacca6f 724 "info" : {
44660702
DM
725 "GET" : {
726 "description" : "List rules.",
727 "method" : "GET",
728 "name" : "get_rules",
7aacca6f 729 "parameters" : {
44660702 730 "additionalProperties" : 0
7aacca6f
DM
731 },
732 "permissions" : {
733 "check" : [
734 "perm",
735 "/",
736 [
44660702 737 "Sys.Audit"
7aacca6f
DM
738 ]
739 ]
740 },
44660702 741 "proxyto" : null,
7aacca6f 742 "returns" : {
7aacca6f
DM
743 "items" : {
744 "properties" : {
44660702
DM
745 "pos" : {
746 "type" : "integer"
7aacca6f
DM
747 }
748 },
749 "type" : "object"
56122987 750 },
7aacca6f
DM
751 "links" : [
752 {
44660702 753 "href" : "{pos}",
7aacca6f
DM
754 "rel" : "child"
755 }
44660702
DM
756 ],
757 "type" : "array"
7aacca6f 758 }
44660702 759 },
7aacca6f 760 "POST" : {
44660702 761 "description" : "Create new rule.",
7aacca6f 762 "method" : "POST",
44660702 763 "name" : "create_rule",
7aacca6f
DM
764 "parameters" : {
765 "additionalProperties" : 0,
766 "properties" : {
44660702
DM
767 "action" : {
768 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
769 "maxLength" : 20,
7aacca6f 770 "minLength" : 2,
44660702
DM
771 "optional" : 0,
772 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
773 "type" : "string"
7aacca6f
DM
774 },
775 "comment" : {
776 "optional" : 1,
777 "type" : "string"
44660702
DM
778 },
779 "dest" : {
780 "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.",
781 "format" : "pve-fw-addr-spec",
782 "optional" : 1,
783 "type" : "string"
784 },
785 "digest" : {
786 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
787 "maxLength" : 40,
788 "optional" : 1,
789 "type" : "string"
790 },
791 "dport" : {
792 "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.",
793 "format" : "pve-fw-dport-spec",
794 "optional" : 1,
795 "type" : "string"
796 },
797 "enable" : {
798 "minimum" : 0,
799 "optional" : 1,
4bd7df8b
DM
800 "type" : "integer",
801 "typetext" : "integer (0- N)"
44660702
DM
802 },
803 "iface" : {
804 "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.",
805 "format" : "pve-iface",
806 "maxLength" : 20,
807 "minLength" : 2,
808 "optional" : 1,
809 "type" : "string"
810 },
811 "macro" : {
812 "maxLength" : 128,
813 "optional" : 1,
814 "type" : "string"
815 },
816 "pos" : {
817 "description" : "Update rule at position <pos>.",
818 "minimum" : 0,
819 "optional" : 1,
4bd7df8b
DM
820 "type" : "integer",
821 "typetext" : "integer (0- N)"
44660702
DM
822 },
823 "proto" : {
824 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
825 "format" : "pve-fw-protocol-spec",
826 "optional" : 1,
827 "type" : "string"
828 },
829 "source" : {
830 "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.",
831 "format" : "pve-fw-addr-spec",
832 "optional" : 1,
833 "type" : "string"
834 },
835 "sport" : {
836 "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.",
837 "format" : "pve-fw-sport-spec",
838 "optional" : 1,
839 "type" : "string"
840 },
841 "type" : {
842 "enum" : [
843 "in",
844 "out",
845 "group"
846 ],
847 "optional" : 0,
848 "type" : "string"
7aacca6f
DM
849 }
850 }
851 },
852 "permissions" : {
853 "check" : [
854 "perm",
855 "/",
856 [
857 "Sys.Modify"
858 ]
859 ]
860 },
44660702
DM
861 "protected" : 1,
862 "proxyto" : null,
7aacca6f 863 "returns" : {
44660702
DM
864 "type" : "null"
865 }
866 }
867 },
868 "leaf" : 0,
869 "path" : "/cluster/firewall/rules",
870 "text" : "rules"
871 },
872 {
873 "children" : [
874 {
875 "children" : [
876 {
877 "info" : {
878 "DELETE" : {
879 "description" : "Remove IP or Network from IPSet.",
880 "method" : "DELETE",
881 "name" : "remove_ip",
882 "parameters" : {
883 "additionalProperties" : 0,
884 "properties" : {
885 "cidr" : {
886 "description" : "Network/IP specification in CIDR format.",
887 "format" : "IPorCIDRorAlias",
888 "type" : "string"
889 },
890 "digest" : {
891 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
892 "maxLength" : 40,
893 "optional" : 1,
894 "type" : "string"
895 },
896 "name" : {
897 "description" : "IP set name.",
898 "maxLength" : 64,
899 "minLength" : 2,
900 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
901 "type" : "string"
902 }
903 }
904 },
905 "permissions" : {
906 "check" : [
907 "perm",
908 "/",
909 [
910 "Sys.Modify"
911 ]
912 ]
913 },
914 "protected" : 1,
915 "returns" : {
916 "type" : "null"
917 }
7aacca6f 918 },
44660702
DM
919 "GET" : {
920 "description" : "Read IP or Network settings from IPSet.",
921 "method" : "GET",
922 "name" : "read_ip",
923 "parameters" : {
924 "additionalProperties" : 0,
925 "properties" : {
926 "cidr" : {
927 "description" : "Network/IP specification in CIDR format.",
928 "format" : "IPorCIDRorAlias",
929 "type" : "string"
930 },
931 "name" : {
932 "description" : "IP set name.",
933 "maxLength" : 64,
934 "minLength" : 2,
935 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
936 "type" : "string"
937 }
938 }
939 },
940 "permissions" : {
941 "check" : [
942 "perm",
943 "/",
944 [
945 "Sys.Audit"
946 ]
947 ]
948 },
949 "protected" : 1,
950 "returns" : {
951 "type" : "object"
952 }
7aacca6f 953 },
44660702
DM
954 "PUT" : {
955 "description" : "Update IP or Network settings",
956 "method" : "PUT",
957 "name" : "update_ip",
958 "parameters" : {
959 "additionalProperties" : 0,
960 "properties" : {
961 "cidr" : {
962 "description" : "Network/IP specification in CIDR format.",
963 "format" : "IPorCIDRorAlias",
964 "type" : "string"
965 },
966 "comment" : {
967 "optional" : 1,
968 "type" : "string"
969 },
970 "digest" : {
971 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
972 "maxLength" : 40,
973 "optional" : 1,
974 "type" : "string"
975 },
976 "name" : {
977 "description" : "IP set name.",
978 "maxLength" : 64,
979 "minLength" : 2,
980 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
981 "type" : "string"
982 },
983 "nomatch" : {
984 "optional" : 1,
985 "type" : "boolean"
986 }
987 }
988 },
989 "permissions" : {
990 "check" : [
991 "perm",
992 "/",
993 [
994 "Sys.Modify"
995 ]
996 ]
997 },
998 "protected" : 1,
999 "returns" : {
1000 "type" : "null"
1001 }
7aacca6f
DM
1002 }
1003 },
44660702
DM
1004 "leaf" : 1,
1005 "path" : "/cluster/firewall/ipset/{name}/{cidr}",
1006 "text" : "{cidr}"
7aacca6f 1007 }
44660702 1008 ],
7aacca6f
DM
1009 "info" : {
1010 "DELETE" : {
44660702
DM
1011 "description" : "Delete IPSet",
1012 "method" : "DELETE",
1013 "name" : "delete_ipset",
56122987 1014 "parameters" : {
44660702 1015 "additionalProperties" : 0,
56122987
DM
1016 "properties" : {
1017 "name" : {
44660702 1018 "description" : "IP set name.",
56122987 1019 "maxLength" : 64,
44660702 1020 "minLength" : 2,
56122987 1021 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 1022 "type" : "string"
56122987 1023 }
44660702 1024 }
7aacca6f 1025 },
56122987
DM
1026 "permissions" : {
1027 "check" : [
1028 "perm",
1029 "/",
1030 [
1031 "Sys.Modify"
1032 ]
1033 ]
1034 },
7aacca6f
DM
1035 "protected" : 1,
1036 "returns" : {
1037 "type" : "null"
44660702 1038 }
7aacca6f 1039 },
44660702
DM
1040 "GET" : {
1041 "description" : "List IPSet content",
1042 "method" : "GET",
1043 "name" : "get_ipset",
56122987
DM
1044 "parameters" : {
1045 "additionalProperties" : 0,
1046 "properties" : {
7aacca6f 1047 "name" : {
44660702 1048 "description" : "IP set name.",
7aacca6f 1049 "maxLength" : 64,
7aacca6f 1050 "minLength" : 2,
44660702 1051 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 1052 "type" : "string"
56122987 1053 }
7aacca6f 1054 }
56122987 1055 },
56122987
DM
1056 "permissions" : {
1057 "check" : [
1058 "perm",
1059 "/",
1060 [
44660702 1061 "Sys.Audit"
56122987
DM
1062 ]
1063 ]
44660702
DM
1064 },
1065 "returns" : {
1066 "items" : {
1067 "properties" : {
1068 "cidr" : {
1069 "type" : "string"
1070 },
1071 "comment" : {
1072 "optional" : 1,
1073 "type" : "string"
1074 },
1075 "digest" : {
1076 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1077 "maxLength" : 40,
1078 "optional" : 0,
1079 "type" : "string"
1080 },
1081 "nomatch" : {
1082 "optional" : 1,
1083 "type" : "boolean"
1084 }
1085 },
1086 "type" : "object"
1087 },
1088 "links" : [
1089 {
1090 "href" : "{cidr}",
1091 "rel" : "child"
1092 }
1093 ],
1094 "type" : "array"
7aacca6f
DM
1095 }
1096 },
44660702
DM
1097 "POST" : {
1098 "description" : "Add IP or Network to IPSet.",
1099 "method" : "POST",
1100 "name" : "create_ip",
56122987
DM
1101 "parameters" : {
1102 "additionalProperties" : 0,
1103 "properties" : {
44660702
DM
1104 "cidr" : {
1105 "description" : "Network/IP specification in CIDR format.",
1106 "format" : "IPorCIDRorAlias",
1107 "type" : "string"
1108 },
1109 "comment" : {
1110 "optional" : 1,
1111 "type" : "string"
1112 },
1113 "name" : {
1114 "description" : "IP set name.",
1115 "maxLength" : 64,
1116 "minLength" : 2,
1117 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1118 "type" : "string"
1119 },
1120 "nomatch" : {
1121 "optional" : 1,
1122 "type" : "boolean"
56122987
DM
1123 }
1124 }
1125 },
56122987
DM
1126 "permissions" : {
1127 "check" : [
1128 "perm",
1129 "/",
1130 [
44660702 1131 "Sys.Modify"
56122987
DM
1132 ]
1133 ]
1134 },
44660702 1135 "protected" : 1,
56122987 1136 "returns" : {
44660702
DM
1137 "type" : "null"
1138 }
56122987
DM
1139 }
1140 },
44660702
DM
1141 "leaf" : 0,
1142 "path" : "/cluster/firewall/ipset/{name}",
1143 "text" : "{name}"
56122987
DM
1144 }
1145 ],
56122987 1146 "info" : {
44660702
DM
1147 "GET" : {
1148 "description" : "List IPSets",
1149 "method" : "GET",
1150 "name" : "ipset_index",
56122987 1151 "parameters" : {
7aacca6f 1152 "additionalProperties" : 0
56122987 1153 },
56122987
DM
1154 "permissions" : {
1155 "check" : [
1156 "perm",
1157 "/",
1158 [
7aacca6f 1159 "Sys.Audit"
56122987
DM
1160 ]
1161 ]
1162 },
56122987
DM
1163 "returns" : {
1164 "items" : {
1165 "properties" : {
44660702
DM
1166 "comment" : {
1167 "optional" : 1,
1168 "type" : "string"
56122987 1169 },
44660702
DM
1170 "digest" : {
1171 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1172 "maxLength" : 40,
1173 "optional" : 0,
1174 "type" : "string"
1175 },
1176 "name" : {
1177 "description" : "IP set name.",
1178 "maxLength" : 64,
1179 "minLength" : 2,
1180 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 1181 "type" : "string"
56122987
DM
1182 }
1183 },
1184 "type" : "object"
44660702
DM
1185 },
1186 "links" : [
1187 {
1188 "href" : "{name}",
1189 "rel" : "child"
1190 }
1191 ],
1192 "type" : "array"
56122987 1193 }
44660702
DM
1194 },
1195 "POST" : {
1196 "description" : "Create new IPSet",
1197 "method" : "POST",
1198 "name" : "create_ipset",
7aacca6f
DM
1199 "parameters" : {
1200 "additionalProperties" : 0,
1201 "properties" : {
44660702
DM
1202 "comment" : {
1203 "optional" : 1,
1204 "type" : "string"
1205 },
1206 "digest" : {
1207 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1208 "maxLength" : 40,
1209 "optional" : 1,
1210 "type" : "string"
1211 },
1212 "name" : {
1213 "description" : "IP set name.",
1214 "maxLength" : 64,
1215 "minLength" : 2,
1216 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1217 "type" : "string"
1218 },
1219 "rename" : {
1220 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
1221 "maxLength" : 64,
1222 "minLength" : 2,
1223 "optional" : 1,
1224 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1225 "type" : "string"
7aacca6f
DM
1226 }
1227 }
1228 },
56122987
DM
1229 "permissions" : {
1230 "check" : [
1231 "perm",
1232 "/",
1233 [
44660702 1234 "Sys.Modify"
56122987
DM
1235 ]
1236 ]
1237 },
44660702 1238 "protected" : 1,
56122987 1239 "returns" : {
44660702
DM
1240 "type" : "null"
1241 }
56122987 1242 }
7aacca6f 1243 },
44660702
DM
1244 "leaf" : 0,
1245 "path" : "/cluster/firewall/ipset",
1246 "text" : "ipset"
1247 },
56122987 1248 {
44660702
DM
1249 "children" : [
1250 {
1251 "info" : {
1252 "DELETE" : {
1253 "description" : "Remove IP or Network alias.",
1254 "method" : "DELETE",
1255 "name" : "remove_alias",
1256 "parameters" : {
1257 "additionalProperties" : 0,
1258 "properties" : {
1259 "digest" : {
1260 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1261 "maxLength" : 40,
1262 "optional" : 1,
1263 "type" : "string"
1264 },
1265 "name" : {
1266 "description" : "Alias name.",
1267 "maxLength" : 64,
1268 "minLength" : 2,
1269 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1270 "type" : "string"
1271 }
1272 }
1273 },
1274 "permissions" : {
1275 "check" : [
1276 "perm",
1277 "/",
1278 [
1279 "Sys.Modify"
1280 ]
1281 ]
1282 },
1283 "protected" : 1,
1284 "returns" : {
1285 "type" : "null"
1286 }
1287 },
1288 "GET" : {
1289 "description" : "Read alias.",
1290 "method" : "GET",
1291 "name" : "read_alias",
1292 "parameters" : {
1293 "additionalProperties" : 0,
1294 "properties" : {
1295 "name" : {
1296 "description" : "Alias name.",
1297 "maxLength" : 64,
1298 "minLength" : 2,
1299 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1300 "type" : "string"
1301 }
1302 }
1303 },
1304 "permissions" : {
1305 "check" : [
1306 "perm",
1307 "/",
1308 [
1309 "Sys.Audit"
1310 ]
1311 ]
1312 },
1313 "returns" : {
1314 "type" : "object"
1315 }
1316 },
1317 "PUT" : {
1318 "description" : "Update IP or Network alias.",
1319 "method" : "PUT",
1320 "name" : "update_alias",
1321 "parameters" : {
1322 "additionalProperties" : 0,
1323 "properties" : {
1324 "cidr" : {
1325 "description" : "Network/IP specification in CIDR format.",
1326 "format" : "IPorCIDR",
1327 "type" : "string"
1328 },
1329 "comment" : {
1330 "optional" : 1,
1331 "type" : "string"
1332 },
1333 "digest" : {
1334 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1335 "maxLength" : 40,
1336 "optional" : 1,
1337 "type" : "string"
1338 },
1339 "name" : {
1340 "description" : "Alias name.",
1341 "maxLength" : 64,
1342 "minLength" : 2,
1343 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1344 "type" : "string"
1345 },
1346 "rename" : {
1347 "description" : "Rename an existing alias.",
1348 "maxLength" : 64,
1349 "minLength" : 2,
1350 "optional" : 1,
1351 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1352 "type" : "string"
1353 }
1354 }
1355 },
1356 "permissions" : {
1357 "check" : [
1358 "perm",
1359 "/",
1360 [
1361 "Sys.Modify"
1362 ]
1363 ]
1364 },
1365 "protected" : 1,
1366 "returns" : {
1367 "type" : "null"
1368 }
1369 }
1370 },
1371 "leaf" : 1,
1372 "path" : "/cluster/firewall/aliases/{name}",
1373 "text" : "{name}"
1374 }
1375 ],
1376 "info" : {
1377 "GET" : {
1378 "description" : "List aliases",
1379 "method" : "GET",
1380 "name" : "get_aliases",
1381 "parameters" : {
1382 "additionalProperties" : 0
1383 },
1384 "permissions" : {
1385 "check" : [
1386 "perm",
1387 "/",
1388 [
1389 "Sys.Audit"
1390 ]
1391 ]
1392 },
1393 "returns" : {
1394 "items" : {
1395 "properties" : {
1396 "cidr" : {
1397 "type" : "string"
1398 },
1399 "comment" : {
1400 "optional" : 1,
1401 "type" : "string"
1402 },
1403 "digest" : {
1404 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1405 "maxLength" : 40,
1406 "optional" : 0,
1407 "type" : "string"
1408 },
1409 "name" : {
1410 "type" : "string"
1411 }
1412 },
1413 "type" : "object"
1414 },
1415 "links" : [
1416 {
1417 "href" : "{name}",
1418 "rel" : "child"
1419 }
1420 ],
1421 "type" : "array"
1422 }
1423 },
1424 "POST" : {
1425 "description" : "Create IP or Network Alias.",
1426 "method" : "POST",
1427 "name" : "create_alias",
56122987
DM
1428 "parameters" : {
1429 "additionalProperties" : 0,
1430 "properties" : {
44660702
DM
1431 "cidr" : {
1432 "description" : "Network/IP specification in CIDR format.",
1433 "format" : "IPorCIDR",
1434 "type" : "string"
1435 },
1436 "comment" : {
1437 "optional" : 1,
1438 "type" : "string"
1439 },
1440 "name" : {
1441 "description" : "Alias name.",
1442 "maxLength" : 64,
1443 "minLength" : 2,
1444 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1445 "type" : "string"
56122987
DM
1446 }
1447 }
1448 },
56122987
DM
1449 "permissions" : {
1450 "check" : [
1451 "perm",
1452 "/",
1453 [
1454 "Sys.Modify"
1455 ]
1456 ]
1457 },
44660702 1458 "protected" : 1,
56122987
DM
1459 "returns" : {
1460 "type" : "null"
1461 }
44660702
DM
1462 }
1463 },
1464 "leaf" : 0,
1465 "path" : "/cluster/firewall/aliases",
1466 "text" : "aliases"
1467 },
1468 {
1469 "info" : {
1470 "GET" : {
1471 "description" : "Get Firewall options.",
1472 "method" : "GET",
1473 "name" : "get_options",
1474 "parameters" : {
1475 "additionalProperties" : 0
7aacca6f 1476 },
56122987
DM
1477 "permissions" : {
1478 "check" : [
1479 "perm",
1480 "/",
1481 [
44660702 1482 "Sys.Audit"
56122987
DM
1483 ]
1484 ]
1485 },
44660702 1486 "returns" : {
56122987 1487 "properties" : {
44660702
DM
1488 "enable" : {
1489 "description" : "Enable or disable the firewall cluster wide.",
1490 "minimum" : 0,
56122987 1491 "optional" : 1,
7aacca6f 1492 "type" : "integer"
56122987 1493 },
44660702
DM
1494 "policy_in" : {
1495 "description" : "Input policy.",
1496 "enum" : [
1497 "ACCEPT",
1498 "REJECT",
1499 "DROP"
1500 ],
56122987 1501 "optional" : 1,
44660702 1502 "type" : "string"
7aacca6f 1503 },
44660702
DM
1504 "policy_out" : {
1505 "description" : "Output policy.",
1506 "enum" : [
1507 "ACCEPT",
1508 "REJECT",
1509 "DROP"
1510 ],
7aacca6f 1511 "optional" : 1,
44660702
DM
1512 "type" : "string"
1513 }
1514 },
1515 "type" : "object"
1516 }
1517 },
1518 "PUT" : {
1519 "description" : "Set Firewall options.",
1520 "method" : "PUT",
1521 "name" : "set_options",
1522 "parameters" : {
1523 "additionalProperties" : 0,
1524 "properties" : {
1525 "delete" : {
1526 "description" : "A list of settings you want to delete.",
1527 "format" : "pve-configid-list",
56122987 1528 "optional" : 1,
44660702 1529 "type" : "string"
56122987 1530 },
44660702
DM
1531 "digest" : {
1532 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1533 "maxLength" : 40,
56122987 1534 "optional" : 1,
44660702 1535 "type" : "string"
56122987 1536 },
44660702
DM
1537 "enable" : {
1538 "description" : "Enable or disable the firewall cluster wide.",
7aacca6f 1539 "minimum" : 0,
56122987 1540 "optional" : 1,
4bd7df8b
DM
1541 "type" : "integer",
1542 "typetext" : "integer (0- N)"
56122987 1543 },
44660702
DM
1544 "policy_in" : {
1545 "description" : "Input policy.",
56122987 1546 "enum" : [
44660702
DM
1547 "ACCEPT",
1548 "REJECT",
1549 "DROP"
56122987 1550 ],
56122987 1551 "optional" : 1,
44660702 1552 "type" : "string"
56122987 1553 },
44660702
DM
1554 "policy_out" : {
1555 "description" : "Output policy.",
56122987 1556 "enum" : [
44660702
DM
1557 "ACCEPT",
1558 "REJECT",
1559 "DROP"
56122987 1560 ],
7aacca6f 1561 "optional" : 1,
44660702 1562 "type" : "string"
56122987 1563 }
44660702
DM
1564 }
1565 },
1566 "permissions" : {
1567 "check" : [
1568 "perm",
1569 "/",
1570 [
1571 "Sys.Modify"
1572 ]
1573 ]
7aacca6f
DM
1574 },
1575 "protected" : 1,
44660702
DM
1576 "returns" : {
1577 "type" : "null"
1578 }
1579 }
1580 },
1581 "leaf" : 1,
1582 "path" : "/cluster/firewall/options",
1583 "text" : "options"
1584 },
1585 {
1586 "info" : {
7aacca6f 1587 "GET" : {
44660702 1588 "description" : "List available macros",
7aacca6f 1589 "method" : "GET",
44660702
DM
1590 "name" : "get_macros",
1591 "parameters" : {
1592 "additionalProperties" : 0
7aacca6f 1593 },
44660702
DM
1594 "permissions" : {
1595 "user" : "all"
1596 },
1597 "returns" : {
1598 "items" : {
1599 "properties" : {
1600 "descr" : {
1601 "description" : "More verbose description (if available).",
1602 "type" : "string"
1603 },
1604 "macro" : {
1605 "description" : "Macro name.",
1606 "type" : "string"
1607 }
1608 },
1609 "type" : "object"
1610 },
1611 "type" : "array"
1612 }
1613 }
1614 },
1615 "leaf" : 1,
1616 "path" : "/cluster/firewall/macros",
1617 "text" : "macros"
1618 },
1619 {
1620 "info" : {
1621 "GET" : {
1622 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
1623 "method" : "GET",
1624 "name" : "refs",
7aacca6f 1625 "parameters" : {
44660702 1626 "additionalProperties" : 0,
7aacca6f 1627 "properties" : {
44660702
DM
1628 "type" : {
1629 "description" : "Only list references of specified type.",
1630 "enum" : [
1631 "alias",
1632 "ipset"
1633 ],
1634 "optional" : 1,
1635 "type" : "string"
7aacca6f 1636 }
44660702 1637 }
7aacca6f
DM
1638 },
1639 "permissions" : {
1640 "check" : [
1641 "perm",
1642 "/",
1643 [
1644 "Sys.Audit"
1645 ]
1646 ]
1647 },
44660702
DM
1648 "returns" : {
1649 "items" : {
1650 "properties" : {
1651 "comment" : {
1652 "optional" : 1,
1653 "type" : "string"
1654 },
1655 "name" : {
1656 "type" : "string"
1657 },
1658 "ref" : {
1659 "type" : "string"
1660 },
1661 "type" : {
1662 "enum" : [
1663 "alias",
1664 "ipset"
1665 ],
1666 "type" : "string"
1667 }
1668 },
1669 "type" : "object"
1670 },
1671 "type" : "array"
1672 }
56122987
DM
1673 }
1674 },
7aacca6f 1675 "leaf" : 1,
44660702
DM
1676 "path" : "/cluster/firewall/refs",
1677 "text" : "refs"
56122987
DM
1678 }
1679 ],
56122987 1680 "info" : {
44660702
DM
1681 "GET" : {
1682 "description" : "Directory index.",
1683 "method" : "GET",
1684 "name" : "index",
56122987 1685 "parameters" : {
56122987
DM
1686 "additionalProperties" : 0
1687 },
44660702
DM
1688 "permissions" : {
1689 "user" : "all"
1690 },
56122987 1691 "returns" : {
44660702
DM
1692 "items" : {
1693 "properties" : {},
1694 "type" : "object"
1695 },
7aacca6f
DM
1696 "links" : [
1697 {
44660702
DM
1698 "href" : "{name}",
1699 "rel" : "child"
7aacca6f
DM
1700 }
1701 ],
7aacca6f 1702 "type" : "array"
7aacca6f 1703 }
56122987
DM
1704 }
1705 },
44660702
DM
1706 "leaf" : 0,
1707 "path" : "/cluster/firewall",
1708 "text" : "firewall"
7aacca6f
DM
1709 },
1710 {
56122987
DM
1711 "children" : [
1712 {
56122987 1713 "info" : {
44660702
DM
1714 "DELETE" : {
1715 "description" : "Delete vzdump backup job definition.",
1716 "method" : "DELETE",
1717 "name" : "delete_job",
1718 "parameters" : {
1719 "additionalProperties" : 0,
1720 "properties" : {
1721 "id" : {
1722 "description" : "The job ID.",
1723 "maxLength" : 50,
1724 "type" : "string"
1725 }
1726 }
1727 },
1728 "permissions" : {
1729 "check" : [
1730 "perm",
1731 "/",
1732 [
1733 "Sys.Modify"
1734 ]
1735 ]
1736 },
1737 "protected" : 1,
56122987
DM
1738 "returns" : {
1739 "type" : "null"
44660702
DM
1740 }
1741 },
1742 "GET" : {
1743 "description" : "Read vzdump backup job definition.",
1744 "method" : "GET",
1745 "name" : "read_job",
1746 "parameters" : {
1747 "additionalProperties" : 0,
1748 "properties" : {
1749 "id" : {
1750 "description" : "The job ID.",
1751 "maxLength" : 50,
1752 "type" : "string"
1753 }
1754 }
56122987 1755 },
7aacca6f
DM
1756 "permissions" : {
1757 "check" : [
1758 "perm",
1759 "/",
1760 [
44660702 1761 "Sys.Audit"
7aacca6f
DM
1762 ]
1763 ]
1764 },
44660702
DM
1765 "returns" : {
1766 "type" : "object"
1767 }
1768 },
1769 "PUT" : {
1770 "description" : "Update vzdump backup job definition.",
1771 "method" : "PUT",
1772 "name" : "update_job",
56122987 1773 "parameters" : {
44660702 1774 "additionalProperties" : 0,
56122987 1775 "properties" : {
44660702
DM
1776 "all" : {
1777 "default" : 0,
1778 "description" : "Backup all known guest systems on this host.",
7aacca6f 1779 "optional" : 1,
44660702 1780 "type" : "boolean"
7aacca6f 1781 },
44660702
DM
1782 "bwlimit" : {
1783 "default" : 0,
1784 "description" : "Limit I/O bandwidth (KBytes per second).",
1785 "minimum" : 0,
1786 "optional" : 1,
4bd7df8b
DM
1787 "type" : "integer",
1788 "typetext" : "integer (0- N)"
44660702
DM
1789 },
1790 "compress" : {
1791 "default" : "0",
1792 "description" : "Compress dump file.",
7aacca6f 1793 "enum" : [
44660702
DM
1794 "0",
1795 "1",
1796 "gzip",
1797 "lzo"
7aacca6f 1798 ],
44660702
DM
1799 "optional" : 1,
1800 "type" : "string"
7aacca6f 1801 },
44660702
DM
1802 "delete" : {
1803 "description" : "A list of settings you want to delete.",
1804 "format" : "pve-configid-list",
7aacca6f 1805 "optional" : 1,
44660702 1806 "type" : "string"
56122987 1807 },
44660702
DM
1808 "dow" : {
1809 "description" : "Day of week selection.",
1810 "format" : "pve-day-of-week-list",
7aacca6f 1811 "optional" : 1,
44660702 1812 "type" : "string"
56122987 1813 },
44660702
DM
1814 "dumpdir" : {
1815 "description" : "Store resulting files to specified directory.",
56122987 1816 "optional" : 1,
44660702 1817 "type" : "string"
56122987 1818 },
44660702
DM
1819 "enabled" : {
1820 "default" : "1",
1821 "description" : "Enable or disable the job.",
1822 "optional" : 1,
1823 "type" : "boolean"
1824 },
1825 "exclude" : {
1826 "description" : "Exclude specified guest systems (assumes --all)",
1827 "format" : "pve-vmid-list",
1828 "optional" : 1,
1829 "type" : "string"
1830 },
1831 "exclude-path" : {
1832 "description" : "Exclude certain files/directories (shell globs).",
1833 "format" : "string-alist",
1834 "optional" : 1,
1835 "type" : "string"
1836 },
1837 "id" : {
1838 "description" : "The job ID.",
1839 "maxLength" : 50,
1840 "type" : "string"
1841 },
1842 "ionice" : {
1843 "default" : 7,
1844 "description" : "Set CFQ ionice priority.",
1845 "maximum" : 8,
1846 "minimum" : 0,
1847 "optional" : 1,
4bd7df8b
DM
1848 "type" : "integer",
1849 "typetext" : "integer (0-8)"
44660702
DM
1850 },
1851 "lockwait" : {
1852 "default" : 180,
1853 "description" : "Maximal time to wait for the global lock (minutes).",
1854 "minimum" : 0,
1855 "optional" : 1,
4bd7df8b
DM
1856 "type" : "integer",
1857 "typetext" : "integer (0- N)"
44660702
DM
1858 },
1859 "mailnotification" : {
1860 "default" : "always",
1861 "description" : "Specify when to send an email",
56122987 1862 "enum" : [
44660702
DM
1863 "always",
1864 "failure"
56122987 1865 ],
44660702
DM
1866 "optional" : 1,
1867 "type" : "string"
1868 },
1869 "mailto" : {
1870 "description" : "Comma-separated list of email addresses that should receive email notifications.",
1871 "format" : "string-list",
1872 "optional" : 1,
1873 "type" : "string"
1874 },
1875 "maxfiles" : {
1876 "default" : 1,
1877 "description" : "Maximal number of backup files per guest system.",
1878 "minimum" : 1,
1879 "optional" : 1,
4bd7df8b
DM
1880 "type" : "integer",
1881 "typetext" : "integer (1- N)"
44660702
DM
1882 },
1883 "mode" : {
1884 "default" : "snapshot",
1885 "description" : "Backup mode.",
1886 "enum" : [
1887 "snapshot",
1888 "suspend",
1889 "stop"
1890 ],
1891 "optional" : 1,
1892 "type" : "string"
1893 },
1894 "node" : {
1895 "description" : "Only run if executed on this node.",
1896 "format" : "pve-node",
1897 "optional" : 1,
1898 "type" : "string"
1899 },
1900 "pigz" : {
1901 "default" : 0,
1902 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
1903 "optional" : 1,
1904 "type" : "integer"
1905 },
1906 "quiet" : {
1907 "default" : 0,
1908 "description" : "Be quiet.",
1909 "optional" : 1,
1910 "type" : "boolean"
1911 },
1912 "remove" : {
1913 "default" : 1,
1914 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
1915 "optional" : 1,
1916 "type" : "boolean"
1917 },
1918 "script" : {
1919 "description" : "Use specified hook script.",
1920 "optional" : 1,
1921 "type" : "string"
1922 },
1923 "size" : {
1924 "default" : 1024,
1925 "description" : "Unused, will be removed in a future release.",
1926 "minimum" : 500,
1927 "optional" : 1,
4bd7df8b
DM
1928 "type" : "integer",
1929 "typetext" : "integer (500- N)"
44660702
DM
1930 },
1931 "starttime" : {
1932 "description" : "Job Start time.",
1933 "pattern" : "\\d{1,2}:\\d{1,2}",
56122987 1934 "type" : "string",
44660702 1935 "typetext" : "HH:MM"
7aacca6f 1936 },
44660702
DM
1937 "stdexcludes" : {
1938 "default" : 1,
1939 "description" : "Exclude temporary files and logs.",
1940 "optional" : 1,
1941 "type" : "boolean"
1942 },
1943 "stop" : {
1944 "default" : 0,
1945 "description" : "Stop runnig backup jobs on this host.",
1946 "optional" : 1,
1947 "type" : "boolean"
1948 },
1949 "stopwait" : {
1950 "default" : 10,
1951 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
1952 "minimum" : 0,
1953 "optional" : 1,
4bd7df8b
DM
1954 "type" : "integer",
1955 "typetext" : "integer (0- N)"
44660702
DM
1956 },
1957 "storage" : {
1958 "description" : "Store resulting file to this storage.",
1959 "format" : "pve-storage-id",
1960 "optional" : 1,
7aacca6f 1961 "type" : "string"
56122987 1962 },
44660702
DM
1963 "tmpdir" : {
1964 "description" : "Store temporary files to specified directory.",
1965 "optional" : 1,
1966 "type" : "string"
1967 },
1968 "vmid" : {
1969 "description" : "The ID of the guest system you want to backup.",
1970 "format" : "pve-vmid-list",
1971 "optional" : 1,
1972 "type" : "string"
56122987 1973 }
44660702 1974 }
56122987
DM
1975 },
1976 "permissions" : {
1977 "check" : [
1978 "perm",
1979 "/",
1980 [
44660702 1981 "Sys.Modify"
56122987
DM
1982 ]
1983 ]
1984 },
44660702
DM
1985 "protected" : 1,
1986 "returns" : {
1987 "type" : "null"
7aacca6f 1988 }
56122987
DM
1989 }
1990 },
44660702
DM
1991 "leaf" : 1,
1992 "path" : "/cluster/backup/{id}",
1993 "text" : "{id}"
1994 }
1995 ],
1996 "info" : {
1997 "GET" : {
1998 "description" : "List vzdump backup schedule.",
1999 "method" : "GET",
2000 "name" : "index",
2001 "parameters" : {
2002 "additionalProperties" : 0
2003 },
2004 "permissions" : {
2005 "check" : [
2006 "perm",
2007 "/",
2008 [
2009 "Sys.Audit"
2010 ]
2011 ]
2012 },
2013 "returns" : {
2014 "items" : {
2015 "properties" : {
2016 "id" : {
2017 "type" : "string"
2018 }
2019 },
2020 "type" : "object"
2021 },
2022 "links" : [
2023 {
2024 "href" : "{id}",
2025 "rel" : "child"
2026 }
2027 ],
2028 "type" : "array"
2029 }
2030 },
2031 "POST" : {
2032 "description" : "Create new vzdump backup job.",
2033 "method" : "POST",
2034 "name" : "create_job",
2035 "parameters" : {
2036 "additionalProperties" : 0,
2037 "properties" : {
2038 "all" : {
2039 "default" : 0,
2040 "description" : "Backup all known guest systems on this host.",
2041 "optional" : 1,
2042 "type" : "boolean"
2043 },
2044 "bwlimit" : {
2045 "default" : 0,
2046 "description" : "Limit I/O bandwidth (KBytes per second).",
2047 "minimum" : 0,
2048 "optional" : 1,
4bd7df8b
DM
2049 "type" : "integer",
2050 "typetext" : "integer (0- N)"
44660702
DM
2051 },
2052 "compress" : {
2053 "default" : "0",
2054 "description" : "Compress dump file.",
2055 "enum" : [
2056 "0",
2057 "1",
2058 "gzip",
2059 "lzo"
2060 ],
2061 "optional" : 1,
2062 "type" : "string"
2063 },
2064 "dow" : {
2065 "default" : "mon,tue,wed,thu,fri,sat,sun",
2066 "description" : "Day of week selection.",
2067 "format" : "pve-day-of-week-list",
2068 "optional" : 1,
2069 "type" : "string"
2070 },
2071 "dumpdir" : {
2072 "description" : "Store resulting files to specified directory.",
2073 "optional" : 1,
2074 "type" : "string"
2075 },
2076 "enabled" : {
2077 "default" : "1",
2078 "description" : "Enable or disable the job.",
2079 "optional" : 1,
2080 "type" : "boolean"
2081 },
2082 "exclude" : {
2083 "description" : "Exclude specified guest systems (assumes --all)",
2084 "format" : "pve-vmid-list",
2085 "optional" : 1,
2086 "type" : "string"
2087 },
2088 "exclude-path" : {
2089 "description" : "Exclude certain files/directories (shell globs).",
2090 "format" : "string-alist",
2091 "optional" : 1,
2092 "type" : "string"
2093 },
2094 "ionice" : {
2095 "default" : 7,
2096 "description" : "Set CFQ ionice priority.",
2097 "maximum" : 8,
2098 "minimum" : 0,
2099 "optional" : 1,
4bd7df8b
DM
2100 "type" : "integer",
2101 "typetext" : "integer (0-8)"
44660702
DM
2102 },
2103 "lockwait" : {
2104 "default" : 180,
2105 "description" : "Maximal time to wait for the global lock (minutes).",
2106 "minimum" : 0,
2107 "optional" : 1,
4bd7df8b
DM
2108 "type" : "integer",
2109 "typetext" : "integer (0- N)"
44660702
DM
2110 },
2111 "mailnotification" : {
2112 "default" : "always",
2113 "description" : "Specify when to send an email",
2114 "enum" : [
2115 "always",
2116 "failure"
2117 ],
2118 "optional" : 1,
2119 "type" : "string"
2120 },
2121 "mailto" : {
2122 "description" : "Comma-separated list of email addresses that should receive email notifications.",
2123 "format" : "string-list",
2124 "optional" : 1,
2125 "type" : "string"
2126 },
2127 "maxfiles" : {
2128 "default" : 1,
2129 "description" : "Maximal number of backup files per guest system.",
2130 "minimum" : 1,
2131 "optional" : 1,
4bd7df8b
DM
2132 "type" : "integer",
2133 "typetext" : "integer (1- N)"
44660702
DM
2134 },
2135 "mode" : {
2136 "default" : "snapshot",
2137 "description" : "Backup mode.",
2138 "enum" : [
2139 "snapshot",
2140 "suspend",
2141 "stop"
2142 ],
2143 "optional" : 1,
2144 "type" : "string"
2145 },
2146 "node" : {
2147 "description" : "Only run if executed on this node.",
2148 "format" : "pve-node",
2149 "optional" : 1,
2150 "type" : "string"
2151 },
2152 "pigz" : {
2153 "default" : 0,
2154 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
2155 "optional" : 1,
2156 "type" : "integer"
2157 },
2158 "quiet" : {
2159 "default" : 0,
2160 "description" : "Be quiet.",
2161 "optional" : 1,
2162 "type" : "boolean"
2163 },
2164 "remove" : {
2165 "default" : 1,
2166 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
2167 "optional" : 1,
2168 "type" : "boolean"
2169 },
2170 "script" : {
2171 "description" : "Use specified hook script.",
2172 "optional" : 1,
2173 "type" : "string"
2174 },
2175 "size" : {
2176 "default" : 1024,
2177 "description" : "Unused, will be removed in a future release.",
2178 "minimum" : 500,
2179 "optional" : 1,
4bd7df8b
DM
2180 "type" : "integer",
2181 "typetext" : "integer (500- N)"
44660702
DM
2182 },
2183 "starttime" : {
2184 "description" : "Job Start time.",
2185 "pattern" : "\\d{1,2}:\\d{1,2}",
2186 "type" : "string",
2187 "typetext" : "HH:MM"
2188 },
2189 "stdexcludes" : {
2190 "default" : 1,
2191 "description" : "Exclude temporary files and logs.",
2192 "optional" : 1,
2193 "type" : "boolean"
2194 },
2195 "stop" : {
2196 "default" : 0,
2197 "description" : "Stop runnig backup jobs on this host.",
2198 "optional" : 1,
2199 "type" : "boolean"
2200 },
2201 "stopwait" : {
2202 "default" : 10,
2203 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
2204 "minimum" : 0,
2205 "optional" : 1,
4bd7df8b
DM
2206 "type" : "integer",
2207 "typetext" : "integer (0- N)"
44660702
DM
2208 },
2209 "storage" : {
2210 "description" : "Store resulting file to this storage.",
2211 "format" : "pve-storage-id",
2212 "optional" : 1,
2213 "type" : "string"
2214 },
2215 "tmpdir" : {
2216 "description" : "Store temporary files to specified directory.",
2217 "optional" : 1,
2218 "type" : "string"
2219 },
2220 "vmid" : {
2221 "description" : "The ID of the guest system you want to backup.",
2222 "format" : "pve-vmid-list",
2223 "optional" : 1,
2224 "type" : "string"
2225 }
2226 }
2227 },
2228 "permissions" : {
2229 "check" : [
2230 "perm",
2231 "/",
2232 [
2233 "Sys.Modify"
2234 ]
2235 ]
2236 },
2237 "protected" : 1,
2238 "returns" : {
2239 "type" : "null"
2240 }
2241 }
2242 },
2243 "leaf" : 0,
2244 "path" : "/cluster/backup",
2245 "text" : "backup"
2246 },
2247 {
2248 "children" : [
2249 {
2250 "children" : [
2251 {
2252 "children" : [
56122987 2253 {
56122987
DM
2254 "info" : {
2255 "POST" : {
44660702
DM
2256 "description" : "Request resource migration (online) to another node.",
2257 "method" : "POST",
2258 "name" : "migrate",
56122987 2259 "parameters" : {
7aacca6f 2260 "additionalProperties" : 0,
56122987
DM
2261 "properties" : {
2262 "node" : {
7aacca6f 2263 "description" : "The cluster node name.",
44660702 2264 "format" : "pve-node",
7aacca6f 2265 "type" : "string"
56122987
DM
2266 },
2267 "sid" : {
44660702 2268 "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).",
56122987 2269 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2270 "type" : "string",
44660702 2271 "typetext" : "<type>:<name>"
56122987 2272 }
7aacca6f 2273 }
56122987 2274 },
56122987
DM
2275 "permissions" : {
2276 "check" : [
2277 "perm",
2278 "/",
2279 [
2280 "Sys.Console"
2281 ]
2282 ]
2283 },
7aacca6f 2284 "protected" : 1,
7aacca6f
DM
2285 "returns" : {
2286 "type" : "null"
44660702 2287 }
56122987 2288 }
44660702
DM
2289 },
2290 "leaf" : 1,
2291 "path" : "/cluster/ha/resources/{sid}/migrate",
2292 "text" : "migrate"
2293 },
2294 {
2295 "info" : {
2296 "POST" : {
2297 "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.",
2298 "method" : "POST",
2299 "name" : "relocate",
2300 "parameters" : {
2301 "additionalProperties" : 0,
2302 "properties" : {
2303 "node" : {
2304 "description" : "The cluster node name.",
2305 "format" : "pve-node",
2306 "type" : "string"
2307 },
2308 "sid" : {
2309 "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).",
2310 "format" : "pve-ha-resource-or-vm-id",
2311 "type" : "string",
2312 "typetext" : "<type>:<name>"
2313 }
2314 }
2315 },
2316 "permissions" : {
2317 "check" : [
2318 "perm",
2319 "/",
2320 [
2321 "Sys.Console"
2322 ]
2323 ]
2324 },
2325 "protected" : 1,
2326 "returns" : {
2327 "type" : "null"
2328 }
2329 }
2330 },
2331 "leaf" : 1,
2332 "path" : "/cluster/ha/resources/{sid}/relocate",
2333 "text" : "relocate"
2334 }
2335 ],
2336 "info" : {
2337 "DELETE" : {
2338 "description" : "Delete resource configuration.",
2339 "method" : "DELETE",
2340 "name" : "delete",
7aacca6f 2341 "parameters" : {
44660702 2342 "additionalProperties" : 0,
7aacca6f
DM
2343 "properties" : {
2344 "sid" : {
2345 "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).",
44660702 2346 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2347 "type" : "string",
44660702
DM
2348 "typetext" : "<type>:<name>"
2349 }
2350 }
2351 },
2352 "permissions" : {
2353 "check" : [
2354 "perm",
2355 "/",
2356 [
2357 "Sys.Console"
2358 ]
2359 ]
2360 },
2361 "protected" : 1,
2362 "returns" : {
2363 "type" : "null"
2364 }
2365 },
2366 "GET" : {
2367 "description" : "Read resource configuration.",
2368 "method" : "GET",
2369 "name" : "read",
2370 "parameters" : {
2371 "additionalProperties" : 0,
2372 "properties" : {
2373 "sid" : {
2374 "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).",
7aacca6f 2375 "format" : "pve-ha-resource-or-vm-id",
44660702 2376 "type" : "string",
7aacca6f
DM
2377 "typetext" : "<type>:<name>"
2378 }
44660702 2379 }
7aacca6f
DM
2380 },
2381 "permissions" : {
2382 "check" : [
2383 "perm",
2384 "/",
2385 [
2386 "Sys.Audit"
2387 ]
2388 ]
2389 },
44660702 2390 "returns" : {}
7aacca6f 2391 },
56122987 2392 "PUT" : {
44660702 2393 "description" : "Update resource configuration.",
7aacca6f 2394 "method" : "PUT",
44660702 2395 "name" : "update",
56122987
DM
2396 "parameters" : {
2397 "additionalProperties" : 0,
2398 "properties" : {
44660702
DM
2399 "comment" : {
2400 "description" : "Description.",
2401 "maxLength" : 4096,
56122987 2402 "optional" : 1,
44660702 2403 "type" : "string"
56122987 2404 },
7aacca6f
DM
2405 "delete" : {
2406 "description" : "A list of settings you want to delete.",
7aacca6f 2407 "format" : "pve-configid-list",
44660702
DM
2408 "maxLength" : 4096,
2409 "optional" : 1,
2410 "type" : "string"
56122987 2411 },
44660702
DM
2412 "digest" : {
2413 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2414 "maxLength" : 40,
2415 "optional" : 1,
2416 "type" : "string"
56122987 2417 },
44660702
DM
2418 "group" : {
2419 "description" : "The HA group identifier.",
2420 "format" : "pve-configid",
7aacca6f 2421 "optional" : 1,
44660702 2422 "type" : "string"
56122987
DM
2423 },
2424 "max_relocate" : {
7aacca6f 2425 "default" : 1,
56122987 2426 "description" : "Maximal number of service relocate tries when a service failes to start.",
44660702
DM
2427 "minimum" : 0,
2428 "optional" : 1,
4bd7df8b
DM
2429 "type" : "integer",
2430 "typetext" : "integer (0- N)"
7aacca6f 2431 },
44660702
DM
2432 "max_restart" : {
2433 "default" : 1,
2434 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2435 "minimum" : 0,
7aacca6f 2436 "optional" : 1,
4bd7df8b
DM
2437 "type" : "integer",
2438 "typetext" : "integer (0- N)"
44660702
DM
2439 },
2440 "sid" : {
2441 "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).",
2442 "format" : "pve-ha-resource-or-vm-id",
2443 "type" : "string",
2444 "typetext" : "<type>:<name>"
7aacca6f
DM
2445 },
2446 "state" : {
44660702
DM
2447 "default" : "enabled",
2448 "description" : "Resource state.",
7aacca6f
DM
2449 "enum" : [
2450 "enabled",
2451 "disabled"
2452 ],
7aacca6f 2453 "optional" : 1,
44660702 2454 "type" : "string"
56122987 2455 }
44660702
DM
2456 },
2457 "type" : "object"
56122987 2458 },
56122987
DM
2459 "permissions" : {
2460 "check" : [
2461 "perm",
2462 "/",
2463 [
2464 "Sys.Console"
2465 ]
2466 ]
2467 },
7aacca6f 2468 "protected" : 1,
56122987
DM
2469 "returns" : {
2470 "type" : "null"
2471 }
2472 }
2473 },
44660702 2474 "leaf" : 0,
7aacca6f 2475 "path" : "/cluster/ha/resources/{sid}",
44660702 2476 "text" : "{sid}"
56122987
DM
2477 }
2478 ],
7aacca6f
DM
2479 "info" : {
2480 "GET" : {
44660702
DM
2481 "description" : "List HA resources.",
2482 "method" : "GET",
2483 "name" : "index",
7aacca6f 2484 "parameters" : {
44660702
DM
2485 "additionalProperties" : 0,
2486 "properties" : {
2487 "type" : {
2488 "description" : "Only list resources of specific type",
2489 "enum" : [
2490 "ct",
2491 "vm"
2492 ],
2493 "optional" : 1,
2494 "type" : "string"
2495 }
2496 }
7aacca6f 2497 },
7aacca6f
DM
2498 "permissions" : {
2499 "check" : [
2500 "perm",
2501 "/",
2502 [
2503 "Sys.Audit"
2504 ]
2505 ]
2506 },
7aacca6f 2507 "returns" : {
7aacca6f 2508 "items" : {
7aacca6f 2509 "properties" : {
44660702 2510 "sid" : {
7aacca6f
DM
2511 "type" : "string"
2512 }
44660702
DM
2513 },
2514 "type" : "object"
7aacca6f
DM
2515 },
2516 "links" : [
2517 {
44660702 2518 "href" : "{sid}",
7aacca6f
DM
2519 "rel" : "child"
2520 }
44660702
DM
2521 ],
2522 "type" : "array"
7aacca6f
DM
2523 }
2524 },
2525 "POST" : {
44660702 2526 "description" : "Create a new HA resource.",
7aacca6f 2527 "method" : "POST",
44660702 2528 "name" : "create",
7aacca6f 2529 "parameters" : {
44660702 2530 "additionalProperties" : 0,
7aacca6f
DM
2531 "properties" : {
2532 "comment" : {
7aacca6f 2533 "description" : "Description.",
44660702 2534 "maxLength" : 4096,
7aacca6f
DM
2535 "optional" : 1,
2536 "type" : "string"
2537 },
44660702
DM
2538 "group" : {
2539 "description" : "The HA group identifier.",
2540 "format" : "pve-configid",
7aacca6f 2541 "optional" : 1,
44660702 2542 "type" : "string"
7aacca6f 2543 },
44660702
DM
2544 "max_relocate" : {
2545 "default" : 1,
2546 "description" : "Maximal number of service relocate tries when a service failes to start.",
2547 "minimum" : 0,
7aacca6f 2548 "optional" : 1,
4bd7df8b
DM
2549 "type" : "integer",
2550 "typetext" : "integer (0- N)"
7aacca6f 2551 },
44660702
DM
2552 "max_restart" : {
2553 "default" : 1,
2554 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2555 "minimum" : 0,
2556 "optional" : 1,
4bd7df8b
DM
2557 "type" : "integer",
2558 "typetext" : "integer (0- N)"
44660702
DM
2559 },
2560 "sid" : {
2561 "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).",
2562 "format" : "pve-ha-resource-or-vm-id",
2563 "type" : "string",
2564 "typetext" : "<type>:<name>"
2565 },
2566 "state" : {
2567 "default" : "enabled",
2568 "description" : "Resource state.",
7aacca6f 2569 "enum" : [
44660702
DM
2570 "enabled",
2571 "disabled"
7aacca6f 2572 ],
7aacca6f
DM
2573 "optional" : 1,
2574 "type" : "string"
2575 },
44660702
DM
2576 "type" : {
2577 "description" : "Resource type.",
2578 "enum" : [
2579 "ct",
2580 "vm"
2581 ],
2582 "optional" : 1,
2583 "type" : "string"
2584 }
7aacca6f 2585 },
44660702 2586 "type" : "object"
7aacca6f
DM
2587 },
2588 "permissions" : {
2589 "check" : [
2590 "perm",
2591 "/",
2592 [
2593 "Sys.Console"
2594 ]
2595 ]
2596 },
44660702
DM
2597 "protected" : 1,
2598 "returns" : {
2599 "type" : "null"
2600 }
7aacca6f
DM
2601 }
2602 },
44660702
DM
2603 "leaf" : 0,
2604 "path" : "/cluster/ha/resources",
2605 "text" : "resources"
2606 },
2607 {
56122987
DM
2608 "children" : [
2609 {
56122987 2610 "info" : {
44660702
DM
2611 "DELETE" : {
2612 "description" : "Delete ha group configuration.",
2613 "method" : "DELETE",
2614 "name" : "delete",
56122987 2615 "parameters" : {
7aacca6f 2616 "additionalProperties" : 0,
56122987 2617 "properties" : {
7aacca6f
DM
2618 "group" : {
2619 "description" : "The HA group identifier.",
44660702
DM
2620 "format" : "pve-configid",
2621 "type" : "string"
56122987 2622 }
7aacca6f 2623 }
56122987 2624 },
56122987
DM
2625 "permissions" : {
2626 "check" : [
2627 "perm",
2628 "/",
2629 [
7aacca6f 2630 "Sys.Console"
56122987
DM
2631 ]
2632 ]
2633 },
44660702 2634 "protected" : 1,
7aacca6f
DM
2635 "returns" : {
2636 "type" : "null"
56122987
DM
2637 }
2638 },
44660702
DM
2639 "GET" : {
2640 "description" : "Read ha group configuration.",
2641 "method" : "GET",
2642 "name" : "read",
56122987 2643 "parameters" : {
44660702 2644 "additionalProperties" : 0,
56122987
DM
2645 "properties" : {
2646 "group" : {
2647 "description" : "The HA group identifier.",
44660702
DM
2648 "format" : "pve-configid",
2649 "type" : "string"
56122987 2650 }
44660702 2651 }
56122987 2652 },
56122987
DM
2653 "permissions" : {
2654 "check" : [
2655 "perm",
2656 "/",
2657 [
44660702 2658 "Sys.Audit"
56122987
DM
2659 ]
2660 ]
2661 },
44660702 2662 "returns" : {}
7aacca6f 2663 },
44660702
DM
2664 "PUT" : {
2665 "description" : "Update ha group configuration.",
2666 "method" : "PUT",
2667 "name" : "update",
7aacca6f 2668 "parameters" : {
44660702 2669 "additionalProperties" : 0,
7aacca6f 2670 "properties" : {
44660702
DM
2671 "comment" : {
2672 "description" : "Description.",
2673 "maxLength" : 4096,
2674 "optional" : 1,
2675 "type" : "string"
2676 },
2677 "delete" : {
2678 "description" : "A list of settings you want to delete.",
2679 "format" : "pve-configid-list",
2680 "maxLength" : 4096,
2681 "optional" : 1,
2682 "type" : "string"
2683 },
2684 "digest" : {
2685 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2686 "maxLength" : 40,
2687 "optional" : 1,
2688 "type" : "string"
2689 },
7aacca6f
DM
2690 "group" : {
2691 "description" : "The HA group identifier.",
44660702
DM
2692 "format" : "pve-configid",
2693 "type" : "string"
2694 },
2695 "nodes" : {
2696 "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').",
2697 "format" : "pve-ha-group-node-list",
2698 "optional" : 1,
7aacca6f 2699 "type" : "string",
44660702
DM
2700 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2701 },
2702 "nofailback" : {
2703 "default" : 0,
2704 "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.",
2705 "optional" : 1,
2706 "type" : "boolean"
2707 },
2708 "restricted" : {
2709 "default" : 0,
2710 "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.",
2711 "optional" : 1,
2712 "type" : "boolean"
7aacca6f
DM
2713 }
2714 },
44660702 2715 "type" : "object"
7aacca6f 2716 },
7aacca6f
DM
2717 "permissions" : {
2718 "check" : [
2719 "perm",
2720 "/",
2721 [
44660702 2722 "Sys.Console"
7aacca6f
DM
2723 ]
2724 ]
2725 },
44660702
DM
2726 "protected" : 1,
2727 "returns" : {
2728 "type" : "null"
2729 }
56122987
DM
2730 }
2731 },
2732 "leaf" : 1,
44660702
DM
2733 "path" : "/cluster/ha/groups/{group}",
2734 "text" : "{group}"
56122987 2735 }
44660702
DM
2736 ],
2737 "info" : {
2738 "GET" : {
2739 "description" : "Get HA groups.",
2740 "method" : "GET",
2741 "name" : "index",
2742 "parameters" : {
2743 "additionalProperties" : 0
2744 },
2745 "permissions" : {
2746 "check" : [
2747 "perm",
2748 "/",
2749 [
2750 "Sys.Audit"
2751 ]
2752 ]
2753 },
2754 "returns" : {
2755 "items" : {
2756 "properties" : {
2757 "group" : {
2758 "type" : "string"
2759 }
2760 },
2761 "type" : "object"
2762 },
2763 "links" : [
2764 {
2765 "href" : "{group}",
2766 "rel" : "child"
2767 }
2768 ],
2769 "type" : "array"
2770 }
2771 },
2772 "POST" : {
2773 "description" : "Create a new HA group.",
2774 "method" : "POST",
2775 "name" : "create",
2776 "parameters" : {
2777 "additionalProperties" : 0,
2778 "properties" : {
2779 "comment" : {
2780 "description" : "Description.",
2781 "maxLength" : 4096,
2782 "optional" : 1,
2783 "type" : "string"
2784 },
2785 "group" : {
2786 "description" : "The HA group identifier.",
2787 "format" : "pve-configid",
2788 "type" : "string"
2789 },
2790 "nodes" : {
2791 "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').",
2792 "format" : "pve-ha-group-node-list",
2793 "optional" : 0,
2794 "type" : "string",
2795 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2796 },
2797 "nofailback" : {
2798 "default" : 0,
2799 "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.",
2800 "optional" : 1,
2801 "type" : "boolean"
2802 },
2803 "restricted" : {
2804 "default" : 0,
2805 "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.",
2806 "optional" : 1,
2807 "type" : "boolean"
2808 },
2809 "type" : {
2810 "description" : "Group type.",
2811 "enum" : [
2812 "group"
2813 ],
2814 "optional" : 1,
2815 "type" : "string"
2816 }
2817 },
2818 "type" : "object"
2819 },
2820 "permissions" : {
2821 "check" : [
2822 "perm",
2823 "/",
2824 [
2825 "Sys.Console"
2826 ]
2827 ]
2828 },
2829 "protected" : 1,
2830 "returns" : {
2831 "type" : "null"
2832 }
2833 }
2834 },
2835 "leaf" : 0,
2836 "path" : "/cluster/ha/groups",
2837 "text" : "groups"
7aacca6f
DM
2838 },
2839 {
7aacca6f
DM
2840 "children" : [
2841 {
2842 "info" : {
2843 "GET" : {
56122987 2844 "description" : "Get HA manger status.",
44660702 2845 "method" : "GET",
7aacca6f 2846 "name" : "status",
44660702
DM
2847 "parameters" : {
2848 "additionalProperties" : 0
2849 },
56122987
DM
2850 "permissions" : {
2851 "check" : [
2852 "perm",
2853 "/",
2854 [
2855 "Sys.Audit"
2856 ]
2857 ]
7aacca6f 2858 },
44660702
DM
2859 "returns" : {
2860 "type" : "array"
56122987
DM
2861 }
2862 }
7aacca6f 2863 },
7aacca6f 2864 "leaf" : 1,
44660702
DM
2865 "path" : "/cluster/ha/status/current",
2866 "text" : "current"
56122987
DM
2867 },
2868 {
2869 "info" : {
2870 "GET" : {
7aacca6f 2871 "description" : "Get full HA manger status, including LRM status.",
44660702
DM
2872 "method" : "GET",
2873 "name" : "manager_status",
7aacca6f
DM
2874 "parameters" : {
2875 "additionalProperties" : 0
2876 },
56122987
DM
2877 "permissions" : {
2878 "check" : [
2879 "perm",
2880 "/",
2881 [
2882 "Sys.Audit"
2883 ]
2884 ]
44660702
DM
2885 },
2886 "returns" : {
2887 "type" : "object"
7aacca6f 2888 }
56122987
DM
2889 }
2890 },
56122987 2891 "leaf" : 1,
44660702
DM
2892 "path" : "/cluster/ha/status/manager_status",
2893 "text" : "manager_status"
56122987
DM
2894 }
2895 ],
56122987
DM
2896 "info" : {
2897 "GET" : {
44660702 2898 "description" : "Directory index.",
7aacca6f 2899 "method" : "GET",
44660702
DM
2900 "name" : "index",
2901 "parameters" : {
2902 "additionalProperties" : 0
2903 },
2904 "permissions" : {
2905 "user" : "all"
2906 },
56122987 2907 "returns" : {
56122987
DM
2908 "items" : {
2909 "properties" : {},
2910 "type" : "object"
2911 },
2912 "links" : [
2913 {
44660702
DM
2914 "href" : "{name}",
2915 "rel" : "child"
56122987 2916 }
7aacca6f
DM
2917 ],
2918 "type" : "array"
44660702 2919 }
56122987 2920 }
7aacca6f 2921 },
44660702 2922 "leaf" : 0,
7aacca6f 2923 "path" : "/cluster/ha/status",
44660702 2924 "text" : "status"
56122987
DM
2925 }
2926 ],
56122987
DM
2927 "info" : {
2928 "GET" : {
7aacca6f 2929 "description" : "Directory index.",
44660702
DM
2930 "method" : "GET",
2931 "name" : "index",
2932 "parameters" : {
2933 "additionalProperties" : 0
2934 },
7aacca6f
DM
2935 "permissions" : {
2936 "check" : [
2937 "perm",
2938 "/",
2939 [
2940 "Sys.Audit"
2941 ]
2942 ]
2943 },
56122987 2944 "returns" : {
56122987 2945 "items" : {
7aacca6f
DM
2946 "properties" : {
2947 "id" : {
2948 "type" : "string"
2949 }
44660702
DM
2950 },
2951 "type" : "object"
7aacca6f
DM
2952 },
2953 "links" : [
2954 {
2955 "href" : "{id}",
2956 "rel" : "child"
2957 }
44660702
DM
2958 ],
2959 "type" : "array"
7aacca6f
DM
2960 }
2961 }
44660702
DM
2962 },
2963 "leaf" : 0,
2964 "path" : "/cluster/ha",
2965 "text" : "ha"
7aacca6f
DM
2966 },
2967 {
7aacca6f
DM
2968 "info" : {
2969 "GET" : {
2970 "description" : "Read cluster log",
44660702
DM
2971 "method" : "GET",
2972 "name" : "log",
56122987 2973 "parameters" : {
7aacca6f 2974 "additionalProperties" : 0,
56122987
DM
2975 "properties" : {
2976 "max" : {
7aacca6f 2977 "description" : "Maximum number of entries.",
44660702
DM
2978 "minimum" : 1,
2979 "optional" : 1,
4bd7df8b
DM
2980 "type" : "integer",
2981 "typetext" : "integer (1- N)"
56122987 2982 }
7aacca6f 2983 }
56122987 2984 },
44660702
DM
2985 "permissions" : {
2986 "user" : "all"
2987 },
7aacca6f 2988 "returns" : {
7aacca6f 2989 "items" : {
44660702
DM
2990 "properties" : {},
2991 "type" : "object"
2992 },
2993 "type" : "array"
7aacca6f 2994 }
56122987 2995 }
44660702
DM
2996 },
2997 "leaf" : 1,
2998 "path" : "/cluster/log",
2999 "text" : "log"
56122987
DM
3000 },
3001 {
56122987
DM
3002 "info" : {
3003 "GET" : {
44660702 3004 "description" : "Resources index (cluster wide).",
7aacca6f 3005 "method" : "GET",
7aacca6f 3006 "name" : "resources",
56122987
DM
3007 "parameters" : {
3008 "additionalProperties" : 0,
3009 "properties" : {
3010 "type" : {
3011 "enum" : [
3012 "vm",
3013 "storage",
3014 "node"
44660702
DM
3015 ],
3016 "optional" : 1,
3017 "type" : "string"
56122987
DM
3018 }
3019 }
3020 },
44660702
DM
3021 "permissions" : {
3022 "user" : "all"
3023 },
3024 "returns" : {
3025 "items" : {
3026 "properties" : {},
3027 "type" : "object"
3028 },
3029 "type" : "array"
3030 }
56122987
DM
3031 }
3032 },
7aacca6f 3033 "leaf" : 1,
44660702
DM
3034 "path" : "/cluster/resources",
3035 "text" : "resources"
56122987
DM
3036 },
3037 {
56122987
DM
3038 "info" : {
3039 "GET" : {
7aacca6f 3040 "description" : "List recent tasks (cluster wide).",
44660702 3041 "method" : "GET",
7aacca6f 3042 "name" : "tasks",
56122987
DM
3043 "parameters" : {
3044 "additionalProperties" : 0
3045 },
44660702
DM
3046 "permissions" : {
3047 "user" : "all"
3048 },
56122987
DM
3049 "returns" : {
3050 "items" : {
3051 "properties" : {
3052 "upid" : {
3053 "type" : "string"
3054 }
44660702
DM
3055 },
3056 "type" : "object"
3057 },
3058 "type" : "array"
7aacca6f 3059 }
56122987
DM
3060 }
3061 },
7aacca6f 3062 "leaf" : 1,
44660702
DM
3063 "path" : "/cluster/tasks",
3064 "text" : "tasks"
56122987
DM
3065 },
3066 {
56122987 3067 "info" : {
7aacca6f 3068 "GET" : {
44660702
DM
3069 "description" : "Get datacenter options.",
3070 "method" : "GET",
3071 "name" : "get_options",
56122987 3072 "parameters" : {
7aacca6f
DM
3073 "additionalProperties" : 0
3074 },
3075 "permissions" : {
3076 "check" : [
3077 "perm",
3078 "/",
3079 [
3080 "Sys.Audit"
3081 ]
3082 ]
3083 },
7aacca6f 3084 "returns" : {
44660702
DM
3085 "properties" : {},
3086 "type" : "object"
7aacca6f
DM
3087 }
3088 },
3089 "PUT" : {
44660702
DM
3090 "description" : "Set datacenter options.",
3091 "method" : "PUT",
7aacca6f
DM
3092 "name" : "set_options",
3093 "parameters" : {
3094 "additionalProperties" : 0,
3095 "properties" : {
56122987 3096 "console" : {
56122987 3097 "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).",
56122987
DM
3098 "enum" : [
3099 "applet",
3100 "vv",
3101 "html5"
44660702
DM
3102 ],
3103 "optional" : 1,
3104 "type" : "string"
56122987 3105 },
7aacca6f 3106 "delete" : {
7aacca6f 3107 "description" : "A list of settings you want to delete.",
44660702 3108 "format" : "pve-configid-list",
7aacca6f
DM
3109 "optional" : 1,
3110 "type" : "string"
3111 },
44660702
DM
3112 "email_from" : {
3113 "description" : "Specify email address to send notification from (default is root@$hostname)",
3114 "format" : "email-opt",
7aacca6f 3115 "optional" : 1,
44660702
DM
3116 "type" : "string"
3117 },
3118 "fencing" : {
3119 "default" : "watchdog",
3120 "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",
7aacca6f 3121 "enum" : [
44660702
DM
3122 "watchdog",
3123 "hardware",
3124 "both"
7aacca6f 3125 ],
44660702
DM
3126 "optional" : 1,
3127 "type" : "string"
3128 },
3129 "http_proxy" : {
3130 "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')",
3131 "optional" : 1,
3132 "pattern" : "http://.*",
3133 "type" : "string"
7aacca6f 3134 },
56122987 3135 "keyboard" : {
44660702 3136 "description" : "Default keybord layout for vnc server.",
56122987 3137 "enum" : [
44660702
DM
3138 "de",
3139 "de-ch",
7aacca6f 3140 "da",
56122987 3141 "en-gb",
44660702
DM
3142 "en-us",
3143 "es",
3144 "fi",
3145 "fr",
3146 "fr-be",
3147 "fr-ca",
3148 "fr-ch",
3149 "hu",
7aacca6f 3150 "is",
44660702
DM
3151 "it",
3152 "ja",
3153 "lt",
56122987 3154 "mk",
7aacca6f 3155 "nl",
56122987 3156 "no",
44660702 3157 "pl",
7aacca6f 3158 "pt",
44660702
DM
3159 "pt-br",
3160 "sv",
3161 "sl",
3162 "tr"
56122987 3163 ],
56122987
DM
3164 "optional" : 1,
3165 "type" : "string"
3166 },
44660702
DM
3167 "language" : {
3168 "description" : "Default GUI language.",
3169 "enum" : [
3170 "en",
3171 "de"
3172 ],
56122987 3173 "optional" : 1,
44660702 3174 "type" : "string"
56122987 3175 },
4bd7df8b
DM
3176 "mac_prefix" : {
3177 "description" : "Prefix for autogenerated MAC addresses.",
3178 "optional" : 1,
3179 "pattern" : "(?^i:[a-f0-9]{2}(?::[a-f0-9]{2}){0,2}:?)",
3180 "type" : "string"
3181 },
44660702
DM
3182 "max_workers" : {
3183 "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.",
3184 "minimum" : 1,
56122987 3185 "optional" : 1,
4bd7df8b
DM
3186 "type" : "integer",
3187 "typetext" : "integer (1- N)"
56122987 3188 },
7aacca6f 3189 "migration_unsecure" : {
44660702 3190 "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.",
56122987 3191 "optional" : 1,
44660702 3192 "type" : "boolean"
56122987
DM
3193 }
3194 }
3195 },
44660702
DM
3196 "permissions" : {
3197 "check" : [
3198 "perm",
3199 "/",
3200 [
3201 "Sys.Modify"
3202 ]
3203 ]
3204 },
56122987 3205 "protected" : 1,
7aacca6f
DM
3206 "returns" : {
3207 "type" : "null"
44660702 3208 }
7aacca6f
DM
3209 }
3210 },
44660702
DM
3211 "leaf" : 1,
3212 "path" : "/cluster/options",
7aacca6f
DM
3213 "text" : "options"
3214 },
3215 {
7aacca6f 3216 "info" : {
56122987 3217 "GET" : {
44660702
DM
3218 "description" : "Get cluster status informations.",
3219 "method" : "GET",
3220 "name" : "get_status",
56122987
DM
3221 "parameters" : {
3222 "additionalProperties" : 0
3223 },
56122987
DM
3224 "permissions" : {
3225 "check" : [
3226 "perm",
3227 "/",
3228 [
3229 "Sys.Audit"
3230 ]
3231 ]
3232 },
7aacca6f 3233 "protected" : 1,
56122987 3234 "returns" : {
56122987 3235 "items" : {
56122987
DM
3236 "properties" : {
3237 "type" : {
3238 "type" : "string"
3239 }
44660702
DM
3240 },
3241 "type" : "object"
7aacca6f
DM
3242 },
3243 "type" : "array"
56122987
DM
3244 }
3245 }
3246 },
44660702 3247 "leaf" : 1,
7aacca6f 3248 "path" : "/cluster/status",
44660702 3249 "text" : "status"
56122987
DM
3250 },
3251 {
56122987
DM
3252 "info" : {
3253 "GET" : {
56122987 3254 "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
44660702
DM
3255 "method" : "GET",
3256 "name" : "nextid",
56122987 3257 "parameters" : {
44660702 3258 "additionalProperties" : 0,
56122987
DM
3259 "properties" : {
3260 "vmid" : {
44660702 3261 "description" : "The (unique) ID of the VM.",
56122987 3262 "format" : "pve-vmid",
7aacca6f 3263 "minimum" : 1,
7aacca6f 3264 "optional" : 1,
4bd7df8b
DM
3265 "type" : "integer",
3266 "typetext" : "integer (1- N)"
56122987 3267 }
44660702 3268 }
56122987 3269 },
7aacca6f
DM
3270 "permissions" : {
3271 "user" : "all"
44660702
DM
3272 },
3273 "returns" : {
3274 "description" : "The next free VMID.",
3275 "type" : "integer"
7aacca6f 3276 }
56122987
DM
3277 }
3278 },
7aacca6f 3279 "leaf" : 1,
44660702
DM
3280 "path" : "/cluster/nextid",
3281 "text" : "nextid"
56122987
DM
3282 }
3283 ],
44660702
DM
3284 "info" : {
3285 "GET" : {
3286 "description" : "Cluster index.",
3287 "method" : "GET",
3288 "name" : "index",
3289 "parameters" : {
3290 "additionalProperties" : 0
3291 },
3292 "permissions" : {
3293 "user" : "all"
3294 },
3295 "returns" : {
3296 "items" : {
3297 "properties" : {},
3298 "type" : "object"
3299 },
3300 "links" : [
3301 {
3302 "href" : "{name}",
3303 "rel" : "child"
3304 }
3305 ],
3306 "type" : "array"
3307 }
3308 }
3309 },
3310 "leaf" : 0,
3311 "path" : "/cluster",
7aacca6f 3312 "text" : "cluster"
56122987
DM
3313 },
3314 {
56122987
DM
3315 "children" : [
3316 {
7aacca6f
DM
3317 "children" : [
3318 {
3319 "children" : [
3320 {
56122987
DM
3321 "children" : [
3322 {
56122987
DM
3323 "children" : [
3324 {
3325 "children" : [
3326 {
56122987
DM
3327 "info" : {
3328 "DELETE" : {
44660702 3329 "description" : "Delete rule.",
7aacca6f 3330 "method" : "DELETE",
44660702 3331 "name" : "delete_rule",
56122987 3332 "parameters" : {
44660702 3333 "additionalProperties" : 0,
56122987 3334 "properties" : {
44660702
DM
3335 "digest" : {
3336 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3337 "maxLength" : 40,
3338 "optional" : 1,
3339 "type" : "string"
3340 },
56122987 3341 "node" : {
7aacca6f 3342 "description" : "The cluster node name.",
44660702
DM
3343 "format" : "pve-node",
3344 "type" : "string"
7aacca6f 3345 },
56122987 3346 "pos" : {
7aacca6f 3347 "description" : "Update rule at position <pos>.",
44660702 3348 "minimum" : 0,
56122987 3349 "optional" : 1,
4bd7df8b
DM
3350 "type" : "integer",
3351 "typetext" : "integer (0- N)"
44660702
DM
3352 },
3353 "vmid" : {
3354 "description" : "The (unique) ID of the VM.",
3355 "format" : "pve-vmid",
3356 "minimum" : 1,
4bd7df8b
DM
3357 "type" : "integer",
3358 "typetext" : "integer (1- N)"
56122987 3359 }
44660702 3360 }
7aacca6f 3361 },
56122987
DM
3362 "permissions" : {
3363 "check" : [
3364 "perm",
3365 "/vms/{vmid}",
3366 [
3367 "VM.Config.Network"
3368 ]
3369 ]
3370 },
44660702
DM
3371 "protected" : 1,
3372 "proxyto" : null,
56122987
DM
3373 "returns" : {
3374 "type" : "null"
44660702
DM
3375 }
3376 },
3377 "GET" : {
3378 "description" : "Get single rule data.",
3379 "method" : "GET",
3380 "name" : "get_rule",
3381 "parameters" : {
3382 "additionalProperties" : 0,
3383 "properties" : {
3384 "node" : {
3385 "description" : "The cluster node name.",
3386 "format" : "pve-node",
3387 "type" : "string"
3388 },
3389 "pos" : {
3390 "description" : "Update rule at position <pos>.",
3391 "minimum" : 0,
3392 "optional" : 1,
4bd7df8b
DM
3393 "type" : "integer",
3394 "typetext" : "integer (0- N)"
44660702
DM
3395 },
3396 "vmid" : {
3397 "description" : "The (unique) ID of the VM.",
3398 "format" : "pve-vmid",
3399 "minimum" : 1,
4bd7df8b
DM
3400 "type" : "integer",
3401 "typetext" : "integer (1- N)"
44660702
DM
3402 }
3403 }
56122987 3404 },
56122987
DM
3405 "permissions" : {
3406 "check" : [
3407 "perm",
3408 "/vms/{vmid}",
3409 [
44660702 3410 "VM.Audit"
56122987
DM
3411 ]
3412 ]
3413 },
56122987 3414 "proxyto" : null,
44660702
DM
3415 "returns" : {
3416 "properties" : {
3417 "pos" : {
3418 "type" : "integer"
3419 }
3420 },
3421 "type" : "object"
3422 }
3423 },
3424 "PUT" : {
7aacca6f
DM
3425 "description" : "Modify rule data.",
3426 "method" : "PUT",
44660702 3427 "name" : "update_rule",
56122987 3428 "parameters" : {
44660702 3429 "additionalProperties" : 0,
56122987 3430 "properties" : {
44660702
DM
3431 "action" : {
3432 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3433 "maxLength" : 20,
3434 "minLength" : 2,
56122987 3435 "optional" : 1,
44660702 3436 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
3437 "type" : "string"
3438 },
7aacca6f
DM
3439 "comment" : {
3440 "optional" : 1,
3441 "type" : "string"
3442 },
3443 "delete" : {
7aacca6f 3444 "description" : "A list of settings you want to delete.",
44660702
DM
3445 "format" : "pve-configid-list",
3446 "optional" : 1,
3447 "type" : "string"
7aacca6f
DM
3448 },
3449 "dest" : {
44660702 3450 "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.",
7aacca6f 3451 "format" : "pve-fw-addr-spec",
56122987 3452 "optional" : 1,
44660702 3453 "type" : "string"
56122987 3454 },
7aacca6f 3455 "digest" : {
44660702 3456 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 3457 "maxLength" : 40,
56122987 3458 "optional" : 1,
44660702
DM
3459 "type" : "string"
3460 },
3461 "dport" : {
3462 "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.",
3463 "format" : "pve-fw-dport-spec",
3464 "optional" : 1,
3465 "type" : "string"
56122987 3466 },
7aacca6f 3467 "enable" : {
44660702 3468 "minimum" : 0,
56122987 3469 "optional" : 1,
4bd7df8b
DM
3470 "type" : "integer",
3471 "typetext" : "integer (0- N)"
7aacca6f 3472 },
44660702
DM
3473 "iface" : {
3474 "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.",
3475 "format" : "pve-iface",
3476 "maxLength" : 20,
7aacca6f 3477 "minLength" : 2,
56122987 3478 "optional" : 1,
44660702 3479 "type" : "string"
56122987 3480 },
44660702
DM
3481 "macro" : {
3482 "maxLength" : 128,
56122987 3483 "optional" : 1,
44660702 3484 "type" : "string"
56122987 3485 },
44660702
DM
3486 "moveto" : {
3487 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
3488 "minimum" : 0,
56122987 3489 "optional" : 1,
4bd7df8b
DM
3490 "type" : "integer",
3491 "typetext" : "integer (0- N)"
56122987 3492 },
44660702
DM
3493 "node" : {
3494 "description" : "The cluster node name.",
3495 "format" : "pve-node",
3496 "type" : "string"
3497 },
3498 "pos" : {
3499 "description" : "Update rule at position <pos>.",
3500 "minimum" : 0,
3501 "optional" : 1,
4bd7df8b
DM
3502 "type" : "integer",
3503 "typetext" : "integer (0- N)"
56122987 3504 },
44660702
DM
3505 "proto" : {
3506 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3507 "format" : "pve-fw-protocol-spec",
3508 "optional" : 1,
3509 "type" : "string"
7aacca6f 3510 },
44660702
DM
3511 "source" : {
3512 "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.",
3513 "format" : "pve-fw-addr-spec",
56122987 3514 "optional" : 1,
7aacca6f 3515 "type" : "string"
56122987
DM
3516 },
3517 "sport" : {
3518 "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.",
44660702
DM
3519 "format" : "pve-fw-sport-spec",
3520 "optional" : 1,
3521 "type" : "string"
3522 },
3523 "type" : {
3524 "enum" : [
3525 "in",
3526 "out",
3527 "group"
3528 ],
56122987 3529 "optional" : 1,
56122987 3530 "type" : "string"
44660702
DM
3531 },
3532 "vmid" : {
3533 "description" : "The (unique) ID of the VM.",
3534 "format" : "pve-vmid",
3535 "minimum" : 1,
4bd7df8b
DM
3536 "type" : "integer",
3537 "typetext" : "integer (1- N)"
56122987 3538 }
44660702 3539 }
56122987 3540 },
56122987
DM
3541 "permissions" : {
3542 "check" : [
3543 "perm",
3544 "/vms/{vmid}",
3545 [
44660702 3546 "VM.Config.Network"
56122987
DM
3547 ]
3548 ]
7aacca6f 3549 },
44660702 3550 "protected" : 1,
7aacca6f 3551 "proxyto" : null,
7aacca6f 3552 "returns" : {
44660702
DM
3553 "type" : "null"
3554 }
56122987 3555 }
7aacca6f 3556 },
44660702 3557 "leaf" : 1,
7aacca6f 3558 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}",
44660702 3559 "text" : "{pos}"
56122987
DM
3560 }
3561 ],
56122987 3562 "info" : {
44660702
DM
3563 "GET" : {
3564 "description" : "List rules.",
3565 "method" : "GET",
3566 "name" : "get_rules",
3567 "parameters" : {
3568 "additionalProperties" : 0,
3569 "properties" : {
3570 "node" : {
3571 "description" : "The cluster node name.",
3572 "format" : "pve-node",
3573 "type" : "string"
3574 },
3575 "vmid" : {
3576 "description" : "The (unique) ID of the VM.",
3577 "format" : "pve-vmid",
3578 "minimum" : 1,
4bd7df8b
DM
3579 "type" : "integer",
3580 "typetext" : "integer (1- N)"
44660702
DM
3581 }
3582 }
56122987 3583 },
56122987
DM
3584 "permissions" : {
3585 "check" : [
3586 "perm",
3587 "/vms/{vmid}",
3588 [
44660702 3589 "VM.Audit"
56122987
DM
3590 ]
3591 ]
7aacca6f 3592 },
44660702
DM
3593 "proxyto" : null,
3594 "returns" : {
3595 "items" : {
3596 "properties" : {
3597 "pos" : {
3598 "type" : "integer"
3599 }
3600 },
3601 "type" : "object"
3602 },
3603 "links" : [
3604 {
3605 "href" : "{pos}",
3606 "rel" : "child"
3607 }
3608 ],
3609 "type" : "array"
3610 }
3611 },
3612 "POST" : {
3613 "description" : "Create new rule.",
7aacca6f 3614 "method" : "POST",
44660702 3615 "name" : "create_rule",
56122987 3616 "parameters" : {
44660702 3617 "additionalProperties" : 0,
56122987 3618 "properties" : {
44660702
DM
3619 "action" : {
3620 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3621 "maxLength" : 20,
3622 "minLength" : 2,
3623 "optional" : 0,
3624 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3625 "type" : "string"
56122987 3626 },
44660702 3627 "comment" : {
56122987 3628 "optional" : 1,
56122987
DM
3629 "type" : "string"
3630 },
44660702
DM
3631 "dest" : {
3632 "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.",
3633 "format" : "pve-fw-addr-spec",
3634 "optional" : 1,
3635 "type" : "string"
56122987 3636 },
44660702
DM
3637 "digest" : {
3638 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3639 "maxLength" : 40,
56122987 3640 "optional" : 1,
44660702 3641 "type" : "string"
56122987 3642 },
7aacca6f
DM
3643 "dport" : {
3644 "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.",
44660702 3645 "format" : "pve-fw-dport-spec",
7aacca6f 3646 "optional" : 1,
44660702 3647 "type" : "string"
56122987
DM
3648 },
3649 "enable" : {
3650 "minimum" : 0,
44660702 3651 "optional" : 1,
4bd7df8b
DM
3652 "type" : "integer",
3653 "typetext" : "integer (0- N)"
56122987 3654 },
44660702
DM
3655 "iface" : {
3656 "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.",
3657 "format" : "pve-iface",
3658 "maxLength" : 20,
7aacca6f 3659 "minLength" : 2,
44660702
DM
3660 "optional" : 1,
3661 "type" : "string"
56122987 3662 },
44660702
DM
3663 "macro" : {
3664 "maxLength" : 128,
56122987 3665 "optional" : 1,
44660702 3666 "type" : "string"
7aacca6f 3667 },
44660702
DM
3668 "node" : {
3669 "description" : "The cluster node name.",
3670 "format" : "pve-node",
3671 "type" : "string"
3672 },
3673 "pos" : {
3674 "description" : "Update rule at position <pos>.",
3675 "minimum" : 0,
3676 "optional" : 1,
4bd7df8b
DM
3677 "type" : "integer",
3678 "typetext" : "integer (0- N)"
44660702
DM
3679 },
3680 "proto" : {
3681 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3682 "format" : "pve-fw-protocol-spec",
7aacca6f 3683 "optional" : 1,
56122987 3684 "type" : "string"
7aacca6f
DM
3685 },
3686 "source" : {
3687 "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.",
44660702 3688 "format" : "pve-fw-addr-spec",
7aacca6f 3689 "optional" : 1,
44660702 3690 "type" : "string"
7aacca6f 3691 },
44660702
DM
3692 "sport" : {
3693 "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.",
3694 "format" : "pve-fw-sport-spec",
7aacca6f 3695 "optional" : 1,
44660702 3696 "type" : "string"
7aacca6f 3697 },
44660702
DM
3698 "type" : {
3699 "enum" : [
3700 "in",
3701 "out",
3702 "group"
3703 ],
3704 "optional" : 0,
3705 "type" : "string"
7aacca6f 3706 },
7aacca6f 3707 "vmid" : {
44660702 3708 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
3709 "format" : "pve-vmid",
3710 "minimum" : 1,
4bd7df8b
DM
3711 "type" : "integer",
3712 "typetext" : "integer (1- N)"
7aacca6f
DM
3713 }
3714 }
3715 },
56122987
DM
3716 "permissions" : {
3717 "check" : [
3718 "perm",
3719 "/vms/{vmid}",
3720 [
44660702 3721 "VM.Config.Network"
56122987
DM
3722 ]
3723 ]
3724 },
44660702
DM
3725 "protected" : 1,
3726 "proxyto" : null,
56122987 3727 "returns" : {
44660702
DM
3728 "type" : "null"
3729 }
56122987
DM
3730 }
3731 },
44660702 3732 "leaf" : 0,
7aacca6f 3733 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules",
44660702 3734 "text" : "rules"
56122987
DM
3735 },
3736 {
3737 "children" : [
3738 {
56122987 3739 "info" : {
44660702
DM
3740 "DELETE" : {
3741 "description" : "Remove IP or Network alias.",
3742 "method" : "DELETE",
3743 "name" : "remove_alias",
56122987 3744 "parameters" : {
44660702 3745 "additionalProperties" : 0,
56122987 3746 "properties" : {
44660702
DM
3747 "digest" : {
3748 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3749 "maxLength" : 40,
3750 "optional" : 1,
3751 "type" : "string"
56122987
DM
3752 },
3753 "name" : {
56122987 3754 "description" : "Alias name.",
44660702 3755 "maxLength" : 64,
7aacca6f 3756 "minLength" : 2,
44660702 3757 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
3758 "type" : "string"
3759 },
7aacca6f 3760 "node" : {
44660702 3761 "description" : "The cluster node name.",
7aacca6f 3762 "format" : "pve-node",
44660702
DM
3763 "type" : "string"
3764 },
3765 "vmid" : {
3766 "description" : "The (unique) ID of the VM.",
3767 "format" : "pve-vmid",
3768 "minimum" : 1,
4bd7df8b
DM
3769 "type" : "integer",
3770 "typetext" : "integer (1- N)"
56122987 3771 }
44660702 3772 }
56122987 3773 },
7aacca6f
DM
3774 "permissions" : {
3775 "check" : [
3776 "perm",
3777 "/vms/{vmid}",
3778 [
3779 "VM.Config.Network"
3780 ]
3781 ]
56122987 3782 },
44660702
DM
3783 "protected" : 1,
3784 "returns" : {
3785 "type" : "null"
3786 }
3787 },
3788 "GET" : {
3789 "description" : "Read alias.",
3790 "method" : "GET",
3791 "name" : "read_alias",
56122987 3792 "parameters" : {
44660702 3793 "additionalProperties" : 0,
56122987 3794 "properties" : {
56122987 3795 "name" : {
7aacca6f 3796 "description" : "Alias name.",
44660702 3797 "maxLength" : 64,
56122987 3798 "minLength" : 2,
44660702 3799 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 3800 "type" : "string"
7aacca6f
DM
3801 },
3802 "node" : {
3803 "description" : "The cluster node name.",
44660702
DM
3804 "format" : "pve-node",
3805 "type" : "string"
3806 },
3807 "vmid" : {
3808 "description" : "The (unique) ID of the VM.",
3809 "format" : "pve-vmid",
3810 "minimum" : 1,
4bd7df8b
DM
3811 "type" : "integer",
3812 "typetext" : "integer (1- N)"
56122987 3813 }
44660702 3814 }
56122987 3815 },
44660702
DM
3816 "permissions" : {
3817 "check" : [
3818 "perm",
3819 "/vms/{vmid}",
3820 [
3821 "VM.Audit"
3822 ]
3823 ]
56122987 3824 },
44660702
DM
3825 "returns" : {
3826 "type" : "object"
3827 }
7aacca6f 3828 },
44660702
DM
3829 "PUT" : {
3830 "description" : "Update IP or Network alias.",
3831 "method" : "PUT",
3832 "name" : "update_alias",
56122987
DM
3833 "parameters" : {
3834 "additionalProperties" : 0,
3835 "properties" : {
44660702
DM
3836 "cidr" : {
3837 "description" : "Network/IP specification in CIDR format.",
3838 "format" : "IPorCIDR",
3839 "type" : "string"
3840 },
3841 "comment" : {
3842 "optional" : 1,
3843 "type" : "string"
56122987
DM
3844 },
3845 "digest" : {
44660702 3846 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987
DM
3847 "maxLength" : 40,
3848 "optional" : 1,
44660702 3849 "type" : "string"
56122987 3850 },
7aacca6f 3851 "name" : {
44660702 3852 "description" : "Alias name.",
56122987
DM
3853 "maxLength" : 64,
3854 "minLength" : 2,
3855 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3856 "type" : "string"
7aacca6f
DM
3857 },
3858 "node" : {
7aacca6f 3859 "description" : "The cluster node name.",
44660702
DM
3860 "format" : "pve-node",
3861 "type" : "string"
3862 },
3863 "rename" : {
3864 "description" : "Rename an existing alias.",
3865 "maxLength" : 64,
3866 "minLength" : 2,
3867 "optional" : 1,
3868 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3869 "type" : "string"
3870 },
3871 "vmid" : {
3872 "description" : "The (unique) ID of the VM.",
3873 "format" : "pve-vmid",
3874 "minimum" : 1,
4bd7df8b
DM
3875 "type" : "integer",
3876 "typetext" : "integer (1- N)"
56122987
DM
3877 }
3878 }
3879 },
7aacca6f
DM
3880 "permissions" : {
3881 "check" : [
3882 "perm",
3883 "/vms/{vmid}",
3884 [
3885 "VM.Config.Network"
3886 ]
3887 ]
3888 },
3889 "protected" : 1,
7aacca6f
DM
3890 "returns" : {
3891 "type" : "null"
44660702 3892 }
56122987
DM
3893 }
3894 },
44660702 3895 "leaf" : 1,
7aacca6f 3896 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}",
44660702 3897 "text" : "{name}"
56122987
DM
3898 }
3899 ],
3900 "info" : {
44660702
DM
3901 "GET" : {
3902 "description" : "List aliases",
3903 "method" : "GET",
3904 "name" : "get_aliases",
56122987 3905 "parameters" : {
44660702 3906 "additionalProperties" : 0,
56122987 3907 "properties" : {
7aacca6f 3908 "node" : {
7aacca6f 3909 "description" : "The cluster node name.",
44660702 3910 "format" : "pve-node",
7aacca6f 3911 "type" : "string"
56122987 3912 },
44660702
DM
3913 "vmid" : {
3914 "description" : "The (unique) ID of the VM.",
3915 "format" : "pve-vmid",
3916 "minimum" : 1,
4bd7df8b
DM
3917 "type" : "integer",
3918 "typetext" : "integer (1- N)"
56122987 3919 }
44660702 3920 }
56122987 3921 },
56122987
DM
3922 "permissions" : {
3923 "check" : [
3924 "perm",
3925 "/vms/{vmid}",
3926 [
44660702 3927 "VM.Audit"
56122987
DM
3928 ]
3929 ]
3930 },
56122987
DM
3931 "returns" : {
3932 "items" : {
3933 "properties" : {
44660702 3934 "cidr" : {
56122987
DM
3935 "type" : "string"
3936 },
44660702
DM
3937 "comment" : {
3938 "optional" : 1,
7aacca6f 3939 "type" : "string"
56122987
DM
3940 },
3941 "digest" : {
56122987 3942 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 3943 "maxLength" : 40,
56122987
DM
3944 "optional" : 0,
3945 "type" : "string"
3946 },
44660702 3947 "name" : {
56122987
DM
3948 "type" : "string"
3949 }
44660702
DM
3950 },
3951 "type" : "object"
56122987 3952 },
56122987
DM
3953 "links" : [
3954 {
3955 "href" : "{name}",
3956 "rel" : "child"
3957 }
44660702
DM
3958 ],
3959 "type" : "array"
3960 }
3961 },
3962 "POST" : {
3963 "description" : "Create IP or Network Alias.",
3964 "method" : "POST",
3965 "name" : "create_alias",
56122987 3966 "parameters" : {
7aacca6f 3967 "additionalProperties" : 0,
56122987 3968 "properties" : {
44660702
DM
3969 "cidr" : {
3970 "description" : "Network/IP specification in CIDR format.",
3971 "format" : "IPorCIDR",
3972 "type" : "string"
3973 },
3974 "comment" : {
3975 "optional" : 1,
3976 "type" : "string"
3977 },
3978 "name" : {
3979 "description" : "Alias name.",
3980 "maxLength" : 64,
3981 "minLength" : 2,
3982 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3983 "type" : "string"
56122987
DM
3984 },
3985 "node" : {
7aacca6f 3986 "description" : "The cluster node name.",
44660702 3987 "format" : "pve-node",
56122987 3988 "type" : "string"
44660702
DM
3989 },
3990 "vmid" : {
3991 "description" : "The (unique) ID of the VM.",
3992 "format" : "pve-vmid",
3993 "minimum" : 1,
4bd7df8b
DM
3994 "type" : "integer",
3995 "typetext" : "integer (1- N)"
56122987 3996 }
7aacca6f 3997 }
56122987 3998 },
44660702
DM
3999 "permissions" : {
4000 "check" : [
4001 "perm",
4002 "/vms/{vmid}",
4003 [
4004 "VM.Config.Network"
4005 ]
4006 ]
4007 },
4008 "protected" : 1,
4009 "returns" : {
4010 "type" : "null"
4011 }
56122987 4012 }
44660702
DM
4013 },
4014 "leaf" : 0,
4015 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases",
4016 "text" : "aliases"
56122987
DM
4017 },
4018 {
56122987
DM
4019 "children" : [
4020 {
7aacca6f
DM
4021 "children" : [
4022 {
4023 "info" : {
4024 "DELETE" : {
44660702 4025 "description" : "Remove IP or Network from IPSet.",
7aacca6f 4026 "method" : "DELETE",
44660702 4027 "name" : "remove_ip",
7aacca6f 4028 "parameters" : {
44660702 4029 "additionalProperties" : 0,
7aacca6f 4030 "properties" : {
44660702
DM
4031 "cidr" : {
4032 "description" : "Network/IP specification in CIDR format.",
4033 "format" : "IPorCIDRorAlias",
4034 "type" : "string"
4035 },
4036 "digest" : {
4037 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4038 "maxLength" : 40,
4039 "optional" : 1,
4040 "type" : "string"
4041 },
7aacca6f 4042 "name" : {
7aacca6f 4043 "description" : "IP set name.",
44660702
DM
4044 "maxLength" : 64,
4045 "minLength" : 2,
7aacca6f 4046 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 4047 "type" : "string"
7aacca6f
DM
4048 },
4049 "node" : {
4050 "description" : "The cluster node name.",
44660702
DM
4051 "format" : "pve-node",
4052 "type" : "string"
7aacca6f
DM
4053 },
4054 "vmid" : {
44660702 4055 "description" : "The (unique) ID of the VM.",
7aacca6f 4056 "format" : "pve-vmid",
44660702 4057 "minimum" : 1,
4bd7df8b
DM
4058 "type" : "integer",
4059 "typetext" : "integer (1- N)"
7aacca6f 4060 }
44660702 4061 }
7aacca6f 4062 },
7aacca6f
DM
4063 "permissions" : {
4064 "check" : [
4065 "perm",
4066 "/vms/{vmid}",
4067 [
4068 "VM.Config.Network"
4069 ]
4070 ]
4071 },
4072 "protected" : 1,
44660702
DM
4073 "returns" : {
4074 "type" : "null"
4075 }
56122987 4076 },
44660702
DM
4077 "GET" : {
4078 "description" : "Read IP or Network settings from IPSet.",
4079 "method" : "GET",
4080 "name" : "read_ip",
7aacca6f 4081 "parameters" : {
44660702 4082 "additionalProperties" : 0,
7aacca6f 4083 "properties" : {
7aacca6f 4084 "cidr" : {
44660702 4085 "description" : "Network/IP specification in CIDR format.",
7aacca6f 4086 "format" : "IPorCIDRorAlias",
44660702 4087 "type" : "string"
7aacca6f
DM
4088 },
4089 "name" : {
7aacca6f 4090 "description" : "IP set name.",
44660702 4091 "maxLength" : 64,
7aacca6f 4092 "minLength" : 2,
44660702
DM
4093 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4094 "type" : "string"
7aacca6f 4095 },
44660702
DM
4096 "node" : {
4097 "description" : "The cluster node name.",
4098 "format" : "pve-node",
7aacca6f
DM
4099 "type" : "string"
4100 },
44660702
DM
4101 "vmid" : {
4102 "description" : "The (unique) ID of the VM.",
4103 "format" : "pve-vmid",
4104 "minimum" : 1,
4bd7df8b
DM
4105 "type" : "integer",
4106 "typetext" : "integer (1- N)"
7aacca6f 4107 }
44660702 4108 }
7aacca6f 4109 },
44660702
DM
4110 "permissions" : {
4111 "check" : [
4112 "perm",
4113 "/vms/{vmid}",
4114 [
4115 "VM.Audit"
4116 ]
4117 ]
4118 },
4119 "protected" : 1,
7aacca6f 4120 "returns" : {
44660702 4121 "type" : "object"
7aacca6f 4122 }
56122987 4123 },
44660702
DM
4124 "PUT" : {
4125 "description" : "Update IP or Network settings",
4126 "method" : "PUT",
4127 "name" : "update_ip",
7aacca6f
DM
4128 "parameters" : {
4129 "additionalProperties" : 0,
4130 "properties" : {
44660702
DM
4131 "cidr" : {
4132 "description" : "Network/IP specification in CIDR format.",
4133 "format" : "IPorCIDRorAlias",
4134 "type" : "string"
4135 },
4136 "comment" : {
4137 "optional" : 1,
4138 "type" : "string"
4139 },
4140 "digest" : {
4141 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4142 "maxLength" : 40,
4143 "optional" : 1,
4144 "type" : "string"
4145 },
7aacca6f 4146 "name" : {
7aacca6f 4147 "description" : "IP set name.",
44660702 4148 "maxLength" : 64,
7aacca6f 4149 "minLength" : 2,
44660702
DM
4150 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4151 "type" : "string"
7aacca6f
DM
4152 },
4153 "node" : {
7aacca6f 4154 "description" : "The cluster node name.",
44660702 4155 "format" : "pve-node",
7aacca6f
DM
4156 "type" : "string"
4157 },
44660702
DM
4158 "nomatch" : {
4159 "optional" : 1,
4160 "type" : "boolean"
7aacca6f
DM
4161 },
4162 "vmid" : {
4163 "description" : "The (unique) ID of the VM.",
44660702 4164 "format" : "pve-vmid",
7aacca6f 4165 "minimum" : 1,
4bd7df8b
DM
4166 "type" : "integer",
4167 "typetext" : "integer (1- N)"
7aacca6f
DM
4168 }
4169 }
4170 },
4171 "permissions" : {
4172 "check" : [
4173 "perm",
4174 "/vms/{vmid}",
4175 [
44660702 4176 "VM.Config.Network"
7aacca6f
DM
4177 ]
4178 ]
4179 },
7aacca6f 4180 "protected" : 1,
7aacca6f 4181 "returns" : {
44660702 4182 "type" : "null"
7aacca6f 4183 }
56122987 4184 }
7aacca6f 4185 },
7aacca6f 4186 "leaf" : 1,
44660702
DM
4187 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}",
4188 "text" : "{cidr}"
7aacca6f 4189 }
44660702
DM
4190 ],
4191 "info" : {
4192 "DELETE" : {
4193 "description" : "Delete IPSet",
4194 "method" : "DELETE",
4195 "name" : "delete_ipset",
4196 "parameters" : {
4197 "additionalProperties" : 0,
4198 "properties" : {
4199 "name" : {
4200 "description" : "IP set name.",
4201 "maxLength" : 64,
4202 "minLength" : 2,
4203 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4204 "type" : "string"
4205 },
4206 "node" : {
4207 "description" : "The cluster node name.",
4208 "format" : "pve-node",
4209 "type" : "string"
4210 },
4211 "vmid" : {
4212 "description" : "The (unique) ID of the VM.",
4213 "format" : "pve-vmid",
4214 "minimum" : 1,
4bd7df8b
DM
4215 "type" : "integer",
4216 "typetext" : "integer (1- N)"
44660702
DM
4217 }
4218 }
7aacca6f 4219 },
44660702
DM
4220 "permissions" : {
4221 "check" : [
4222 "perm",
4223 "/vms/{vmid}",
4224 [
4225 "VM.Config.Network"
4226 ]
4227 ]
7aacca6f 4228 },
44660702
DM
4229 "protected" : 1,
4230 "returns" : {
4231 "type" : "null"
4232 }
4233 },
4234 "GET" : {
4235 "description" : "List IPSet content",
4236 "method" : "GET",
4237 "name" : "get_ipset",
4238 "parameters" : {
4239 "additionalProperties" : 0,
4240 "properties" : {
4241 "name" : {
4242 "description" : "IP set name.",
4243 "maxLength" : 64,
4244 "minLength" : 2,
4245 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4246 "type" : "string"
4247 },
4248 "node" : {
4249 "description" : "The cluster node name.",
4250 "format" : "pve-node",
4251 "type" : "string"
4252 },
4253 "vmid" : {
4254 "description" : "The (unique) ID of the VM.",
4255 "format" : "pve-vmid",
4256 "minimum" : 1,
4bd7df8b
DM
4257 "type" : "integer",
4258 "typetext" : "integer (1- N)"
44660702
DM
4259 }
4260 }
7aacca6f 4261 },
44660702
DM
4262 "permissions" : {
4263 "check" : [
4264 "perm",
4265 "/vms/{vmid}",
4266 [
4267 "VM.Audit"
4268 ]
4269 ]
7aacca6f 4270 },
44660702
DM
4271 "returns" : {
4272 "items" : {
4273 "properties" : {
4274 "cidr" : {
4275 "type" : "string"
4276 },
4277 "comment" : {
4278 "optional" : 1,
4279 "type" : "string"
4280 },
4281 "digest" : {
4282 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4283 "maxLength" : 40,
4284 "optional" : 0,
4285 "type" : "string"
4286 },
4287 "nomatch" : {
4288 "optional" : 1,
4289 "type" : "boolean"
4290 }
4291 },
4292 "type" : "object"
4293 },
4294 "links" : [
4295 {
4296 "href" : "{cidr}",
4297 "rel" : "child"
4298 }
4299 ],
4300 "type" : "array"
56122987
DM
4301 }
4302 },
44660702
DM
4303 "POST" : {
4304 "description" : "Add IP or Network to IPSet.",
4305 "method" : "POST",
4306 "name" : "create_ip",
4307 "parameters" : {
4308 "additionalProperties" : 0,
4309 "properties" : {
4310 "cidr" : {
4311 "description" : "Network/IP specification in CIDR format.",
4312 "format" : "IPorCIDRorAlias",
4313 "type" : "string"
4314 },
4315 "comment" : {
4316 "optional" : 1,
4317 "type" : "string"
4318 },
4319 "name" : {
4320 "description" : "IP set name.",
4321 "maxLength" : 64,
4322 "minLength" : 2,
4323 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4324 "type" : "string"
4325 },
4326 "node" : {
4327 "description" : "The cluster node name.",
4328 "format" : "pve-node",
4329 "type" : "string"
4330 },
4331 "nomatch" : {
4332 "optional" : 1,
4333 "type" : "boolean"
4334 },
4335 "vmid" : {
4336 "description" : "The (unique) ID of the VM.",
4337 "format" : "pve-vmid",
4338 "minimum" : 1,
4bd7df8b
DM
4339 "type" : "integer",
4340 "typetext" : "integer (1- N)"
44660702
DM
4341 }
4342 }
4343 },
4344 "permissions" : {
4345 "check" : [
4346 "perm",
4347 "/vms/{vmid}",
4348 [
4349 "VM.Config.Network"
4350 ]
4351 ]
4352 },
4353 "protected" : 1,
4354 "returns" : {
4355 "type" : "null"
4356 }
4357 }
4358 },
4359 "leaf" : 0,
4360 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}",
4361 "text" : "{name}"
4362 }
4363 ],
4364 "info" : {
4365 "GET" : {
4366 "description" : "List IPSets",
4367 "method" : "GET",
4368 "name" : "ipset_index",
4369 "parameters" : {
4370 "additionalProperties" : 0,
4371 "properties" : {
4372 "node" : {
4373 "description" : "The cluster node name.",
4374 "format" : "pve-node",
4375 "type" : "string"
4376 },
4377 "vmid" : {
4378 "description" : "The (unique) ID of the VM.",
4379 "format" : "pve-vmid",
4380 "minimum" : 1,
4bd7df8b
DM
4381 "type" : "integer",
4382 "typetext" : "integer (1- N)"
44660702
DM
4383 }
4384 }
56122987
DM
4385 },
4386 "permissions" : {
4387 "check" : [
4388 "perm",
4389 "/vms/{vmid}",
4390 [
44660702 4391 "VM.Audit"
56122987
DM
4392 ]
4393 ]
4394 },
7aacca6f 4395 "returns" : {
7aacca6f
DM
4396 "items" : {
4397 "properties" : {
7aacca6f
DM
4398 "comment" : {
4399 "optional" : 1,
4400 "type" : "string"
4401 },
4402 "digest" : {
7aacca6f 4403 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
4404 "maxLength" : 40,
4405 "optional" : 0,
4406 "type" : "string"
4407 },
4408 "name" : {
4409 "description" : "IP set name.",
4410 "maxLength" : 64,
4411 "minLength" : 2,
4412 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4413 "type" : "string"
7aacca6f
DM
4414 }
4415 },
4416 "type" : "object"
4417 },
4418 "links" : [
4419 {
44660702
DM
4420 "href" : "{name}",
4421 "rel" : "child"
7aacca6f 4422 }
44660702
DM
4423 ],
4424 "type" : "array"
4425 }
4426 },
4427 "POST" : {
4428 "description" : "Create new IPSet",
4429 "method" : "POST",
4430 "name" : "create_ipset",
56122987
DM
4431 "parameters" : {
4432 "additionalProperties" : 0,
4433 "properties" : {
44660702
DM
4434 "comment" : {
4435 "optional" : 1,
4436 "type" : "string"
56122987 4437 },
44660702
DM
4438 "digest" : {
4439 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4440 "maxLength" : 40,
4441 "optional" : 1,
4442 "type" : "string"
4443 },
4444 "name" : {
4445 "description" : "IP set name.",
4446 "maxLength" : 64,
4447 "minLength" : 2,
4448 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4449 "type" : "string"
4450 },
4451 "node" : {
4452 "description" : "The cluster node name.",
4453 "format" : "pve-node",
4454 "type" : "string"
4455 },
4456 "rename" : {
4457 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
4458 "maxLength" : 64,
4459 "minLength" : 2,
4460 "optional" : 1,
4461 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4462 "type" : "string"
4463 },
4464 "vmid" : {
4465 "description" : "The (unique) ID of the VM.",
4466 "format" : "pve-vmid",
4467 "minimum" : 1,
4bd7df8b
DM
4468 "type" : "integer",
4469 "typetext" : "integer (1- N)"
44660702
DM
4470 }
4471 }
4472 },
7aacca6f
DM
4473 "permissions" : {
4474 "check" : [
4475 "perm",
4476 "/vms/{vmid}",
4477 [
4478 "VM.Config.Network"
4479 ]
4480 ]
4481 },
44660702 4482 "protected" : 1,
56122987 4483 "returns" : {
7aacca6f 4484 "type" : "null"
44660702
DM
4485 }
4486 }
4487 },
4488 "leaf" : 0,
4489 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset",
4490 "text" : "ipset"
4491 },
4492 {
4493 "info" : {
4494 "GET" : {
4495 "description" : "Get VM firewall options.",
4496 "method" : "GET",
4497 "name" : "get_options",
7aacca6f
DM
4498 "parameters" : {
4499 "additionalProperties" : 0,
56122987 4500 "properties" : {
7aacca6f
DM
4501 "node" : {
4502 "description" : "The cluster node name.",
44660702
DM
4503 "format" : "pve-node",
4504 "type" : "string"
7aacca6f 4505 },
44660702
DM
4506 "vmid" : {
4507 "description" : "The (unique) ID of the VM.",
4508 "format" : "pve-vmid",
4509 "minimum" : 1,
4bd7df8b
DM
4510 "type" : "integer",
4511 "typetext" : "integer (1- N)"
44660702
DM
4512 }
4513 }
4514 },
4515 "permissions" : {
4516 "check" : [
4517 "perm",
4518 "/vms/{vmid}",
4519 [
4520 "VM.Audit"
4521 ]
4522 ]
4523 },
4524 "proxyto" : "node",
4525 "returns" : {
4526 "properties" : {
4527 "dhcp" : {
4528 "description" : "Enable DHCP.",
56122987 4529 "optional" : 1,
44660702 4530 "type" : "boolean"
56122987 4531 },
44660702
DM
4532 "enable" : {
4533 "description" : "Enable/disable firewall rules.",
7aacca6f 4534 "optional" : 1,
44660702 4535 "type" : "boolean"
56122987 4536 },
44660702
DM
4537 "ipfilter" : {
4538 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
7aacca6f 4539 "optional" : 1,
44660702 4540 "type" : "boolean"
7aacca6f 4541 },
56122987 4542 "log_level_in" : {
7aacca6f 4543 "description" : "Log level for incoming traffic.",
56122987
DM
4544 "enum" : [
4545 "emerg",
4546 "alert",
4547 "crit",
4548 "err",
4549 "warning",
4550 "notice",
4551 "info",
4552 "debug",
4553 "nolog"
4554 ],
56122987
DM
4555 "optional" : 1,
4556 "type" : "string"
4557 },
44660702
DM
4558 "log_level_out" : {
4559 "description" : "Log level for outgoing traffic.",
4560 "enum" : [
4561 "emerg",
4562 "alert",
4563 "crit",
4564 "err",
4565 "warning",
4566 "notice",
4567 "info",
4568 "debug",
4569 "nolog"
4570 ],
4571 "optional" : 1,
4572 "type" : "string"
4573 },
4574 "macfilter" : {
4575 "description" : "Enable/disable MAC address filter.",
56122987 4576 "optional" : 1,
7aacca6f 4577 "type" : "boolean"
56122987
DM
4578 },
4579 "ndp" : {
44660702 4580 "description" : "Enable NDP.",
56122987 4581 "optional" : 1,
44660702 4582 "type" : "boolean"
56122987
DM
4583 },
4584 "policy_in" : {
56122987
DM
4585 "description" : "Input policy.",
4586 "enum" : [
4587 "ACCEPT",
4588 "REJECT",
4589 "DROP"
44660702
DM
4590 ],
4591 "optional" : 1,
4592 "type" : "string"
56122987 4593 },
44660702
DM
4594 "policy_out" : {
4595 "description" : "Output policy.",
4596 "enum" : [
4597 "ACCEPT",
4598 "REJECT",
4599 "DROP"
4600 ],
4601 "optional" : 1,
4602 "type" : "string"
4603 },
4604 "radv" : {
4605 "description" : "Allow sending Router Advertisement.",
4606 "optional" : 1,
4607 "type" : "boolean"
4608 }
4609 },
4610 "type" : "object"
4611 }
4612 },
4613 "PUT" : {
4614 "description" : "Set Firewall options.",
4615 "method" : "PUT",
4616 "name" : "set_options",
4617 "parameters" : {
4618 "additionalProperties" : 0,
4619 "properties" : {
4620 "delete" : {
4621 "description" : "A list of settings you want to delete.",
4622 "format" : "pve-configid-list",
4623 "optional" : 1,
4624 "type" : "string"
4625 },
4626 "dhcp" : {
4627 "description" : "Enable DHCP.",
7aacca6f 4628 "optional" : 1,
44660702 4629 "type" : "boolean"
7aacca6f
DM
4630 },
4631 "digest" : {
4632 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 4633 "maxLength" : 40,
7aacca6f 4634 "optional" : 1,
44660702 4635 "type" : "string"
7aacca6f
DM
4636 },
4637 "enable" : {
4638 "description" : "Enable/disable firewall rules.",
56122987 4639 "optional" : 1,
7aacca6f
DM
4640 "type" : "boolean"
4641 },
44660702
DM
4642 "ipfilter" : {
4643 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
4644 "optional" : 1,
4645 "type" : "boolean"
4646 },
4647 "log_level_in" : {
4648 "description" : "Log level for incoming traffic.",
56122987
DM
4649 "enum" : [
4650 "emerg",
4651 "alert",
4652 "crit",
4653 "err",
4654 "warning",
4655 "notice",
4656 "info",
4657 "debug",
4658 "nolog"
7aacca6f 4659 ],
7aacca6f 4660 "optional" : 1,
44660702 4661 "type" : "string"
7aacca6f 4662 },
44660702
DM
4663 "log_level_out" : {
4664 "description" : "Log level for outgoing traffic.",
56122987
DM
4665 "enum" : [
4666 "emerg",
4667 "alert",
4668 "crit",
4669 "err",
4670 "warning",
4671 "notice",
4672 "info",
4673 "debug",
4674 "nolog"
4675 ],
56122987 4676 "optional" : 1,
44660702 4677 "type" : "string"
56122987
DM
4678 },
4679 "macfilter" : {
56122987 4680 "description" : "Enable/disable MAC address filter.",
7aacca6f
DM
4681 "optional" : 1,
4682 "type" : "boolean"
56122987 4683 },
44660702
DM
4684 "ndp" : {
4685 "description" : "Enable NDP.",
4686 "optional" : 1,
4687 "type" : "boolean"
4688 },
4689 "node" : {
4690 "description" : "The cluster node name.",
4691 "format" : "pve-node",
4692 "type" : "string"
4693 },
56122987 4694 "policy_in" : {
44660702 4695 "description" : "Input policy.",
56122987
DM
4696 "enum" : [
4697 "ACCEPT",
4698 "REJECT",
4699 "DROP"
7aacca6f 4700 ],
56122987 4701 "optional" : 1,
7aacca6f 4702 "type" : "string"
56122987 4703 },
44660702
DM
4704 "policy_out" : {
4705 "description" : "Output policy.",
4706 "enum" : [
4707 "ACCEPT",
4708 "REJECT",
4709 "DROP"
4710 ],
56122987 4711 "optional" : 1,
44660702 4712 "type" : "string"
56122987 4713 },
44660702
DM
4714 "radv" : {
4715 "description" : "Allow sending Router Advertisement.",
56122987 4716 "optional" : 1,
44660702 4717 "type" : "boolean"
7aacca6f
DM
4718 },
4719 "vmid" : {
4720 "description" : "The (unique) ID of the VM.",
44660702 4721 "format" : "pve-vmid",
7aacca6f 4722 "minimum" : 1,
4bd7df8b
DM
4723 "type" : "integer",
4724 "typetext" : "integer (1- N)"
56122987
DM
4725 }
4726 }
4727 },
56122987
DM
4728 "permissions" : {
4729 "check" : [
4730 "perm",
4731 "/vms/{vmid}",
4732 [
44660702 4733 "VM.Config.Network"
56122987
DM
4734 ]
4735 ]
7aacca6f 4736 },
44660702 4737 "protected" : 1,
7aacca6f 4738 "proxyto" : "node",
44660702
DM
4739 "returns" : {
4740 "type" : "null"
4741 }
56122987
DM
4742 }
4743 },
44660702 4744 "leaf" : 1,
7aacca6f 4745 "path" : "/nodes/{node}/qemu/{vmid}/firewall/options",
44660702 4746 "text" : "options"
56122987
DM
4747 },
4748 {
56122987
DM
4749 "info" : {
4750 "GET" : {
44660702
DM
4751 "description" : "Read firewall log",
4752 "method" : "GET",
4753 "name" : "log",
4754 "parameters" : {
4755 "additionalProperties" : 0,
4756 "properties" : {
4757 "limit" : {
4758 "minimum" : 0,
4759 "optional" : 1,
4bd7df8b
DM
4760 "type" : "integer",
4761 "typetext" : "integer (0- N)"
56122987 4762 },
44660702
DM
4763 "node" : {
4764 "description" : "The cluster node name.",
4765 "format" : "pve-node",
4766 "type" : "string"
4767 },
4768 "start" : {
4769 "minimum" : 0,
4770 "optional" : 1,
4bd7df8b
DM
4771 "type" : "integer",
4772 "typetext" : "integer (0- N)"
44660702
DM
4773 },
4774 "vmid" : {
4775 "description" : "The (unique) ID of the VM.",
4776 "format" : "pve-vmid",
4777 "minimum" : 1,
4bd7df8b
DM
4778 "type" : "integer",
4779 "typetext" : "integer (1- N)"
44660702
DM
4780 }
4781 }
7aacca6f 4782 },
7aacca6f
DM
4783 "permissions" : {
4784 "check" : [
4785 "perm",
4786 "/vms/{vmid}",
4787 [
4788 "VM.Console"
4789 ]
4790 ]
56122987 4791 },
7aacca6f 4792 "protected" : 1,
44660702
DM
4793 "proxyto" : "node",
4794 "returns" : {
4795 "items" : {
4796 "properties" : {
4797 "n" : {
4798 "description" : "Line number",
4799 "type" : "integer"
4800 },
4801 "t" : {
4802 "description" : "Line text",
4803 "type" : "string"
4804 }
56122987 4805 },
44660702 4806 "type" : "object"
7aacca6f 4807 },
44660702 4808 "type" : "array"
7aacca6f
DM
4809 }
4810 }
4811 },
44660702 4812 "leaf" : 1,
7aacca6f 4813 "path" : "/nodes/{node}/qemu/{vmid}/firewall/log",
44660702 4814 "text" : "log"
7aacca6f
DM
4815 },
4816 {
7aacca6f
DM
4817 "info" : {
4818 "GET" : {
4819 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
4820 "method" : "GET",
4821 "name" : "refs",
56122987 4822 "parameters" : {
44660702 4823 "additionalProperties" : 0,
56122987
DM
4824 "properties" : {
4825 "node" : {
7aacca6f 4826 "description" : "The cluster node name.",
44660702 4827 "format" : "pve-node",
7aacca6f 4828 "type" : "string"
56122987
DM
4829 },
4830 "type" : {
56122987
DM
4831 "description" : "Only list references of specified type.",
4832 "enum" : [
4833 "alias",
4834 "ipset"
7aacca6f 4835 ],
44660702
DM
4836 "optional" : 1,
4837 "type" : "string"
4838 },
4839 "vmid" : {
4840 "description" : "The (unique) ID of the VM.",
4841 "format" : "pve-vmid",
4842 "minimum" : 1,
4bd7df8b
DM
4843 "type" : "integer",
4844 "typetext" : "integer (1- N)"
56122987 4845 }
44660702
DM
4846 }
4847 },
4848 "permissions" : {
4849 "check" : [
4850 "perm",
4851 "/vms/{vmid}",
4852 [
4853 "VM.Audit"
4854 ]
4855 ]
56122987
DM
4856 },
4857 "returns" : {
56122987
DM
4858 "items" : {
4859 "properties" : {
44660702
DM
4860 "comment" : {
4861 "optional" : 1,
56122987
DM
4862 "type" : "string"
4863 },
4864 "name" : {
4865 "type" : "string"
4866 },
44660702
DM
4867 "type" : {
4868 "enum" : [
4869 "alias",
4870 "ipset"
4871 ],
7aacca6f 4872 "type" : "string"
56122987
DM
4873 }
4874 },
4875 "type" : "object"
7aacca6f
DM
4876 },
4877 "type" : "array"
4878 }
56122987 4879 }
44660702
DM
4880 },
4881 "leaf" : 1,
4882 "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs",
4883 "text" : "refs"
56122987
DM
4884 }
4885 ],
56122987
DM
4886 "info" : {
4887 "GET" : {
44660702 4888 "description" : "Directory index.",
56122987 4889 "method" : "GET",
44660702 4890 "name" : "index",
56122987 4891 "parameters" : {
44660702 4892 "additionalProperties" : 0,
56122987
DM
4893 "properties" : {
4894 "node" : {
4895 "description" : "The cluster node name.",
44660702
DM
4896 "format" : "pve-node",
4897 "type" : "string"
56122987
DM
4898 },
4899 "vmid" : {
44660702 4900 "description" : "The (unique) ID of the VM.",
56122987
DM
4901 "format" : "pve-vmid",
4902 "minimum" : 1,
4bd7df8b
DM
4903 "type" : "integer",
4904 "typetext" : "integer (1- N)"
56122987 4905 }
44660702 4906 }
56122987 4907 },
56122987
DM
4908 "permissions" : {
4909 "user" : "all"
7aacca6f 4910 },
44660702
DM
4911 "returns" : {
4912 "items" : {
4913 "properties" : {},
4914 "type" : "object"
4915 },
4916 "links" : [
4917 {
4918 "href" : "{name}",
4919 "rel" : "child"
4920 }
4921 ],
4922 "type" : "array"
4923 }
56122987 4924 }
44660702
DM
4925 },
4926 "leaf" : 0,
4927 "path" : "/nodes/{node}/qemu/{vmid}/firewall",
4928 "text" : "firewall"
56122987
DM
4929 },
4930 {
56122987
DM
4931 "info" : {
4932 "GET" : {
44660702
DM
4933 "description" : "Read VM RRD statistics (returns PNG)",
4934 "method" : "GET",
7aacca6f 4935 "name" : "rrd",
56122987
DM
4936 "parameters" : {
4937 "additionalProperties" : 0,
4938 "properties" : {
7aacca6f 4939 "cf" : {
44660702 4940 "description" : "The RRD consolidation function",
7aacca6f
DM
4941 "enum" : [
4942 "AVERAGE",
4943 "MAX"
4944 ],
7aacca6f
DM
4945 "optional" : 1,
4946 "type" : "string"
4947 },
44660702
DM
4948 "ds" : {
4949 "description" : "The list of datasources you want to display.",
4950 "format" : "pve-configid-list",
4951 "type" : "string"
56122987
DM
4952 },
4953 "node" : {
44660702 4954 "description" : "The cluster node name.",
56122987 4955 "format" : "pve-node",
44660702 4956 "type" : "string"
56122987
DM
4957 },
4958 "timeframe" : {
44660702 4959 "description" : "Specify the time frame you are interested in.",
56122987
DM
4960 "enum" : [
4961 "hour",
4962 "day",
4963 "week",
4964 "month",
4965 "year"
4966 ],
56122987
DM
4967 "type" : "string"
4968 },
44660702
DM
4969 "vmid" : {
4970 "description" : "The (unique) ID of the VM.",
4971 "format" : "pve-vmid",
4972 "minimum" : 1,
4bd7df8b
DM
4973 "type" : "integer",
4974 "typetext" : "integer (1- N)"
56122987
DM
4975 }
4976 }
4977 },
56122987
DM
4978 "permissions" : {
4979 "check" : [
4980 "perm",
4981 "/vms/{vmid}",
4982 [
4983 "VM.Audit"
4984 ]
4985 ]
4986 },
7aacca6f
DM
4987 "protected" : 1,
4988 "returns" : {
4989 "properties" : {
4990 "filename" : {
4991 "type" : "string"
4992 }
4993 },
4994 "type" : "object"
44660702 4995 }
56122987 4996 }
44660702
DM
4997 },
4998 "leaf" : 1,
4999 "path" : "/nodes/{node}/qemu/{vmid}/rrd",
5000 "text" : "rrd"
56122987
DM
5001 },
5002 {
7aacca6f 5003 "info" : {
56122987 5004 "GET" : {
7aacca6f 5005 "description" : "Read VM RRD statistics",
44660702 5006 "method" : "GET",
56122987 5007 "name" : "rrddata",
56122987 5008 "parameters" : {
44660702 5009 "additionalProperties" : 0,
56122987 5010 "properties" : {
44660702
DM
5011 "cf" : {
5012 "description" : "The RRD consolidation function",
5013 "enum" : [
5014 "AVERAGE",
5015 "MAX"
5016 ],
5017 "optional" : 1,
5018 "type" : "string"
5019 },
56122987 5020 "node" : {
44660702 5021 "description" : "The cluster node name.",
56122987 5022 "format" : "pve-node",
44660702 5023 "type" : "string"
56122987
DM
5024 },
5025 "timeframe" : {
44660702 5026 "description" : "Specify the time frame you are interested in.",
56122987
DM
5027 "enum" : [
5028 "hour",
5029 "day",
5030 "week",
5031 "month",
5032 "year"
7aacca6f 5033 ],
44660702 5034 "type" : "string"
7aacca6f
DM
5035 },
5036 "vmid" : {
7aacca6f
DM
5037 "description" : "The (unique) ID of the VM.",
5038 "format" : "pve-vmid",
44660702 5039 "minimum" : 1,
4bd7df8b
DM
5040 "type" : "integer",
5041 "typetext" : "integer (1- N)"
56122987 5042 }
44660702 5043 }
56122987 5044 },
56122987
DM
5045 "permissions" : {
5046 "check" : [
5047 "perm",
5048 "/vms/{vmid}",
5049 [
5050 "VM.Audit"
5051 ]
5052 ]
5053 },
44660702 5054 "protected" : 1,
7aacca6f 5055 "returns" : {
7aacca6f 5056 "items" : {
44660702
DM
5057 "properties" : {},
5058 "type" : "object"
5059 },
5060 "type" : "array"
7aacca6f 5061 }
56122987
DM
5062 }
5063 },
44660702
DM
5064 "leaf" : 1,
5065 "path" : "/nodes/{node}/qemu/{vmid}/rrddata",
56122987
DM
5066 "text" : "rrddata"
5067 },
5068 {
56122987 5069 "info" : {
44660702
DM
5070 "GET" : {
5071 "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).",
5072 "method" : "GET",
5073 "name" : "vm_config",
5074 "parameters" : {
5075 "additionalProperties" : 0,
5076 "properties" : {
5077 "current" : {
5078 "default" : 0,
5079 "description" : "Get current values (instead of pending values).",
5080 "optional" : 1,
5081 "type" : "boolean"
5082 },
5083 "node" : {
5084 "description" : "The cluster node name.",
5085 "format" : "pve-node",
5086 "type" : "string"
5087 },
5088 "vmid" : {
5089 "description" : "The (unique) ID of the VM.",
5090 "format" : "pve-vmid",
5091 "minimum" : 1,
4bd7df8b
DM
5092 "type" : "integer",
5093 "typetext" : "integer (1- N)"
44660702
DM
5094 }
5095 }
7aacca6f 5096 },
56122987
DM
5097 "permissions" : {
5098 "check" : [
5099 "perm",
5100 "/vms/{vmid}",
5101 [
44660702
DM
5102 "VM.Audit"
5103 ]
56122987
DM
5104 ]
5105 },
56122987 5106 "proxyto" : "node",
44660702
DM
5107 "returns" : {
5108 "properties" : {
5109 "digest" : {
5110 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
5111 "type" : "string"
5112 }
5113 },
5114 "type" : "object"
5115 }
5116 },
5117 "POST" : {
7aacca6f
DM
5118 "description" : "Set virtual machine options (asynchrounous API).",
5119 "method" : "POST",
44660702 5120 "name" : "update_vm_async",
56122987 5121 "parameters" : {
44660702 5122 "additionalProperties" : 0,
56122987 5123 "properties" : {
44660702
DM
5124 "acpi" : {
5125 "default" : 1,
5126 "description" : "Enable/disable ACPI.",
5127 "optional" : 1,
5128 "type" : "boolean"
5129 },
5130 "agent" : {
7aacca6f 5131 "default" : 0,
44660702 5132 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 5133 "optional" : 1,
44660702 5134 "type" : "boolean"
7aacca6f 5135 },
44660702 5136 "args" : {
c2993fe5 5137 "description" : "Arbitrary arguments passed to kvm.",
44660702 5138 "optional" : 1,
c2993fe5
DM
5139 "type" : "string",
5140 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
7aacca6f 5141 },
44660702
DM
5142 "autostart" : {
5143 "default" : 0,
5144 "description" : "Automatic restart after crash (currently ignored).",
56122987 5145 "optional" : 1,
44660702 5146 "type" : "boolean"
56122987 5147 },
44660702
DM
5148 "background_delay" : {
5149 "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.",
5150 "maximum" : 30,
5151 "minimum" : 1,
7aacca6f 5152 "optional" : 1,
4bd7df8b
DM
5153 "type" : "integer",
5154 "typetext" : "integer (1-30)"
56122987 5155 },
44660702
DM
5156 "balloon" : {
5157 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
5158 "minimum" : 0,
7aacca6f 5159 "optional" : 1,
4bd7df8b
DM
5160 "type" : "integer",
5161 "typetext" : "integer (0- N)"
7aacca6f 5162 },
44660702
DM
5163 "bios" : {
5164 "default" : "seabios",
5165 "description" : "Select BIOS implementation.",
5166 "enum" : [
5167 "seabios",
5168 "ovmf"
5169 ],
56122987 5170 "optional" : 1,
44660702 5171 "type" : "string"
7aacca6f 5172 },
44660702
DM
5173 "boot" : {
5174 "default" : "cdn",
5175 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
5176 "optional" : 1,
5177 "pattern" : "[acdn]{1,4}",
5178 "type" : "string"
5179 },
5180 "bootdisk" : {
5181 "description" : "Enable booting from specified disk.",
5182 "format" : "pve-qm-bootdisk",
5183 "optional" : 1,
5184 "pattern" : "(ide|sata|scsi|virtio)\\d+",
5185 "type" : "string"
5186 },
5187 "cdrom" : {
5188 "description" : "This is an alias for option -ide2",
5189 "format" : "pve-qm-drive",
5190 "optional" : 1,
7aacca6f 5191 "type" : "string",
44660702
DM
5192 "typetext" : "volume"
5193 },
5194 "cores" : {
5195 "default" : 1,
5196 "description" : "The number of cores per socket.",
5197 "minimum" : 1,
7aacca6f 5198 "optional" : 1,
4bd7df8b
DM
5199 "type" : "integer",
5200 "typetext" : "integer (1- N)"
7aacca6f 5201 },
44660702
DM
5202 "cpu" : {
5203 "description" : "Emulated CPU type.",
56122987 5204 "format" : {
44660702
DM
5205 "cputype" : {
5206 "default" : "kvm64",
7aacca6f 5207 "default_key" : 1,
44660702 5208 "description" : "Emulated CPU type.",
56122987 5209 "enum" : [
44660702
DM
5210 "486",
5211 "athlon",
f004f5b9
DM
5212 "Broadwell",
5213 "Broadwell-noTSX",
5214 "Conroe",
44660702 5215 "core2duo",
f004f5b9
DM
5216 "coreduo",
5217 "Haswell",
5218 "Haswell-noTSX",
5219 "host",
5220 "IvyBridge",
44660702
DM
5221 "kvm32",
5222 "kvm64",
44660702 5223 "Nehalem",
44660702
DM
5224 "Opteron_G1",
5225 "Opteron_G2",
5226 "Opteron_G3",
5227 "Opteron_G4",
5228 "Opteron_G5",
f004f5b9
DM
5229 "Penryn",
5230 "pentium",
5231 "pentium2",
5232 "pentium3",
5233 "phenom",
5234 "qemu32",
5235 "qemu64",
5236 "SandyBridge",
5237 "Westmere"
56122987 5238 ],
44660702 5239 "format_description" : "cputype",
56122987
DM
5240 "type" : "string"
5241 },
44660702
DM
5242 "hidden" : {
5243 "default" : 0,
5244 "description" : "Do not identify as a KVM virtual machine.",
56122987 5245 "optional" : 1,
44660702
DM
5246 "type" : "boolean"
5247 }
5248 },
5249 "optional" : 1,
4bd7df8b
DM
5250 "type" : "string",
5251 "typetext" : "[cputype=]<cputype> [,hidden=<1|0>]"
44660702
DM
5252 },
5253 "cpulimit" : {
5254 "default" : 0,
c2993fe5 5255 "description" : "Limit of CPU usage.",
44660702
DM
5256 "maximum" : 128,
5257 "minimum" : 0,
5258 "optional" : 1,
c2993fe5 5259 "type" : "number",
4bd7df8b 5260 "typetext" : "number (0-128)",
c2993fe5 5261 "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."
44660702
DM
5262 },
5263 "cpuunits" : {
5264 "default" : 1000,
c2993fe5 5265 "description" : "CPU weight for a VM.",
44660702
DM
5266 "maximum" : 500000,
5267 "minimum" : 0,
5268 "optional" : 1,
c2993fe5 5269 "type" : "integer",
4bd7df8b 5270 "typetext" : "integer (0-500000)",
c2993fe5 5271 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
5272 },
5273 "delete" : {
5274 "description" : "A list of settings you want to delete.",
5275 "format" : "pve-configid-list",
5276 "optional" : 1,
5277 "type" : "string"
5278 },
5279 "description" : {
5280 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
5281 "optional" : 1,
5282 "type" : "string"
5283 },
5284 "digest" : {
5285 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
5286 "maxLength" : 40,
5287 "optional" : 1,
5288 "type" : "string"
5289 },
5290 "force" : {
5291 "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.",
5292 "optional" : 1,
5293 "requires" : "delete",
5294 "type" : "boolean"
5295 },
5296 "freeze" : {
5297 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
5298 "optional" : 1,
5299 "type" : "boolean"
5300 },
5301 "hostpci[n]" : {
c2993fe5 5302 "description" : "Map host PCI devices into guest.",
44660702
DM
5303 "format" : "pve-qm-hostpci",
5304 "optional" : 1,
57b78691 5305 "type" : "string",
4bd7df8b 5306 "typetext" : "[host=]<HOSTPCIID[;HOSTPCIID2...]> [,pcie=<1|0>] [,rombar=<1|0>] [,x-vga=<1|0>]",
57b78691 5307 "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"
44660702
DM
5308 },
5309 "hotplug" : {
5310 "default" : "network,disk,usb",
5311 "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'.",
5312 "format" : "pve-hotplug-features",
5313 "optional" : 1,
5314 "type" : "string"
5315 },
4bd7df8b
DM
5316 "hugepages" : {
5317 "description" : "Enable/disable hugepages memory.",
5318 "enum" : [
5319 "any",
5320 "2",
5321 "1024"
5322 ],
5323 "optional" : 1,
5324 "type" : "string"
5325 },
44660702
DM
5326 "ide[n]" : {
5327 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
5328 "format" : {
5329 "aio" : {
5330 "description" : "AIO type to use.",
5331 "enum" : [
5332 "native",
5333 "threads"
56122987 5334 ],
56122987 5335 "optional" : 1,
44660702 5336 "type" : "string"
56122987 5337 },
44660702
DM
5338 "backup" : {
5339 "description" : "Whether the drive should be included when making backups.",
56122987 5340 "optional" : 1,
44660702 5341 "type" : "boolean"
56122987 5342 },
7aacca6f
DM
5343 "bps" : {
5344 "description" : "Maximum r/w speed speed in bytes per second.",
44660702
DM
5345 "format_description" : "bps",
5346 "optional" : 1,
5347 "type" : "integer"
5348 },
5349 "bps_rd" : {
5350 "description" : "Maximum read speed speed in bytes per second.",
5351 "format_description" : "bps",
56122987 5352 "optional" : 1,
44660702 5353 "type" : "integer"
56122987 5354 },
44660702
DM
5355 "bps_wr" : {
5356 "description" : "Maximum write speed speed in bytes per second.",
5357 "format_description" : "bps",
5358 "optional" : 1,
5359 "type" : "integer"
5360 },
5361 "cache" : {
5362 "description" : "The drive's cache mode",
5363 "enum" : [
5364 "none",
5365 "writethrough",
5366 "writeback",
5367 "unsafe",
5368 "directsync"
5369 ],
44660702
DM
5370 "optional" : 1,
5371 "type" : "string"
5372 },
5373 "cyls" : {
5374 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
5375 "optional" : 1,
5376 "type" : "integer"
5377 },
5378 "detect_zeroes" : {
5379 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
5380 "optional" : 1,
5381 "type" : "boolean"
5382 },
5383 "discard" : {
5384 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5385 "enum" : [
5386 "ignore",
5387 "on"
5388 ],
56122987 5389 "optional" : 1,
44660702
DM
5390 "type" : "string"
5391 },
5392 "file" : {
5393 "default_key" : 1,
5394 "description" : "The drive's backing volume.",
5395 "format" : "pve-volume-id-or-qm-path",
5396 "format_description" : "volume",
5397 "type" : "string"
56122987 5398 },
7aacca6f 5399 "format" : {
7aacca6f 5400 "description" : "The drive's backing file's data format.",
56122987 5401 "enum" : [
7aacca6f
DM
5402 "raw",
5403 "cow",
5404 "qcow",
5405 "qed",
5406 "qcow2",
5407 "vmdk",
5408 "cloop"
56122987 5409 ],
f004f5b9 5410 "format_description" : "image format",
56122987 5411 "optional" : 1,
56122987
DM
5412 "type" : "string"
5413 },
44660702
DM
5414 "heads" : {
5415 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
5416 "optional" : 1,
5417 "type" : "integer"
7aacca6f 5418 },
44660702
DM
5419 "iops" : {
5420 "description" : "Maximum r/w I/O speed in operations per second.",
5421 "format_description" : "iops",
56122987 5422 "optional" : 1,
44660702 5423 "type" : "integer"
56122987 5424 },
44660702
DM
5425 "iops_max" : {
5426 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5427 "format_description" : "iops",
56122987 5428 "optional" : 1,
44660702 5429 "type" : "integer"
56122987 5430 },
44660702
DM
5431 "iops_rd" : {
5432 "description" : "Maximum read I/O speed in operations per second.",
5433 "format_description" : "iops",
5434 "optional" : 1,
5435 "type" : "integer"
5436 },
5437 "iops_rd_max" : {
5438 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 5439 "format_description" : "iops",
44660702
DM
5440 "optional" : 1,
5441 "type" : "integer"
5442 },
5443 "iops_wr" : {
7aacca6f 5444 "description" : "Maximum write I/O speed in operations per second.",
44660702 5445 "format_description" : "iops",
56122987 5446 "optional" : 1,
7aacca6f 5447 "type" : "integer"
56122987 5448 },
44660702
DM
5449 "iops_wr_max" : {
5450 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
5451 "format_description" : "iops",
7aacca6f 5452 "optional" : 1,
44660702 5453 "type" : "integer"
56122987 5454 },
44660702
DM
5455 "mbps" : {
5456 "description" : "Maximum r/w speed speed in megabytes per second.",
5457 "format_description" : "mbps",
5458 "optional" : 1,
5459 "type" : "number"
5460 },
5461 "mbps_max" : {
5462 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5463 "format_description" : "mbps",
5464 "optional" : 1,
5465 "type" : "number"
5466 },
5467 "mbps_rd" : {
5468 "description" : "Maximum read speed speed in megabytes per second.",
5469 "format_description" : "mbps",
5470 "optional" : 1,
5471 "type" : "number"
5472 },
5473 "mbps_rd_max" : {
5474 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5475 "format_description" : "mbps",
5476 "optional" : 1,
5477 "type" : "number"
5478 },
5479 "mbps_wr" : {
5480 "description" : "Maximum write speed speed in megabytes per second.",
5481 "format_description" : "mbps",
5482 "optional" : 1,
5483 "type" : "number"
5484 },
5485 "mbps_wr_max" : {
5486 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5487 "format_description" : "mbps",
56122987 5488 "optional" : 1,
44660702 5489 "type" : "number"
56122987 5490 },
7aacca6f 5491 "media" : {
7aacca6f 5492 "default" : "disk",
7aacca6f
DM
5493 "description" : "The drive's media type.",
5494 "enum" : [
5495 "cdrom",
5496 "disk"
44660702 5497 ],
44660702
DM
5498 "optional" : 1,
5499 "type" : "string"
56122987 5500 },
44660702
DM
5501 "model" : {
5502 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
5503 "format" : "urlencoded",
5504 "format_description" : "model",
5505 "maxLength" : 120,
56122987 5506 "optional" : 1,
44660702 5507 "type" : "string"
56122987 5508 },
44660702
DM
5509 "rerror" : {
5510 "description" : "Read error action.",
5511 "enum" : [
5512 "ignore",
5513 "report",
5514 "stop"
5515 ],
56122987 5516 "optional" : 1,
44660702
DM
5517 "type" : "string"
5518 },
5519 "secs" : {
5520 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
5521 "optional" : 1,
5522 "type" : "integer"
5523 },
5524 "serial" : {
5525 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5526 "format" : "urlencoded",
5527 "format_description" : "serial",
5528 "maxLength" : 60,
5529 "optional" : 1,
5530 "type" : "string"
5531 },
5532 "size" : {
5533 "description" : "Disk size. This is purely informational and has no effect.",
5534 "format" : "disk-size",
f004f5b9 5535 "format_description" : "DiskSize",
44660702
DM
5536 "optional" : 1,
5537 "type" : "string"
5538 },
5539 "snapshot" : {
5540 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
5541 "optional" : 1,
5542 "type" : "boolean"
5543 },
5544 "trans" : {
5545 "description" : "Force disk geometry bios translation mode.",
5546 "enum" : [
5547 "none",
5548 "lba",
5549 "auto"
5550 ],
44660702
DM
5551 "optional" : 1,
5552 "type" : "string"
5553 },
5554 "volume" : {
5555 "alias" : "file"
5556 },
5557 "werror" : {
5558 "description" : "Write error action.",
5559 "enum" : [
5560 "enospc",
5561 "ignore",
5562 "report",
5563 "stop"
5564 ],
44660702
DM
5565 "optional" : 1,
5566 "type" : "string"
56122987
DM
5567 }
5568 },
44660702 5569 "optional" : 1,
4bd7df8b
DM
5570 "type" : "string",
5571 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,model=<model>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
56122987 5572 },
44660702
DM
5573 "keyboard" : {
5574 "default" : "en-us",
c2993fe5 5575 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
5576 "enum" : [
5577 "de",
5578 "de-ch",
5579 "da",
5580 "en-gb",
5581 "en-us",
5582 "es",
5583 "fi",
5584 "fr",
5585 "fr-be",
5586 "fr-ca",
5587 "fr-ch",
5588 "hu",
5589 "is",
5590 "it",
5591 "ja",
5592 "lt",
5593 "mk",
5594 "nl",
5595 "no",
5596 "pl",
5597 "pt",
5598 "pt-br",
5599 "sv",
5600 "sl",
5601 "tr"
5602 ],
56122987 5603 "optional" : 1,
44660702
DM
5604 "type" : "string"
5605 },
5606 "kvm" : {
7aacca6f 5607 "default" : 1,
44660702
DM
5608 "description" : "Enable/disable KVM hardware virtualization.",
5609 "optional" : 1,
5610 "type" : "boolean"
56122987 5611 },
44660702
DM
5612 "localtime" : {
5613 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 5614 "optional" : 1,
44660702 5615 "type" : "boolean"
56122987 5616 },
44660702
DM
5617 "lock" : {
5618 "description" : "Lock/unlock the VM.",
5619 "enum" : [
5620 "migrate",
5621 "backup",
5622 "snapshot",
5623 "rollback"
5624 ],
7aacca6f 5625 "optional" : 1,
44660702
DM
5626 "type" : "string"
5627 },
5628 "machine" : {
5629 "description" : "Specific the Qemu machine type.",
5630 "maxLength" : 40,
5631 "optional" : 1,
5632 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
5633 "type" : "string"
5634 },
5635 "memory" : {
5636 "default" : 512,
5637 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
5638 "minimum" : 16,
5639 "optional" : 1,
4bd7df8b
DM
5640 "type" : "integer",
5641 "typetext" : "integer (16- N)"
44660702
DM
5642 },
5643 "migrate_downtime" : {
5644 "default" : 0.1,
5645 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
5646 "minimum" : 0,
5647 "optional" : 1,
4bd7df8b
DM
5648 "type" : "number",
5649 "typetext" : "number (0- N)"
44660702
DM
5650 },
5651 "migrate_speed" : {
5652 "default" : 0,
5653 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
5654 "minimum" : 0,
5655 "optional" : 1,
4bd7df8b
DM
5656 "type" : "integer",
5657 "typetext" : "integer (0- N)"
44660702
DM
5658 },
5659 "name" : {
5660 "description" : "Set a name for the VM. Only used on the configuration web interface.",
5661 "format" : "dns-name",
5662 "optional" : 1,
5663 "type" : "string"
5664 },
5665 "net[n]" : {
c2993fe5 5666 "description" : "Specify network devices.",
f004f5b9
DM
5667 "format" : {
5668 "bridge" : {
c2993fe5 5669 "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",
f004f5b9
DM
5670 "format_description" : "bridge",
5671 "optional" : 1,
5672 "type" : "string"
5673 },
5674 "e1000" : {
5675 "alias" : "macaddr",
5676 "keyAlias" : "model"
5677 },
5678 "e1000-82540em" : {
5679 "alias" : "macaddr",
5680 "keyAlias" : "model"
5681 },
5682 "e1000-82544gc" : {
5683 "alias" : "macaddr",
5684 "keyAlias" : "model"
5685 },
5686 "e1000-82545em" : {
5687 "alias" : "macaddr",
5688 "keyAlias" : "model"
5689 },
5690 "firewall" : {
5691 "description" : "Whether this interface should be protected by the firewall.",
5692 "optional" : 1,
5693 "type" : "boolean"
5694 },
5695 "i82551" : {
5696 "alias" : "macaddr",
5697 "keyAlias" : "model"
5698 },
5699 "i82557b" : {
5700 "alias" : "macaddr",
5701 "keyAlias" : "model"
5702 },
5703 "i82559er" : {
5704 "alias" : "macaddr",
5705 "keyAlias" : "model"
5706 },
5707 "link_down" : {
c2993fe5 5708 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
5709 "optional" : 1,
5710 "type" : "boolean"
5711 },
5712 "macaddr" : {
c2993fe5 5713 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 5714 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
5715 "optional" : 1,
5716 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
5717 "type" : "string"
5718 },
5719 "model" : {
5720 "default_key" : 1,
c2993fe5 5721 "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'.",
f004f5b9
DM
5722 "enum" : [
5723 "rtl8139",
5724 "ne2k_pci",
5725 "e1000",
5726 "pcnet",
5727 "virtio",
5728 "ne2k_isa",
5729 "i82551",
5730 "i82557b",
5731 "i82559er",
5732 "vmxnet3",
5733 "e1000-82540em",
5734 "e1000-82544gc",
5735 "e1000-82545em"
5736 ],
5737 "format_description" : "model",
5738 "type" : "string"
5739 },
5740 "ne2k_isa" : {
5741 "alias" : "macaddr",
5742 "keyAlias" : "model"
5743 },
5744 "ne2k_pci" : {
5745 "alias" : "macaddr",
5746 "keyAlias" : "model"
5747 },
5748 "pcnet" : {
5749 "alias" : "macaddr",
5750 "keyAlias" : "model"
5751 },
5752 "queues" : {
5753 "description" : "Number of packet queues to be used on the device.",
5754 "maximum" : 16,
5755 "minimum" : 0,
5756 "optional" : 1,
5757 "type" : "integer"
5758 },
5759 "rate" : {
c2993fe5 5760 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
5761 "minimum" : 0,
5762 "optional" : 1,
5763 "type" : "number"
5764 },
5765 "rtl8139" : {
5766 "alias" : "macaddr",
5767 "keyAlias" : "model"
5768 },
5769 "tag" : {
5770 "description" : "VLAN tag to apply to packets on this interface.",
5771 "maximum" : 4094,
c2993fe5 5772 "minimum" : 1,
f004f5b9
DM
5773 "optional" : 1,
5774 "type" : "integer"
5775 },
5776 "trunks" : {
5777 "description" : "VLAN trunks to pass through this interface.",
5778 "format_description" : "vlanid[;vlanid...]",
5779 "optional" : 1,
5780 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5781 "type" : "string"
5782 },
5783 "virtio" : {
5784 "alias" : "macaddr",
5785 "keyAlias" : "model"
5786 },
5787 "vmxnet3" : {
5788 "alias" : "macaddr",
5789 "keyAlias" : "model"
5790 }
5791 },
44660702 5792 "optional" : 1,
4bd7df8b
DM
5793 "type" : "string",
5794 "typetext" : "[model=]<model> [,bridge=<bridge>] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=<XX:XX:XX:XX:XX:XX>] [,queues=<integer>] [,rate=<number>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,<model>=<macaddr>]"
44660702
DM
5795 },
5796 "node" : {
5797 "description" : "The cluster node name.",
5798 "format" : "pve-node",
5799 "type" : "string"
5800 },
5801 "numa" : {
5802 "default" : 0,
5803 "description" : "Enable/disable NUMA.",
5804 "optional" : 1,
5805 "type" : "boolean"
5806 },
5807 "numa[n]" : {
c2993fe5 5808 "description" : "NUMA topology.",
56122987 5809 "format" : {
7aacca6f 5810 "cpus" : {
c2993fe5 5811 "description" : "CPUs accessing this NUMA node.",
44660702
DM
5812 "format_description" : "id[-id];...",
5813 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5814 "type" : "string"
7aacca6f
DM
5815 },
5816 "hostnodes" : {
c2993fe5 5817 "description" : "Host NUMA nodes to use.",
44660702 5818 "format_description" : "id[-id];...",
7aacca6f 5819 "optional" : 1,
7aacca6f 5820 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
44660702 5821 "type" : "string"
7aacca6f 5822 },
44660702 5823 "memory" : {
c2993fe5 5824 "description" : "Amount of memory this NUMA node provides.",
7aacca6f 5825 "optional" : 1,
44660702
DM
5826 "type" : "number"
5827 },
5828 "policy" : {
c2993fe5 5829 "description" : "NUMA allocation policy.",
7aacca6f
DM
5830 "enum" : [
5831 "preferred",
5832 "bind",
5833 "interleave"
5834 ],
44660702
DM
5835 "optional" : 1,
5836 "type" : "string"
56122987 5837 }
44660702 5838 },
56122987 5839 "optional" : 1,
4bd7df8b
DM
5840 "type" : "string",
5841 "typetext" : "cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]"
56122987 5842 },
44660702 5843 "onboot" : {
7aacca6f 5844 "default" : 0,
44660702
DM
5845 "description" : "Specifies whether a VM will be started during system bootup.",
5846 "optional" : 1,
5847 "type" : "boolean"
7aacca6f
DM
5848 },
5849 "ostype" : {
c2993fe5 5850 "description" : "Specify guest operating system.",
7aacca6f
DM
5851 "enum" : [
5852 "other",
5853 "wxp",
5854 "w2k",
5855 "w2k3",
5856 "w2k8",
5857 "wvista",
5858 "win7",
5859 "win8",
5860 "l24",
5861 "l26",
5862 "solaris"
5863 ],
7aacca6f 5864 "optional" : 1,
c2993fe5
DM
5865 "type" : "string",
5866 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
56122987 5867 },
44660702 5868 "parallel[n]" : {
c2993fe5 5869 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 5870 "optional" : 1,
44660702 5871 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
5872 "type" : "string",
5873 "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"
7aacca6f
DM
5874 },
5875 "protection" : {
5876 "default" : 0,
c2993fe5 5877 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 5878 "optional" : 1,
44660702 5879 "type" : "boolean"
7aacca6f 5880 },
44660702
DM
5881 "reboot" : {
5882 "default" : 1,
5883 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 5884 "optional" : 1,
44660702 5885 "type" : "boolean"
7aacca6f 5886 },
44660702
DM
5887 "revert" : {
5888 "description" : "Revert a pending change.",
5889 "format" : "pve-configid-list",
7aacca6f 5890 "optional" : 1,
44660702
DM
5891 "type" : "string"
5892 },
5893 "sata[n]" : {
5894 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 5895 "format" : {
44660702
DM
5896 "aio" : {
5897 "description" : "AIO type to use.",
7aacca6f 5898 "enum" : [
44660702
DM
5899 "native",
5900 "threads"
7aacca6f 5901 ],
44660702
DM
5902 "optional" : 1,
5903 "type" : "string"
7aacca6f 5904 },
44660702
DM
5905 "backup" : {
5906 "description" : "Whether the drive should be included when making backups.",
56122987 5907 "optional" : 1,
7aacca6f 5908 "type" : "boolean"
44660702
DM
5909 },
5910 "bps" : {
5911 "description" : "Maximum r/w speed speed in bytes per second.",
5912 "format_description" : "bps",
7aacca6f 5913 "optional" : 1,
44660702 5914 "type" : "integer"
56122987 5915 },
44660702
DM
5916 "bps_rd" : {
5917 "description" : "Maximum read speed speed in bytes per second.",
5918 "format_description" : "bps",
56122987 5919 "optional" : 1,
44660702 5920 "type" : "integer"
56122987 5921 },
44660702
DM
5922 "bps_wr" : {
5923 "description" : "Maximum write speed speed in bytes per second.",
5924 "format_description" : "bps",
56122987 5925 "optional" : 1,
44660702 5926 "type" : "integer"
56122987
DM
5927 },
5928 "cache" : {
44660702 5929 "description" : "The drive's cache mode",
56122987
DM
5930 "enum" : [
5931 "none",
5932 "writethrough",
5933 "writeback",
5934 "unsafe",
5935 "directsync"
5936 ],
56122987 5937 "optional" : 1,
44660702 5938 "type" : "string"
56122987 5939 },
44660702
DM
5940 "cyls" : {
5941 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 5942 "optional" : 1,
44660702 5943 "type" : "integer"
7aacca6f
DM
5944 },
5945 "detect_zeroes" : {
5946 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5947 "optional" : 1,
44660702 5948 "type" : "boolean"
56122987 5949 },
44660702
DM
5950 "discard" : {
5951 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5952 "enum" : [
5953 "ignore",
5954 "on"
5955 ],
56122987 5956 "optional" : 1,
44660702 5957 "type" : "string"
7aacca6f 5958 },
44660702
DM
5959 "file" : {
5960 "default_key" : 1,
5961 "description" : "The drive's backing volume.",
5962 "format" : "pve-volume-id-or-qm-path",
5963 "format_description" : "volume",
5964 "type" : "string"
56122987 5965 },
7aacca6f 5966 "format" : {
44660702 5967 "description" : "The drive's backing file's data format.",
7aacca6f
DM
5968 "enum" : [
5969 "raw",
5970 "cow",
5971 "qcow",
5972 "qed",
5973 "qcow2",
5974 "vmdk",
5975 "cloop"
5976 ],
f004f5b9 5977 "format_description" : "image format",
7aacca6f 5978 "optional" : 1,
44660702 5979 "type" : "string"
56122987 5980 },
7aacca6f 5981 "heads" : {
7aacca6f 5982 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 5983 "optional" : 1,
7aacca6f 5984 "type" : "integer"
56122987 5985 },
44660702
DM
5986 "iops" : {
5987 "description" : "Maximum r/w I/O speed in operations per second.",
5988 "format_description" : "iops",
56122987 5989 "optional" : 1,
44660702 5990 "type" : "integer"
56122987 5991 },
44660702
DM
5992 "iops_max" : {
5993 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5994 "format_description" : "iops",
56122987 5995 "optional" : 1,
44660702 5996 "type" : "integer"
56122987 5997 },
44660702
DM
5998 "iops_rd" : {
5999 "description" : "Maximum read I/O speed in operations per second.",
6000 "format_description" : "iops",
7aacca6f 6001 "optional" : 1,
44660702 6002 "type" : "integer"
56122987 6003 },
44660702
DM
6004 "iops_rd_max" : {
6005 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6006 "format_description" : "iops",
56122987 6007 "optional" : 1,
44660702 6008 "type" : "integer"
7aacca6f 6009 },
44660702
DM
6010 "iops_wr" : {
6011 "description" : "Maximum write I/O speed in operations per second.",
6012 "format_description" : "iops",
56122987 6013 "optional" : 1,
44660702 6014 "type" : "integer"
56122987
DM
6015 },
6016 "iops_wr_max" : {
6017 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
44660702 6018 "format_description" : "iops",
56122987 6019 "optional" : 1,
44660702 6020 "type" : "integer"
56122987 6021 },
44660702
DM
6022 "mbps" : {
6023 "description" : "Maximum r/w speed speed in megabytes per second.",
6024 "format_description" : "mbps",
56122987 6025 "optional" : 1,
44660702 6026 "type" : "number"
56122987 6027 },
44660702
DM
6028 "mbps_max" : {
6029 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6030 "format_description" : "mbps",
6031 "optional" : 1,
6032 "type" : "number"
56122987 6033 },
44660702
DM
6034 "mbps_rd" : {
6035 "description" : "Maximum read speed speed in megabytes per second.",
6036 "format_description" : "mbps",
56122987 6037 "optional" : 1,
44660702 6038 "type" : "number"
56122987 6039 },
44660702
DM
6040 "mbps_rd_max" : {
6041 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6042 "format_description" : "mbps",
56122987 6043 "optional" : 1,
44660702 6044 "type" : "number"
56122987 6045 },
44660702
DM
6046 "mbps_wr" : {
6047 "description" : "Maximum write speed speed in megabytes per second.",
56122987 6048 "format_description" : "mbps",
44660702
DM
6049 "optional" : 1,
6050 "type" : "number"
56122987 6051 },
44660702
DM
6052 "mbps_wr_max" : {
6053 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6054 "format_description" : "mbps",
6055 "optional" : 1,
6056 "type" : "number"
7aacca6f 6057 },
44660702
DM
6058 "media" : {
6059 "default" : "disk",
6060 "description" : "The drive's media type.",
6061 "enum" : [
6062 "cdrom",
6063 "disk"
6064 ],
56122987 6065 "optional" : 1,
44660702
DM
6066 "type" : "string"
6067 },
6068 "rerror" : {
6069 "description" : "Read error action.",
7aacca6f 6070 "enum" : [
44660702
DM
6071 "ignore",
6072 "report",
6073 "stop"
6074 ],
7aacca6f 6075 "optional" : 1,
44660702 6076 "type" : "string"
56122987 6077 },
44660702
DM
6078 "secs" : {
6079 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 6080 "optional" : 1,
44660702 6081 "type" : "integer"
56122987 6082 },
44660702
DM
6083 "serial" : {
6084 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6085 "format" : "urlencoded",
6086 "format_description" : "serial",
6087 "maxLength" : 60,
56122987 6088 "optional" : 1,
44660702 6089 "type" : "string"
56122987 6090 },
44660702
DM
6091 "size" : {
6092 "description" : "Disk size. This is purely informational and has no effect.",
6093 "format" : "disk-size",
f004f5b9 6094 "format_description" : "DiskSize",
44660702
DM
6095 "optional" : 1,
6096 "type" : "string"
6097 },
6098 "snapshot" : {
6099 "description" : "Whether the drive should be included when making snapshots.",
56122987 6100 "optional" : 1,
44660702
DM
6101 "type" : "boolean"
6102 },
6103 "trans" : {
6104 "description" : "Force disk geometry bios translation mode.",
56122987 6105 "enum" : [
7aacca6f
DM
6106 "none",
6107 "lba",
6108 "auto"
56122987 6109 ],
44660702
DM
6110 "optional" : 1,
6111 "type" : "string"
56122987 6112 },
7aacca6f
DM
6113 "volume" : {
6114 "alias" : "file"
56122987 6115 },
44660702
DM
6116 "werror" : {
6117 "description" : "Write error action.",
6118 "enum" : [
6119 "enospc",
6120 "ignore",
6121 "report",
6122 "stop"
6123 ],
7aacca6f 6124 "optional" : 1,
44660702
DM
6125 "type" : "string"
6126 }
6127 },
6128 "optional" : 1,
4bd7df8b
DM
6129 "type" : "string",
6130 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
44660702
DM
6131 },
6132 "scsi[n]" : {
6133 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
6134 "format" : {
56122987 6135 "aio" : {
56122987
DM
6136 "description" : "AIO type to use.",
6137 "enum" : [
6138 "native",
6139 "threads"
6140 ],
7aacca6f 6141 "optional" : 1,
44660702 6142 "type" : "string"
56122987 6143 },
44660702
DM
6144 "backup" : {
6145 "description" : "Whether the drive should be included when making backups.",
56122987 6146 "optional" : 1,
44660702 6147 "type" : "boolean"
56122987 6148 },
44660702
DM
6149 "bps" : {
6150 "description" : "Maximum r/w speed speed in bytes per second.",
6151 "format_description" : "bps",
56122987 6152 "optional" : 1,
44660702 6153 "type" : "integer"
56122987 6154 },
44660702
DM
6155 "bps_rd" : {
6156 "description" : "Maximum read speed speed in bytes per second.",
6157 "format_description" : "bps",
56122987 6158 "optional" : 1,
44660702 6159 "type" : "integer"
56122987 6160 },
7aacca6f 6161 "bps_wr" : {
44660702 6162 "description" : "Maximum write speed speed in bytes per second.",
7aacca6f 6163 "format_description" : "bps",
56122987 6164 "optional" : 1,
44660702 6165 "type" : "integer"
56122987 6166 },
44660702
DM
6167 "cache" : {
6168 "description" : "The drive's cache mode",
7aacca6f 6169 "enum" : [
44660702
DM
6170 "none",
6171 "writethrough",
6172 "writeback",
6173 "unsafe",
6174 "directsync"
7aacca6f 6175 ],
56122987 6176 "optional" : 1,
44660702 6177 "type" : "string"
56122987 6178 },
44660702
DM
6179 "cyls" : {
6180 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 6181 "optional" : 1,
44660702 6182 "type" : "integer"
56122987 6183 },
44660702
DM
6184 "detect_zeroes" : {
6185 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 6186 "optional" : 1,
44660702 6187 "type" : "boolean"
56122987 6188 },
44660702
DM
6189 "discard" : {
6190 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6191 "enum" : [
6192 "ignore",
6193 "on"
6194 ],
7aacca6f 6195 "optional" : 1,
44660702 6196 "type" : "string"
56122987 6197 },
44660702
DM
6198 "file" : {
6199 "default_key" : 1,
6200 "description" : "The drive's backing volume.",
6201 "format" : "pve-volume-id-or-qm-path",
6202 "format_description" : "volume",
6203 "type" : "string"
56122987 6204 },
7aacca6f 6205 "format" : {
44660702 6206 "description" : "The drive's backing file's data format.",
56122987 6207 "enum" : [
7aacca6f
DM
6208 "raw",
6209 "cow",
6210 "qcow",
6211 "qed",
6212 "qcow2",
6213 "vmdk",
6214 "cloop"
6215 ],
f004f5b9 6216 "format_description" : "image format",
44660702
DM
6217 "optional" : 1,
6218 "type" : "string"
56122987 6219 },
44660702
DM
6220 "heads" : {
6221 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6222 "optional" : 1,
7aacca6f 6223 "type" : "integer"
56122987 6224 },
44660702
DM
6225 "iops" : {
6226 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6227 "format_description" : "iops",
44660702
DM
6228 "optional" : 1,
6229 "type" : "integer"
7aacca6f 6230 },
44660702
DM
6231 "iops_max" : {
6232 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6233 "format_description" : "iops",
56122987 6234 "optional" : 1,
44660702 6235 "type" : "integer"
7aacca6f 6236 },
44660702
DM
6237 "iops_rd" : {
6238 "description" : "Maximum read I/O speed in operations per second.",
6239 "format_description" : "iops",
7aacca6f 6240 "optional" : 1,
44660702 6241 "type" : "integer"
56122987 6242 },
44660702
DM
6243 "iops_rd_max" : {
6244 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6245 "format_description" : "iops",
6246 "optional" : 1,
6247 "type" : "integer"
6248 },
6249 "iops_wr" : {
6250 "description" : "Maximum write I/O speed in operations per second.",
6251 "format_description" : "iops",
56122987 6252 "optional" : 1,
44660702
DM
6253 "type" : "integer"
6254 },
6255 "iops_wr_max" : {
6256 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6257 "format_description" : "iops",
6258 "optional" : 1,
6259 "type" : "integer"
56122987 6260 },
7aacca6f 6261 "iothread" : {
7aacca6f 6262 "description" : "Whether to use iothreads for this drive",
56122987 6263 "optional" : 1,
56122987
DM
6264 "type" : "boolean"
6265 },
44660702
DM
6266 "mbps" : {
6267 "description" : "Maximum r/w speed speed in megabytes per second.",
6268 "format_description" : "mbps",
6269 "optional" : 1,
6270 "type" : "number"
6271 },
6272 "mbps_max" : {
6273 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6274 "format_description" : "mbps",
6275 "optional" : 1,
6276 "type" : "number"
6277 },
6278 "mbps_rd" : {
6279 "description" : "Maximum read speed speed in megabytes per second.",
6280 "format_description" : "mbps",
6281 "optional" : 1,
6282 "type" : "number"
6283 },
6284 "mbps_rd_max" : {
6285 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6286 "format_description" : "mbps",
6287 "optional" : 1,
6288 "type" : "number"
6289 },
6290 "mbps_wr" : {
6291 "description" : "Maximum write speed speed in megabytes per second.",
6292 "format_description" : "mbps",
6293 "optional" : 1,
6294 "type" : "number"
6295 },
6296 "mbps_wr_max" : {
6297 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6298 "format_description" : "mbps",
6299 "optional" : 1,
6300 "type" : "number"
6301 },
7aacca6f 6302 "media" : {
44660702
DM
6303 "default" : "disk",
6304 "description" : "The drive's media type.",
7aacca6f
DM
6305 "enum" : [
6306 "cdrom",
6307 "disk"
6308 ],
56122987 6309 "optional" : 1,
44660702
DM
6310 "type" : "string"
6311 },
6312 "queues" : {
6313 "description" : "Number of queues.",
44660702
DM
6314 "minimum" : 2,
6315 "optional" : 1,
6316 "type" : "integer"
6317 },
6318 "secs" : {
6319 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6320 "optional" : 1,
6321 "type" : "integer"
6322 },
6323 "serial" : {
6324 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6325 "format" : "urlencoded",
6326 "format_description" : "serial",
6327 "maxLength" : 60,
6328 "optional" : 1,
6329 "type" : "string"
6330 },
6331 "size" : {
6332 "description" : "Disk size. This is purely informational and has no effect.",
6333 "format" : "disk-size",
f004f5b9 6334 "format_description" : "DiskSize",
44660702
DM
6335 "optional" : 1,
6336 "type" : "string"
56122987 6337 },
7aacca6f
DM
6338 "snapshot" : {
6339 "description" : "Whether the drive should be included when making snapshots.",
6340 "optional" : 1,
44660702 6341 "type" : "boolean"
7aacca6f 6342 },
44660702
DM
6343 "trans" : {
6344 "description" : "Force disk geometry bios translation mode.",
6345 "enum" : [
6346 "none",
6347 "lba",
6348 "auto"
6349 ],
44660702
DM
6350 "optional" : 1,
6351 "type" : "string"
6352 },
6353 "volume" : {
6354 "alias" : "file"
6355 },
6356 "werror" : {
6357 "description" : "Write error action.",
6358 "enum" : [
6359 "enospc",
6360 "ignore",
6361 "report",
6362 "stop"
6363 ],
56122987 6364 "optional" : 1,
44660702 6365 "type" : "string"
56122987 6366 }
44660702 6367 },
7aacca6f 6368 "optional" : 1,
4bd7df8b
DM
6369 "type" : "string",
6370 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,queues=<integer>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
44660702
DM
6371 },
6372 "scsihw" : {
6373 "default" : "lsi",
c2993fe5 6374 "description" : "SCSI controller model",
7aacca6f 6375 "enum" : [
44660702
DM
6376 "lsi",
6377 "lsi53c810",
6378 "virtio-scsi-pci",
6379 "virtio-scsi-single",
6380 "megasas",
6381 "pvscsi"
7aacca6f 6382 ],
44660702
DM
6383 "optional" : 1,
6384 "type" : "string"
56122987 6385 },
44660702 6386 "serial[n]" : {
c2993fe5 6387 "description" : "Create a serial device inside the VM (n is 0 to 3)",
7aacca6f 6388 "optional" : 1,
44660702 6389 "pattern" : "(/dev/.+|socket)",
c2993fe5 6390 "type" : "string",
57b78691 6391 "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"
7aacca6f 6392 },
44660702
DM
6393 "shares" : {
6394 "default" : 1000,
6395 "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",
6396 "maximum" : 50000,
6397 "minimum" : 0,
56122987 6398 "optional" : 1,
4bd7df8b
DM
6399 "type" : "integer",
6400 "typetext" : "integer (0-50000)"
56122987 6401 },
44660702
DM
6402 "skiplock" : {
6403 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 6404 "optional" : 1,
44660702 6405 "type" : "boolean"
56122987 6406 },
44660702
DM
6407 "smbios1" : {
6408 "description" : "Specify SMBIOS type 1 fields.",
6409 "format" : "pve-qm-smbios1",
6410 "maxLength" : 256,
56122987 6411 "optional" : 1,
4bd7df8b
DM
6412 "type" : "string",
6413 "typetext" : "[family=<string>] [,manufacturer=<string>] [,product=<string>] [,serial=<string>] [,sku=<string>] [,uuid=<UUID>] [,version=<string>]"
56122987 6414 },
44660702
DM
6415 "smp" : {
6416 "default" : 1,
6417 "description" : "The number of CPUs. Please use option -sockets instead.",
7aacca6f 6418 "minimum" : 1,
7aacca6f 6419 "optional" : 1,
4bd7df8b
DM
6420 "type" : "integer",
6421 "typetext" : "integer (1- N)"
7aacca6f 6422 },
44660702
DM
6423 "sockets" : {
6424 "default" : 1,
6425 "description" : "The number of CPU sockets.",
6426 "minimum" : 1,
7aacca6f 6427 "optional" : 1,
4bd7df8b
DM
6428 "type" : "integer",
6429 "typetext" : "integer (1- N)"
56122987 6430 },
44660702
DM
6431 "startdate" : {
6432 "default" : "now",
6433 "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'.",
7aacca6f 6434 "optional" : 1,
44660702 6435 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 6436 "type" : "string",
44660702 6437 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
56122987 6438 },
7aacca6f 6439 "startup" : {
7aacca6f 6440 "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.",
44660702 6441 "format" : "pve-startup-order",
56122987 6442 "optional" : 1,
44660702
DM
6443 "type" : "string",
6444 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
56122987 6445 },
44660702 6446 "tablet" : {
7aacca6f 6447 "default" : 1,
c2993fe5 6448 "description" : "Enable/disable the USB tablet device.",
7aacca6f 6449 "optional" : 1,
c2993fe5
DM
6450 "type" : "boolean",
6451 "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)."
56122987 6452 },
44660702
DM
6453 "tdf" : {
6454 "default" : 0,
6455 "description" : "Enable/disable time drift fix.",
7aacca6f 6456 "optional" : 1,
44660702 6457 "type" : "boolean"
7aacca6f 6458 },
44660702
DM
6459 "template" : {
6460 "default" : 0,
6461 "description" : "Enable/disable Template.",
7aacca6f 6462 "optional" : 1,
44660702 6463 "type" : "boolean"
7aacca6f 6464 },
44660702 6465 "unused[n]" : {
c2993fe5 6466 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 6467 "format" : "pve-volume-id",
7aacca6f 6468 "optional" : 1,
44660702 6469 "type" : "string"
7aacca6f 6470 },
44660702 6471 "usb[n]" : {
c2993fe5 6472 "description" : "Configure an USB device (n is 0 to 4).",
44660702
DM
6473 "format" : {
6474 "host" : {
6475 "default_key" : 1,
c2993fe5 6476 "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",
44660702
DM
6477 "format" : "pve-qm-usb-device",
6478 "format_description" : "HOSTUSBDEVICE|spice",
6479 "type" : "string"
6480 },
6481 "usb3" : {
c2993fe5
DM
6482 "default" : 0,
6483 "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).",
44660702
DM
6484 "optional" : 1,
6485 "type" : "boolean"
6486 }
6487 },
7aacca6f 6488 "optional" : 1,
4bd7df8b
DM
6489 "type" : "string",
6490 "typetext" : "[host=]<HOSTUSBDEVICE|spice> [,usb3=<1|0>]"
56122987 6491 },
44660702
DM
6492 "vcpus" : {
6493 "default" : 0,
6494 "description" : "Number of hotplugged vcpus.",
6495 "minimum" : 1,
56122987 6496 "optional" : 1,
4bd7df8b
DM
6497 "type" : "integer",
6498 "typetext" : "integer (1- N)"
56122987 6499 },
44660702 6500 "vga" : {
c2993fe5 6501 "description" : "Select the VGA type.",
44660702
DM
6502 "enum" : [
6503 "std",
6504 "cirrus",
6505 "vmware",
6506 "qxl",
6507 "serial0",
6508 "serial1",
6509 "serial2",
6510 "serial3",
6511 "qxl2",
6512 "qxl3",
6513 "qxl4"
6514 ],
56122987 6515 "optional" : 1,
c2993fe5
DM
6516 "type" : "string",
6517 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
56122987 6518 },
44660702
DM
6519 "virtio[n]" : {
6520 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
56122987 6521 "format" : {
44660702
DM
6522 "aio" : {
6523 "description" : "AIO type to use.",
56122987 6524 "enum" : [
44660702
DM
6525 "native",
6526 "threads"
56122987 6527 ],
56122987
DM
6528 "optional" : 1,
6529 "type" : "string"
6530 },
44660702
DM
6531 "backup" : {
6532 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6533 "optional" : 1,
6534 "type" : "boolean"
7aacca6f 6535 },
44660702
DM
6536 "bps" : {
6537 "description" : "Maximum r/w speed speed in bytes per second.",
6538 "format_description" : "bps",
6539 "optional" : 1,
6540 "type" : "integer"
56122987 6541 },
44660702
DM
6542 "bps_rd" : {
6543 "description" : "Maximum read speed speed in bytes per second.",
6544 "format_description" : "bps",
56122987 6545 "optional" : 1,
44660702 6546 "type" : "integer"
56122987 6547 },
44660702
DM
6548 "bps_wr" : {
6549 "description" : "Maximum write speed speed in bytes per second.",
6550 "format_description" : "bps",
56122987 6551 "optional" : 1,
44660702
DM
6552 "type" : "integer"
6553 },
6554 "cache" : {
6555 "description" : "The drive's cache mode",
56122987 6556 "enum" : [
44660702
DM
6557 "none",
6558 "writethrough",
6559 "writeback",
6560 "unsafe",
6561 "directsync"
56122987 6562 ],
56122987 6563 "optional" : 1,
44660702 6564 "type" : "string"
56122987 6565 },
44660702
DM
6566 "cyls" : {
6567 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 6568 "optional" : 1,
44660702 6569 "type" : "integer"
7aacca6f 6570 },
44660702
DM
6571 "detect_zeroes" : {
6572 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6573 "optional" : 1,
6574 "type" : "boolean"
7aacca6f 6575 },
44660702
DM
6576 "discard" : {
6577 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6578 "enum" : [
6579 "ignore",
6580 "on"
6581 ],
56122987 6582 "optional" : 1,
44660702 6583 "type" : "string"
56122987
DM
6584 },
6585 "file" : {
7aacca6f 6586 "default_key" : 1,
44660702 6587 "description" : "The drive's backing volume.",
7aacca6f 6588 "format" : "pve-volume-id-or-qm-path",
44660702
DM
6589 "format_description" : "volume",
6590 "type" : "string"
7aacca6f
DM
6591 },
6592 "format" : {
7aacca6f
DM
6593 "description" : "The drive's backing file's data format.",
6594 "enum" : [
6595 "raw",
6596 "cow",
6597 "qcow",
6598 "qed",
6599 "qcow2",
6600 "vmdk",
6601 "cloop"
56122987 6602 ],
f004f5b9 6603 "format_description" : "image format",
56122987 6604 "optional" : 1,
56122987
DM
6605 "type" : "string"
6606 },
44660702
DM
6607 "heads" : {
6608 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6609 "optional" : 1,
44660702 6610 "type" : "integer"
56122987 6611 },
44660702
DM
6612 "iops" : {
6613 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6614 "format_description" : "iops",
56122987 6615 "optional" : 1,
44660702 6616 "type" : "integer"
56122987 6617 },
44660702
DM
6618 "iops_max" : {
6619 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6620 "format_description" : "iops",
56122987 6621 "optional" : 1,
56122987
DM
6622 "type" : "integer"
6623 },
44660702
DM
6624 "iops_rd" : {
6625 "description" : "Maximum read I/O speed in operations per second.",
6626 "format_description" : "iops",
56122987 6627 "optional" : 1,
44660702 6628 "type" : "integer"
56122987 6629 },
44660702
DM
6630 "iops_rd_max" : {
6631 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6632 "format_description" : "iops",
7aacca6f 6633 "optional" : 1,
44660702 6634 "type" : "integer"
56122987 6635 },
44660702
DM
6636 "iops_wr" : {
6637 "description" : "Maximum write I/O speed in operations per second.",
6638 "format_description" : "iops",
7aacca6f 6639 "optional" : 1,
44660702 6640 "type" : "integer"
56122987 6641 },
44660702
DM
6642 "iops_wr_max" : {
6643 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6644 "format_description" : "iops",
56122987
DM
6645 "optional" : 1,
6646 "type" : "integer"
6647 },
44660702
DM
6648 "iothread" : {
6649 "description" : "Whether to use iothreads for this drive",
44660702
DM
6650 "optional" : 1,
6651 "type" : "boolean"
6652 },
6653 "mbps" : {
6654 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6655 "format_description" : "mbps",
44660702
DM
6656 "optional" : 1,
6657 "type" : "number"
6658 },
6659 "mbps_max" : {
7aacca6f 6660 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702
DM
6661 "format_description" : "mbps",
6662 "optional" : 1,
6663 "type" : "number"
7aacca6f 6664 },
44660702
DM
6665 "mbps_rd" : {
6666 "description" : "Maximum read speed speed in megabytes per second.",
6667 "format_description" : "mbps",
56122987 6668 "optional" : 1,
44660702 6669 "type" : "number"
56122987 6670 },
44660702
DM
6671 "mbps_rd_max" : {
6672 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6673 "format_description" : "mbps",
7aacca6f 6674 "optional" : 1,
44660702 6675 "type" : "number"
56122987 6676 },
44660702
DM
6677 "mbps_wr" : {
6678 "description" : "Maximum write speed speed in megabytes per second.",
6679 "format_description" : "mbps",
56122987 6680 "optional" : 1,
44660702 6681 "type" : "number"
56122987 6682 },
44660702
DM
6683 "mbps_wr_max" : {
6684 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6685 "format_description" : "mbps",
56122987 6686 "optional" : 1,
44660702 6687 "type" : "number"
56122987
DM
6688 },
6689 "media" : {
7aacca6f 6690 "default" : "disk",
44660702 6691 "description" : "The drive's media type.",
56122987
DM
6692 "enum" : [
6693 "cdrom",
6694 "disk"
6695 ],
44660702
DM
6696 "optional" : 1,
6697 "type" : "string"
56122987 6698 },
7aacca6f 6699 "rerror" : {
44660702 6700 "description" : "Read error action.",
56122987 6701 "enum" : [
7aacca6f
DM
6702 "ignore",
6703 "report",
6704 "stop"
56122987 6705 ],
56122987 6706 "optional" : 1,
44660702 6707 "type" : "string"
56122987 6708 },
44660702
DM
6709 "secs" : {
6710 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6711 "optional" : 1,
6712 "type" : "integer"
6713 },
6714 "serial" : {
6715 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6716 "format" : "urlencoded",
6717 "format_description" : "serial",
6718 "maxLength" : 60,
56122987 6719 "optional" : 1,
7aacca6f 6720 "type" : "string"
56122987 6721 },
44660702
DM
6722 "size" : {
6723 "description" : "Disk size. This is purely informational and has no effect.",
6724 "format" : "disk-size",
f004f5b9 6725 "format_description" : "DiskSize",
56122987 6726 "optional" : 1,
44660702 6727 "type" : "string"
56122987 6728 },
44660702
DM
6729 "snapshot" : {
6730 "description" : "Whether the drive should be included when making snapshots.",
56122987 6731 "optional" : 1,
44660702 6732 "type" : "boolean"
56122987 6733 },
44660702
DM
6734 "trans" : {
6735 "description" : "Force disk geometry bios translation mode.",
6736 "enum" : [
6737 "none",
6738 "lba",
6739 "auto"
6740 ],
44660702
DM
6741 "optional" : 1,
6742 "type" : "string"
6743 },
6744 "volume" : {
6745 "alias" : "file"
6746 },
6747 "werror" : {
6748 "description" : "Write error action.",
6749 "enum" : [
6750 "enospc",
6751 "ignore",
6752 "report",
6753 "stop"
6754 ],
56122987 6755 "optional" : 1,
44660702 6756 "type" : "string"
56122987 6757 }
44660702 6758 },
56122987 6759 "optional" : 1,
4bd7df8b
DM
6760 "type" : "string",
6761 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
56122987 6762 },
7aacca6f
DM
6763 "vmid" : {
6764 "description" : "The (unique) ID of the VM.",
7aacca6f 6765 "format" : "pve-vmid",
44660702 6766 "minimum" : 1,
4bd7df8b
DM
6767 "type" : "integer",
6768 "typetext" : "integer (1- N)"
56122987 6769 },
44660702 6770 "watchdog" : {
c2993fe5 6771 "description" : "Create a virtual hardware watchdog device.",
44660702 6772 "format" : "pve-qm-watchdog",
56122987 6773 "optional" : 1,
c2993fe5 6774 "type" : "string",
4bd7df8b 6775 "typetext" : "[[model=]<i6300esb|ib700>] [,action=<reset|shutdown|poweroff|pause|debug|none>]",
c2993fe5 6776 "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)"
56122987 6777 }
44660702 6778 }
56122987 6779 },
7aacca6f
DM
6780 "permissions" : {
6781 "check" : [
6782 "perm",
6783 "/vms/{vmid}",
6784 [
44660702
DM
6785 "VM.Config.Disk",
6786 "VM.Config.CDROM",
6787 "VM.Config.CPU",
6788 "VM.Config.Memory",
6789 "VM.Config.Network",
6790 "VM.Config.HWType",
6791 "VM.Config.Options"
6792 ],
6793 "any",
6794 1
7aacca6f 6795 ]
56122987 6796 },
44660702 6797 "protected" : 1,
7aacca6f 6798 "proxyto" : "node",
44660702
DM
6799 "returns" : {
6800 "optional" : 1,
6801 "type" : "string"
6802 }
56122987 6803 },
7aacca6f 6804 "PUT" : {
44660702
DM
6805 "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.",
6806 "method" : "PUT",
6807 "name" : "update_vm",
56122987 6808 "parameters" : {
7aacca6f 6809 "additionalProperties" : 0,
56122987 6810 "properties" : {
44660702
DM
6811 "acpi" : {
6812 "default" : 1,
6813 "description" : "Enable/disable ACPI.",
7aacca6f 6814 "optional" : 1,
44660702 6815 "type" : "boolean"
7aacca6f 6816 },
44660702
DM
6817 "agent" : {
6818 "default" : 0,
6819 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 6820 "optional" : 1,
44660702 6821 "type" : "boolean"
56122987 6822 },
44660702 6823 "args" : {
c2993fe5 6824 "description" : "Arbitrary arguments passed to kvm.",
7aacca6f 6825 "optional" : 1,
c2993fe5
DM
6826 "type" : "string",
6827 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
7aacca6f 6828 },
44660702
DM
6829 "autostart" : {
6830 "default" : 0,
6831 "description" : "Automatic restart after crash (currently ignored).",
7aacca6f
DM
6832 "optional" : 1,
6833 "type" : "boolean"
6834 },
44660702
DM
6835 "balloon" : {
6836 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
6837 "minimum" : 0,
6838 "optional" : 1,
4bd7df8b
DM
6839 "type" : "integer",
6840 "typetext" : "integer (0- N)"
44660702
DM
6841 },
6842 "bios" : {
6843 "default" : "seabios",
6844 "description" : "Select BIOS implementation.",
7aacca6f 6845 "enum" : [
44660702
DM
6846 "seabios",
6847 "ovmf"
7aacca6f 6848 ],
56122987 6849 "optional" : 1,
7aacca6f
DM
6850 "type" : "string"
6851 },
44660702
DM
6852 "boot" : {
6853 "default" : "cdn",
6854 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
7aacca6f 6855 "optional" : 1,
44660702
DM
6856 "pattern" : "[acdn]{1,4}",
6857 "type" : "string"
56122987 6858 },
44660702
DM
6859 "bootdisk" : {
6860 "description" : "Enable booting from specified disk.",
6861 "format" : "pve-qm-bootdisk",
6862 "optional" : 1,
6863 "pattern" : "(ide|sata|scsi|virtio)\\d+",
6864 "type" : "string"
6865 },
6866 "cdrom" : {
6867 "description" : "This is an alias for option -ide2",
6868 "format" : "pve-qm-drive",
56122987 6869 "optional" : 1,
7aacca6f 6870 "type" : "string",
44660702
DM
6871 "typetext" : "volume"
6872 },
6873 "cores" : {
6874 "default" : 1,
6875 "description" : "The number of cores per socket.",
6876 "minimum" : 1,
6877 "optional" : 1,
4bd7df8b
DM
6878 "type" : "integer",
6879 "typetext" : "integer (1- N)"
44660702
DM
6880 },
6881 "cpu" : {
6882 "description" : "Emulated CPU type.",
6883 "format" : {
6884 "cputype" : {
6885 "default" : "kvm64",
6886 "default_key" : 1,
6887 "description" : "Emulated CPU type.",
6888 "enum" : [
6889 "486",
6890 "athlon",
f004f5b9
DM
6891 "Broadwell",
6892 "Broadwell-noTSX",
6893 "Conroe",
44660702 6894 "core2duo",
f004f5b9
DM
6895 "coreduo",
6896 "Haswell",
6897 "Haswell-noTSX",
6898 "host",
6899 "IvyBridge",
44660702
DM
6900 "kvm32",
6901 "kvm64",
44660702 6902 "Nehalem",
44660702
DM
6903 "Opteron_G1",
6904 "Opteron_G2",
6905 "Opteron_G3",
6906 "Opteron_G4",
6907 "Opteron_G5",
f004f5b9
DM
6908 "Penryn",
6909 "pentium",
6910 "pentium2",
6911 "pentium3",
6912 "phenom",
6913 "qemu32",
6914 "qemu64",
6915 "SandyBridge",
6916 "Westmere"
44660702
DM
6917 ],
6918 "format_description" : "cputype",
6919 "type" : "string"
6920 },
6921 "hidden" : {
6922 "default" : 0,
6923 "description" : "Do not identify as a KVM virtual machine.",
6924 "optional" : 1,
6925 "type" : "boolean"
6926 }
6927 },
6928 "optional" : 1,
4bd7df8b
DM
6929 "type" : "string",
6930 "typetext" : "[cputype=]<cputype> [,hidden=<1|0>]"
44660702
DM
6931 },
6932 "cpulimit" : {
6933 "default" : 0,
c2993fe5 6934 "description" : "Limit of CPU usage.",
44660702
DM
6935 "maximum" : 128,
6936 "minimum" : 0,
6937 "optional" : 1,
c2993fe5 6938 "type" : "number",
4bd7df8b 6939 "typetext" : "number (0-128)",
c2993fe5 6940 "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."
44660702
DM
6941 },
6942 "cpuunits" : {
6943 "default" : 1000,
c2993fe5 6944 "description" : "CPU weight for a VM.",
44660702
DM
6945 "maximum" : 500000,
6946 "minimum" : 0,
6947 "optional" : 1,
c2993fe5 6948 "type" : "integer",
4bd7df8b 6949 "typetext" : "integer (0-500000)",
c2993fe5 6950 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
6951 },
6952 "delete" : {
6953 "description" : "A list of settings you want to delete.",
6954 "format" : "pve-configid-list",
6955 "optional" : 1,
6956 "type" : "string"
6957 },
6958 "description" : {
6959 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
6960 "optional" : 1,
6961 "type" : "string"
6962 },
6963 "digest" : {
6964 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
6965 "maxLength" : 40,
6966 "optional" : 1,
6967 "type" : "string"
6968 },
6969 "force" : {
6970 "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.",
6971 "optional" : 1,
6972 "requires" : "delete",
6973 "type" : "boolean"
6974 },
6975 "freeze" : {
6976 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
6977 "optional" : 1,
6978 "type" : "boolean"
6979 },
6980 "hostpci[n]" : {
c2993fe5 6981 "description" : "Map host PCI devices into guest.",
44660702
DM
6982 "format" : "pve-qm-hostpci",
6983 "optional" : 1,
57b78691 6984 "type" : "string",
4bd7df8b 6985 "typetext" : "[host=]<HOSTPCIID[;HOSTPCIID2...]> [,pcie=<1|0>] [,rombar=<1|0>] [,x-vga=<1|0>]",
57b78691 6986 "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"
56122987 6987 },
7aacca6f 6988 "hotplug" : {
7aacca6f 6989 "default" : "network,disk,usb",
44660702
DM
6990 "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'.",
6991 "format" : "pve-hotplug-features",
56122987 6992 "optional" : 1,
56122987
DM
6993 "type" : "string"
6994 },
4bd7df8b
DM
6995 "hugepages" : {
6996 "description" : "Enable/disable hugepages memory.",
6997 "enum" : [
6998 "any",
6999 "2",
7000 "1024"
7001 ],
7002 "optional" : 1,
7003 "type" : "string"
7004 },
56122987 7005 "ide[n]" : {
7aacca6f 7006 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 7007 "format" : {
44660702
DM
7008 "aio" : {
7009 "description" : "AIO type to use.",
7010 "enum" : [
7011 "native",
7012 "threads"
7013 ],
56122987 7014 "optional" : 1,
44660702 7015 "type" : "string"
56122987 7016 },
44660702
DM
7017 "backup" : {
7018 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7019 "optional" : 1,
7020 "type" : "boolean"
7021 },
7022 "bps" : {
7023 "description" : "Maximum r/w speed speed in bytes per second.",
7024 "format_description" : "bps",
56122987 7025 "optional" : 1,
44660702 7026 "type" : "integer"
56122987 7027 },
44660702
DM
7028 "bps_rd" : {
7029 "description" : "Maximum read speed speed in bytes per second.",
7030 "format_description" : "bps",
56122987 7031 "optional" : 1,
44660702 7032 "type" : "integer"
56122987 7033 },
7aacca6f 7034 "bps_wr" : {
7aacca6f 7035 "description" : "Maximum write speed speed in bytes per second.",
44660702
DM
7036 "format_description" : "bps",
7037 "optional" : 1,
7038 "type" : "integer"
7aacca6f 7039 },
44660702
DM
7040 "cache" : {
7041 "description" : "The drive's cache mode",
7042 "enum" : [
7043 "none",
7044 "writethrough",
7045 "writeback",
7046 "unsafe",
7047 "directsync"
7048 ],
56122987 7049 "optional" : 1,
44660702
DM
7050 "type" : "string"
7051 },
7052 "cyls" : {
7053 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7054 "optional" : 1,
7055 "type" : "integer"
7056 },
7057 "detect_zeroes" : {
7058 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7059 "optional" : 1,
7060 "type" : "boolean"
56122987 7061 },
7aacca6f 7062 "discard" : {
7aacca6f 7063 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 7064 "enum" : [
7aacca6f
DM
7065 "ignore",
7066 "on"
56122987
DM
7067 ],
7068 "optional" : 1,
44660702 7069 "type" : "string"
7aacca6f 7070 },
44660702
DM
7071 "file" : {
7072 "default_key" : 1,
7073 "description" : "The drive's backing volume.",
7074 "format" : "pve-volume-id-or-qm-path",
7075 "format_description" : "volume",
7076 "type" : "string"
7aacca6f
DM
7077 },
7078 "format" : {
44660702 7079 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7080 "enum" : [
7081 "raw",
7082 "cow",
7083 "qcow",
7084 "qed",
7085 "qcow2",
7086 "vmdk",
7087 "cloop"
7088 ],
f004f5b9 7089 "format_description" : "image format",
7aacca6f 7090 "optional" : 1,
44660702 7091 "type" : "string"
56122987 7092 },
7aacca6f 7093 "heads" : {
44660702 7094 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7095 "optional" : 1,
44660702 7096 "type" : "integer"
7aacca6f 7097 },
44660702
DM
7098 "iops" : {
7099 "description" : "Maximum r/w I/O speed in operations per second.",
7100 "format_description" : "iops",
7aacca6f 7101 "optional" : 1,
44660702 7102 "type" : "integer"
56122987 7103 },
44660702
DM
7104 "iops_max" : {
7105 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7106 "format_description" : "iops",
56122987 7107 "optional" : 1,
44660702 7108 "type" : "integer"
56122987 7109 },
44660702
DM
7110 "iops_rd" : {
7111 "description" : "Maximum read I/O speed in operations per second.",
7112 "format_description" : "iops",
56122987 7113 "optional" : 1,
44660702 7114 "type" : "integer"
7aacca6f 7115 },
44660702
DM
7116 "iops_rd_max" : {
7117 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7118 "format_description" : "iops",
7aacca6f 7119 "optional" : 1,
44660702 7120 "type" : "integer"
7aacca6f 7121 },
44660702
DM
7122 "iops_wr" : {
7123 "description" : "Maximum write I/O speed in operations per second.",
7124 "format_description" : "iops",
7aacca6f 7125 "optional" : 1,
44660702 7126 "type" : "integer"
56122987 7127 },
44660702
DM
7128 "iops_wr_max" : {
7129 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7130 "format_description" : "iops",
7aacca6f 7131 "optional" : 1,
44660702 7132 "type" : "integer"
7aacca6f
DM
7133 },
7134 "mbps" : {
44660702 7135 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 7136 "format_description" : "mbps",
7aacca6f 7137 "optional" : 1,
44660702 7138 "type" : "number"
7aacca6f 7139 },
44660702
DM
7140 "mbps_max" : {
7141 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7142 "format_description" : "mbps",
7aacca6f 7143 "optional" : 1,
44660702 7144 "type" : "number"
7aacca6f 7145 },
44660702
DM
7146 "mbps_rd" : {
7147 "description" : "Maximum read speed speed in megabytes per second.",
7148 "format_description" : "mbps",
7aacca6f 7149 "optional" : 1,
44660702 7150 "type" : "number"
7aacca6f 7151 },
44660702
DM
7152 "mbps_rd_max" : {
7153 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7154 "format_description" : "mbps",
7155 "optional" : 1,
7156 "type" : "number"
7aacca6f 7157 },
44660702
DM
7158 "mbps_wr" : {
7159 "description" : "Maximum write speed speed in megabytes per second.",
7160 "format_description" : "mbps",
7aacca6f 7161 "optional" : 1,
44660702
DM
7162 "type" : "number"
7163 },
7164 "mbps_wr_max" : {
7165 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7166 "format_description" : "mbps",
7167 "optional" : 1,
7168 "type" : "number"
7169 },
7170 "media" : {
7171 "default" : "disk",
7172 "description" : "The drive's media type.",
56122987 7173 "enum" : [
44660702
DM
7174 "cdrom",
7175 "disk"
56122987 7176 ],
44660702
DM
7177 "optional" : 1,
7178 "type" : "string"
56122987 7179 },
7aacca6f 7180 "model" : {
44660702 7181 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
56122987 7182 "format" : "urlencoded",
7aacca6f 7183 "format_description" : "model",
44660702 7184 "maxLength" : 120,
56122987 7185 "optional" : 1,
44660702 7186 "type" : "string"
56122987 7187 },
44660702
DM
7188 "rerror" : {
7189 "description" : "Read error action.",
7190 "enum" : [
7191 "ignore",
7192 "report",
7193 "stop"
7194 ],
56122987 7195 "optional" : 1,
44660702 7196 "type" : "string"
56122987 7197 },
44660702
DM
7198 "secs" : {
7199 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
7200 "optional" : 1,
7201 "type" : "integer"
56122987 7202 },
44660702
DM
7203 "serial" : {
7204 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7205 "format" : "urlencoded",
7206 "format_description" : "serial",
7207 "maxLength" : 60,
56122987 7208 "optional" : 1,
44660702 7209 "type" : "string"
56122987 7210 },
44660702
DM
7211 "size" : {
7212 "description" : "Disk size. This is purely informational and has no effect.",
7213 "format" : "disk-size",
f004f5b9 7214 "format_description" : "DiskSize",
56122987 7215 "optional" : 1,
44660702 7216 "type" : "string"
56122987 7217 },
44660702
DM
7218 "snapshot" : {
7219 "description" : "Whether the drive should be included when making snapshots.",
56122987 7220 "optional" : 1,
44660702 7221 "type" : "boolean"
56122987 7222 },
44660702
DM
7223 "trans" : {
7224 "description" : "Force disk geometry bios translation mode.",
7225 "enum" : [
7226 "none",
7227 "lba",
7228 "auto"
7229 ],
56122987 7230 "optional" : 1,
44660702
DM
7231 "type" : "string"
7232 },
7233 "volume" : {
7234 "alias" : "file"
56122987 7235 },
7aacca6f 7236 "werror" : {
44660702 7237 "description" : "Write error action.",
7aacca6f
DM
7238 "enum" : [
7239 "enospc",
7240 "ignore",
7241 "report",
7242 "stop"
7243 ],
56122987 7244 "optional" : 1,
44660702 7245 "type" : "string"
7aacca6f 7246 }
44660702
DM
7247 },
7248 "optional" : 1,
4bd7df8b
DM
7249 "type" : "string",
7250 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,model=<model>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
7aacca6f 7251 },
44660702
DM
7252 "keyboard" : {
7253 "default" : "en-us",
c2993fe5 7254 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
7255 "enum" : [
7256 "de",
7257 "de-ch",
7258 "da",
7259 "en-gb",
7260 "en-us",
7261 "es",
7262 "fi",
7263 "fr",
7264 "fr-be",
7265 "fr-ca",
7266 "fr-ch",
7267 "hu",
7268 "is",
7269 "it",
7270 "ja",
7271 "lt",
7272 "mk",
7273 "nl",
7274 "no",
7275 "pl",
7276 "pt",
7277 "pt-br",
7278 "sv",
7279 "sl",
7280 "tr"
7281 ],
7aacca6f 7282 "optional" : 1,
44660702 7283 "type" : "string"
7aacca6f 7284 },
44660702 7285 "kvm" : {
7aacca6f 7286 "default" : 1,
44660702 7287 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 7288 "optional" : 1,
44660702 7289 "type" : "boolean"
7aacca6f 7290 },
44660702
DM
7291 "localtime" : {
7292 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
7aacca6f 7293 "optional" : 1,
44660702 7294 "type" : "boolean"
7aacca6f 7295 },
44660702
DM
7296 "lock" : {
7297 "description" : "Lock/unlock the VM.",
7298 "enum" : [
7299 "migrate",
7300 "backup",
7301 "snapshot",
7302 "rollback"
7303 ],
7aacca6f 7304 "optional" : 1,
44660702 7305 "type" : "string"
7aacca6f 7306 },
44660702
DM
7307 "machine" : {
7308 "description" : "Specific the Qemu machine type.",
7309 "maxLength" : 40,
7aacca6f 7310 "optional" : 1,
44660702
DM
7311 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
7312 "type" : "string"
7aacca6f 7313 },
44660702
DM
7314 "memory" : {
7315 "default" : 512,
7316 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
7317 "minimum" : 16,
7aacca6f 7318 "optional" : 1,
4bd7df8b
DM
7319 "type" : "integer",
7320 "typetext" : "integer (16- N)"
7aacca6f 7321 },
44660702
DM
7322 "migrate_downtime" : {
7323 "default" : 0.1,
7324 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
7325 "minimum" : 0,
7aacca6f 7326 "optional" : 1,
4bd7df8b
DM
7327 "type" : "number",
7328 "typetext" : "number (0- N)"
7aacca6f 7329 },
44660702 7330 "migrate_speed" : {
7aacca6f 7331 "default" : 0,
44660702
DM
7332 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
7333 "minimum" : 0,
7334 "optional" : 1,
4bd7df8b
DM
7335 "type" : "integer",
7336 "typetext" : "integer (0- N)"
7aacca6f 7337 },
44660702
DM
7338 "name" : {
7339 "description" : "Set a name for the VM. Only used on the configuration web interface.",
7340 "format" : "dns-name",
7aacca6f 7341 "optional" : 1,
44660702 7342 "type" : "string"
7aacca6f 7343 },
44660702 7344 "net[n]" : {
c2993fe5 7345 "description" : "Specify network devices.",
f004f5b9
DM
7346 "format" : {
7347 "bridge" : {
c2993fe5 7348 "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",
f004f5b9
DM
7349 "format_description" : "bridge",
7350 "optional" : 1,
7351 "type" : "string"
7352 },
7353 "e1000" : {
7354 "alias" : "macaddr",
7355 "keyAlias" : "model"
7356 },
7357 "e1000-82540em" : {
7358 "alias" : "macaddr",
7359 "keyAlias" : "model"
7360 },
7361 "e1000-82544gc" : {
7362 "alias" : "macaddr",
7363 "keyAlias" : "model"
7364 },
7365 "e1000-82545em" : {
7366 "alias" : "macaddr",
7367 "keyAlias" : "model"
7368 },
7369 "firewall" : {
7370 "description" : "Whether this interface should be protected by the firewall.",
7371 "optional" : 1,
7372 "type" : "boolean"
7373 },
7374 "i82551" : {
7375 "alias" : "macaddr",
7376 "keyAlias" : "model"
7377 },
7378 "i82557b" : {
7379 "alias" : "macaddr",
7380 "keyAlias" : "model"
7381 },
7382 "i82559er" : {
7383 "alias" : "macaddr",
7384 "keyAlias" : "model"
7385 },
7386 "link_down" : {
c2993fe5 7387 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
7388 "optional" : 1,
7389 "type" : "boolean"
7390 },
7391 "macaddr" : {
c2993fe5 7392 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 7393 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
7394 "optional" : 1,
7395 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
7396 "type" : "string"
7397 },
7398 "model" : {
7399 "default_key" : 1,
c2993fe5 7400 "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'.",
f004f5b9
DM
7401 "enum" : [
7402 "rtl8139",
7403 "ne2k_pci",
7404 "e1000",
7405 "pcnet",
7406 "virtio",
7407 "ne2k_isa",
7408 "i82551",
7409 "i82557b",
7410 "i82559er",
7411 "vmxnet3",
7412 "e1000-82540em",
7413 "e1000-82544gc",
7414 "e1000-82545em"
7415 ],
7416 "format_description" : "model",
7417 "type" : "string"
7418 },
7419 "ne2k_isa" : {
7420 "alias" : "macaddr",
7421 "keyAlias" : "model"
7422 },
7423 "ne2k_pci" : {
7424 "alias" : "macaddr",
7425 "keyAlias" : "model"
7426 },
7427 "pcnet" : {
7428 "alias" : "macaddr",
7429 "keyAlias" : "model"
7430 },
7431 "queues" : {
7432 "description" : "Number of packet queues to be used on the device.",
7433 "maximum" : 16,
7434 "minimum" : 0,
7435 "optional" : 1,
7436 "type" : "integer"
7437 },
7438 "rate" : {
c2993fe5 7439 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
7440 "minimum" : 0,
7441 "optional" : 1,
7442 "type" : "number"
7443 },
7444 "rtl8139" : {
7445 "alias" : "macaddr",
7446 "keyAlias" : "model"
7447 },
7448 "tag" : {
7449 "description" : "VLAN tag to apply to packets on this interface.",
7450 "maximum" : 4094,
c2993fe5 7451 "minimum" : 1,
f004f5b9
DM
7452 "optional" : 1,
7453 "type" : "integer"
7454 },
7455 "trunks" : {
7456 "description" : "VLAN trunks to pass through this interface.",
7457 "format_description" : "vlanid[;vlanid...]",
7458 "optional" : 1,
7459 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7460 "type" : "string"
7461 },
7462 "virtio" : {
7463 "alias" : "macaddr",
7464 "keyAlias" : "model"
7465 },
7466 "vmxnet3" : {
7467 "alias" : "macaddr",
7468 "keyAlias" : "model"
7469 }
7470 },
7aacca6f 7471 "optional" : 1,
4bd7df8b
DM
7472 "type" : "string",
7473 "typetext" : "[model=]<model> [,bridge=<bridge>] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=<XX:XX:XX:XX:XX:XX>] [,queues=<integer>] [,rate=<number>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,<model>=<macaddr>]"
7aacca6f 7474 },
44660702
DM
7475 "node" : {
7476 "description" : "The cluster node name.",
7477 "format" : "pve-node",
7478 "type" : "string"
7479 },
7480 "numa" : {
7481 "default" : 0,
7482 "description" : "Enable/disable NUMA.",
7aacca6f
DM
7483 "optional" : 1,
7484 "type" : "boolean"
7485 },
44660702 7486 "numa[n]" : {
c2993fe5 7487 "description" : "NUMA topology.",
44660702
DM
7488 "format" : {
7489 "cpus" : {
c2993fe5 7490 "description" : "CPUs accessing this NUMA node.",
44660702
DM
7491 "format_description" : "id[-id];...",
7492 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7493 "type" : "string"
7494 },
7495 "hostnodes" : {
c2993fe5 7496 "description" : "Host NUMA nodes to use.",
44660702
DM
7497 "format_description" : "id[-id];...",
7498 "optional" : 1,
7499 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7500 "type" : "string"
7501 },
7502 "memory" : {
c2993fe5 7503 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
7504 "optional" : 1,
7505 "type" : "number"
7506 },
7507 "policy" : {
c2993fe5 7508 "description" : "NUMA allocation policy.",
44660702
DM
7509 "enum" : [
7510 "preferred",
7511 "bind",
7512 "interleave"
7513 ],
44660702
DM
7514 "optional" : 1,
7515 "type" : "string"
7516 }
7517 },
7aacca6f 7518 "optional" : 1,
4bd7df8b
DM
7519 "type" : "string",
7520 "typetext" : "cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]"
7aacca6f 7521 },
44660702
DM
7522 "onboot" : {
7523 "default" : 0,
7524 "description" : "Specifies whether a VM will be started during system bootup.",
7aacca6f 7525 "optional" : 1,
44660702 7526 "type" : "boolean"
7aacca6f 7527 },
44660702 7528 "ostype" : {
c2993fe5 7529 "description" : "Specify guest operating system.",
44660702
DM
7530 "enum" : [
7531 "other",
7532 "wxp",
7533 "w2k",
7534 "w2k3",
7535 "w2k8",
7536 "wvista",
7537 "win7",
7538 "win8",
7539 "l24",
7540 "l26",
7541 "solaris"
7542 ],
7aacca6f 7543 "optional" : 1,
c2993fe5
DM
7544 "type" : "string",
7545 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
7aacca6f 7546 },
44660702 7547 "parallel[n]" : {
c2993fe5 7548 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 7549 "optional" : 1,
44660702 7550 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
7551 "type" : "string",
7552 "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"
7aacca6f 7553 },
44660702
DM
7554 "protection" : {
7555 "default" : 0,
c2993fe5 7556 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 7557 "optional" : 1,
44660702 7558 "type" : "boolean"
7aacca6f 7559 },
44660702
DM
7560 "reboot" : {
7561 "default" : 1,
7562 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 7563 "optional" : 1,
44660702 7564 "type" : "boolean"
7aacca6f 7565 },
44660702
DM
7566 "revert" : {
7567 "description" : "Revert a pending change.",
7568 "format" : "pve-configid-list",
7aacca6f 7569 "optional" : 1,
44660702 7570 "type" : "string"
7aacca6f 7571 },
44660702
DM
7572 "sata[n]" : {
7573 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
7aacca6f 7574 "format" : {
44660702
DM
7575 "aio" : {
7576 "description" : "AIO type to use.",
7577 "enum" : [
7578 "native",
7579 "threads"
7580 ],
44660702
DM
7581 "optional" : 1,
7582 "type" : "string"
7583 },
7584 "backup" : {
7585 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7586 "optional" : 1,
7587 "type" : "boolean"
7588 },
7589 "bps" : {
7590 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 7591 "format_description" : "bps",
7aacca6f
DM
7592 "optional" : 1,
7593 "type" : "integer"
56122987 7594 },
44660702
DM
7595 "bps_rd" : {
7596 "description" : "Maximum read speed speed in bytes per second.",
7597 "format_description" : "bps",
7aacca6f 7598 "optional" : 1,
44660702 7599 "type" : "integer"
7aacca6f 7600 },
44660702
DM
7601 "bps_wr" : {
7602 "description" : "Maximum write speed speed in bytes per second.",
7603 "format_description" : "bps",
7aacca6f 7604 "optional" : 1,
44660702 7605 "type" : "integer"
7aacca6f 7606 },
44660702
DM
7607 "cache" : {
7608 "description" : "The drive's cache mode",
7609 "enum" : [
7610 "none",
7611 "writethrough",
7612 "writeback",
7613 "unsafe",
7614 "directsync"
7615 ],
7aacca6f 7616 "optional" : 1,
44660702 7617 "type" : "string"
7aacca6f 7618 },
44660702
DM
7619 "cyls" : {
7620 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 7621 "optional" : 1,
44660702 7622 "type" : "integer"
7aacca6f 7623 },
44660702
DM
7624 "detect_zeroes" : {
7625 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7aacca6f 7626 "optional" : 1,
44660702 7627 "type" : "boolean"
7aacca6f 7628 },
44660702
DM
7629 "discard" : {
7630 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7631 "enum" : [
7632 "ignore",
7633 "on"
7634 ],
7aacca6f 7635 "optional" : 1,
44660702
DM
7636 "type" : "string"
7637 },
7638 "file" : {
7639 "default_key" : 1,
7640 "description" : "The drive's backing volume.",
7641 "format" : "pve-volume-id-or-qm-path",
7642 "format_description" : "volume",
7643 "type" : "string"
7aacca6f
DM
7644 },
7645 "format" : {
7aacca6f 7646 "description" : "The drive's backing file's data format.",
56122987
DM
7647 "enum" : [
7648 "raw",
7649 "cow",
7650 "qcow",
7651 "qed",
7652 "qcow2",
7653 "vmdk",
7654 "cloop"
7655 ],
f004f5b9 7656 "format_description" : "image format",
56122987 7657 "optional" : 1,
7aacca6f 7658 "type" : "string"
56122987 7659 },
7aacca6f 7660 "heads" : {
7aacca6f 7661 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
7662 "optional" : 1,
7663 "type" : "integer"
56122987 7664 },
44660702
DM
7665 "iops" : {
7666 "description" : "Maximum r/w I/O speed in operations per second.",
7667 "format_description" : "iops",
56122987 7668 "optional" : 1,
44660702 7669 "type" : "integer"
7aacca6f 7670 },
44660702
DM
7671 "iops_max" : {
7672 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7673 "format_description" : "iops",
7aacca6f 7674 "optional" : 1,
44660702 7675 "type" : "integer"
56122987 7676 },
44660702
DM
7677 "iops_rd" : {
7678 "description" : "Maximum read I/O speed in operations per second.",
7679 "format_description" : "iops",
56122987 7680 "optional" : 1,
44660702 7681 "type" : "integer"
7aacca6f 7682 },
44660702
DM
7683 "iops_rd_max" : {
7684 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7685 "format_description" : "iops",
56122987 7686 "optional" : 1,
44660702 7687 "type" : "integer"
56122987 7688 },
44660702
DM
7689 "iops_wr" : {
7690 "description" : "Maximum write I/O speed in operations per second.",
7691 "format_description" : "iops",
7692 "optional" : 1,
7693 "type" : "integer"
56122987 7694 },
44660702
DM
7695 "iops_wr_max" : {
7696 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7697 "format_description" : "iops",
7698 "optional" : 1,
7699 "type" : "integer"
7700 },
7701 "mbps" : {
7702 "description" : "Maximum r/w speed speed in megabytes per second.",
7703 "format_description" : "mbps",
7704 "optional" : 1,
7705 "type" : "number"
7706 },
7707 "mbps_max" : {
7708 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7709 "format_description" : "mbps",
7710 "optional" : 1,
7711 "type" : "number"
7712 },
7713 "mbps_rd" : {
7714 "description" : "Maximum read speed speed in megabytes per second.",
7715 "format_description" : "mbps",
7716 "optional" : 1,
7717 "type" : "number"
7718 },
7719 "mbps_rd_max" : {
7720 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7721 "format_description" : "mbps",
7722 "optional" : 1,
7723 "type" : "number"
7724 },
7725 "mbps_wr" : {
7726 "description" : "Maximum write speed speed in megabytes per second.",
7727 "format_description" : "mbps",
7728 "optional" : 1,
7729 "type" : "number"
7730 },
7731 "mbps_wr_max" : {
7732 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7733 "format_description" : "mbps",
7734 "optional" : 1,
7735 "type" : "number"
7736 },
7737 "media" : {
7738 "default" : "disk",
7739 "description" : "The drive's media type.",
7740 "enum" : [
7741 "cdrom",
7742 "disk"
7743 ],
56122987 7744 "optional" : 1,
44660702
DM
7745 "type" : "string"
7746 },
7747 "rerror" : {
7aacca6f
DM
7748 "description" : "Read error action.",
7749 "enum" : [
7750 "ignore",
7751 "report",
7752 "stop"
44660702 7753 ],
56122987 7754 "optional" : 1,
44660702 7755 "type" : "string"
56122987 7756 },
7aacca6f 7757 "secs" : {
44660702 7758 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7759 "optional" : 1,
44660702 7760 "type" : "integer"
56122987 7761 },
44660702
DM
7762 "serial" : {
7763 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7764 "format" : "urlencoded",
7765 "format_description" : "serial",
7766 "maxLength" : 60,
56122987 7767 "optional" : 1,
44660702 7768 "type" : "string"
56122987 7769 },
44660702
DM
7770 "size" : {
7771 "description" : "Disk size. This is purely informational and has no effect.",
7772 "format" : "disk-size",
f004f5b9 7773 "format_description" : "DiskSize",
56122987 7774 "optional" : 1,
44660702 7775 "type" : "string"
56122987
DM
7776 },
7777 "snapshot" : {
7aacca6f 7778 "description" : "Whether the drive should be included when making snapshots.",
56122987 7779 "optional" : 1,
44660702 7780 "type" : "boolean"
56122987 7781 },
56122987 7782 "trans" : {
7aacca6f 7783 "description" : "Force disk geometry bios translation mode.",
56122987
DM
7784 "enum" : [
7785 "none",
7786 "lba",
7787 "auto"
7788 ],
7789 "optional" : 1,
44660702 7790 "type" : "string"
56122987 7791 },
44660702
DM
7792 "volume" : {
7793 "alias" : "file"
56122987 7794 },
7aacca6f 7795 "werror" : {
44660702 7796 "description" : "Write error action.",
56122987 7797 "enum" : [
7aacca6f 7798 "enospc",
56122987 7799 "ignore",
7aacca6f
DM
7800 "report",
7801 "stop"
7802 ],
7aacca6f 7803 "optional" : 1,
44660702
DM
7804 "type" : "string"
7805 }
7806 },
7807 "optional" : 1,
4bd7df8b
DM
7808 "type" : "string",
7809 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
44660702
DM
7810 },
7811 "scsi[n]" : {
7812 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
7813 "format" : {
7814 "aio" : {
7aacca6f 7815 "description" : "AIO type to use.",
56122987
DM
7816 "enum" : [
7817 "native",
7818 "threads"
44660702 7819 ],
56122987 7820 "optional" : 1,
44660702 7821 "type" : "string"
56122987 7822 },
7aacca6f 7823 "backup" : {
7aacca6f 7824 "description" : "Whether the drive should be included when making backups.",
7aacca6f 7825 "optional" : 1,
44660702 7826 "type" : "boolean"
56122987 7827 },
44660702
DM
7828 "bps" : {
7829 "description" : "Maximum r/w speed speed in bytes per second.",
7830 "format_description" : "bps",
7aacca6f 7831 "optional" : 1,
44660702 7832 "type" : "integer"
7aacca6f 7833 },
44660702
DM
7834 "bps_rd" : {
7835 "description" : "Maximum read speed speed in bytes per second.",
7836 "format_description" : "bps",
56122987 7837 "optional" : 1,
44660702 7838 "type" : "integer"
56122987 7839 },
44660702
DM
7840 "bps_wr" : {
7841 "description" : "Maximum write speed speed in bytes per second.",
7842 "format_description" : "bps",
56122987 7843 "optional" : 1,
44660702 7844 "type" : "integer"
56122987 7845 },
44660702
DM
7846 "cache" : {
7847 "description" : "The drive's cache mode",
7848 "enum" : [
7849 "none",
7850 "writethrough",
7851 "writeback",
7852 "unsafe",
7853 "directsync"
7854 ],
56122987 7855 "optional" : 1,
44660702
DM
7856 "type" : "string"
7857 },
7858 "cyls" : {
7859 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7860 "optional" : 1,
7861 "type" : "integer"
7862 },
7863 "detect_zeroes" : {
7864 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7865 "optional" : 1,
7866 "type" : "boolean"
7867 },
7868 "discard" : {
7869 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7870 "enum" : [
7871 "ignore",
7872 "on"
7873 ],
44660702
DM
7874 "optional" : 1,
7875 "type" : "string"
7876 },
7877 "file" : {
7878 "default_key" : 1,
7879 "description" : "The drive's backing volume.",
7880 "format" : "pve-volume-id-or-qm-path",
7881 "format_description" : "volume",
7882 "type" : "string"
56122987 7883 },
7aacca6f 7884 "format" : {
44660702 7885 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7886 "enum" : [
7887 "raw",
7888 "cow",
7889 "qcow",
7890 "qed",
7891 "qcow2",
7892 "vmdk",
7893 "cloop"
7894 ],
f004f5b9 7895 "format_description" : "image format",
56122987 7896 "optional" : 1,
44660702 7897 "type" : "string"
56122987 7898 },
44660702
DM
7899 "heads" : {
7900 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7901 "optional" : 1,
44660702 7902 "type" : "integer"
56122987 7903 },
44660702
DM
7904 "iops" : {
7905 "description" : "Maximum r/w I/O speed in operations per second.",
7906 "format_description" : "iops",
7aacca6f 7907 "optional" : 1,
44660702 7908 "type" : "integer"
56122987 7909 },
44660702
DM
7910 "iops_max" : {
7911 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7aacca6f 7912 "format_description" : "iops",
7aacca6f 7913 "optional" : 1,
44660702 7914 "type" : "integer"
56122987 7915 },
44660702
DM
7916 "iops_rd" : {
7917 "description" : "Maximum read I/O speed in operations per second.",
7918 "format_description" : "iops",
56122987 7919 "optional" : 1,
44660702 7920 "type" : "integer"
56122987 7921 },
44660702
DM
7922 "iops_rd_max" : {
7923 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7924 "format_description" : "iops",
56122987 7925 "optional" : 1,
44660702 7926 "type" : "integer"
56122987 7927 },
44660702
DM
7928 "iops_wr" : {
7929 "description" : "Maximum write I/O speed in operations per second.",
7930 "format_description" : "iops",
56122987 7931 "optional" : 1,
44660702 7932 "type" : "integer"
56122987 7933 },
44660702
DM
7934 "iops_wr_max" : {
7935 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7aacca6f 7936 "format_description" : "iops",
44660702
DM
7937 "optional" : 1,
7938 "type" : "integer"
7aacca6f
DM
7939 },
7940 "iothread" : {
44660702 7941 "description" : "Whether to use iothreads for this drive",
56122987 7942 "optional" : 1,
44660702 7943 "type" : "boolean"
56122987 7944 },
44660702
DM
7945 "mbps" : {
7946 "description" : "Maximum r/w speed speed in megabytes per second.",
7947 "format_description" : "mbps",
56122987 7948 "optional" : 1,
44660702 7949 "type" : "number"
56122987 7950 },
44660702
DM
7951 "mbps_max" : {
7952 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7953 "format_description" : "mbps",
56122987 7954 "optional" : 1,
44660702 7955 "type" : "number"
56122987 7956 },
44660702
DM
7957 "mbps_rd" : {
7958 "description" : "Maximum read speed speed in megabytes per second.",
7959 "format_description" : "mbps",
7aacca6f 7960 "optional" : 1,
44660702 7961 "type" : "number"
56122987 7962 },
44660702
DM
7963 "mbps_rd_max" : {
7964 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7965 "format_description" : "mbps",
7aacca6f 7966 "optional" : 1,
44660702 7967 "type" : "number"
7aacca6f 7968 },
44660702
DM
7969 "mbps_wr" : {
7970 "description" : "Maximum write speed speed in megabytes per second.",
7971 "format_description" : "mbps",
56122987 7972 "optional" : 1,
44660702 7973 "type" : "number"
56122987 7974 },
44660702
DM
7975 "mbps_wr_max" : {
7976 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7977 "format_description" : "mbps",
56122987 7978 "optional" : 1,
44660702
DM
7979 "type" : "number"
7980 },
7981 "media" : {
7982 "default" : "disk",
7983 "description" : "The drive's media type.",
7aacca6f 7984 "enum" : [
44660702
DM
7985 "cdrom",
7986 "disk"
7aacca6f 7987 ],
56122987 7988 "optional" : 1,
44660702 7989 "type" : "string"
56122987 7990 },
7aacca6f 7991 "queues" : {
44660702 7992 "description" : "Number of queues.",
7aacca6f 7993 "minimum" : 2,
7aacca6f
DM
7994 "optional" : 1,
7995 "type" : "integer"
56122987 7996 },
44660702
DM
7997 "secs" : {
7998 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7999 "optional" : 1,
44660702 8000 "type" : "integer"
56122987 8001 },
44660702
DM
8002 "serial" : {
8003 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
8004 "format" : "urlencoded",
8005 "format_description" : "serial",
8006 "maxLength" : 60,
56122987 8007 "optional" : 1,
44660702 8008 "type" : "string"
56122987 8009 },
44660702
DM
8010 "size" : {
8011 "description" : "Disk size. This is purely informational and has no effect.",
8012 "format" : "disk-size",
f004f5b9 8013 "format_description" : "DiskSize",
44660702
DM
8014 "optional" : 1,
8015 "type" : "string"
8016 },
8017 "snapshot" : {
8018 "description" : "Whether the drive should be included when making snapshots.",
56122987 8019 "optional" : 1,
44660702
DM
8020 "type" : "boolean"
8021 },
8022 "trans" : {
8023 "description" : "Force disk geometry bios translation mode.",
56122987 8024 "enum" : [
44660702
DM
8025 "none",
8026 "lba",
8027 "auto"
56122987 8028 ],
44660702
DM
8029 "optional" : 1,
8030 "type" : "string"
8031 },
8032 "volume" : {
8033 "alias" : "file"
56122987 8034 },
7aacca6f 8035 "werror" : {
7aacca6f
DM
8036 "description" : "Write error action.",
8037 "enum" : [
8038 "enospc",
8039 "ignore",
8040 "report",
8041 "stop"
44660702 8042 ],
56122987 8043 "optional" : 1,
7aacca6f 8044 "type" : "string"
56122987 8045 }
44660702 8046 },
56122987 8047 "optional" : 1,
4bd7df8b
DM
8048 "type" : "string",
8049 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,queues=<integer>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
56122987
DM
8050 },
8051 "scsihw" : {
44660702 8052 "default" : "lsi",
c2993fe5 8053 "description" : "SCSI controller model",
56122987
DM
8054 "enum" : [
8055 "lsi",
8056 "lsi53c810",
8057 "virtio-scsi-pci",
8058 "virtio-scsi-single",
8059 "megasas",
8060 "pvscsi"
8061 ],
8062 "optional" : 1,
56122987
DM
8063 "type" : "string"
8064 },
44660702 8065 "serial[n]" : {
c2993fe5 8066 "description" : "Create a serial device inside the VM (n is 0 to 3)",
56122987 8067 "optional" : 1,
44660702 8068 "pattern" : "(/dev/.+|socket)",
c2993fe5 8069 "type" : "string",
57b78691 8070 "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"
56122987 8071 },
44660702
DM
8072 "shares" : {
8073 "default" : 1000,
8074 "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",
8075 "maximum" : 50000,
8076 "minimum" : 0,
7aacca6f 8077 "optional" : 1,
4bd7df8b
DM
8078 "type" : "integer",
8079 "typetext" : "integer (0-50000)"
56122987 8080 },
7aacca6f
DM
8081 "skiplock" : {
8082 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8083 "optional" : 1,
8084 "type" : "boolean"
56122987 8085 },
44660702
DM
8086 "smbios1" : {
8087 "description" : "Specify SMBIOS type 1 fields.",
8088 "format" : "pve-qm-smbios1",
8089 "maxLength" : 256,
56122987 8090 "optional" : 1,
4bd7df8b
DM
8091 "type" : "string",
8092 "typetext" : "[family=<string>] [,manufacturer=<string>] [,product=<string>] [,serial=<string>] [,sku=<string>] [,uuid=<UUID>] [,version=<string>]"
56122987 8093 },
44660702
DM
8094 "smp" : {
8095 "default" : 1,
8096 "description" : "The number of CPUs. Please use option -sockets instead.",
8097 "minimum" : 1,
56122987 8098 "optional" : 1,
4bd7df8b
DM
8099 "type" : "integer",
8100 "typetext" : "integer (1- N)"
56122987 8101 },
44660702
DM
8102 "sockets" : {
8103 "default" : 1,
8104 "description" : "The number of CPU sockets.",
8105 "minimum" : 1,
56122987 8106 "optional" : 1,
4bd7df8b
DM
8107 "type" : "integer",
8108 "typetext" : "integer (1- N)"
56122987 8109 },
44660702
DM
8110 "startdate" : {
8111 "default" : "now",
8112 "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'.",
8113 "optional" : 1,
8114 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 8115 "type" : "string",
44660702
DM
8116 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
8117 },
8118 "startup" : {
8119 "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.",
8120 "format" : "pve-startup-order",
7aacca6f 8121 "optional" : 1,
44660702
DM
8122 "type" : "string",
8123 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 8124 },
44660702
DM
8125 "tablet" : {
8126 "default" : 1,
c2993fe5 8127 "description" : "Enable/disable the USB tablet device.",
7aacca6f 8128 "optional" : 1,
c2993fe5
DM
8129 "type" : "boolean",
8130 "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)."
7aacca6f 8131 },
44660702
DM
8132 "tdf" : {
8133 "default" : 0,
8134 "description" : "Enable/disable time drift fix.",
7aacca6f 8135 "optional" : 1,
44660702 8136 "type" : "boolean"
7aacca6f 8137 },
44660702
DM
8138 "template" : {
8139 "default" : 0,
8140 "description" : "Enable/disable Template.",
7aacca6f 8141 "optional" : 1,
44660702 8142 "type" : "boolean"
7aacca6f 8143 },
44660702 8144 "unused[n]" : {
c2993fe5 8145 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 8146 "format" : "pve-volume-id",
7aacca6f
DM
8147 "optional" : 1,
8148 "type" : "string"
8149 },
44660702 8150 "usb[n]" : {
c2993fe5 8151 "description" : "Configure an USB device (n is 0 to 4).",
56122987 8152 "format" : {
44660702
DM
8153 "host" : {
8154 "default_key" : 1,
c2993fe5 8155 "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",
44660702
DM
8156 "format" : "pve-qm-usb-device",
8157 "format_description" : "HOSTUSBDEVICE|spice",
8158 "type" : "string"
7aacca6f 8159 },
44660702 8160 "usb3" : {
c2993fe5
DM
8161 "default" : 0,
8162 "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).",
7aacca6f 8163 "optional" : 1,
44660702 8164 "type" : "boolean"
7aacca6f 8165 }
44660702 8166 },
7aacca6f 8167 "optional" : 1,
4bd7df8b
DM
8168 "type" : "string",
8169 "typetext" : "[host=]<HOSTUSBDEVICE|spice> [,usb3=<1|0>]"
7aacca6f 8170 },
44660702 8171 "vcpus" : {
7aacca6f 8172 "default" : 0,
44660702
DM
8173 "description" : "Number of hotplugged vcpus.",
8174 "minimum" : 1,
7aacca6f 8175 "optional" : 1,
4bd7df8b
DM
8176 "type" : "integer",
8177 "typetext" : "integer (1- N)"
7aacca6f 8178 },
44660702 8179 "vga" : {
c2993fe5 8180 "description" : "Select the VGA type.",
44660702
DM
8181 "enum" : [
8182 "std",
8183 "cirrus",
8184 "vmware",
8185 "qxl",
8186 "serial0",
8187 "serial1",
8188 "serial2",
8189 "serial3",
8190 "qxl2",
8191 "qxl3",
8192 "qxl4"
8193 ],
7aacca6f 8194 "optional" : 1,
c2993fe5
DM
8195 "type" : "string",
8196 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
7aacca6f 8197 },
44660702
DM
8198 "virtio[n]" : {
8199 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
7aacca6f 8200 "format" : {
7aacca6f 8201 "aio" : {
7aacca6f 8202 "description" : "AIO type to use.",
56122987 8203 "enum" : [
7aacca6f
DM
8204 "native",
8205 "threads"
7aacca6f 8206 ],
44660702
DM
8207 "optional" : 1,
8208 "type" : "string"
56122987 8209 },
44660702
DM
8210 "backup" : {
8211 "description" : "Whether the drive should be included when making backups.",
56122987 8212 "optional" : 1,
44660702 8213 "type" : "boolean"
7aacca6f 8214 },
44660702
DM
8215 "bps" : {
8216 "description" : "Maximum r/w speed speed in bytes per second.",
8217 "format_description" : "bps",
7aacca6f 8218 "optional" : 1,
44660702 8219 "type" : "integer"
56122987
DM
8220 },
8221 "bps_rd" : {
7aacca6f 8222 "description" : "Maximum read speed speed in bytes per second.",
44660702 8223 "format_description" : "bps",
56122987 8224 "optional" : 1,
7aacca6f 8225 "type" : "integer"
56122987 8226 },
44660702
DM
8227 "bps_wr" : {
8228 "description" : "Maximum write speed speed in bytes per second.",
8229 "format_description" : "bps",
56122987 8230 "optional" : 1,
7aacca6f 8231 "type" : "integer"
56122987 8232 },
7aacca6f 8233 "cache" : {
44660702 8234 "description" : "The drive's cache mode",
7aacca6f
DM
8235 "enum" : [
8236 "none",
8237 "writethrough",
8238 "writeback",
8239 "unsafe",
8240 "directsync"
8241 ],
56122987 8242 "optional" : 1,
44660702 8243 "type" : "string"
7aacca6f 8244 },
44660702
DM
8245 "cyls" : {
8246 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
8247 "optional" : 1,
8248 "type" : "integer"
8249 },
8250 "detect_zeroes" : {
8251 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
8252 "optional" : 1,
8253 "type" : "boolean"
8254 },
8255 "discard" : {
8256 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 8257 "enum" : [
44660702
DM
8258 "ignore",
8259 "on"
56122987
DM
8260 ],
8261 "optional" : 1,
44660702 8262 "type" : "string"
56122987 8263 },
44660702
DM
8264 "file" : {
8265 "default_key" : 1,
8266 "description" : "The drive's backing volume.",
8267 "format" : "pve-volume-id-or-qm-path",
8268 "format_description" : "volume",
8269 "type" : "string"
8270 },
8271 "format" : {
8272 "description" : "The drive's backing file's data format.",
8273 "enum" : [
8274 "raw",
8275 "cow",
8276 "qcow",
8277 "qed",
8278 "qcow2",
8279 "vmdk",
8280 "cloop"
8281 ],
f004f5b9 8282 "format_description" : "image format",
56122987 8283 "optional" : 1,
44660702 8284 "type" : "string"
56122987 8285 },
44660702
DM
8286 "heads" : {
8287 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
8288 "optional" : 1,
8289 "type" : "integer"
8290 },
8291 "iops" : {
8292 "description" : "Maximum r/w I/O speed in operations per second.",
8293 "format_description" : "iops",
56122987 8294 "optional" : 1,
44660702
DM
8295 "type" : "integer"
8296 },
8297 "iops_max" : {
7aacca6f 8298 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
44660702
DM
8299 "format_description" : "iops",
8300 "optional" : 1,
8301 "type" : "integer"
56122987 8302 },
7aacca6f 8303 "iops_rd" : {
44660702 8304 "description" : "Maximum read I/O speed in operations per second.",
7aacca6f 8305 "format_description" : "iops",
7aacca6f 8306 "optional" : 1,
44660702 8307 "type" : "integer"
56122987 8308 },
44660702
DM
8309 "iops_rd_max" : {
8310 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
8311 "format_description" : "iops",
8312 "optional" : 1,
8313 "type" : "integer"
8314 },
8315 "iops_wr" : {
8316 "description" : "Maximum write I/O speed in operations per second.",
8317 "format_description" : "iops",
8318 "optional" : 1,
8319 "type" : "integer"
8320 },
8321 "iops_wr_max" : {
8322 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
8323 "format_description" : "iops",
8324 "optional" : 1,
8325 "type" : "integer"
8326 },
8327 "iothread" : {
8328 "description" : "Whether to use iothreads for this drive",
44660702
DM
8329 "optional" : 1,
8330 "type" : "boolean"
8331 },
8332 "mbps" : {
8333 "description" : "Maximum r/w speed speed in megabytes per second.",
8334 "format_description" : "mbps",
7aacca6f 8335 "optional" : 1,
44660702 8336 "type" : "number"
7aacca6f
DM
8337 },
8338 "mbps_max" : {
8339 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 8340 "format_description" : "mbps",
56122987 8341 "optional" : 1,
44660702 8342 "type" : "number"
56122987 8343 },
44660702
DM
8344 "mbps_rd" : {
8345 "description" : "Maximum read speed speed in megabytes per second.",
8346 "format_description" : "mbps",
56122987 8347 "optional" : 1,
44660702 8348 "type" : "number"
56122987 8349 },
44660702
DM
8350 "mbps_rd_max" : {
8351 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
8352 "format_description" : "mbps",
8353 "optional" : 1,
8354 "type" : "number"
8355 },
8356 "mbps_wr" : {
8357 "description" : "Maximum write speed speed in megabytes per second.",
8358 "format_description" : "mbps",
8359 "optional" : 1,
8360 "type" : "number"
8361 },
8362 "mbps_wr_max" : {
8363 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8364 "format_description" : "mbps",
8365 "optional" : 1,
8366 "type" : "number"
8367 },
8368 "media" : {
8369 "default" : "disk",
8370 "description" : "The drive's media type.",
56122987 8371 "enum" : [
44660702
DM
8372 "cdrom",
8373 "disk"
56122987
DM
8374 ],
8375 "optional" : 1,
44660702 8376 "type" : "string"
56122987 8377 },
44660702
DM
8378 "rerror" : {
8379 "description" : "Read error action.",
8380 "enum" : [
8381 "ignore",
8382 "report",
8383 "stop"
8384 ],
56122987 8385 "optional" : 1,
44660702 8386 "type" : "string"
56122987 8387 },
44660702
DM
8388 "secs" : {
8389 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 8390 "optional" : 1,
44660702 8391 "type" : "integer"
56122987 8392 },
7aacca6f
DM
8393 "serial" : {
8394 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7aacca6f 8395 "format" : "urlencoded",
44660702 8396 "format_description" : "serial",
7aacca6f 8397 "maxLength" : 60,
44660702
DM
8398 "optional" : 1,
8399 "type" : "string"
56122987 8400 },
44660702
DM
8401 "size" : {
8402 "description" : "Disk size. This is purely informational and has no effect.",
8403 "format" : "disk-size",
f004f5b9 8404 "format_description" : "DiskSize",
44660702
DM
8405 "optional" : 1,
8406 "type" : "string"
56122987 8407 },
44660702
DM
8408 "snapshot" : {
8409 "description" : "Whether the drive should be included when making snapshots.",
56122987 8410 "optional" : 1,
44660702 8411 "type" : "boolean"
56122987 8412 },
44660702
DM
8413 "trans" : {
8414 "description" : "Force disk geometry bios translation mode.",
8415 "enum" : [
8416 "none",
8417 "lba",
8418 "auto"
8419 ],
7aacca6f 8420 "optional" : 1,
44660702 8421 "type" : "string"
7aacca6f 8422 },
44660702
DM
8423 "volume" : {
8424 "alias" : "file"
8425 },
8426 "werror" : {
8427 "description" : "Write error action.",
8428 "enum" : [
8429 "enospc",
8430 "ignore",
8431 "report",
8432 "stop"
8433 ],
7aacca6f 8434 "optional" : 1,
44660702 8435 "type" : "string"
56122987
DM
8436 }
8437 },
7aacca6f 8438 "optional" : 1,
4bd7df8b
DM
8439 "type" : "string",
8440 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
7aacca6f 8441 },
44660702
DM
8442 "vmid" : {
8443 "description" : "The (unique) ID of the VM.",
8444 "format" : "pve-vmid",
8445 "minimum" : 1,
4bd7df8b
DM
8446 "type" : "integer",
8447 "typetext" : "integer (1- N)"
56122987 8448 },
44660702 8449 "watchdog" : {
c2993fe5 8450 "description" : "Create a virtual hardware watchdog device.",
44660702 8451 "format" : "pve-qm-watchdog",
56122987 8452 "optional" : 1,
c2993fe5 8453 "type" : "string",
4bd7df8b 8454 "typetext" : "[[model=]<i6300esb|ib700>] [,action=<reset|shutdown|poweroff|pause|debug|none>]",
c2993fe5 8455 "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)"
56122987 8456 }
7aacca6f 8457 }
56122987 8458 },
56122987
DM
8459 "permissions" : {
8460 "check" : [
8461 "perm",
8462 "/vms/{vmid}",
8463 [
8464 "VM.Config.Disk",
8465 "VM.Config.CDROM",
8466 "VM.Config.CPU",
8467 "VM.Config.Memory",
8468 "VM.Config.Network",
8469 "VM.Config.HWType",
8470 "VM.Config.Options"
8471 ],
8472 "any",
8473 1
8474 ]
8475 },
44660702 8476 "protected" : 1,
7aacca6f 8477 "proxyto" : "node",
56122987 8478 "returns" : {
7aacca6f
DM
8479 "type" : "null"
8480 }
8481 }
8482 },
44660702
DM
8483 "leaf" : 1,
8484 "path" : "/nodes/{node}/qemu/{vmid}/config",
7aacca6f
DM
8485 "text" : "config"
8486 },
8487 {
8488 "info" : {
56122987 8489 "GET" : {
44660702 8490 "description" : "Get virtual machine configuration, including pending changes.",
56122987 8491 "method" : "GET",
44660702 8492 "name" : "vm_pending",
7aacca6f 8493 "parameters" : {
44660702 8494 "additionalProperties" : 0,
7aacca6f
DM
8495 "properties" : {
8496 "node" : {
7aacca6f 8497 "description" : "The cluster node name.",
44660702 8498 "format" : "pve-node",
7aacca6f
DM
8499 "type" : "string"
8500 },
8501 "vmid" : {
44660702 8502 "description" : "The (unique) ID of the VM.",
7aacca6f 8503 "format" : "pve-vmid",
44660702 8504 "minimum" : 1,
4bd7df8b
DM
8505 "type" : "integer",
8506 "typetext" : "integer (1- N)"
7aacca6f 8507 }
44660702 8508 }
7aacca6f 8509 },
56122987
DM
8510 "permissions" : {
8511 "check" : [
8512 "perm",
8513 "/vms/{vmid}",
8514 [
8515 "VM.Audit"
8516 ]
8517 ]
8518 },
7aacca6f 8519 "proxyto" : "node",
44660702
DM
8520 "returns" : {
8521 "items" : {
8522 "properties" : {
8523 "delete" : {
8524 "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.",
8525 "maximum" : 2,
8526 "minimum" : 0,
8527 "optional" : 1,
8528 "type" : "integer"
8529 },
8530 "key" : {
8531 "description" : "Configuration option name.",
8532 "type" : "string"
8533 },
8534 "pending" : {
8535 "description" : "Pending value.",
8536 "optional" : 1,
8537 "type" : "string"
8538 },
8539 "value" : {
8540 "description" : "Current value.",
8541 "optional" : 1,
8542 "type" : "string"
8543 }
8544 },
8545 "type" : "object"
8546 },
8547 "type" : "array"
8548 }
56122987
DM
8549 }
8550 },
7aacca6f 8551 "leaf" : 1,
44660702
DM
8552 "path" : "/nodes/{node}/qemu/{vmid}/pending",
8553 "text" : "pending"
56122987
DM
8554 },
8555 {
56122987
DM
8556 "info" : {
8557 "PUT" : {
7aacca6f 8558 "description" : "Unlink/delete disk images.",
7aacca6f 8559 "method" : "PUT",
7aacca6f 8560 "name" : "unlink",
56122987 8561 "parameters" : {
44660702 8562 "additionalProperties" : 0,
56122987 8563 "properties" : {
7aacca6f 8564 "force" : {
44660702 8565 "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.",
7aacca6f 8566 "optional" : 1,
44660702 8567 "type" : "boolean"
7aacca6f 8568 },
56122987
DM
8569 "idlist" : {
8570 "description" : "A list of disk IDs you want to delete.",
44660702
DM
8571 "format" : "pve-configid-list",
8572 "type" : "string"
8573 },
8574 "node" : {
8575 "description" : "The cluster node name.",
8576 "format" : "pve-node",
8577 "type" : "string"
56122987
DM
8578 },
8579 "vmid" : {
7aacca6f 8580 "description" : "The (unique) ID of the VM.",
44660702 8581 "format" : "pve-vmid",
7aacca6f 8582 "minimum" : 1,
4bd7df8b
DM
8583 "type" : "integer",
8584 "typetext" : "integer (1- N)"
56122987 8585 }
44660702
DM
8586 }
8587 },
8588 "permissions" : {
8589 "check" : [
8590 "perm",
8591 "/vms/{vmid}",
8592 [
8593 "VM.Config.Disk"
8594 ]
8595 ]
8596 },
8597 "protected" : 1,
8598 "proxyto" : "node",
8599 "returns" : {
8600 "type" : "null"
7aacca6f 8601 }
56122987 8602 }
7aacca6f 8603 },
44660702 8604 "leaf" : 1,
7aacca6f 8605 "path" : "/nodes/{node}/qemu/{vmid}/unlink",
44660702 8606 "text" : "unlink"
56122987
DM
8607 },
8608 {
56122987
DM
8609 "info" : {
8610 "POST" : {
7aacca6f 8611 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
8612 "method" : "POST",
8613 "name" : "vncproxy",
56122987 8614 "parameters" : {
44660702 8615 "additionalProperties" : 0,
56122987 8616 "properties" : {
44660702
DM
8617 "node" : {
8618 "description" : "The cluster node name.",
8619 "format" : "pve-node",
8620 "type" : "string"
8621 },
56122987 8622 "vmid" : {
7aacca6f 8623 "description" : "The (unique) ID of the VM.",
44660702 8624 "format" : "pve-vmid",
56122987 8625 "minimum" : 1,
4bd7df8b
DM
8626 "type" : "integer",
8627 "typetext" : "integer (1- N)"
7aacca6f
DM
8628 },
8629 "websocket" : {
8630 "description" : "starts websockify instead of vncproxy",
44660702
DM
8631 "optional" : 1,
8632 "type" : "boolean"
56122987 8633 }
44660702 8634 }
56122987 8635 },
44660702
DM
8636 "permissions" : {
8637 "check" : [
8638 "perm",
8639 "/vms/{vmid}",
8640 [
8641 "VM.Console"
8642 ]
8643 ]
8644 },
8645 "protected" : 1,
56122987 8646 "returns" : {
7aacca6f 8647 "additionalProperties" : 0,
56122987 8648 "properties" : {
7aacca6f 8649 "cert" : {
56122987
DM
8650 "type" : "string"
8651 },
56122987
DM
8652 "port" : {
8653 "type" : "integer"
8654 },
7aacca6f
DM
8655 "ticket" : {
8656 "type" : "string"
8657 },
44660702
DM
8658 "upid" : {
8659 "type" : "string"
8660 },
7aacca6f 8661 "user" : {
56122987
DM
8662 "type" : "string"
8663 }
7aacca6f 8664 }
56122987
DM
8665 }
8666 }
8667 },
44660702
DM
8668 "leaf" : 1,
8669 "path" : "/nodes/{node}/qemu/{vmid}/vncproxy",
7aacca6f 8670 "text" : "vncproxy"
56122987
DM
8671 },
8672 {
56122987
DM
8673 "info" : {
8674 "GET" : {
44660702
DM
8675 "description" : "Opens a weksocket for VNC traffic.",
8676 "method" : "GET",
8677 "name" : "vncwebsocket",
56122987 8678 "parameters" : {
44660702 8679 "additionalProperties" : 0,
56122987 8680 "properties" : {
7aacca6f 8681 "node" : {
7aacca6f 8682 "description" : "The cluster node name.",
44660702 8683 "format" : "pve-node",
7aacca6f
DM
8684 "type" : "string"
8685 },
44660702
DM
8686 "port" : {
8687 "description" : "Port number returned by previous vncproxy call.",
8688 "maximum" : 5999,
8689 "minimum" : 5900,
4bd7df8b
DM
8690 "type" : "integer",
8691 "typetext" : "integer (5900-5999)"
56122987 8692 },
7aacca6f 8693 "vmid" : {
44660702 8694 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8695 "format" : "pve-vmid",
8696 "minimum" : 1,
4bd7df8b
DM
8697 "type" : "integer",
8698 "typetext" : "integer (1- N)"
44660702
DM
8699 },
8700 "vncticket" : {
8701 "description" : "Ticket from previous call to vncproxy.",
8702 "maxLength" : 512,
8703 "type" : "string"
56122987 8704 }
44660702
DM
8705 }
8706 },
8707 "permissions" : {
8708 "check" : [
8709 "perm",
8710 "/vms/{vmid}",
8711 [
8712 "VM.Console"
8713 ]
8714 ],
8715 "description" : "You also need to pass a valid ticket (vncticket)."
56122987 8716 },
7aacca6f
DM
8717 "returns" : {
8718 "properties" : {
8719 "port" : {
8720 "type" : "string"
8721 }
8722 },
8723 "type" : "object"
8724 }
56122987
DM
8725 }
8726 },
7aacca6f 8727 "leaf" : 1,
44660702
DM
8728 "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket",
8729 "text" : "vncwebsocket"
56122987
DM
8730 },
8731 {
8732 "info" : {
8733 "POST" : {
44660702
DM
8734 "description" : "Returns a SPICE configuration to connect to the VM.",
8735 "method" : "POST",
7aacca6f
DM
8736 "name" : "spiceproxy",
8737 "parameters" : {
44660702 8738 "additionalProperties" : 0,
56122987 8739 "properties" : {
44660702
DM
8740 "node" : {
8741 "description" : "The cluster node name.",
8742 "format" : "pve-node",
8743 "type" : "string"
8744 },
7aacca6f 8745 "proxy" : {
44660702 8746 "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).",
7aacca6f 8747 "format" : "address",
7aacca6f 8748 "optional" : 1,
44660702 8749 "type" : "string"
56122987 8750 },
7aacca6f 8751 "vmid" : {
44660702 8752 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8753 "format" : "pve-vmid",
8754 "minimum" : 1,
4bd7df8b
DM
8755 "type" : "integer",
8756 "typetext" : "integer (1- N)"
56122987 8757 }
44660702 8758 }
56122987 8759 },
56122987
DM
8760 "permissions" : {
8761 "check" : [
8762 "perm",
8763 "/vms/{vmid}",
8764 [
8765 "VM.Console"
8766 ]
8767 ]
8768 },
44660702
DM
8769 "protected" : 1,
8770 "proxyto" : "node",
7aacca6f 8771 "returns" : {
44660702
DM
8772 "additionalProperties" : 1,
8773 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 8774 "properties" : {
44660702 8775 "host" : {
7aacca6f
DM
8776 "type" : "string"
8777 },
7aacca6f
DM
8778 "password" : {
8779 "type" : "string"
8780 },
44660702 8781 "proxy" : {
7aacca6f
DM
8782 "type" : "string"
8783 },
44660702
DM
8784 "tls-port" : {
8785 "type" : "integer"
8786 },
8787 "type" : {
7aacca6f
DM
8788 "type" : "string"
8789 }
44660702 8790 }
7aacca6f
DM
8791 }
8792 }
8793 },
44660702
DM
8794 "leaf" : 1,
8795 "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy",
7aacca6f
DM
8796 "text" : "spiceproxy"
8797 },
8798 {
56122987
DM
8799 "children" : [
8800 {
56122987
DM
8801 "info" : {
8802 "GET" : {
44660702
DM
8803 "description" : "Get virtual machine status.",
8804 "method" : "GET",
8805 "name" : "vm_status",
56122987 8806 "parameters" : {
44660702 8807 "additionalProperties" : 0,
56122987 8808 "properties" : {
44660702
DM
8809 "node" : {
8810 "description" : "The cluster node name.",
8811 "format" : "pve-node",
8812 "type" : "string"
8813 },
56122987 8814 "vmid" : {
44660702 8815 "description" : "The (unique) ID of the VM.",
7aacca6f 8816 "format" : "pve-vmid",
56122987 8817 "minimum" : 1,
4bd7df8b
DM
8818 "type" : "integer",
8819 "typetext" : "integer (1- N)"
56122987 8820 }
44660702 8821 }
56122987
DM
8822 },
8823 "permissions" : {
8824 "check" : [
8825 "perm",
8826 "/vms/{vmid}",
8827 [
8828 "VM.Audit"
8829 ]
8830 ]
8831 },
44660702 8832 "protected" : 1,
7aacca6f 8833 "proxyto" : "node",
56122987
DM
8834 "returns" : {
8835 "type" : "object"
7aacca6f 8836 }
56122987 8837 }
7aacca6f 8838 },
7aacca6f 8839 "leaf" : 1,
44660702
DM
8840 "path" : "/nodes/{node}/qemu/{vmid}/status/current",
8841 "text" : "current"
56122987
DM
8842 },
8843 {
56122987
DM
8844 "info" : {
8845 "POST" : {
44660702 8846 "description" : "Start virtual machine.",
56122987 8847 "method" : "POST",
44660702 8848 "name" : "vm_start",
56122987 8849 "parameters" : {
44660702 8850 "additionalProperties" : 0,
56122987 8851 "properties" : {
44660702
DM
8852 "machine" : {
8853 "description" : "Specific the Qemu machine type.",
8854 "maxLength" : 40,
8855 "optional" : 1,
8856 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
8857 "type" : "string"
8858 },
8859 "migratedfrom" : {
8860 "description" : "The cluster node name.",
8861 "format" : "pve-node",
56122987 8862 "optional" : 1,
44660702 8863 "type" : "string"
56122987 8864 },
7aacca6f 8865 "node" : {
7aacca6f 8866 "description" : "The cluster node name.",
44660702
DM
8867 "format" : "pve-node",
8868 "type" : "string"
7aacca6f 8869 },
44660702
DM
8870 "skiplock" : {
8871 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8872 "optional" : 1,
44660702 8873 "type" : "boolean"
56122987 8874 },
44660702
DM
8875 "stateuri" : {
8876 "description" : "Some command save/restore state from this location.",
8877 "maxLength" : 128,
56122987 8878 "optional" : 1,
44660702 8879 "type" : "string"
56122987
DM
8880 },
8881 "vmid" : {
7aacca6f 8882 "description" : "The (unique) ID of the VM.",
44660702
DM
8883 "format" : "pve-vmid",
8884 "minimum" : 1,
4bd7df8b
DM
8885 "type" : "integer",
8886 "typetext" : "integer (1- N)"
56122987 8887 }
44660702 8888 }
7aacca6f 8889 },
56122987
DM
8890 "permissions" : {
8891 "check" : [
8892 "perm",
8893 "/vms/{vmid}",
8894 [
8895 "VM.PowerMgmt"
8896 ]
8897 ]
44660702
DM
8898 },
8899 "protected" : 1,
8900 "proxyto" : "node",
8901 "returns" : {
8902 "type" : "string"
56122987
DM
8903 }
8904 }
44660702
DM
8905 },
8906 "leaf" : 1,
8907 "path" : "/nodes/{node}/qemu/{vmid}/status/start",
8908 "text" : "start"
56122987
DM
8909 },
8910 {
56122987
DM
8911 "info" : {
8912 "POST" : {
7aacca6f 8913 "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",
44660702
DM
8914 "method" : "POST",
8915 "name" : "vm_stop",
56122987 8916 "parameters" : {
44660702 8917 "additionalProperties" : 0,
56122987 8918 "properties" : {
44660702
DM
8919 "keepActive" : {
8920 "default" : 0,
8921 "description" : "Do not decativate storage volumes.",
56122987 8922 "optional" : 1,
44660702 8923 "type" : "boolean"
56122987
DM
8924 },
8925 "migratedfrom" : {
56122987 8926 "description" : "The cluster node name.",
44660702 8927 "format" : "pve-node",
7aacca6f 8928 "optional" : 1,
44660702 8929 "type" : "string"
7aacca6f 8930 },
44660702
DM
8931 "node" : {
8932 "description" : "The cluster node name.",
8933 "format" : "pve-node",
8934 "type" : "string"
56122987
DM
8935 },
8936 "skiplock" : {
8937 "description" : "Ignore locks - only root is allowed to use this option.",
8938 "optional" : 1,
8939 "type" : "boolean"
8940 },
44660702
DM
8941 "timeout" : {
8942 "description" : "Wait maximal timeout seconds.",
8943 "minimum" : 0,
56122987 8944 "optional" : 1,
4bd7df8b
DM
8945 "type" : "integer",
8946 "typetext" : "integer (0- N)"
7aacca6f 8947 },
44660702
DM
8948 "vmid" : {
8949 "description" : "The (unique) ID of the VM.",
8950 "format" : "pve-vmid",
8951 "minimum" : 1,
4bd7df8b
DM
8952 "type" : "integer",
8953 "typetext" : "integer (1- N)"
56122987 8954 }
44660702 8955 }
56122987 8956 },
56122987
DM
8957 "permissions" : {
8958 "check" : [
8959 "perm",
8960 "/vms/{vmid}",
8961 [
8962 "VM.PowerMgmt"
8963 ]
8964 ]
8965 },
44660702
DM
8966 "protected" : 1,
8967 "proxyto" : "node",
7aacca6f
DM
8968 "returns" : {
8969 "type" : "string"
44660702
DM
8970 }
8971 }
8972 },
8973 "leaf" : 1,
8974 "path" : "/nodes/{node}/qemu/{vmid}/status/stop",
8975 "text" : "stop"
8976 },
8977 {
8978 "info" : {
8979 "POST" : {
8980 "description" : "Reset virtual machine.",
8981 "method" : "POST",
8982 "name" : "vm_reset",
56122987 8983 "parameters" : {
7aacca6f 8984 "additionalProperties" : 0,
56122987 8985 "properties" : {
56122987
DM
8986 "node" : {
8987 "description" : "The cluster node name.",
44660702
DM
8988 "format" : "pve-node",
8989 "type" : "string"
56122987
DM
8990 },
8991 "skiplock" : {
44660702 8992 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8993 "optional" : 1,
44660702 8994 "type" : "boolean"
7aacca6f
DM
8995 },
8996 "vmid" : {
44660702 8997 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8998 "format" : "pve-vmid",
8999 "minimum" : 1,
4bd7df8b
DM
9000 "type" : "integer",
9001 "typetext" : "integer (1- N)"
56122987 9002 }
7aacca6f 9003 }
56122987 9004 },
7aacca6f
DM
9005 "permissions" : {
9006 "check" : [
9007 "perm",
9008 "/vms/{vmid}",
9009 [
9010 "VM.PowerMgmt"
9011 ]
9012 ]
9013 },
44660702 9014 "protected" : 1,
7aacca6f 9015 "proxyto" : "node",
56122987
DM
9016 "returns" : {
9017 "type" : "string"
44660702
DM
9018 }
9019 }
9020 },
9021 "leaf" : 1,
9022 "path" : "/nodes/{node}/qemu/{vmid}/status/reset",
9023 "text" : "reset"
9024 },
9025 {
9026 "info" : {
9027 "POST" : {
9028 "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.",
9029 "method" : "POST",
56122987 9030 "name" : "vm_shutdown",
56122987 9031 "parameters" : {
7aacca6f 9032 "additionalProperties" : 0,
56122987 9033 "properties" : {
56122987 9034 "forceStop" : {
56122987 9035 "default" : 0,
44660702 9036 "description" : "Make sure the VM stops.",
7aacca6f 9037 "optional" : 1,
44660702 9038 "type" : "boolean"
56122987
DM
9039 },
9040 "keepActive" : {
7aacca6f 9041 "default" : 0,
44660702
DM
9042 "description" : "Do not decativate storage volumes.",
9043 "optional" : 1,
9044 "type" : "boolean"
9045 },
9046 "node" : {
9047 "description" : "The cluster node name.",
9048 "format" : "pve-node",
9049 "type" : "string"
9050 },
9051 "skiplock" : {
9052 "description" : "Ignore locks - only root is allowed to use this option.",
9053 "optional" : 1,
9054 "type" : "boolean"
56122987 9055 },
7aacca6f 9056 "timeout" : {
7aacca6f 9057 "description" : "Wait maximal timeout seconds.",
44660702 9058 "minimum" : 0,
7aacca6f 9059 "optional" : 1,
4bd7df8b
DM
9060 "type" : "integer",
9061 "typetext" : "integer (0- N)"
7aacca6f 9062 },
56122987 9063 "vmid" : {
7aacca6f 9064 "description" : "The (unique) ID of the VM.",
44660702
DM
9065 "format" : "pve-vmid",
9066 "minimum" : 1,
4bd7df8b
DM
9067 "type" : "integer",
9068 "typetext" : "integer (1- N)"
56122987 9069 }
7aacca6f 9070 }
56122987 9071 },
44660702
DM
9072 "permissions" : {
9073 "check" : [
9074 "perm",
9075 "/vms/{vmid}",
9076 [
9077 "VM.PowerMgmt"
9078 ]
9079 ]
9080 },
7aacca6f 9081 "protected" : 1,
44660702
DM
9082 "proxyto" : "node",
9083 "returns" : {
9084 "type" : "string"
9085 }
56122987
DM
9086 }
9087 },
44660702 9088 "leaf" : 1,
7aacca6f 9089 "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown",
44660702 9090 "text" : "shutdown"
56122987
DM
9091 },
9092 {
56122987
DM
9093 "info" : {
9094 "POST" : {
44660702 9095 "description" : "Suspend virtual machine.",
56122987 9096 "method" : "POST",
44660702 9097 "name" : "vm_suspend",
7aacca6f 9098 "parameters" : {
44660702 9099 "additionalProperties" : 0,
7aacca6f
DM
9100 "properties" : {
9101 "node" : {
7aacca6f 9102 "description" : "The cluster node name.",
44660702
DM
9103 "format" : "pve-node",
9104 "type" : "string"
7aacca6f
DM
9105 },
9106 "skiplock" : {
9107 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
9108 "optional" : 1,
9109 "type" : "boolean"
9110 },
9111 "vmid" : {
9112 "description" : "The (unique) ID of the VM.",
9113 "format" : "pve-vmid",
9114 "minimum" : 1,
4bd7df8b
DM
9115 "type" : "integer",
9116 "typetext" : "integer (1- N)"
44660702
DM
9117 }
9118 }
56122987
DM
9119 },
9120 "permissions" : {
9121 "check" : [
9122 "perm",
9123 "/vms/{vmid}",
9124 [
9125 "VM.PowerMgmt"
9126 ]
9127 ]
9128 },
44660702
DM
9129 "protected" : 1,
9130 "proxyto" : "node",
9131 "returns" : {
9132 "type" : "string"
9133 }
56122987
DM
9134 }
9135 },
44660702 9136 "leaf" : 1,
7aacca6f 9137 "path" : "/nodes/{node}/qemu/{vmid}/status/suspend",
44660702 9138 "text" : "suspend"
56122987
DM
9139 },
9140 {
56122987
DM
9141 "info" : {
9142 "POST" : {
44660702
DM
9143 "description" : "Resume virtual machine.",
9144 "method" : "POST",
7aacca6f 9145 "name" : "vm_resume",
56122987
DM
9146 "parameters" : {
9147 "additionalProperties" : 0,
9148 "properties" : {
44660702
DM
9149 "nocheck" : {
9150 "optional" : 1,
9151 "type" : "boolean"
9152 },
7aacca6f 9153 "node" : {
44660702 9154 "description" : "The cluster node name.",
7aacca6f 9155 "format" : "pve-node",
44660702 9156 "type" : "string"
56122987
DM
9157 },
9158 "skiplock" : {
56122987 9159 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
9160 "optional" : 1,
9161 "type" : "boolean"
56122987 9162 },
7aacca6f 9163 "vmid" : {
7aacca6f
DM
9164 "description" : "The (unique) ID of the VM.",
9165 "format" : "pve-vmid",
44660702 9166 "minimum" : 1,
4bd7df8b
DM
9167 "type" : "integer",
9168 "typetext" : "integer (1- N)"
56122987
DM
9169 }
9170 }
9171 },
9172 "permissions" : {
9173 "check" : [
9174 "perm",
9175 "/vms/{vmid}",
9176 [
9177 "VM.PowerMgmt"
9178 ]
9179 ]
9180 },
44660702
DM
9181 "protected" : 1,
9182 "proxyto" : "node",
56122987
DM
9183 "returns" : {
9184 "type" : "string"
7aacca6f 9185 }
56122987
DM
9186 }
9187 },
44660702
DM
9188 "leaf" : 1,
9189 "path" : "/nodes/{node}/qemu/{vmid}/status/resume",
7aacca6f 9190 "text" : "resume"
56122987
DM
9191 }
9192 ],
9193 "info" : {
44660702
DM
9194 "GET" : {
9195 "description" : "Directory index",
9196 "method" : "GET",
9197 "name" : "vmcmdidx",
56122987 9198 "parameters" : {
44660702 9199 "additionalProperties" : 0,
56122987 9200 "properties" : {
44660702
DM
9201 "node" : {
9202 "description" : "The cluster node name.",
9203 "format" : "pve-node",
7aacca6f
DM
9204 "type" : "string"
9205 },
56122987 9206 "vmid" : {
7aacca6f 9207 "description" : "The (unique) ID of the VM.",
44660702
DM
9208 "format" : "pve-vmid",
9209 "minimum" : 1,
4bd7df8b
DM
9210 "type" : "integer",
9211 "typetext" : "integer (1- N)"
56122987 9212 }
44660702 9213 }
56122987 9214 },
44660702
DM
9215 "permissions" : {
9216 "user" : "all"
9217 },
9218 "proxyto" : "node",
9219 "returns" : {
9220 "items" : {
9221 "properties" : {
9222 "subdir" : {
9223 "type" : "string"
9224 }
9225 },
9226 "type" : "object"
9227 },
9228 "links" : [
9229 {
9230 "href" : "{subdir}",
9231 "rel" : "child"
9232 }
9233 ],
9234 "type" : "array"
9235 }
56122987 9236 }
7aacca6f 9237 },
44660702
DM
9238 "leaf" : 0,
9239 "path" : "/nodes/{node}/qemu/{vmid}/status",
9240 "text" : "status"
56122987
DM
9241 },
9242 {
56122987 9243 "info" : {
44660702
DM
9244 "PUT" : {
9245 "description" : "Send key event to virtual machine.",
9246 "method" : "PUT",
9247 "name" : "vm_sendkey",
9248 "parameters" : {
9249 "additionalProperties" : 0,
56122987 9250 "properties" : {
44660702
DM
9251 "key" : {
9252 "description" : "The key (qemu monitor encoding).",
9253 "type" : "string"
9254 },
9255 "node" : {
9256 "description" : "The cluster node name.",
9257 "format" : "pve-node",
9258 "type" : "string"
9259 },
9260 "skiplock" : {
9261 "description" : "Ignore locks - only root is allowed to use this option.",
9262 "optional" : 1,
56122987 9263 "type" : "boolean"
7aacca6f 9264 },
44660702
DM
9265 "vmid" : {
9266 "description" : "The (unique) ID of the VM.",
9267 "format" : "pve-vmid",
9268 "minimum" : 1,
4bd7df8b
DM
9269 "type" : "integer",
9270 "typetext" : "integer (1- N)"
56122987 9271 }
7aacca6f 9272 }
56122987 9273 },
56122987
DM
9274 "permissions" : {
9275 "check" : [
9276 "perm",
9277 "/vms/{vmid}",
9278 [
44660702 9279 "VM.Console"
56122987
DM
9280 ]
9281 ]
9282 },
7aacca6f 9283 "protected" : 1,
44660702
DM
9284 "proxyto" : "node",
9285 "returns" : {
9286 "type" : "null"
9287 }
9288 }
9289 },
9290 "leaf" : 1,
9291 "path" : "/nodes/{node}/qemu/{vmid}/sendkey",
9292 "text" : "sendkey"
9293 },
9294 {
9295 "info" : {
9296 "GET" : {
9297 "description" : "Check if feature for virtual machine is available.",
9298 "method" : "GET",
7aacca6f 9299 "name" : "vm_feature",
56122987 9300 "parameters" : {
44660702 9301 "additionalProperties" : 0,
56122987 9302 "properties" : {
56122987 9303 "feature" : {
44660702 9304 "description" : "Feature to check.",
56122987
DM
9305 "enum" : [
9306 "snapshot",
9307 "clone",
9308 "copy"
9309 ],
44660702
DM
9310 "type" : "string"
9311 },
9312 "node" : {
9313 "description" : "The cluster node name.",
9314 "format" : "pve-node",
7aacca6f 9315 "type" : "string"
56122987
DM
9316 },
9317 "snapname" : {
56122987 9318 "description" : "The name of the snapshot.",
44660702
DM
9319 "format" : "pve-configid",
9320 "maxLength" : 40,
7aacca6f
DM
9321 "optional" : 1,
9322 "type" : "string"
9323 },
44660702
DM
9324 "vmid" : {
9325 "description" : "The (unique) ID of the VM.",
9326 "format" : "pve-vmid",
9327 "minimum" : 1,
4bd7df8b
DM
9328 "type" : "integer",
9329 "typetext" : "integer (1- N)"
44660702
DM
9330 }
9331 }
9332 },
9333 "permissions" : {
9334 "check" : [
9335 "perm",
9336 "/vms/{vmid}",
9337 [
9338 "VM.Audit"
9339 ]
9340 ]
9341 },
9342 "protected" : 1,
9343 "proxyto" : "node",
9344 "returns" : {
9345 "properties" : {
9346 "hasFeature" : {
9347 "type" : "boolean"
9348 },
9349 "nodes" : {
9350 "items" : {
9351 "type" : "string"
9352 },
9353 "type" : "array"
56122987
DM
9354 }
9355 },
44660702 9356 "type" : "object"
56122987
DM
9357 }
9358 }
9359 },
7aacca6f 9360 "leaf" : 1,
44660702
DM
9361 "path" : "/nodes/{node}/qemu/{vmid}/feature",
9362 "text" : "feature"
56122987
DM
9363 },
9364 {
56122987
DM
9365 "info" : {
9366 "POST" : {
44660702 9367 "description" : "Create a copy of virtual machine/template.",
56122987 9368 "method" : "POST",
7aacca6f 9369 "name" : "clone_vm",
56122987
DM
9370 "parameters" : {
9371 "additionalProperties" : 0,
9372 "properties" : {
44660702
DM
9373 "description" : {
9374 "description" : "Description for the new VM.",
56122987 9375 "optional" : 1,
7aacca6f 9376 "type" : "string"
56122987 9377 },
44660702
DM
9378 "format" : {
9379 "description" : "Target format for file storage.",
9380 "enum" : [
9381 "raw",
9382 "qcow2",
9383 "vmdk"
9384 ],
9385 "optional" : 1,
9386 "requires" : "full",
56122987
DM
9387 "type" : "string"
9388 },
44660702
DM
9389 "full" : {
9390 "default" : 0,
9391 "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.",
7aacca6f 9392 "optional" : 1,
44660702
DM
9393 "type" : "boolean"
9394 },
9395 "name" : {
56122987 9396 "description" : "Set a name for the new VM.",
44660702
DM
9397 "format" : "dns-name",
9398 "optional" : 1,
9399 "type" : "string"
9400 },
9401 "newid" : {
9402 "description" : "VMID for the clone.",
9403 "format" : "pve-vmid",
9404 "minimum" : 1,
4bd7df8b
DM
9405 "type" : "integer",
9406 "typetext" : "integer (1- N)"
44660702
DM
9407 },
9408 "node" : {
9409 "description" : "The cluster node name.",
9410 "format" : "pve-node",
9411 "type" : "string"
7aacca6f
DM
9412 },
9413 "pool" : {
9414 "description" : "Add the new VM to the specified pool.",
44660702 9415 "format" : "pve-poolid",
56122987 9416 "optional" : 1,
44660702 9417 "type" : "string"
56122987 9418 },
44660702
DM
9419 "snapname" : {
9420 "description" : "The name of the snapshot.",
9421 "format" : "pve-configid",
9422 "maxLength" : 40,
7aacca6f
DM
9423 "optional" : 1,
9424 "type" : "string"
56122987 9425 },
44660702
DM
9426 "storage" : {
9427 "description" : "Target storage for full clone.",
9428 "format" : "pve-storage-id",
7aacca6f 9429 "optional" : 1,
44660702
DM
9430 "requires" : "full",
9431 "type" : "string"
56122987 9432 },
44660702
DM
9433 "target" : {
9434 "description" : "Target node. Only allowed if the original VM is on shared storage.",
9435 "format" : "pve-node",
56122987 9436 "optional" : 1,
56122987 9437 "type" : "string"
44660702
DM
9438 },
9439 "vmid" : {
9440 "description" : "The (unique) ID of the VM.",
9441 "format" : "pve-vmid",
9442 "minimum" : 1,
4bd7df8b
DM
9443 "type" : "integer",
9444 "typetext" : "integer (1- N)"
56122987
DM
9445 }
9446 }
9447 },
56122987
DM
9448 "permissions" : {
9449 "check" : [
9450 "and",
9451 [
9452 "perm",
9453 "/vms/{vmid}",
9454 [
9455 "VM.Clone"
9456 ]
9457 ],
9458 [
9459 "or",
9460 [
9461 "perm",
9462 "/vms/{newid}",
9463 [
9464 "VM.Allocate"
9465 ]
9466 ],
9467 [
9468 "perm",
9469 "/pool/{pool}",
9470 [
9471 "VM.Allocate"
9472 ],
9473 "require_param",
9474 "pool"
9475 ]
9476 ]
44660702
DM
9477 ],
9478 "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."
9479 },
9480 "protected" : 1,
9481 "proxyto" : "node",
9482 "returns" : {
9483 "type" : "string"
56122987
DM
9484 }
9485 }
9486 },
44660702
DM
9487 "leaf" : 1,
9488 "path" : "/nodes/{node}/qemu/{vmid}/clone",
56122987
DM
9489 "text" : "clone"
9490 },
9491 {
56122987
DM
9492 "info" : {
9493 "POST" : {
7aacca6f 9494 "description" : "Move volume to different storage.",
44660702
DM
9495 "method" : "POST",
9496 "name" : "move_vm_disk",
56122987
DM
9497 "parameters" : {
9498 "additionalProperties" : 0,
9499 "properties" : {
9500 "delete" : {
44660702 9501 "default" : 0,
56122987 9502 "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
7aacca6f 9503 "optional" : 1,
44660702 9504 "type" : "boolean"
56122987 9505 },
44660702
DM
9506 "digest" : {
9507 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9508 "maxLength" : 40,
9509 "optional" : 1,
9510 "type" : "string"
56122987 9511 },
56122987 9512 "disk" : {
56122987
DM
9513 "description" : "The disk you want to move.",
9514 "enum" : [
9515 "ide0",
9516 "ide1",
9517 "ide2",
9518 "ide3",
9519 "scsi0",
9520 "scsi1",
9521 "scsi2",
9522 "scsi3",
9523 "scsi4",
9524 "scsi5",
9525 "scsi6",
9526 "scsi7",
9527 "scsi8",
9528 "scsi9",
9529 "scsi10",
9530 "scsi11",
9531 "scsi12",
9532 "scsi13",
9533 "virtio0",
9534 "virtio1",
9535 "virtio2",
9536 "virtio3",
9537 "virtio4",
9538 "virtio5",
9539 "virtio6",
9540 "virtio7",
9541 "virtio8",
9542 "virtio9",
9543 "virtio10",
9544 "virtio11",
9545 "virtio12",
9546 "virtio13",
9547 "virtio14",
9548 "virtio15",
9549 "sata0",
9550 "sata1",
9551 "sata2",
9552 "sata3",
9553 "sata4",
9554 "sata5"
44660702
DM
9555 ],
9556 "type" : "string"
7aacca6f
DM
9557 },
9558 "format" : {
9559 "description" : "Target Format.",
9560 "enum" : [
9561 "raw",
9562 "qcow2",
9563 "vmdk"
9564 ],
9565 "optional" : 1,
9566 "type" : "string"
44660702
DM
9567 },
9568 "node" : {
9569 "description" : "The cluster node name.",
9570 "format" : "pve-node",
9571 "type" : "string"
9572 },
9573 "storage" : {
9574 "description" : "Target storage.",
9575 "format" : "pve-storage-id",
9576 "type" : "string"
9577 },
9578 "vmid" : {
9579 "description" : "The (unique) ID of the VM.",
9580 "format" : "pve-vmid",
9581 "minimum" : 1,
4bd7df8b
DM
9582 "type" : "integer",
9583 "typetext" : "integer (1- N)"
56122987
DM
9584 }
9585 }
9586 },
44660702
DM
9587 "permissions" : {
9588 "check" : [
9589 "and",
9590 [
9591 "perm",
9592 "/vms/{vmid}",
9593 [
9594 "VM.Config.Disk"
9595 ]
9596 ],
9597 [
9598 "perm",
9599 "/storage/{storage}",
9600 [
9601 "Datastore.AllocateSpace"
9602 ]
9603 ]
9604 ],
9605 "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage."
9606 },
9607 "protected" : 1,
9608 "proxyto" : "node",
9609 "returns" : {
9610 "description" : "the task ID.",
9611 "type" : "string"
9612 }
56122987 9613 }
7aacca6f 9614 },
44660702 9615 "leaf" : 1,
7aacca6f 9616 "path" : "/nodes/{node}/qemu/{vmid}/move_disk",
44660702 9617 "text" : "move_disk"
56122987
DM
9618 },
9619 {
56122987
DM
9620 "info" : {
9621 "POST" : {
7aacca6f 9622 "description" : "Migrate virtual machine. Creates a new migration task.",
44660702 9623 "method" : "POST",
7aacca6f 9624 "name" : "migrate_vm",
56122987 9625 "parameters" : {
44660702 9626 "additionalProperties" : 0,
56122987 9627 "properties" : {
44660702
DM
9628 "force" : {
9629 "description" : "Allow to migrate VMs which use local devices. Only root may use this option.",
9630 "optional" : 1,
9631 "type" : "boolean"
9632 },
7aacca6f 9633 "node" : {
44660702 9634 "description" : "The cluster node name.",
7aacca6f 9635 "format" : "pve-node",
44660702 9636 "type" : "string"
56122987
DM
9637 },
9638 "online" : {
44660702 9639 "description" : "Use online/live migration.",
56122987 9640 "optional" : 1,
44660702 9641 "type" : "boolean"
56122987 9642 },
44660702
DM
9643 "target" : {
9644 "description" : "Target node.",
9645 "format" : "pve-node",
9646 "type" : "string"
56122987 9647 },
7aacca6f 9648 "vmid" : {
7aacca6f 9649 "description" : "The (unique) ID of the VM.",
44660702 9650 "format" : "pve-vmid",
7aacca6f 9651 "minimum" : 1,
4bd7df8b
DM
9652 "type" : "integer",
9653 "typetext" : "integer (1- N)"
56122987 9654 }
44660702
DM
9655 }
9656 },
9657 "permissions" : {
9658 "check" : [
9659 "perm",
9660 "/vms/{vmid}",
9661 [
9662 "VM.Migrate"
9663 ]
9664 ]
56122987
DM
9665 },
9666 "protected" : 1,
44660702
DM
9667 "proxyto" : "node",
9668 "returns" : {
9669 "description" : "the task ID.",
9670 "type" : "string"
9671 }
56122987 9672 }
7aacca6f 9673 },
44660702
DM
9674 "leaf" : 1,
9675 "path" : "/nodes/{node}/qemu/{vmid}/migrate",
7aacca6f 9676 "text" : "migrate"
56122987
DM
9677 },
9678 {
9679 "info" : {
9680 "POST" : {
44660702 9681 "description" : "Execute Qemu monitor commands.",
56122987 9682 "method" : "POST",
44660702 9683 "name" : "monitor",
56122987 9684 "parameters" : {
7aacca6f 9685 "additionalProperties" : 0,
56122987 9686 "properties" : {
44660702
DM
9687 "command" : {
9688 "description" : "The monitor command.",
9689 "type" : "string"
9690 },
56122987 9691 "node" : {
44660702 9692 "description" : "The cluster node name.",
7aacca6f 9693 "format" : "pve-node",
44660702 9694 "type" : "string"
56122987
DM
9695 },
9696 "vmid" : {
44660702 9697 "description" : "The (unique) ID of the VM.",
56122987 9698 "format" : "pve-vmid",
7aacca6f 9699 "minimum" : 1,
4bd7df8b
DM
9700 "type" : "integer",
9701 "typetext" : "integer (1- N)"
56122987 9702 }
7aacca6f 9703 }
56122987 9704 },
56122987
DM
9705 "permissions" : {
9706 "check" : [
9707 "perm",
9708 "/vms/{vmid}",
9709 [
9710 "VM.Monitor"
9711 ]
9712 ]
7aacca6f 9713 },
44660702
DM
9714 "protected" : 1,
9715 "proxyto" : "node",
9716 "returns" : {
9717 "type" : "string"
9718 }
56122987 9719 }
44660702
DM
9720 },
9721 "leaf" : 1,
9722 "path" : "/nodes/{node}/qemu/{vmid}/monitor",
9723 "text" : "monitor"
56122987
DM
9724 },
9725 {
56122987
DM
9726 "info" : {
9727 "PUT" : {
44660702
DM
9728 "description" : "Extend volume size.",
9729 "method" : "PUT",
9730 "name" : "resize_vm",
56122987 9731 "parameters" : {
44660702 9732 "additionalProperties" : 0,
56122987 9733 "properties" : {
44660702
DM
9734 "digest" : {
9735 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9736 "maxLength" : 40,
9737 "optional" : 1,
56122987
DM
9738 "type" : "string"
9739 },
56122987
DM
9740 "disk" : {
9741 "description" : "The disk you want to resize.",
9742 "enum" : [
9743 "ide0",
9744 "ide1",
9745 "ide2",
9746 "ide3",
9747 "scsi0",
9748 "scsi1",
9749 "scsi2",
9750 "scsi3",
9751 "scsi4",
9752 "scsi5",
9753 "scsi6",
9754 "scsi7",
9755 "scsi8",
9756 "scsi9",
9757 "scsi10",
9758 "scsi11",
9759 "scsi12",
9760 "scsi13",
9761 "virtio0",
9762 "virtio1",
9763 "virtio2",
9764 "virtio3",
9765 "virtio4",
9766 "virtio5",
9767 "virtio6",
9768 "virtio7",
9769 "virtio8",
9770 "virtio9",
9771 "virtio10",
9772 "virtio11",
9773 "virtio12",
9774 "virtio13",
9775 "virtio14",
9776 "virtio15",
9777 "sata0",
9778 "sata1",
9779 "sata2",
9780 "sata3",
9781 "sata4",
9782 "sata5"
44660702
DM
9783 ],
9784 "type" : "string"
56122987 9785 },
44660702
DM
9786 "node" : {
9787 "description" : "The cluster node name.",
9788 "format" : "pve-node",
9789 "type" : "string"
7aacca6f 9790 },
44660702
DM
9791 "size" : {
9792 "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.",
9793 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
9794 "type" : "string"
56122987
DM
9795 },
9796 "skiplock" : {
9797 "description" : "Ignore locks - only root is allowed to use this option.",
9798 "optional" : 1,
9799 "type" : "boolean"
56122987
DM
9800 },
9801 "vmid" : {
7aacca6f 9802 "description" : "The (unique) ID of the VM.",
56122987 9803 "format" : "pve-vmid",
44660702 9804 "minimum" : 1,
4bd7df8b
DM
9805 "type" : "integer",
9806 "typetext" : "integer (1- N)"
56122987
DM
9807 }
9808 }
9809 },
9810 "permissions" : {
9811 "check" : [
9812 "perm",
9813 "/vms/{vmid}",
9814 [
44660702 9815 "VM.Config.Disk"
56122987
DM
9816 ]
9817 ]
9818 },
7aacca6f 9819 "protected" : 1,
7aacca6f 9820 "proxyto" : "node",
44660702
DM
9821 "returns" : {
9822 "type" : "null"
9823 }
7aacca6f
DM
9824 }
9825 },
44660702
DM
9826 "leaf" : 1,
9827 "path" : "/nodes/{node}/qemu/{vmid}/resize",
9828 "text" : "resize"
9829 },
9830 {
56122987
DM
9831 "children" : [
9832 {
9833 "children" : [
9834 {
56122987 9835 "info" : {
44660702
DM
9836 "GET" : {
9837 "description" : "Get snapshot configuration",
9838 "method" : "GET",
9839 "name" : "get_snapshot_config",
56122987 9840 "parameters" : {
44660702 9841 "additionalProperties" : 0,
56122987 9842 "properties" : {
56122987 9843 "node" : {
44660702 9844 "description" : "The cluster node name.",
56122987 9845 "format" : "pve-node",
44660702 9846 "type" : "string"
7aacca6f
DM
9847 },
9848 "snapname" : {
44660702 9849 "description" : "The name of the snapshot.",
7aacca6f 9850 "format" : "pve-configid",
44660702
DM
9851 "maxLength" : 40,
9852 "type" : "string"
7aacca6f
DM
9853 },
9854 "vmid" : {
44660702 9855 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9856 "format" : "pve-vmid",
9857 "minimum" : 1,
4bd7df8b
DM
9858 "type" : "integer",
9859 "typetext" : "integer (1- N)"
56122987 9860 }
44660702 9861 }
56122987
DM
9862 },
9863 "permissions" : {
9864 "check" : [
9865 "perm",
9866 "/vms/{vmid}",
9867 [
9868 "VM.Snapshot"
9869 ]
9870 ]
9871 },
44660702 9872 "proxyto" : "node",
56122987 9873 "returns" : {
44660702 9874 "type" : "object"
7aacca6f
DM
9875 }
9876 },
44660702
DM
9877 "PUT" : {
9878 "description" : "Update snapshot metadata.",
9879 "method" : "PUT",
9880 "name" : "update_snapshot_config",
56122987 9881 "parameters" : {
44660702 9882 "additionalProperties" : 0,
56122987 9883 "properties" : {
44660702
DM
9884 "description" : {
9885 "description" : "A textual description or comment.",
9886 "optional" : 1,
9887 "type" : "string"
9888 },
56122987 9889 "node" : {
7aacca6f 9890 "description" : "The cluster node name.",
44660702
DM
9891 "format" : "pve-node",
9892 "type" : "string"
56122987 9893 },
56122987
DM
9894 "snapname" : {
9895 "description" : "The name of the snapshot.",
44660702 9896 "format" : "pve-configid",
7aacca6f 9897 "maxLength" : 40,
44660702 9898 "type" : "string"
7aacca6f
DM
9899 },
9900 "vmid" : {
9901 "description" : "The (unique) ID of the VM.",
44660702 9902 "format" : "pve-vmid",
7aacca6f 9903 "minimum" : 1,
4bd7df8b
DM
9904 "type" : "integer",
9905 "typetext" : "integer (1- N)"
56122987 9906 }
44660702 9907 }
56122987 9908 },
7aacca6f
DM
9909 "permissions" : {
9910 "check" : [
9911 "perm",
9912 "/vms/{vmid}",
9913 [
9914 "VM.Snapshot"
9915 ]
9916 ]
44660702
DM
9917 },
9918 "protected" : 1,
9919 "proxyto" : "node",
9920 "returns" : {
9921 "type" : "null"
7aacca6f 9922 }
56122987
DM
9923 }
9924 },
44660702 9925 "leaf" : 1,
7aacca6f 9926 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config",
44660702 9927 "text" : "config"
56122987
DM
9928 },
9929 {
56122987
DM
9930 "info" : {
9931 "POST" : {
44660702 9932 "description" : "Rollback VM state to specified snapshot.",
7aacca6f 9933 "method" : "POST",
44660702 9934 "name" : "rollback",
56122987
DM
9935 "parameters" : {
9936 "additionalProperties" : 0,
9937 "properties" : {
44660702
DM
9938 "node" : {
9939 "description" : "The cluster node name.",
9940 "format" : "pve-node",
9941 "type" : "string"
9942 },
56122987 9943 "snapname" : {
44660702 9944 "description" : "The name of the snapshot.",
56122987
DM
9945 "format" : "pve-configid",
9946 "maxLength" : 40,
7aacca6f
DM
9947 "type" : "string"
9948 },
56122987 9949 "vmid" : {
7aacca6f 9950 "description" : "The (unique) ID of the VM.",
44660702 9951 "format" : "pve-vmid",
56122987 9952 "minimum" : 1,
4bd7df8b
DM
9953 "type" : "integer",
9954 "typetext" : "integer (1- N)"
56122987
DM
9955 }
9956 }
9957 },
7aacca6f 9958 "permissions" : {
56122987
DM
9959 "check" : [
9960 "perm",
9961 "/vms/{vmid}",
9962 [
9963 "VM.Snapshot"
9964 ]
9965 ]
9966 },
44660702 9967 "protected" : 1,
7aacca6f 9968 "proxyto" : "node",
44660702
DM
9969 "returns" : {
9970 "description" : "the task ID.",
9971 "type" : "string"
9972 }
56122987
DM
9973 }
9974 },
44660702
DM
9975 "leaf" : 1,
9976 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback",
7aacca6f 9977 "text" : "rollback"
56122987 9978 }
44660702
DM
9979 ],
9980 "info" : {
9981 "DELETE" : {
9982 "description" : "Delete a VM snapshot.",
9983 "method" : "DELETE",
9984 "name" : "delsnapshot",
9985 "parameters" : {
9986 "additionalProperties" : 0,
9987 "properties" : {
9988 "force" : {
9989 "description" : "For removal from config file, even if removing disk snapshots fails.",
9990 "optional" : 1,
9991 "type" : "boolean"
9992 },
9993 "node" : {
9994 "description" : "The cluster node name.",
9995 "format" : "pve-node",
9996 "type" : "string"
9997 },
9998 "snapname" : {
9999 "description" : "The name of the snapshot.",
10000 "format" : "pve-configid",
10001 "maxLength" : 40,
10002 "type" : "string"
10003 },
10004 "vmid" : {
10005 "description" : "The (unique) ID of the VM.",
10006 "format" : "pve-vmid",
10007 "minimum" : 1,
4bd7df8b
DM
10008 "type" : "integer",
10009 "typetext" : "integer (1- N)"
44660702
DM
10010 }
10011 }
10012 },
10013 "permissions" : {
10014 "check" : [
10015 "perm",
10016 "/vms/{vmid}",
10017 [
10018 "VM.Snapshot"
10019 ]
10020 ]
10021 },
10022 "protected" : 1,
10023 "proxyto" : "node",
10024 "returns" : {
10025 "description" : "the task ID.",
10026 "type" : "string"
10027 }
10028 },
10029 "GET" : {
10030 "description" : "",
10031 "method" : "GET",
10032 "name" : "snapshot_cmd_idx",
10033 "parameters" : {
10034 "additionalProperties" : 0,
10035 "properties" : {
10036 "node" : {
10037 "description" : "The cluster node name.",
10038 "format" : "pve-node",
10039 "type" : "string"
10040 },
10041 "snapname" : {
10042 "description" : "The name of the snapshot.",
10043 "format" : "pve-configid",
10044 "maxLength" : 40,
10045 "type" : "string"
10046 },
10047 "vmid" : {
10048 "description" : "The (unique) ID of the VM.",
10049 "format" : "pve-vmid",
10050 "minimum" : 1,
4bd7df8b
DM
10051 "type" : "integer",
10052 "typetext" : "integer (1- N)"
44660702
DM
10053 }
10054 }
10055 },
10056 "permissions" : {
10057 "user" : "all"
10058 },
10059 "returns" : {
10060 "items" : {
10061 "properties" : {},
10062 "type" : "object"
10063 },
10064 "links" : [
10065 {
10066 "href" : "{cmd}",
10067 "rel" : "child"
10068 }
10069 ],
10070 "type" : "array"
10071 }
10072 }
10073 },
10074 "leaf" : 0,
10075 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}",
10076 "text" : "{snapname}"
56122987
DM
10077 }
10078 ],
44660702
DM
10079 "info" : {
10080 "GET" : {
10081 "description" : "List all snapshots.",
10082 "method" : "GET",
10083 "name" : "snapshot_list",
10084 "parameters" : {
10085 "additionalProperties" : 0,
10086 "properties" : {
10087 "node" : {
10088 "description" : "The cluster node name.",
10089 "format" : "pve-node",
10090 "type" : "string"
10091 },
10092 "vmid" : {
10093 "description" : "The (unique) ID of the VM.",
10094 "format" : "pve-vmid",
10095 "minimum" : 1,
4bd7df8b
DM
10096 "type" : "integer",
10097 "typetext" : "integer (1- N)"
44660702
DM
10098 }
10099 }
10100 },
10101 "permissions" : {
10102 "check" : [
10103 "perm",
10104 "/vms/{vmid}",
10105 [
10106 "VM.Audit"
10107 ]
10108 ]
10109 },
10110 "protected" : 1,
10111 "proxyto" : "node",
10112 "returns" : {
10113 "items" : {
10114 "properties" : {},
10115 "type" : "object"
10116 },
10117 "links" : [
10118 {
10119 "href" : "{name}",
10120 "rel" : "child"
10121 }
10122 ],
10123 "type" : "array"
10124 }
10125 },
10126 "POST" : {
10127 "description" : "Snapshot a VM.",
10128 "method" : "POST",
10129 "name" : "snapshot",
10130 "parameters" : {
10131 "additionalProperties" : 0,
10132 "properties" : {
10133 "description" : {
10134 "description" : "A textual description or comment.",
10135 "optional" : 1,
10136 "type" : "string"
10137 },
10138 "node" : {
10139 "description" : "The cluster node name.",
10140 "format" : "pve-node",
10141 "type" : "string"
10142 },
10143 "snapname" : {
10144 "description" : "The name of the snapshot.",
10145 "format" : "pve-configid",
10146 "maxLength" : 40,
10147 "type" : "string"
10148 },
10149 "vmid" : {
10150 "description" : "The (unique) ID of the VM.",
10151 "format" : "pve-vmid",
10152 "minimum" : 1,
4bd7df8b
DM
10153 "type" : "integer",
10154 "typetext" : "integer (1- N)"
44660702
DM
10155 },
10156 "vmstate" : {
10157 "description" : "Save the vmstate",
10158 "optional" : 1,
10159 "type" : "boolean"
10160 }
10161 }
10162 },
10163 "permissions" : {
10164 "check" : [
10165 "perm",
10166 "/vms/{vmid}",
10167 [
10168 "VM.Snapshot"
10169 ]
10170 ]
10171 },
10172 "protected" : 1,
10173 "proxyto" : "node",
10174 "returns" : {
10175 "description" : "the task ID.",
10176 "type" : "string"
10177 }
10178 }
10179 },
10180 "leaf" : 0,
10181 "path" : "/nodes/{node}/qemu/{vmid}/snapshot",
7aacca6f 10182 "text" : "snapshot"
56122987
DM
10183 },
10184 {
56122987
DM
10185 "info" : {
10186 "POST" : {
44660702
DM
10187 "description" : "Create a Template.",
10188 "method" : "POST",
56122987 10189 "name" : "template",
56122987 10190 "parameters" : {
7aacca6f 10191 "additionalProperties" : 0,
56122987 10192 "properties" : {
56122987 10193 "disk" : {
56122987
DM
10194 "description" : "If you want to convert only 1 disk to base image.",
10195 "enum" : [
10196 "ide0",
10197 "ide1",
10198 "ide2",
10199 "ide3",
10200 "scsi0",
10201 "scsi1",
10202 "scsi2",
10203 "scsi3",
10204 "scsi4",
10205 "scsi5",
10206 "scsi6",
10207 "scsi7",
10208 "scsi8",
10209 "scsi9",
10210 "scsi10",
10211 "scsi11",
10212 "scsi12",
10213 "scsi13",
10214 "virtio0",
10215 "virtio1",
10216 "virtio2",
10217 "virtio3",
10218 "virtio4",
10219 "virtio5",
10220 "virtio6",
10221 "virtio7",
10222 "virtio8",
10223 "virtio9",
10224 "virtio10",
10225 "virtio11",
10226 "virtio12",
10227 "virtio13",
10228 "virtio14",
10229 "virtio15",
10230 "sata0",
10231 "sata1",
10232 "sata2",
10233 "sata3",
10234 "sata4",
10235 "sata5"
10236 ],
7aacca6f 10237 "optional" : 1,
56122987
DM
10238 "type" : "string"
10239 },
44660702
DM
10240 "node" : {
10241 "description" : "The cluster node name.",
10242 "format" : "pve-node",
10243 "type" : "string"
10244 },
10245 "vmid" : {
10246 "description" : "The (unique) ID of the VM.",
7aacca6f 10247 "format" : "pve-vmid",
44660702 10248 "minimum" : 1,
4bd7df8b
DM
10249 "type" : "integer",
10250 "typetext" : "integer (1- N)"
56122987 10251 }
7aacca6f 10252 }
56122987 10253 },
7aacca6f
DM
10254 "permissions" : {
10255 "check" : [
10256 "perm",
10257 "/vms/{vmid}",
10258 [
10259 "VM.Allocate"
10260 ]
10261 ],
10262 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
10263 },
44660702 10264 "protected" : 1,
7aacca6f 10265 "proxyto" : "node",
7aacca6f
DM
10266 "returns" : {
10267 "type" : "null"
10268 }
56122987
DM
10269 }
10270 },
44660702 10271 "leaf" : 1,
7aacca6f 10272 "path" : "/nodes/{node}/qemu/{vmid}/template",
44660702 10273 "text" : "template"
56122987
DM
10274 }
10275 ],
7aacca6f 10276 "info" : {
44660702
DM
10277 "DELETE" : {
10278 "description" : "Destroy the vm (also delete all used/owned volumes).",
10279 "method" : "DELETE",
10280 "name" : "destroy_vm",
7aacca6f 10281 "parameters" : {
44660702 10282 "additionalProperties" : 0,
7aacca6f
DM
10283 "properties" : {
10284 "node" : {
44660702 10285 "description" : "The cluster node name.",
7aacca6f 10286 "format" : "pve-node",
44660702
DM
10287 "type" : "string"
10288 },
10289 "skiplock" : {
10290 "description" : "Ignore locks - only root is allowed to use this option.",
10291 "optional" : 1,
10292 "type" : "boolean"
7aacca6f
DM
10293 },
10294 "vmid" : {
44660702 10295 "description" : "The (unique) ID of the VM.",
7aacca6f 10296 "format" : "pve-vmid",
44660702 10297 "minimum" : 1,
4bd7df8b
DM
10298 "type" : "integer",
10299 "typetext" : "integer (1- N)"
7aacca6f 10300 }
44660702 10301 }
7aacca6f 10302 },
7aacca6f
DM
10303 "permissions" : {
10304 "check" : [
10305 "perm",
10306 "/vms/{vmid}",
10307 [
10308 "VM.Allocate"
10309 ]
10310 ]
10311 },
44660702
DM
10312 "protected" : 1,
10313 "proxyto" : "node",
7aacca6f
DM
10314 "returns" : {
10315 "type" : "string"
44660702
DM
10316 }
10317 },
10318 "GET" : {
10319 "description" : "Directory index",
10320 "method" : "GET",
10321 "name" : "vmdiridx",
7aacca6f 10322 "parameters" : {
44660702 10323 "additionalProperties" : 0,
7aacca6f 10324 "properties" : {
7aacca6f 10325 "node" : {
7aacca6f 10326 "description" : "The cluster node name.",
44660702
DM
10327 "format" : "pve-node",
10328 "type" : "string"
10329 },
10330 "vmid" : {
10331 "description" : "The (unique) ID of the VM.",
10332 "format" : "pve-vmid",
10333 "minimum" : 1,
4bd7df8b
DM
10334 "type" : "integer",
10335 "typetext" : "integer (1- N)"
7aacca6f 10336 }
44660702 10337 }
7aacca6f 10338 },
44660702
DM
10339 "permissions" : {
10340 "user" : "all"
10341 },
10342 "proxyto" : "node",
10343 "returns" : {
10344 "items" : {
10345 "properties" : {
10346 "subdir" : {
10347 "type" : "string"
10348 }
10349 },
10350 "type" : "object"
10351 },
10352 "links" : [
10353 {
10354 "href" : "{subdir}",
10355 "rel" : "child"
10356 }
10357 ],
10358 "type" : "array"
10359 }
7aacca6f 10360 }
44660702
DM
10361 },
10362 "leaf" : 0,
10363 "path" : "/nodes/{node}/qemu/{vmid}",
10364 "text" : "{vmid}"
56122987
DM
10365 }
10366 ],
10367 "info" : {
44660702
DM
10368 "GET" : {
10369 "description" : "Virtual machine index (per node).",
10370 "method" : "GET",
10371 "name" : "vmlist",
56122987 10372 "parameters" : {
44660702 10373 "additionalProperties" : 0,
56122987 10374 "properties" : {
44660702
DM
10375 "full" : {
10376 "description" : "Determine the full status of active VMs.",
56122987 10377 "optional" : 1,
44660702 10378 "type" : "boolean"
56122987 10379 },
44660702
DM
10380 "node" : {
10381 "description" : "The cluster node name.",
10382 "format" : "pve-node",
7aacca6f 10383 "type" : "string"
44660702
DM
10384 }
10385 }
10386 },
10387 "permissions" : {
10388 "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>.",
10389 "user" : "all"
10390 },
10391 "protected" : 1,
10392 "proxyto" : "node",
10393 "returns" : {
10394 "items" : {
10395 "properties" : {},
10396 "type" : "object"
10397 },
10398 "links" : [
10399 {
10400 "href" : "{vmid}",
10401 "rel" : "child"
10402 }
10403 ],
10404 "type" : "array"
10405 }
10406 },
10407 "POST" : {
10408 "description" : "Create or restore a virtual machine.",
10409 "method" : "POST",
10410 "name" : "create_vm",
10411 "parameters" : {
10412 "additionalProperties" : 0,
10413 "properties" : {
7aacca6f 10414 "acpi" : {
7aacca6f 10415 "default" : 1,
44660702 10416 "description" : "Enable/disable ACPI.",
56122987 10417 "optional" : 1,
7aacca6f 10418 "type" : "boolean"
56122987 10419 },
44660702
DM
10420 "agent" : {
10421 "default" : 0,
10422 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 10423 "optional" : 1,
44660702 10424 "type" : "boolean"
56122987 10425 },
44660702
DM
10426 "archive" : {
10427 "description" : "The backup file.",
10428 "maxLength" : 255,
56122987 10429 "optional" : 1,
44660702 10430 "type" : "string"
56122987 10431 },
44660702 10432 "args" : {
c2993fe5 10433 "description" : "Arbitrary arguments passed to kvm.",
56122987 10434 "optional" : 1,
c2993fe5
DM
10435 "type" : "string",
10436 "verbose_description" : "Arbitrary arguments passed to kvm, for example:\n\nargs: -no-reboot -no-hpet\n\nNOTE: this option is for experts only.\n"
56122987 10437 },
44660702 10438 "autostart" : {
7aacca6f 10439 "default" : 0,
44660702
DM
10440 "description" : "Automatic restart after crash (currently ignored).",
10441 "optional" : 1,
10442 "type" : "boolean"
7aacca6f 10443 },
44660702
DM
10444 "balloon" : {
10445 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
10446 "minimum" : 0,
56122987 10447 "optional" : 1,
4bd7df8b
DM
10448 "type" : "integer",
10449 "typetext" : "integer (0- N)"
56122987 10450 },
44660702
DM
10451 "bios" : {
10452 "default" : "seabios",
10453 "description" : "Select BIOS implementation.",
10454 "enum" : [
10455 "seabios",
10456 "ovmf"
10457 ],
56122987 10458 "optional" : 1,
44660702 10459 "type" : "string"
56122987 10460 },
44660702
DM
10461 "boot" : {
10462 "default" : "cdn",
10463 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
56122987 10464 "optional" : 1,
44660702
DM
10465 "pattern" : "[acdn]{1,4}",
10466 "type" : "string"
56122987 10467 },
7aacca6f
DM
10468 "bootdisk" : {
10469 "description" : "Enable booting from specified disk.",
44660702
DM
10470 "format" : "pve-qm-bootdisk",
10471 "optional" : 1,
7aacca6f 10472 "pattern" : "(ide|sata|scsi|virtio)\\d+",
44660702
DM
10473 "type" : "string"
10474 },
10475 "cdrom" : {
10476 "description" : "This is an alias for option -ide2",
10477 "format" : "pve-qm-drive",
56122987 10478 "optional" : 1,
44660702
DM
10479 "type" : "string",
10480 "typetext" : "volume"
56122987 10481 },
44660702
DM
10482 "cores" : {
10483 "default" : 1,
10484 "description" : "The number of cores per socket.",
7aacca6f 10485 "minimum" : 1,
44660702 10486 "optional" : 1,
4bd7df8b
DM
10487 "type" : "integer",
10488 "typetext" : "integer (1- N)"
7aacca6f 10489 },
44660702
DM
10490 "cpu" : {
10491 "description" : "Emulated CPU type.",
10492 "format" : {
10493 "cputype" : {
10494 "default" : "kvm64",
10495 "default_key" : 1,
10496 "description" : "Emulated CPU type.",
10497 "enum" : [
10498 "486",
10499 "athlon",
f004f5b9
DM
10500 "Broadwell",
10501 "Broadwell-noTSX",
10502 "Conroe",
44660702 10503 "core2duo",
f004f5b9
DM
10504 "coreduo",
10505 "Haswell",
10506 "Haswell-noTSX",
10507 "host",
10508 "IvyBridge",
44660702
DM
10509 "kvm32",
10510 "kvm64",
44660702 10511 "Nehalem",
44660702
DM
10512 "Opteron_G1",
10513 "Opteron_G2",
10514 "Opteron_G3",
10515 "Opteron_G4",
10516 "Opteron_G5",
f004f5b9
DM
10517 "Penryn",
10518 "pentium",
10519 "pentium2",
10520 "pentium3",
10521 "phenom",
10522 "qemu32",
10523 "qemu64",
10524 "SandyBridge",
10525 "Westmere"
44660702
DM
10526 ],
10527 "format_description" : "cputype",
10528 "type" : "string"
10529 },
10530 "hidden" : {
10531 "default" : 0,
10532 "description" : "Do not identify as a KVM virtual machine.",
10533 "optional" : 1,
10534 "type" : "boolean"
10535 }
10536 },
56122987 10537 "optional" : 1,
4bd7df8b
DM
10538 "type" : "string",
10539 "typetext" : "[cputype=]<cputype> [,hidden=<1|0>]"
56122987 10540 },
44660702 10541 "cpulimit" : {
7aacca6f 10542 "default" : 0,
c2993fe5 10543 "description" : "Limit of CPU usage.",
44660702
DM
10544 "maximum" : 128,
10545 "minimum" : 0,
7aacca6f 10546 "optional" : 1,
c2993fe5 10547 "type" : "number",
4bd7df8b 10548 "typetext" : "number (0-128)",
c2993fe5 10549 "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."
7aacca6f
DM
10550 },
10551 "cpuunits" : {
7aacca6f 10552 "default" : 1000,
c2993fe5 10553 "description" : "CPU weight for a VM.",
7aacca6f 10554 "maximum" : 500000,
44660702
DM
10555 "minimum" : 0,
10556 "optional" : 1,
c2993fe5 10557 "type" : "integer",
4bd7df8b 10558 "typetext" : "integer (0-500000)",
c2993fe5 10559 "verbose_description" : "CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0."
44660702
DM
10560 },
10561 "description" : {
10562 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
56122987 10563 "optional" : 1,
44660702
DM
10564 "type" : "string"
10565 },
10566 "force" : {
10567 "description" : "Allow to overwrite existing VM.",
10568 "optional" : 1,
10569 "requires" : "archive",
10570 "type" : "boolean"
10571 },
10572 "freeze" : {
10573 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
10574 "optional" : 1,
10575 "type" : "boolean"
10576 },
10577 "hostpci[n]" : {
c2993fe5 10578 "description" : "Map host PCI devices into guest.",
44660702
DM
10579 "format" : "pve-qm-hostpci",
10580 "optional" : 1,
57b78691 10581 "type" : "string",
4bd7df8b 10582 "typetext" : "[host=]<HOSTPCIID[;HOSTPCIID2...]> [,pcie=<1|0>] [,rombar=<1|0>] [,x-vga=<1|0>]",
57b78691 10583 "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"
44660702
DM
10584 },
10585 "hotplug" : {
10586 "default" : "network,disk,usb",
10587 "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'.",
10588 "format" : "pve-hotplug-features",
10589 "optional" : 1,
10590 "type" : "string"
7aacca6f 10591 },
4bd7df8b
DM
10592 "hugepages" : {
10593 "description" : "Enable/disable hugepages memory.",
10594 "enum" : [
10595 "any",
10596 "2",
10597 "1024"
10598 ],
10599 "optional" : 1,
10600 "type" : "string"
10601 },
7aacca6f 10602 "ide[n]" : {
44660702 10603 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 10604 "format" : {
44660702
DM
10605 "aio" : {
10606 "description" : "AIO type to use.",
10607 "enum" : [
10608 "native",
10609 "threads"
10610 ],
44660702
DM
10611 "optional" : 1,
10612 "type" : "string"
10613 },
10614 "backup" : {
10615 "description" : "Whether the drive should be included when making backups.",
44660702
DM
10616 "optional" : 1,
10617 "type" : "boolean"
10618 },
10619 "bps" : {
10620 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 10621 "format_description" : "bps",
56122987 10622 "optional" : 1,
44660702 10623 "type" : "integer"
56122987 10624 },
44660702
DM
10625 "bps_rd" : {
10626 "description" : "Maximum read speed speed in bytes per second.",
10627 "format_description" : "bps",
56122987 10628 "optional" : 1,
44660702 10629 "type" : "integer"
56122987 10630 },
44660702
DM
10631 "bps_wr" : {
10632 "description" : "Maximum write speed speed in bytes per second.",
10633 "format_description" : "bps",
56122987 10634 "optional" : 1,
44660702 10635 "type" : "integer"
56122987 10636 },
44660702
DM
10637 "cache" : {
10638 "description" : "The drive's cache mode",
56122987 10639 "enum" : [
7aacca6f 10640 "none",
44660702
DM
10641 "writethrough",
10642 "writeback",
10643 "unsafe",
10644 "directsync"
56122987 10645 ],
56122987 10646 "optional" : 1,
44660702 10647 "type" : "string"
56122987 10648 },
44660702
DM
10649 "cyls" : {
10650 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
10651 "optional" : 1,
10652 "type" : "integer"
7aacca6f 10653 },
44660702
DM
10654 "detect_zeroes" : {
10655 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10656 "optional" : 1,
44660702 10657 "type" : "boolean"
56122987 10658 },
44660702
DM
10659 "discard" : {
10660 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10661 "enum" : [
10662 "ignore",
10663 "on"
10664 ],
56122987 10665 "optional" : 1,
44660702 10666 "type" : "string"
56122987 10667 },
7aacca6f 10668 "file" : {
44660702 10669 "default_key" : 1,
7aacca6f 10670 "description" : "The drive's backing volume.",
7aacca6f
DM
10671 "format" : "pve-volume-id-or-qm-path",
10672 "format_description" : "volume",
7aacca6f 10673 "type" : "string"
56122987 10674 },
44660702
DM
10675 "format" : {
10676 "description" : "The drive's backing file's data format.",
56122987 10677 "enum" : [
44660702
DM
10678 "raw",
10679 "cow",
10680 "qcow",
10681 "qed",
10682 "qcow2",
10683 "vmdk",
10684 "cloop"
7aacca6f 10685 ],
f004f5b9 10686 "format_description" : "image format",
7aacca6f
DM
10687 "optional" : 1,
10688 "type" : "string"
56122987 10689 },
44660702
DM
10690 "heads" : {
10691 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 10692 "optional" : 1,
44660702 10693 "type" : "integer"
56122987 10694 },
44660702
DM
10695 "iops" : {
10696 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 10697 "format_description" : "iops",
56122987 10698 "optional" : 1,
44660702 10699 "type" : "integer"
56122987 10700 },
44660702
DM
10701 "iops_max" : {
10702 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10703 "format_description" : "iops",
56122987 10704 "optional" : 1,
44660702 10705 "type" : "integer"
56122987 10706 },
7aacca6f 10707 "iops_rd" : {
7aacca6f 10708 "description" : "Maximum read I/O speed in operations per second.",
44660702
DM
10709 "format_description" : "iops",
10710 "optional" : 1,
10711 "type" : "integer"
7aacca6f 10712 },
44660702
DM
10713 "iops_rd_max" : {
10714 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
10715 "format_description" : "iops",
56122987 10716 "optional" : 1,
44660702 10717 "type" : "integer"
56122987 10718 },
44660702
DM
10719 "iops_wr" : {
10720 "description" : "Maximum write I/O speed in operations per second.",
10721 "format_description" : "iops",
56122987 10722 "optional" : 1,
44660702 10723 "type" : "integer"
7aacca6f 10724 },
44660702
DM
10725 "iops_wr_max" : {
10726 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10727 "format_description" : "iops",
7aacca6f 10728 "optional" : 1,
44660702 10729 "type" : "integer"
56122987 10730 },
44660702
DM
10731 "mbps" : {
10732 "description" : "Maximum r/w speed speed in megabytes per second.",
10733 "format_description" : "mbps",
7aacca6f 10734 "optional" : 1,
44660702 10735 "type" : "number"
56122987 10736 },
44660702
DM
10737 "mbps_max" : {
10738 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7aacca6f 10739 "format_description" : "mbps",
56122987 10740 "optional" : 1,
44660702 10741 "type" : "number"
56122987 10742 },
44660702
DM
10743 "mbps_rd" : {
10744 "description" : "Maximum read speed speed in megabytes per second.",
10745 "format_description" : "mbps",
7aacca6f 10746 "optional" : 1,
44660702 10747 "type" : "number"
7aacca6f 10748 },
44660702
DM
10749 "mbps_rd_max" : {
10750 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10751 "format_description" : "mbps",
56122987 10752 "optional" : 1,
44660702 10753 "type" : "number"
56122987 10754 },
44660702
DM
10755 "mbps_wr" : {
10756 "description" : "Maximum write speed speed in megabytes per second.",
10757 "format_description" : "mbps",
7aacca6f 10758 "optional" : 1,
44660702 10759 "type" : "number"
56122987 10760 },
44660702
DM
10761 "mbps_wr_max" : {
10762 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
10763 "format_description" : "mbps",
56122987 10764 "optional" : 1,
44660702 10765 "type" : "number"
7aacca6f
DM
10766 },
10767 "media" : {
44660702
DM
10768 "default" : "disk",
10769 "description" : "The drive's media type.",
56122987 10770 "enum" : [
7aacca6f
DM
10771 "cdrom",
10772 "disk"
56122987 10773 ],
56122987 10774 "optional" : 1,
44660702 10775 "type" : "string"
56122987 10776 },
44660702
DM
10777 "model" : {
10778 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
10779 "format" : "urlencoded",
10780 "format_description" : "model",
10781 "maxLength" : 120,
56122987 10782 "optional" : 1,
44660702 10783 "type" : "string"
56122987 10784 },
7aacca6f 10785 "rerror" : {
7aacca6f
DM
10786 "description" : "Read error action.",
10787 "enum" : [
10788 "ignore",
10789 "report",
10790 "stop"
44660702 10791 ],
44660702
DM
10792 "optional" : 1,
10793 "type" : "string"
56122987 10794 },
44660702
DM
10795 "secs" : {
10796 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 10797 "optional" : 1,
44660702
DM
10798 "type" : "integer"
10799 },
10800 "serial" : {
10801 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10802 "format" : "urlencoded",
10803 "format_description" : "serial",
10804 "maxLength" : 60,
10805 "optional" : 1,
10806 "type" : "string"
10807 },
10808 "size" : {
10809 "description" : "Disk size. This is purely informational and has no effect.",
10810 "format" : "disk-size",
f004f5b9 10811 "format_description" : "DiskSize",
44660702
DM
10812 "optional" : 1,
10813 "type" : "string"
7aacca6f
DM
10814 },
10815 "snapshot" : {
44660702 10816 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f 10817 "optional" : 1,
44660702 10818 "type" : "boolean"
7aacca6f 10819 },
44660702
DM
10820 "trans" : {
10821 "description" : "Force disk geometry bios translation mode.",
10822 "enum" : [
10823 "none",
10824 "lba",
10825 "auto"
10826 ],
7aacca6f 10827 "optional" : 1,
44660702
DM
10828 "type" : "string"
10829 },
10830 "volume" : {
10831 "alias" : "file"
10832 },
10833 "werror" : {
10834 "description" : "Write error action.",
10835 "enum" : [
10836 "enospc",
10837 "ignore",
10838 "report",
10839 "stop"
10840 ],
44660702
DM
10841 "optional" : 1,
10842 "type" : "string"
56122987
DM
10843 }
10844 },
56122987 10845 "optional" : 1,
4bd7df8b
DM
10846 "type" : "string",
10847 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,model=<model>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
56122987 10848 },
56122987 10849 "keyboard" : {
44660702 10850 "default" : "en-us",
c2993fe5 10851 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
56122987 10852 "enum" : [
44660702
DM
10853 "de",
10854 "de-ch",
7aacca6f 10855 "da",
56122987 10856 "en-gb",
44660702
DM
10857 "en-us",
10858 "es",
10859 "fi",
10860 "fr",
10861 "fr-be",
10862 "fr-ca",
10863 "fr-ch",
10864 "hu",
7aacca6f 10865 "is",
44660702
DM
10866 "it",
10867 "ja",
10868 "lt",
56122987 10869 "mk",
7aacca6f 10870 "nl",
56122987 10871 "no",
44660702 10872 "pl",
7aacca6f 10873 "pt",
44660702
DM
10874 "pt-br",
10875 "sv",
10876 "sl",
10877 "tr"
56122987 10878 ],
44660702
DM
10879 "optional" : 1,
10880 "type" : "string"
56122987 10881 },
44660702
DM
10882 "kvm" : {
10883 "default" : 1,
10884 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 10885 "optional" : 1,
44660702 10886 "type" : "boolean"
7aacca6f 10887 },
44660702
DM
10888 "localtime" : {
10889 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 10890 "optional" : 1,
44660702
DM
10891 "type" : "boolean"
10892 },
10893 "lock" : {
10894 "description" : "Lock/unlock the VM.",
7aacca6f
DM
10895 "enum" : [
10896 "migrate",
10897 "backup",
10898 "snapshot",
10899 "rollback"
10900 ],
44660702
DM
10901 "optional" : 1,
10902 "type" : "string"
56122987 10903 },
44660702
DM
10904 "machine" : {
10905 "description" : "Specific the Qemu machine type.",
10906 "maxLength" : 40,
10907 "optional" : 1,
10908 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
10909 "type" : "string"
10910 },
10911 "memory" : {
10912 "default" : 512,
10913 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
10914 "minimum" : 16,
10915 "optional" : 1,
4bd7df8b
DM
10916 "type" : "integer",
10917 "typetext" : "integer (16- N)"
44660702
DM
10918 },
10919 "migrate_downtime" : {
10920 "default" : 0.1,
10921 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
10922 "minimum" : 0,
10923 "optional" : 1,
4bd7df8b
DM
10924 "type" : "number",
10925 "typetext" : "number (0- N)"
44660702
DM
10926 },
10927 "migrate_speed" : {
56122987 10928 "default" : 0,
44660702
DM
10929 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
10930 "minimum" : 0,
56122987 10931 "optional" : 1,
4bd7df8b
DM
10932 "type" : "integer",
10933 "typetext" : "integer (0- N)"
56122987 10934 },
44660702
DM
10935 "name" : {
10936 "description" : "Set a name for the VM. Only used on the configuration web interface.",
10937 "format" : "dns-name",
10938 "optional" : 1,
10939 "type" : "string"
10940 },
10941 "net[n]" : {
c2993fe5 10942 "description" : "Specify network devices.",
f004f5b9
DM
10943 "format" : {
10944 "bridge" : {
c2993fe5 10945 "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",
f004f5b9
DM
10946 "format_description" : "bridge",
10947 "optional" : 1,
10948 "type" : "string"
10949 },
10950 "e1000" : {
10951 "alias" : "macaddr",
10952 "keyAlias" : "model"
10953 },
10954 "e1000-82540em" : {
10955 "alias" : "macaddr",
10956 "keyAlias" : "model"
10957 },
10958 "e1000-82544gc" : {
10959 "alias" : "macaddr",
10960 "keyAlias" : "model"
10961 },
10962 "e1000-82545em" : {
10963 "alias" : "macaddr",
10964 "keyAlias" : "model"
10965 },
10966 "firewall" : {
10967 "description" : "Whether this interface should be protected by the firewall.",
10968 "optional" : 1,
10969 "type" : "boolean"
10970 },
10971 "i82551" : {
10972 "alias" : "macaddr",
10973 "keyAlias" : "model"
10974 },
10975 "i82557b" : {
10976 "alias" : "macaddr",
10977 "keyAlias" : "model"
10978 },
10979 "i82559er" : {
10980 "alias" : "macaddr",
10981 "keyAlias" : "model"
10982 },
10983 "link_down" : {
c2993fe5 10984 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
10985 "optional" : 1,
10986 "type" : "boolean"
10987 },
10988 "macaddr" : {
c2993fe5 10989 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 10990 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
10991 "optional" : 1,
10992 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
10993 "type" : "string"
10994 },
10995 "model" : {
10996 "default_key" : 1,
c2993fe5 10997 "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'.",
f004f5b9
DM
10998 "enum" : [
10999 "rtl8139",
11000 "ne2k_pci",
11001 "e1000",
11002 "pcnet",
11003 "virtio",
11004 "ne2k_isa",
11005 "i82551",
11006 "i82557b",
11007 "i82559er",
11008 "vmxnet3",
11009 "e1000-82540em",
11010 "e1000-82544gc",
11011 "e1000-82545em"
11012 ],
11013 "format_description" : "model",
11014 "type" : "string"
11015 },
11016 "ne2k_isa" : {
11017 "alias" : "macaddr",
11018 "keyAlias" : "model"
11019 },
11020 "ne2k_pci" : {
11021 "alias" : "macaddr",
11022 "keyAlias" : "model"
11023 },
11024 "pcnet" : {
11025 "alias" : "macaddr",
11026 "keyAlias" : "model"
11027 },
11028 "queues" : {
11029 "description" : "Number of packet queues to be used on the device.",
11030 "maximum" : 16,
11031 "minimum" : 0,
11032 "optional" : 1,
11033 "type" : "integer"
11034 },
11035 "rate" : {
c2993fe5 11036 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
11037 "minimum" : 0,
11038 "optional" : 1,
11039 "type" : "number"
11040 },
11041 "rtl8139" : {
11042 "alias" : "macaddr",
11043 "keyAlias" : "model"
11044 },
11045 "tag" : {
11046 "description" : "VLAN tag to apply to packets on this interface.",
11047 "maximum" : 4094,
c2993fe5 11048 "minimum" : 1,
f004f5b9
DM
11049 "optional" : 1,
11050 "type" : "integer"
11051 },
11052 "trunks" : {
11053 "description" : "VLAN trunks to pass through this interface.",
11054 "format_description" : "vlanid[;vlanid...]",
11055 "optional" : 1,
11056 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
11057 "type" : "string"
11058 },
11059 "virtio" : {
11060 "alias" : "macaddr",
11061 "keyAlias" : "model"
11062 },
11063 "vmxnet3" : {
11064 "alias" : "macaddr",
11065 "keyAlias" : "model"
11066 }
11067 },
44660702 11068 "optional" : 1,
4bd7df8b
DM
11069 "type" : "string",
11070 "typetext" : "[model=]<model> [,bridge=<bridge>] [,firewall=<1|0>] [,link_down=<1|0>] [,macaddr=<XX:XX:XX:XX:XX:XX>] [,queues=<integer>] [,rate=<number>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,<model>=<macaddr>]"
44660702
DM
11071 },
11072 "node" : {
11073 "description" : "The cluster node name.",
11074 "format" : "pve-node",
11075 "type" : "string"
11076 },
11077 "numa" : {
7aacca6f 11078 "default" : 0,
44660702
DM
11079 "description" : "Enable/disable NUMA.",
11080 "optional" : 1,
11081 "type" : "boolean"
56122987 11082 },
7aacca6f 11083 "numa[n]" : {
c2993fe5 11084 "description" : "NUMA topology.",
7aacca6f 11085 "format" : {
44660702 11086 "cpus" : {
c2993fe5 11087 "description" : "CPUs accessing this NUMA node.",
44660702
DM
11088 "format_description" : "id[-id];...",
11089 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
11090 "type" : "string"
11091 },
7aacca6f 11092 "hostnodes" : {
c2993fe5 11093 "description" : "Host NUMA nodes to use.",
44660702 11094 "format_description" : "id[-id];...",
7aacca6f 11095 "optional" : 1,
44660702
DM
11096 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
11097 "type" : "string"
7aacca6f 11098 },
44660702 11099 "memory" : {
c2993fe5 11100 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
11101 "optional" : 1,
11102 "type" : "number"
7aacca6f
DM
11103 },
11104 "policy" : {
c2993fe5 11105 "description" : "NUMA allocation policy.",
7aacca6f
DM
11106 "enum" : [
11107 "preferred",
11108 "bind",
11109 "interleave"
11110 ],
7aacca6f 11111 "optional" : 1,
44660702 11112 "type" : "string"
7aacca6f
DM
11113 }
11114 },
56122987 11115 "optional" : 1,
4bd7df8b
DM
11116 "type" : "string",
11117 "typetext" : "cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]"
56122987 11118 },
44660702
DM
11119 "onboot" : {
11120 "default" : 0,
11121 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 11122 "optional" : 1,
44660702 11123 "type" : "boolean"
56122987
DM
11124 },
11125 "ostype" : {
c2993fe5 11126 "description" : "Specify guest operating system.",
56122987
DM
11127 "enum" : [
11128 "other",
11129 "wxp",
11130 "w2k",
11131 "w2k3",
11132 "w2k8",
11133 "wvista",
11134 "win7",
11135 "win8",
11136 "l24",
11137 "l26",
11138 "solaris"
44660702 11139 ],
56122987 11140 "optional" : 1,
c2993fe5
DM
11141 "type" : "string",
11142 "verbose_description" : "Specify guest operating system. This is used to enable special\noptimization/features for specific operating systems:\n\n[horizontal]\nother;; unspecified OS\nwxp;; Microsoft Windows XP\nw2k;; Microsoft Windows 2000\nw2k3;; Microsoft Windows 2003\nw2k8;; Microsoft Windows 2008\nwvista;; Microsoft Windows Vista\nwin7;; Microsoft Windows 7\nwin8;; Microsoft Windows 8/2012\nl24;; Linux 2.4 Kernel\nl26;; Linux 2.6/3.X Kernel\nsolaris;; Solaris/OpenSolaris/OpenIndiania kernel\n"
56122987 11143 },
44660702 11144 "parallel[n]" : {
c2993fe5 11145 "description" : "Map host parallel devices (n is 0 to 2).",
56122987 11146 "optional" : 1,
44660702 11147 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
11148 "type" : "string",
11149 "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"
56122987 11150 },
44660702
DM
11151 "pool" : {
11152 "description" : "Add the VM to the specified pool.",
11153 "format" : "pve-poolid",
56122987 11154 "optional" : 1,
44660702 11155 "type" : "string"
56122987 11156 },
44660702
DM
11157 "protection" : {
11158 "default" : 0,
c2993fe5 11159 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
56122987 11160 "optional" : 1,
44660702 11161 "type" : "boolean"
56122987 11162 },
44660702 11163 "reboot" : {
7aacca6f 11164 "default" : 1,
44660702
DM
11165 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
11166 "optional" : 1,
11167 "type" : "boolean"
56122987 11168 },
56122987 11169 "sata[n]" : {
44660702 11170 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 11171 "format" : {
7aacca6f 11172 "aio" : {
44660702 11173 "description" : "AIO type to use.",
56122987 11174 "enum" : [
7aacca6f
DM
11175 "native",
11176 "threads"
56122987 11177 ],
7aacca6f 11178 "optional" : 1,
44660702 11179 "type" : "string"
7aacca6f
DM
11180 },
11181 "backup" : {
7aacca6f 11182 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11183 "optional" : 1,
44660702 11184 "type" : "boolean"
56122987 11185 },
44660702
DM
11186 "bps" : {
11187 "description" : "Maximum r/w speed speed in bytes per second.",
11188 "format_description" : "bps",
7aacca6f 11189 "optional" : 1,
44660702 11190 "type" : "integer"
56122987 11191 },
44660702
DM
11192 "bps_rd" : {
11193 "description" : "Maximum read speed speed in bytes per second.",
11194 "format_description" : "bps",
56122987 11195 "optional" : 1,
44660702 11196 "type" : "integer"
7aacca6f 11197 },
44660702
DM
11198 "bps_wr" : {
11199 "description" : "Maximum write speed speed in bytes per second.",
11200 "format_description" : "bps",
56122987 11201 "optional" : 1,
44660702 11202 "type" : "integer"
56122987 11203 },
7aacca6f 11204 "cache" : {
7aacca6f
DM
11205 "description" : "The drive's cache mode",
11206 "enum" : [
11207 "none",
11208 "writethrough",
11209 "writeback",
11210 "unsafe",
11211 "directsync"
11212 ],
44660702
DM
11213 "optional" : 1,
11214 "type" : "string"
56122987 11215 },
44660702
DM
11216 "cyls" : {
11217 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 11218 "optional" : 1,
7aacca6f 11219 "type" : "integer"
56122987 11220 },
7aacca6f
DM
11221 "detect_zeroes" : {
11222 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11223 "optional" : 1,
7aacca6f 11224 "type" : "boolean"
56122987 11225 },
44660702
DM
11226 "discard" : {
11227 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11228 "enum" : [
11229 "ignore",
11230 "on"
11231 ],
56122987 11232 "optional" : 1,
44660702 11233 "type" : "string"
56122987 11234 },
44660702
DM
11235 "file" : {
11236 "default_key" : 1,
11237 "description" : "The drive's backing volume.",
11238 "format" : "pve-volume-id-or-qm-path",
11239 "format_description" : "volume",
11240 "type" : "string"
56122987
DM
11241 },
11242 "format" : {
44660702 11243 "description" : "The drive's backing file's data format.",
56122987
DM
11244 "enum" : [
11245 "raw",
11246 "cow",
11247 "qcow",
11248 "qed",
11249 "qcow2",
11250 "vmdk",
11251 "cloop"
11252 ],
f004f5b9 11253 "format_description" : "image format",
56122987 11254 "optional" : 1,
44660702 11255 "type" : "string"
56122987 11256 },
7aacca6f 11257 "heads" : {
7aacca6f 11258 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11259 "optional" : 1,
11260 "type" : "integer"
56122987 11261 },
44660702
DM
11262 "iops" : {
11263 "description" : "Maximum r/w I/O speed in operations per second.",
11264 "format_description" : "iops",
11265 "optional" : 1,
11266 "type" : "integer"
56122987 11267 },
44660702
DM
11268 "iops_max" : {
11269 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11270 "format_description" : "iops",
56122987 11271 "optional" : 1,
44660702 11272 "type" : "integer"
56122987 11273 },
44660702
DM
11274 "iops_rd" : {
11275 "description" : "Maximum read I/O speed in operations per second.",
11276 "format_description" : "iops",
56122987 11277 "optional" : 1,
44660702 11278 "type" : "integer"
56122987 11279 },
44660702
DM
11280 "iops_rd_max" : {
11281 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 11282 "format_description" : "iops",
56122987 11283 "optional" : 1,
44660702 11284 "type" : "integer"
56122987 11285 },
44660702
DM
11286 "iops_wr" : {
11287 "description" : "Maximum write I/O speed in operations per second.",
11288 "format_description" : "iops",
7aacca6f 11289 "optional" : 1,
44660702 11290 "type" : "integer"
7aacca6f 11291 },
44660702
DM
11292 "iops_wr_max" : {
11293 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11294 "format_description" : "iops",
56122987 11295 "optional" : 1,
7aacca6f 11296 "type" : "integer"
56122987 11297 },
44660702
DM
11298 "mbps" : {
11299 "description" : "Maximum r/w speed speed in megabytes per second.",
11300 "format_description" : "mbps",
56122987 11301 "optional" : 1,
44660702 11302 "type" : "number"
56122987 11303 },
44660702
DM
11304 "mbps_max" : {
11305 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11306 "format_description" : "mbps",
7aacca6f 11307 "optional" : 1,
44660702 11308 "type" : "number"
7aacca6f 11309 },
44660702
DM
11310 "mbps_rd" : {
11311 "description" : "Maximum read speed speed in megabytes per second.",
11312 "format_description" : "mbps",
7aacca6f 11313 "optional" : 1,
44660702 11314 "type" : "number"
7aacca6f 11315 },
44660702
DM
11316 "mbps_rd_max" : {
11317 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11318 "format_description" : "mbps",
7aacca6f 11319 "optional" : 1,
44660702 11320 "type" : "number"
7aacca6f 11321 },
44660702
DM
11322 "mbps_wr" : {
11323 "description" : "Maximum write speed speed in megabytes per second.",
11324 "format_description" : "mbps",
7aacca6f 11325 "optional" : 1,
44660702 11326 "type" : "number"
7aacca6f
DM
11327 },
11328 "mbps_wr_max" : {
7aacca6f 11329 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
44660702 11330 "format_description" : "mbps",
7aacca6f 11331 "optional" : 1,
44660702 11332 "type" : "number"
7aacca6f 11333 },
44660702
DM
11334 "media" : {
11335 "default" : "disk",
11336 "description" : "The drive's media type.",
56122987 11337 "enum" : [
44660702
DM
11338 "cdrom",
11339 "disk"
56122987 11340 ],
56122987 11341 "optional" : 1,
44660702 11342 "type" : "string"
56122987 11343 },
44660702
DM
11344 "rerror" : {
11345 "description" : "Read error action.",
7aacca6f
DM
11346 "enum" : [
11347 "ignore",
44660702
DM
11348 "report",
11349 "stop"
7aacca6f 11350 ],
56122987 11351 "optional" : 1,
44660702 11352 "type" : "string"
56122987 11353 },
44660702
DM
11354 "secs" : {
11355 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 11356 "optional" : 1,
44660702 11357 "type" : "integer"
56122987 11358 },
44660702
DM
11359 "serial" : {
11360 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11361 "format" : "urlencoded",
11362 "format_description" : "serial",
11363 "maxLength" : 60,
11364 "optional" : 1,
11365 "type" : "string"
7aacca6f
DM
11366 },
11367 "size" : {
11368 "description" : "Disk size. This is purely informational and has no effect.",
44660702 11369 "format" : "disk-size",
f004f5b9 11370 "format_description" : "DiskSize",
56122987 11371 "optional" : 1,
44660702 11372 "type" : "string"
56122987 11373 },
44660702
DM
11374 "snapshot" : {
11375 "description" : "Whether the drive should be included when making snapshots.",
56122987 11376 "optional" : 1,
44660702 11377 "type" : "boolean"
56122987 11378 },
44660702
DM
11379 "trans" : {
11380 "description" : "Force disk geometry bios translation mode.",
56122987 11381 "enum" : [
44660702
DM
11382 "none",
11383 "lba",
11384 "auto"
7aacca6f 11385 ],
44660702
DM
11386 "optional" : 1,
11387 "type" : "string"
11388 },
11389 "volume" : {
11390 "alias" : "file"
56122987
DM
11391 },
11392 "werror" : {
56122987
DM
11393 "description" : "Write error action.",
11394 "enum" : [
11395 "enospc",
11396 "ignore",
11397 "report",
11398 "stop"
11399 ],
56122987 11400 "optional" : 1,
44660702
DM
11401 "type" : "string"
11402 }
11403 },
11404 "optional" : 1,
4bd7df8b
DM
11405 "type" : "string",
11406 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
44660702
DM
11407 },
11408 "scsi[n]" : {
11409 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
11410 "format" : {
11411 "aio" : {
11412 "description" : "AIO type to use.",
11413 "enum" : [
11414 "native",
11415 "threads"
11416 ],
44660702
DM
11417 "optional" : 1,
11418 "type" : "string"
56122987 11419 },
7aacca6f 11420 "backup" : {
44660702 11421 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11422 "optional" : 1,
44660702 11423 "type" : "boolean"
7aacca6f 11424 },
44660702
DM
11425 "bps" : {
11426 "description" : "Maximum r/w speed speed in bytes per second.",
11427 "format_description" : "bps",
7aacca6f 11428 "optional" : 1,
44660702 11429 "type" : "integer"
7aacca6f 11430 },
44660702
DM
11431 "bps_rd" : {
11432 "description" : "Maximum read speed speed in bytes per second.",
11433 "format_description" : "bps",
56122987 11434 "optional" : 1,
44660702 11435 "type" : "integer"
56122987 11436 },
44660702
DM
11437 "bps_wr" : {
11438 "description" : "Maximum write speed speed in bytes per second.",
11439 "format_description" : "bps",
7aacca6f 11440 "optional" : 1,
44660702 11441 "type" : "integer"
56122987 11442 },
44660702
DM
11443 "cache" : {
11444 "description" : "The drive's cache mode",
7aacca6f
DM
11445 "enum" : [
11446 "none",
44660702
DM
11447 "writethrough",
11448 "writeback",
11449 "unsafe",
11450 "directsync"
7aacca6f 11451 ],
56122987 11452 "optional" : 1,
44660702 11453 "type" : "string"
56122987 11454 },
7aacca6f
DM
11455 "cyls" : {
11456 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
11457 "optional" : 1,
44660702 11458 "type" : "integer"
7aacca6f 11459 },
44660702
DM
11460 "detect_zeroes" : {
11461 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11462 "optional" : 1,
44660702 11463 "type" : "boolean"
56122987 11464 },
44660702
DM
11465 "discard" : {
11466 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7aacca6f 11467 "enum" : [
44660702
DM
11468 "ignore",
11469 "on"
7aacca6f 11470 ],
7aacca6f 11471 "optional" : 1,
44660702 11472 "type" : "string"
56122987
DM
11473 },
11474 "file" : {
7aacca6f
DM
11475 "default_key" : 1,
11476 "description" : "The drive's backing volume.",
44660702
DM
11477 "format" : "pve-volume-id-or-qm-path",
11478 "format_description" : "volume",
7aacca6f 11479 "type" : "string"
56122987 11480 },
7aacca6f 11481 "format" : {
44660702 11482 "description" : "The drive's backing file's data format.",
56122987 11483 "enum" : [
7aacca6f
DM
11484 "raw",
11485 "cow",
11486 "qcow",
11487 "qed",
11488 "qcow2",
11489 "vmdk",
11490 "cloop"
56122987 11491 ],
f004f5b9 11492 "format_description" : "image format",
44660702
DM
11493 "optional" : 1,
11494 "type" : "string"
56122987 11495 },
44660702
DM
11496 "heads" : {
11497 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11498 "optional" : 1,
11499 "type" : "integer"
11500 },
11501 "iops" : {
11502 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 11503 "format_description" : "iops",
56122987 11504 "optional" : 1,
44660702 11505 "type" : "integer"
56122987 11506 },
44660702
DM
11507 "iops_max" : {
11508 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11509 "format_description" : "iops",
7aacca6f 11510 "optional" : 1,
44660702 11511 "type" : "integer"
56122987 11512 },
44660702
DM
11513 "iops_rd" : {
11514 "description" : "Maximum read I/O speed in operations per second.",
11515 "format_description" : "iops",
56122987 11516 "optional" : 1,
44660702 11517 "type" : "integer"
56122987 11518 },
44660702
DM
11519 "iops_rd_max" : {
11520 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11521 "format_description" : "iops",
11522 "optional" : 1,
11523 "type" : "integer"
56122987 11524 },
44660702
DM
11525 "iops_wr" : {
11526 "description" : "Maximum write I/O speed in operations per second.",
11527 "format_description" : "iops",
56122987 11528 "optional" : 1,
44660702 11529 "type" : "integer"
56122987 11530 },
44660702
DM
11531 "iops_wr_max" : {
11532 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11533 "format_description" : "iops",
56122987 11534 "optional" : 1,
56122987
DM
11535 "type" : "integer"
11536 },
44660702
DM
11537 "iothread" : {
11538 "description" : "Whether to use iothreads for this drive",
44660702
DM
11539 "optional" : 1,
11540 "type" : "boolean"
11541 },
11542 "mbps" : {
11543 "description" : "Maximum r/w speed speed in megabytes per second.",
11544 "format_description" : "mbps",
11545 "optional" : 1,
11546 "type" : "number"
11547 },
7aacca6f
DM
11548 "mbps_max" : {
11549 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 11550 "format_description" : "mbps",
56122987 11551 "optional" : 1,
44660702 11552 "type" : "number"
56122987 11553 },
44660702
DM
11554 "mbps_rd" : {
11555 "description" : "Maximum read speed speed in megabytes per second.",
11556 "format_description" : "mbps",
11557 "optional" : 1,
11558 "type" : "number"
56122987 11559 },
44660702
DM
11560 "mbps_rd_max" : {
11561 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11562 "format_description" : "mbps",
56122987 11563 "optional" : 1,
44660702 11564 "type" : "number"
56122987 11565 },
44660702
DM
11566 "mbps_wr" : {
11567 "description" : "Maximum write speed speed in megabytes per second.",
11568 "format_description" : "mbps",
56122987 11569 "optional" : 1,
44660702 11570 "type" : "number"
56122987 11571 },
44660702
DM
11572 "mbps_wr_max" : {
11573 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11574 "format_description" : "mbps",
7aacca6f 11575 "optional" : 1,
44660702 11576 "type" : "number"
56122987 11577 },
7aacca6f 11578 "media" : {
44660702 11579 "default" : "disk",
7aacca6f
DM
11580 "description" : "The drive's media type.",
11581 "enum" : [
11582 "cdrom",
11583 "disk"
11584 ],
56122987 11585 "optional" : 1,
44660702 11586 "type" : "string"
56122987 11587 },
44660702
DM
11588 "queues" : {
11589 "description" : "Number of queues.",
44660702
DM
11590 "minimum" : 2,
11591 "optional" : 1,
11592 "type" : "integer"
56122987 11593 },
7aacca6f 11594 "secs" : {
7aacca6f 11595 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11596 "optional" : 1,
11597 "type" : "integer"
11598 },
11599 "serial" : {
11600 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11601 "format" : "urlencoded",
11602 "format_description" : "serial",
11603 "maxLength" : 60,
11604 "optional" : 1,
11605 "type" : "string"
11606 },
11607 "size" : {
11608 "description" : "Disk size. This is purely informational and has no effect.",
11609 "format" : "disk-size",
f004f5b9 11610 "format_description" : "DiskSize",
44660702
DM
11611 "optional" : 1,
11612 "type" : "string"
11613 },
11614 "snapshot" : {
11615 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11616 "optional" : 1,
11617 "type" : "boolean"
11618 },
11619 "trans" : {
11620 "description" : "Force disk geometry bios translation mode.",
11621 "enum" : [
11622 "none",
11623 "lba",
11624 "auto"
11625 ],
44660702
DM
11626 "optional" : 1,
11627 "type" : "string"
11628 },
11629 "volume" : {
11630 "alias" : "file"
11631 },
11632 "werror" : {
11633 "description" : "Write error action.",
11634 "enum" : [
11635 "enospc",
11636 "ignore",
11637 "report",
11638 "stop"
11639 ],
44660702
DM
11640 "optional" : 1,
11641 "type" : "string"
56122987
DM
11642 }
11643 },
7aacca6f 11644 "optional" : 1,
4bd7df8b
DM
11645 "type" : "string",
11646 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,queues=<integer>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
56122987 11647 },
44660702
DM
11648 "scsihw" : {
11649 "default" : "lsi",
c2993fe5 11650 "description" : "SCSI controller model",
44660702
DM
11651 "enum" : [
11652 "lsi",
11653 "lsi53c810",
11654 "virtio-scsi-pci",
11655 "virtio-scsi-single",
11656 "megasas",
11657 "pvscsi"
11658 ],
7aacca6f 11659 "optional" : 1,
44660702 11660 "type" : "string"
7aacca6f 11661 },
44660702 11662 "serial[n]" : {
c2993fe5 11663 "description" : "Create a serial device inside the VM (n is 0 to 3)",
44660702
DM
11664 "optional" : 1,
11665 "pattern" : "(/dev/.+|socket)",
c2993fe5 11666 "type" : "string",
57b78691 11667 "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"
44660702
DM
11668 },
11669 "shares" : {
11670 "default" : 1000,
11671 "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",
11672 "maximum" : 50000,
11673 "minimum" : 0,
11674 "optional" : 1,
4bd7df8b
DM
11675 "type" : "integer",
11676 "typetext" : "integer (0-50000)"
44660702
DM
11677 },
11678 "smbios1" : {
11679 "description" : "Specify SMBIOS type 1 fields.",
11680 "format" : "pve-qm-smbios1",
11681 "maxLength" : 256,
7aacca6f 11682 "optional" : 1,
4bd7df8b
DM
11683 "type" : "string",
11684 "typetext" : "[family=<string>] [,manufacturer=<string>] [,product=<string>] [,serial=<string>] [,sku=<string>] [,uuid=<UUID>] [,version=<string>]"
7aacca6f
DM
11685 },
11686 "smp" : {
44660702 11687 "default" : 1,
7aacca6f 11688 "description" : "The number of CPUs. Please use option -sockets instead.",
44660702 11689 "minimum" : 1,
56122987 11690 "optional" : 1,
4bd7df8b
DM
11691 "type" : "integer",
11692 "typetext" : "integer (1- N)"
44660702
DM
11693 },
11694 "sockets" : {
7aacca6f 11695 "default" : 1,
44660702
DM
11696 "description" : "The number of CPU sockets.",
11697 "minimum" : 1,
11698 "optional" : 1,
4bd7df8b
DM
11699 "type" : "integer",
11700 "typetext" : "integer (1- N)"
7aacca6f 11701 },
44660702
DM
11702 "startdate" : {
11703 "default" : "now",
11704 "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'.",
11705 "optional" : 1,
11706 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
11707 "type" : "string",
11708 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
11709 },
11710 "startup" : {
11711 "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.",
11712 "format" : "pve-startup-order",
11713 "optional" : 1,
11714 "type" : "string",
11715 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11716 },
11717 "storage" : {
11718 "description" : "Default storage.",
11719 "format" : "pve-storage-id",
7aacca6f 11720 "optional" : 1,
56122987
DM
11721 "type" : "string"
11722 },
44660702
DM
11723 "tablet" : {
11724 "default" : 1,
c2993fe5 11725 "description" : "Enable/disable the USB tablet device.",
56122987 11726 "optional" : 1,
c2993fe5
DM
11727 "type" : "boolean",
11728 "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)."
44660702
DM
11729 },
11730 "tdf" : {
11731 "default" : 0,
11732 "description" : "Enable/disable time drift fix.",
11733 "optional" : 1,
11734 "type" : "boolean"
7aacca6f
DM
11735 },
11736 "template" : {
7aacca6f 11737 "default" : 0,
44660702 11738 "description" : "Enable/disable Template.",
7aacca6f
DM
11739 "optional" : 1,
11740 "type" : "boolean"
11741 },
44660702
DM
11742 "unique" : {
11743 "description" : "Assign a unique random ethernet address.",
7aacca6f 11744 "optional" : 1,
44660702
DM
11745 "requires" : "archive",
11746 "type" : "boolean"
56122987 11747 },
44660702 11748 "unused[n]" : {
c2993fe5 11749 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 11750 "format" : "pve-volume-id",
7aacca6f 11751 "optional" : 1,
44660702
DM
11752 "type" : "string"
11753 },
11754 "usb[n]" : {
c2993fe5 11755 "description" : "Configure an USB device (n is 0 to 4).",
56122987 11756 "format" : {
7aacca6f
DM
11757 "host" : {
11758 "default_key" : 1,
c2993fe5 11759 "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",
7aacca6f 11760 "format" : "pve-qm-usb-device",
44660702
DM
11761 "format_description" : "HOSTUSBDEVICE|spice",
11762 "type" : "string"
7aacca6f 11763 },
56122987 11764 "usb3" : {
c2993fe5
DM
11765 "default" : 0,
11766 "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).",
56122987 11767 "optional" : 1,
56122987 11768 "type" : "boolean"
7aacca6f 11769 }
56122987 11770 },
56122987 11771 "optional" : 1,
4bd7df8b
DM
11772 "type" : "string",
11773 "typetext" : "[host=]<HOSTUSBDEVICE|spice> [,usb3=<1|0>]"
56122987 11774 },
44660702
DM
11775 "vcpus" : {
11776 "default" : 0,
11777 "description" : "Number of hotplugged vcpus.",
11778 "minimum" : 1,
56122987 11779 "optional" : 1,
4bd7df8b
DM
11780 "type" : "integer",
11781 "typetext" : "integer (1- N)"
7aacca6f 11782 },
44660702 11783 "vga" : {
c2993fe5 11784 "description" : "Select the VGA type.",
44660702
DM
11785 "enum" : [
11786 "std",
11787 "cirrus",
11788 "vmware",
11789 "qxl",
11790 "serial0",
11791 "serial1",
11792 "serial2",
11793 "serial3",
11794 "qxl2",
11795 "qxl3",
11796 "qxl4"
11797 ],
11798 "optional" : 1,
c2993fe5
DM
11799 "type" : "string",
11800 "verbose_description" : "Select the VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use the options 'std' or 'vmware'. Default is 'std' for win8/win7/w2k8, and 'cirrus' for other OS types. The 'qxl' option enables the SPICE display sever. For win* OS you can select how many independent displays you want, Linux guests can add displays them self. You can also run without any graphic card, using a serial device as terminal."
7aacca6f 11801 },
44660702
DM
11802 "virtio[n]" : {
11803 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
11804 "format" : {
11805 "aio" : {
11806 "description" : "AIO type to use.",
11807 "enum" : [
11808 "native",
11809 "threads"
11810 ],
44660702
DM
11811 "optional" : 1,
11812 "type" : "string"
11813 },
11814 "backup" : {
11815 "description" : "Whether the drive should be included when making backups.",
44660702
DM
11816 "optional" : 1,
11817 "type" : "boolean"
11818 },
11819 "bps" : {
11820 "description" : "Maximum r/w speed speed in bytes per second.",
11821 "format_description" : "bps",
11822 "optional" : 1,
11823 "type" : "integer"
11824 },
11825 "bps_rd" : {
11826 "description" : "Maximum read speed speed in bytes per second.",
11827 "format_description" : "bps",
11828 "optional" : 1,
11829 "type" : "integer"
11830 },
11831 "bps_wr" : {
11832 "description" : "Maximum write speed speed in bytes per second.",
11833 "format_description" : "bps",
11834 "optional" : 1,
11835 "type" : "integer"
11836 },
11837 "cache" : {
11838 "description" : "The drive's cache mode",
11839 "enum" : [
11840 "none",
11841 "writethrough",
11842 "writeback",
11843 "unsafe",
11844 "directsync"
11845 ],
44660702
DM
11846 "optional" : 1,
11847 "type" : "string"
11848 },
11849 "cyls" : {
11850 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
11851 "optional" : 1,
11852 "type" : "integer"
11853 },
11854 "detect_zeroes" : {
11855 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
11856 "optional" : 1,
11857 "type" : "boolean"
11858 },
11859 "discard" : {
11860 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11861 "enum" : [
11862 "ignore",
11863 "on"
11864 ],
44660702
DM
11865 "optional" : 1,
11866 "type" : "string"
11867 },
11868 "file" : {
11869 "default_key" : 1,
11870 "description" : "The drive's backing volume.",
11871 "format" : "pve-volume-id-or-qm-path",
11872 "format_description" : "volume",
11873 "type" : "string"
11874 },
11875 "format" : {
11876 "description" : "The drive's backing file's data format.",
11877 "enum" : [
11878 "raw",
11879 "cow",
11880 "qcow",
11881 "qed",
11882 "qcow2",
11883 "vmdk",
11884 "cloop"
11885 ],
f004f5b9 11886 "format_description" : "image format",
44660702
DM
11887 "optional" : 1,
11888 "type" : "string"
11889 },
11890 "heads" : {
11891 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11892 "optional" : 1,
11893 "type" : "integer"
11894 },
11895 "iops" : {
11896 "description" : "Maximum r/w I/O speed in operations per second.",
11897 "format_description" : "iops",
11898 "optional" : 1,
11899 "type" : "integer"
11900 },
11901 "iops_max" : {
11902 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11903 "format_description" : "iops",
11904 "optional" : 1,
11905 "type" : "integer"
11906 },
11907 "iops_rd" : {
11908 "description" : "Maximum read I/O speed in operations per second.",
11909 "format_description" : "iops",
11910 "optional" : 1,
11911 "type" : "integer"
11912 },
11913 "iops_rd_max" : {
11914 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11915 "format_description" : "iops",
11916 "optional" : 1,
11917 "type" : "integer"
11918 },
11919 "iops_wr" : {
11920 "description" : "Maximum write I/O speed in operations per second.",
11921 "format_description" : "iops",
11922 "optional" : 1,
11923 "type" : "integer"
11924 },
11925 "iops_wr_max" : {
11926 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11927 "format_description" : "iops",
11928 "optional" : 1,
11929 "type" : "integer"
11930 },
11931 "iothread" : {
11932 "description" : "Whether to use iothreads for this drive",
44660702
DM
11933 "optional" : 1,
11934 "type" : "boolean"
11935 },
11936 "mbps" : {
11937 "description" : "Maximum r/w speed speed in megabytes per second.",
11938 "format_description" : "mbps",
11939 "optional" : 1,
11940 "type" : "number"
11941 },
11942 "mbps_max" : {
11943 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11944 "format_description" : "mbps",
11945 "optional" : 1,
11946 "type" : "number"
11947 },
11948 "mbps_rd" : {
11949 "description" : "Maximum read speed speed in megabytes per second.",
11950 "format_description" : "mbps",
11951 "optional" : 1,
11952 "type" : "number"
11953 },
11954 "mbps_rd_max" : {
11955 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11956 "format_description" : "mbps",
11957 "optional" : 1,
11958 "type" : "number"
11959 },
11960 "mbps_wr" : {
11961 "description" : "Maximum write speed speed in megabytes per second.",
11962 "format_description" : "mbps",
11963 "optional" : 1,
11964 "type" : "number"
11965 },
11966 "mbps_wr_max" : {
11967 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11968 "format_description" : "mbps",
11969 "optional" : 1,
11970 "type" : "number"
11971 },
11972 "media" : {
11973 "default" : "disk",
11974 "description" : "The drive's media type.",
11975 "enum" : [
11976 "cdrom",
11977 "disk"
11978 ],
44660702
DM
11979 "optional" : 1,
11980 "type" : "string"
11981 },
11982 "rerror" : {
11983 "description" : "Read error action.",
11984 "enum" : [
11985 "ignore",
11986 "report",
11987 "stop"
11988 ],
44660702
DM
11989 "optional" : 1,
11990 "type" : "string"
11991 },
11992 "secs" : {
11993 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11994 "optional" : 1,
11995 "type" : "integer"
11996 },
11997 "serial" : {
11998 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11999 "format" : "urlencoded",
12000 "format_description" : "serial",
12001 "maxLength" : 60,
12002 "optional" : 1,
12003 "type" : "string"
12004 },
12005 "size" : {
12006 "description" : "Disk size. This is purely informational and has no effect.",
12007 "format" : "disk-size",
f004f5b9 12008 "format_description" : "DiskSize",
44660702
DM
12009 "optional" : 1,
12010 "type" : "string"
12011 },
12012 "snapshot" : {
12013 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
12014 "optional" : 1,
12015 "type" : "boolean"
12016 },
12017 "trans" : {
12018 "description" : "Force disk geometry bios translation mode.",
12019 "enum" : [
12020 "none",
12021 "lba",
12022 "auto"
12023 ],
44660702
DM
12024 "optional" : 1,
12025 "type" : "string"
12026 },
12027 "volume" : {
12028 "alias" : "file"
12029 },
12030 "werror" : {
12031 "description" : "Write error action.",
12032 "enum" : [
12033 "enospc",
12034 "ignore",
12035 "report",
12036 "stop"
12037 ],
44660702
DM
12038 "optional" : 1,
12039 "type" : "string"
12040 }
12041 },
12042 "optional" : 1,
4bd7df8b
DM
12043 "type" : "string",
12044 "typetext" : "[file=]<volume> [,aio=<native|threads>] [,backup=<1|0>] [,bps=<bps>] [,bps_rd=<bps>] [,bps_wr=<bps>] [,cache=<none|writethrough|writeback|unsafe|directsync>] [,cyls=<integer>] [,detect_zeroes=<1|0>] [,discard=<ignore|on>] [,format=<image format>] [,heads=<integer>] [,iops=<iops>] [,iops_max=<iops>] [,iops_rd=<iops>] [,iops_rd_max=<iops>] [,iops_wr=<iops>] [,iops_wr_max=<iops>] [,iothread=<1|0>] [,mbps=<mbps>] [,mbps_max=<mbps>] [,mbps_rd=<mbps>] [,mbps_rd_max=<mbps>] [,mbps_wr=<mbps>] [,mbps_wr_max=<mbps>] [,media=<cdrom|disk>] [,rerror=<ignore|report|stop>] [,secs=<integer>] [,serial=<serial>] [,size=<DiskSize>] [,snapshot=<1|0>] [,trans=<none|lba|auto>] [,werror=<enospc|ignore|report|stop>]"
7aacca6f 12045 },
44660702
DM
12046 "vmid" : {
12047 "description" : "The (unique) ID of the VM.",
12048 "format" : "pve-vmid",
12049 "minimum" : 1,
4bd7df8b
DM
12050 "type" : "integer",
12051 "typetext" : "integer (1- N)"
44660702
DM
12052 },
12053 "watchdog" : {
c2993fe5 12054 "description" : "Create a virtual hardware watchdog device.",
44660702 12055 "format" : "pve-qm-watchdog",
7aacca6f 12056 "optional" : 1,
c2993fe5 12057 "type" : "string",
4bd7df8b 12058 "typetext" : "[[model=]<i6300esb|ib700>] [,action=<reset|shutdown|poweroff|pause|debug|none>]",
c2993fe5 12059 "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)"
56122987 12060 }
44660702 12061 }
56122987 12062 },
56122987 12063 "permissions" : {
44660702
DM
12064 "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.",
12065 "user" : "all"
56122987 12066 },
44660702
DM
12067 "protected" : 1,
12068 "proxyto" : "node",
56122987 12069 "returns" : {
44660702 12070 "type" : "string"
7aacca6f 12071 }
56122987 12072 }
7aacca6f 12073 },
44660702 12074 "leaf" : 0,
7aacca6f 12075 "path" : "/nodes/{node}/qemu",
44660702 12076 "text" : "qemu"
56122987
DM
12077 },
12078 {
12079 "children" : [
12080 {
56122987
DM
12081 "children" : [
12082 {
56122987 12083 "info" : {
44660702
DM
12084 "GET" : {
12085 "description" : "Get container configuration.",
12086 "method" : "GET",
12087 "name" : "vm_config",
12088 "parameters" : {
12089 "additionalProperties" : 0,
12090 "properties" : {
12091 "node" : {
12092 "description" : "The cluster node name.",
12093 "format" : "pve-node",
12094 "type" : "string"
12095 },
12096 "vmid" : {
12097 "description" : "The (unique) ID of the VM.",
12098 "format" : "pve-vmid",
12099 "minimum" : 1,
4bd7df8b
DM
12100 "type" : "integer",
12101 "typetext" : "integer (1- N)"
44660702
DM
12102 }
12103 }
12104 },
12105 "permissions" : {
12106 "check" : [
12107 "perm",
12108 "/vms/{vmid}",
12109 [
12110 "VM.Audit"
12111 ]
12112 ]
12113 },
12114 "proxyto" : "node",
12115 "returns" : {
12116 "properties" : {
12117 "digest" : {
12118 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
12119 "type" : "string"
12120 }
12121 },
12122 "type" : "object"
12123 }
12124 },
56122987 12125 "PUT" : {
44660702
DM
12126 "description" : "Set container options.",
12127 "method" : "PUT",
12128 "name" : "update_vm",
56122987 12129 "parameters" : {
44660702 12130 "additionalProperties" : 0,
56122987 12131 "properties" : {
44660702
DM
12132 "arch" : {
12133 "default" : "amd64",
12134 "description" : "OS architecture type.",
12135 "enum" : [
12136 "amd64",
12137 "i386"
12138 ],
7aacca6f 12139 "optional" : 1,
44660702
DM
12140 "type" : "string"
12141 },
12142 "cmode" : {
7aacca6f 12143 "default" : "tty",
44660702 12144 "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).",
7aacca6f
DM
12145 "enum" : [
12146 "shell",
12147 "console",
12148 "tty"
12149 ],
44660702
DM
12150 "optional" : 1,
12151 "type" : "string"
7aacca6f 12152 },
44660702
DM
12153 "console" : {
12154 "default" : 1,
12155 "description" : "Attach a console device (/dev/console) to the container.",
7aacca6f 12156 "optional" : 1,
44660702 12157 "type" : "boolean"
7aacca6f 12158 },
44660702
DM
12159 "cpulimit" : {
12160 "default" : 0,
12161 "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.",
12162 "maximum" : 128,
7aacca6f 12163 "minimum" : 0,
7aacca6f 12164 "optional" : 1,
4bd7df8b
DM
12165 "type" : "number",
12166 "typetext" : "number (0-128)"
7aacca6f 12167 },
44660702
DM
12168 "cpuunits" : {
12169 "default" : 1024,
12170 "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.",
12171 "maximum" : 500000,
12172 "minimum" : 0,
12173 "optional" : 1,
4bd7df8b
DM
12174 "type" : "integer",
12175 "typetext" : "integer (0-500000)"
7aacca6f 12176 },
44660702
DM
12177 "delete" : {
12178 "description" : "A list of settings you want to delete.",
12179 "format" : "pve-configid-list",
7aacca6f 12180 "optional" : 1,
44660702 12181 "type" : "string"
7aacca6f 12182 },
44660702
DM
12183 "description" : {
12184 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 12185 "optional" : 1,
44660702 12186 "type" : "string"
7aacca6f 12187 },
44660702
DM
12188 "digest" : {
12189 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12190 "maxLength" : 40,
7aacca6f 12191 "optional" : 1,
44660702 12192 "type" : "string"
7aacca6f 12193 },
44660702
DM
12194 "hostname" : {
12195 "description" : "Set a host name for the container.",
12196 "format" : "dns-name",
12197 "maxLength" : 255,
56122987 12198 "optional" : 1,
44660702
DM
12199 "type" : "string"
12200 },
12201 "lock" : {
12202 "description" : "Lock/unlock the VM.",
12203 "enum" : [
12204 "migrate",
12205 "backup",
12206 "snapshot",
12207 "rollback"
12208 ],
12209 "optional" : 1,
12210 "type" : "string"
12211 },
12212 "memory" : {
12213 "default" : 512,
12214 "description" : "Amount of RAM for the VM in MB.",
12215 "minimum" : 16,
12216 "optional" : 1,
4bd7df8b
DM
12217 "type" : "integer",
12218 "typetext" : "integer (16- N)"
7aacca6f
DM
12219 },
12220 "mp[n]" : {
c2993fe5 12221 "description" : "Use volume as container mount point.",
7aacca6f 12222 "format" : {
7aacca6f
DM
12223 "acl" : {
12224 "description" : "Explicitly enable or disable ACL support.",
7aacca6f 12225 "optional" : 1,
44660702 12226 "type" : "boolean"
7aacca6f
DM
12227 },
12228 "backup" : {
12229 "description" : "Whether to include the mountpoint in backups.",
12230 "optional" : 1,
4bd7df8b
DM
12231 "type" : "boolean",
12232 "verbose_description" : "Whether to include the mountpoint in backups (only used for volume mountpoints)."
7aacca6f
DM
12233 },
12234 "mp" : {
4bd7df8b 12235 "description" : "Path to the mountpoint as seen from inside the container (must not contain symlinks).",
7aacca6f 12236 "format" : "pve-lxc-mp-string",
44660702 12237 "format_description" : "Path",
4bd7df8b
DM
12238 "type" : "string",
12239 "verbose_description" : "Path to the mountpoint as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons."
44660702
DM
12240 },
12241 "quota" : {
12242 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12243 "optional" : 1,
12244 "type" : "boolean"
12245 },
12246 "ro" : {
4bd7df8b 12247 "description" : "Read-only mountpoint",
44660702
DM
12248 "optional" : 1,
12249 "type" : "boolean"
12250 },
12251 "size" : {
12252 "description" : "Volume size (read only value).",
12253 "format" : "disk-size",
12254 "format_description" : "DiskSize",
12255 "optional" : 1,
12256 "type" : "string"
12257 },
12258 "volume" : {
12259 "default_key" : 1,
12260 "description" : "Volume, device or directory to mount into the container.",
12261 "format" : "pve-lxc-mp-string",
12262 "format_description" : "volume",
12263 "type" : "string"
12264 }
12265 },
7aacca6f 12266 "optional" : 1,
4bd7df8b
DM
12267 "type" : "string",
12268 "typetext" : "[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
56122987 12269 },
44660702
DM
12270 "nameserver" : {
12271 "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.",
12272 "format" : "address-list",
56122987 12273 "optional" : 1,
44660702 12274 "type" : "string"
56122987
DM
12275 },
12276 "net[n]" : {
44660702 12277 "description" : "Specifies network interfaces for the container.",
56122987 12278 "format" : {
44660702
DM
12279 "bridge" : {
12280 "description" : "Bridge to attach the network device to.",
f004f5b9 12281 "format_description" : "bridge",
56122987 12282 "optional" : 1,
44660702
DM
12283 "pattern" : "[-_.\\w\\d]+",
12284 "type" : "string"
56122987 12285 },
44660702
DM
12286 "firewall" : {
12287 "description" : "Controls whether this interface's firewall rules should be used.",
56122987 12288 "optional" : 1,
44660702 12289 "type" : "boolean"
56122987 12290 },
44660702
DM
12291 "gw" : {
12292 "description" : "Default gateway for IPv4 traffic.",
12293 "format" : "ipv4",
12294 "format_description" : "GatewayIPv4",
56122987 12295 "optional" : 1,
44660702 12296 "type" : "string"
56122987
DM
12297 },
12298 "gw6" : {
7aacca6f 12299 "description" : "Default gateway for IPv6 traffic.",
44660702
DM
12300 "format" : "ipv6",
12301 "format_description" : "GatewayIPv6",
7aacca6f 12302 "optional" : 1,
56122987
DM
12303 "type" : "string"
12304 },
44660702 12305 "hwaddr" : {
f004f5b9
DM
12306 "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)",
12307 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
12308 "optional" : 1,
12309 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
12310 "type" : "string"
12311 },
12312 "ip" : {
12313 "description" : "IPv4 address in CIDR format.",
12314 "format" : "pve-ipv4-config",
12315 "format_description" : "IPv4Format/CIDR",
56122987 12316 "optional" : 1,
44660702 12317 "type" : "string"
56122987 12318 },
7aacca6f 12319 "ip6" : {
7aacca6f
DM
12320 "description" : "IPv6 address in CIDR format.",
12321 "format" : "pve-ipv6-config",
44660702 12322 "format_description" : "IPv6Format/CIDR",
7aacca6f 12323 "optional" : 1,
44660702 12324 "type" : "string"
56122987 12325 },
44660702
DM
12326 "mtu" : {
12327 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702 12328 "minimum" : 64,
56122987 12329 "optional" : 1,
44660702 12330 "type" : "integer"
56122987
DM
12331 },
12332 "name" : {
44660702 12333 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 12334 "format_description" : "string",
56122987 12335 "pattern" : "[-_.\\w\\d]+",
44660702 12336 "type" : "string"
56122987 12337 },
44660702
DM
12338 "rate" : {
12339 "description" : "Apply rate limiting to the interface",
12340 "format_description" : "mbps",
56122987 12341 "optional" : 1,
44660702 12342 "type" : "number"
7aacca6f 12343 },
44660702
DM
12344 "tag" : {
12345 "description" : "VLAN tag for this interface.",
4bd7df8b
DM
12346 "maximum" : 4094,
12347 "minimum" : 1,
56122987 12348 "optional" : 1,
7aacca6f 12349 "type" : "integer"
56122987 12350 },
44660702
DM
12351 "trunks" : {
12352 "description" : "VLAN ids to pass through the interface",
12353 "format_description" : "vlanid[;vlanid...]",
12354 "optional" : 1,
12355 "pattern" : "(?^:\\d+(?:;\\d+)*)",
12356 "type" : "string"
12357 },
12358 "type" : {
12359 "description" : "Network interface type.",
12360 "enum" : [
12361 "veth"
12362 ],
56122987 12363 "optional" : 1,
44660702 12364 "type" : "string"
56122987
DM
12365 }
12366 },
7aacca6f 12367 "optional" : 1,
4bd7df8b
DM
12368 "type" : "string",
12369 "typetext" : "name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]"
56122987 12370 },
44660702
DM
12371 "node" : {
12372 "description" : "The cluster node name.",
12373 "format" : "pve-node",
12374 "type" : "string"
56122987 12375 },
44660702
DM
12376 "onboot" : {
12377 "default" : 0,
12378 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 12379 "optional" : 1,
44660702 12380 "type" : "boolean"
56122987 12381 },
44660702
DM
12382 "ostype" : {
12383 "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.",
12384 "enum" : [
12385 "debian",
12386 "ubuntu",
12387 "centos",
12388 "fedora",
12389 "opensuse",
12390 "archlinux",
12391 "alpine",
57b78691 12392 "gentoo",
44660702
DM
12393 "unmanaged"
12394 ],
56122987 12395 "optional" : 1,
44660702 12396 "type" : "string"
56122987 12397 },
44660702
DM
12398 "protection" : {
12399 "default" : 0,
12400 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
56122987 12401 "optional" : 1,
44660702 12402 "type" : "boolean"
56122987 12403 },
7aacca6f
DM
12404 "rootfs" : {
12405 "description" : "Use volume as container root.",
56122987
DM
12406 "format" : {
12407 "acl" : {
44660702 12408 "description" : "Explicitly enable or disable ACL support.",
7aacca6f
DM
12409 "optional" : 1,
12410 "type" : "boolean"
56122987 12411 },
44660702
DM
12412 "quota" : {
12413 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12414 "optional" : 1,
12415 "type" : "boolean"
12416 },
12417 "ro" : {
4bd7df8b 12418 "description" : "Read-only mountpoint",
56122987 12419 "optional" : 1,
44660702
DM
12420 "type" : "boolean"
12421 },
12422 "size" : {
7aacca6f 12423 "description" : "Volume size (read only value).",
44660702 12424 "format" : "disk-size",
56122987 12425 "format_description" : "DiskSize",
56122987 12426 "optional" : 1,
44660702 12427 "type" : "string"
7aacca6f
DM
12428 },
12429 "volume" : {
7aacca6f
DM
12430 "default_key" : 1,
12431 "description" : "Volume, device or directory to mount into the container.",
44660702
DM
12432 "format" : "pve-lxc-mp-string",
12433 "format_description" : "volume",
7aacca6f 12434 "type" : "string"
56122987 12435 }
44660702
DM
12436 },
12437 "optional" : 1,
4bd7df8b
DM
12438 "type" : "string",
12439 "typetext" : "[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
44660702
DM
12440 },
12441 "searchdomain" : {
12442 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
12443 "format" : "dns-name-list",
12444 "optional" : 1,
12445 "type" : "string"
12446 },
12447 "startup" : {
12448 "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.",
12449 "format" : "pve-startup-order",
12450 "optional" : 1,
12451 "type" : "string",
12452 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
12453 },
12454 "swap" : {
12455 "default" : 512,
12456 "description" : "Amount of SWAP for the VM in MB.",
12457 "minimum" : 0,
12458 "optional" : 1,
4bd7df8b
DM
12459 "type" : "integer",
12460 "typetext" : "integer (0- N)"
56122987 12461 },
56122987 12462 "template" : {
44660702 12463 "default" : 0,
7aacca6f 12464 "description" : "Enable/disable Template.",
56122987 12465 "optional" : 1,
44660702 12466 "type" : "boolean"
56122987 12467 },
44660702
DM
12468 "tty" : {
12469 "default" : 2,
12470 "description" : "Specify the number of tty available to the container",
12471 "maximum" : 6,
12472 "minimum" : 0,
12473 "optional" : 1,
4bd7df8b
DM
12474 "type" : "integer",
12475 "typetext" : "integer (0-6)"
56122987 12476 },
44660702
DM
12477 "unprivileged" : {
12478 "default" : 0,
12479 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
56122987 12480 "optional" : 1,
44660702 12481 "type" : "boolean"
56122987 12482 },
44660702 12483 "unused[n]" : {
c2993fe5 12484 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 12485 "format" : "pve-volume-id",
56122987 12486 "optional" : 1,
44660702
DM
12487 "type" : "string"
12488 },
12489 "vmid" : {
12490 "description" : "The (unique) ID of the VM.",
12491 "format" : "pve-vmid",
12492 "minimum" : 1,
4bd7df8b
DM
12493 "type" : "integer",
12494 "typetext" : "integer (1- N)"
56122987 12495 }
44660702 12496 }
56122987 12497 },
56122987
DM
12498 "permissions" : {
12499 "check" : [
12500 "perm",
12501 "/vms/{vmid}",
12502 [
12503 "VM.Config.Disk",
12504 "VM.Config.CPU",
12505 "VM.Config.Memory",
12506 "VM.Config.Network",
12507 "VM.Config.Options"
12508 ],
12509 "any",
12510 1
12511 ]
12512 },
44660702
DM
12513 "protected" : 1,
12514 "proxyto" : "node",
56122987
DM
12515 "returns" : {
12516 "type" : "null"
7aacca6f 12517 }
56122987 12518 }
7aacca6f 12519 },
44660702 12520 "leaf" : 1,
7aacca6f 12521 "path" : "/nodes/{node}/lxc/{vmid}/config",
44660702 12522 "text" : "config"
56122987
DM
12523 },
12524 {
56122987
DM
12525 "children" : [
12526 {
12527 "info" : {
12528 "GET" : {
44660702 12529 "description" : "Get virtual machine status.",
7aacca6f 12530 "method" : "GET",
44660702 12531 "name" : "vm_status",
56122987 12532 "parameters" : {
44660702 12533 "additionalProperties" : 0,
56122987 12534 "properties" : {
56122987 12535 "node" : {
44660702 12536 "description" : "The cluster node name.",
56122987 12537 "format" : "pve-node",
44660702 12538 "type" : "string"
7aacca6f
DM
12539 },
12540 "vmid" : {
12541 "description" : "The (unique) ID of the VM.",
44660702 12542 "format" : "pve-vmid",
7aacca6f 12543 "minimum" : 1,
4bd7df8b
DM
12544 "type" : "integer",
12545 "typetext" : "integer (1- N)"
56122987 12546 }
44660702 12547 }
7aacca6f
DM
12548 },
12549 "permissions" : {
12550 "check" : [
12551 "perm",
12552 "/vms/{vmid}",
12553 [
12554 "VM.Audit"
12555 ]
12556 ]
12557 },
44660702 12558 "protected" : 1,
7aacca6f 12559 "proxyto" : "node",
44660702
DM
12560 "returns" : {
12561 "type" : "object"
12562 }
56122987
DM
12563 }
12564 },
44660702
DM
12565 "leaf" : 1,
12566 "path" : "/nodes/{node}/lxc/{vmid}/status/current",
56122987
DM
12567 "text" : "current"
12568 },
12569 {
56122987
DM
12570 "info" : {
12571 "POST" : {
7aacca6f 12572 "description" : "Start the container.",
44660702 12573 "method" : "POST",
7aacca6f 12574 "name" : "vm_start",
56122987
DM
12575 "parameters" : {
12576 "additionalProperties" : 0,
12577 "properties" : {
56122987 12578 "node" : {
7aacca6f 12579 "description" : "The cluster node name.",
44660702
DM
12580 "format" : "pve-node",
12581 "type" : "string"
56122987 12582 },
7aacca6f 12583 "skiplock" : {
44660702 12584 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 12585 "optional" : 1,
44660702 12586 "type" : "boolean"
7aacca6f 12587 },
56122987 12588 "vmid" : {
7aacca6f 12589 "description" : "The (unique) ID of the VM.",
44660702 12590 "format" : "pve-vmid",
56122987 12591 "minimum" : 1,
4bd7df8b
DM
12592 "type" : "integer",
12593 "typetext" : "integer (1- N)"
56122987
DM
12594 }
12595 }
12596 },
12597 "permissions" : {
12598 "check" : [
12599 "perm",
12600 "/vms/{vmid}",
12601 [
12602 "VM.PowerMgmt"
12603 ]
12604 ]
12605 },
44660702 12606 "protected" : 1,
7aacca6f 12607 "proxyto" : "node",
44660702
DM
12608 "returns" : {
12609 "type" : "string"
12610 }
12611 }
12612 },
12613 "leaf" : 1,
12614 "path" : "/nodes/{node}/lxc/{vmid}/status/start",
12615 "text" : "start"
12616 },
12617 {
12618 "info" : {
12619 "POST" : {
12620 "description" : "Stop the container. This will abruptly stop all processes running in the container.",
7aacca6f
DM
12621 "method" : "POST",
12622 "name" : "vm_stop",
12623 "parameters" : {
44660702 12624 "additionalProperties" : 0,
7aacca6f 12625 "properties" : {
44660702
DM
12626 "node" : {
12627 "description" : "The cluster node name.",
12628 "format" : "pve-node",
12629 "type" : "string"
12630 },
7aacca6f
DM
12631 "skiplock" : {
12632 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
12633 "optional" : 1,
12634 "type" : "boolean"
7aacca6f
DM
12635 },
12636 "vmid" : {
44660702 12637 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12638 "format" : "pve-vmid",
12639 "minimum" : 1,
4bd7df8b
DM
12640 "type" : "integer",
12641 "typetext" : "integer (1- N)"
7aacca6f 12642 }
44660702
DM
12643 }
12644 },
12645 "permissions" : {
12646 "check" : [
12647 "perm",
12648 "/vms/{vmid}",
12649 [
12650 "VM.PowerMgmt"
12651 ]
12652 ]
7aacca6f 12653 },
44660702
DM
12654 "protected" : 1,
12655 "proxyto" : "node",
12656 "returns" : {
12657 "type" : "string"
12658 }
56122987 12659 }
7aacca6f 12660 },
7aacca6f 12661 "leaf" : 1,
44660702
DM
12662 "path" : "/nodes/{node}/lxc/{vmid}/status/stop",
12663 "text" : "stop"
56122987
DM
12664 },
12665 {
56122987
DM
12666 "info" : {
12667 "POST" : {
44660702
DM
12668 "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.",
12669 "method" : "POST",
7aacca6f 12670 "name" : "vm_shutdown",
56122987 12671 "parameters" : {
44660702 12672 "additionalProperties" : 0,
56122987 12673 "properties" : {
7aacca6f 12674 "forceStop" : {
44660702 12675 "default" : 0,
7aacca6f
DM
12676 "description" : "Make sure the Container stops.",
12677 "optional" : 1,
44660702
DM
12678 "type" : "boolean"
12679 },
12680 "node" : {
12681 "description" : "The cluster node name.",
12682 "format" : "pve-node",
12683 "type" : "string"
7aacca6f
DM
12684 },
12685 "timeout" : {
7aacca6f 12686 "default" : 60,
44660702
DM
12687 "description" : "Wait maximal timeout seconds.",
12688 "minimum" : 0,
56122987 12689 "optional" : 1,
4bd7df8b
DM
12690 "type" : "integer",
12691 "typetext" : "integer (0- N)"
56122987
DM
12692 },
12693 "vmid" : {
7aacca6f 12694 "description" : "The (unique) ID of the VM.",
44660702
DM
12695 "format" : "pve-vmid",
12696 "minimum" : 1,
4bd7df8b
DM
12697 "type" : "integer",
12698 "typetext" : "integer (1- N)"
56122987 12699 }
44660702 12700 }
56122987
DM
12701 },
12702 "permissions" : {
12703 "check" : [
12704 "perm",
12705 "/vms/{vmid}",
12706 [
12707 "VM.PowerMgmt"
12708 ]
12709 ]
12710 },
44660702
DM
12711 "protected" : 1,
12712 "proxyto" : "node",
7aacca6f
DM
12713 "returns" : {
12714 "type" : "string"
12715 }
56122987
DM
12716 }
12717 },
44660702
DM
12718 "leaf" : 1,
12719 "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown",
7aacca6f 12720 "text" : "shutdown"
56122987
DM
12721 },
12722 {
56122987
DM
12723 "info" : {
12724 "POST" : {
7aacca6f 12725 "description" : "Suspend the container.",
7aacca6f 12726 "method" : "POST",
7aacca6f 12727 "name" : "vm_suspend",
56122987
DM
12728 "parameters" : {
12729 "additionalProperties" : 0,
12730 "properties" : {
44660702
DM
12731 "node" : {
12732 "description" : "The cluster node name.",
12733 "format" : "pve-node",
12734 "type" : "string"
12735 },
7aacca6f 12736 "vmid" : {
7aacca6f
DM
12737 "description" : "The (unique) ID of the VM.",
12738 "format" : "pve-vmid",
44660702 12739 "minimum" : 1,
4bd7df8b
DM
12740 "type" : "integer",
12741 "typetext" : "integer (1- N)"
56122987
DM
12742 }
12743 }
7aacca6f 12744 },
56122987
DM
12745 "permissions" : {
12746 "check" : [
12747 "perm",
12748 "/vms/{vmid}",
12749 [
12750 "VM.PowerMgmt"
12751 ]
12752 ]
12753 },
7aacca6f 12754 "protected" : 1,
44660702
DM
12755 "proxyto" : "node",
12756 "returns" : {
12757 "type" : "string"
12758 }
12759 }
12760 },
12761 "leaf" : 1,
12762 "path" : "/nodes/{node}/lxc/{vmid}/status/suspend",
12763 "text" : "suspend"
12764 },
12765 {
12766 "info" : {
12767 "POST" : {
12768 "description" : "Resume the container.",
12769 "method" : "POST",
12770 "name" : "vm_resume",
56122987 12771 "parameters" : {
44660702 12772 "additionalProperties" : 0,
56122987
DM
12773 "properties" : {
12774 "node" : {
7aacca6f 12775 "description" : "The cluster node name.",
44660702
DM
12776 "format" : "pve-node",
12777 "type" : "string"
56122987
DM
12778 },
12779 "vmid" : {
7aacca6f 12780 "description" : "The (unique) ID of the VM.",
56122987 12781 "format" : "pve-vmid",
44660702 12782 "minimum" : 1,
4bd7df8b
DM
12783 "type" : "integer",
12784 "typetext" : "integer (1- N)"
56122987 12785 }
44660702
DM
12786 }
12787 },
12788 "permissions" : {
12789 "check" : [
12790 "perm",
12791 "/vms/{vmid}",
12792 [
12793 "VM.PowerMgmt"
12794 ]
12795 ]
56122987 12796 },
44660702
DM
12797 "protected" : 1,
12798 "proxyto" : "node",
12799 "returns" : {
12800 "type" : "string"
12801 }
7aacca6f
DM
12802 }
12803 },
44660702
DM
12804 "leaf" : 1,
12805 "path" : "/nodes/{node}/lxc/{vmid}/status/resume",
7aacca6f
DM
12806 "text" : "resume"
12807 }
12808 ],
12809 "info" : {
12810 "GET" : {
7aacca6f 12811 "description" : "Directory index",
44660702 12812 "method" : "GET",
7aacca6f 12813 "name" : "vmcmdidx",
7aacca6f
DM
12814 "parameters" : {
12815 "additionalProperties" : 0,
12816 "properties" : {
12817 "node" : {
12818 "description" : "The cluster node name.",
44660702
DM
12819 "format" : "pve-node",
12820 "type" : "string"
56122987 12821 },
7aacca6f 12822 "vmid" : {
44660702 12823 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12824 "format" : "pve-vmid",
12825 "minimum" : 1,
4bd7df8b
DM
12826 "type" : "integer",
12827 "typetext" : "integer (1- N)"
7aacca6f 12828 }
56122987
DM
12829 }
12830 },
44660702
DM
12831 "permissions" : {
12832 "user" : "all"
12833 },
12834 "proxyto" : "node",
7aacca6f 12835 "returns" : {
7aacca6f
DM
12836 "items" : {
12837 "properties" : {
12838 "subdir" : {
12839 "type" : "string"
12840 }
12841 },
12842 "type" : "object"
12843 },
12844 "links" : [
12845 {
44660702
DM
12846 "href" : "{subdir}",
12847 "rel" : "child"
7aacca6f 12848 }
44660702
DM
12849 ],
12850 "type" : "array"
7aacca6f
DM
12851 }
12852 }
44660702
DM
12853 },
12854 "leaf" : 0,
12855 "path" : "/nodes/{node}/lxc/{vmid}/status",
12856 "text" : "status"
7aacca6f
DM
12857 },
12858 {
7aacca6f 12859 "children" : [
56122987 12860 {
7aacca6f
DM
12861 "children" : [
12862 {
12863 "info" : {
12864 "POST" : {
7aacca6f 12865 "description" : "Rollback LXC state to specified snapshot.",
7aacca6f 12866 "method" : "POST",
44660702 12867 "name" : "rollback",
7aacca6f 12868 "parameters" : {
44660702 12869 "additionalProperties" : 0,
7aacca6f 12870 "properties" : {
44660702
DM
12871 "node" : {
12872 "description" : "The cluster node name.",
12873 "format" : "pve-node",
12874 "type" : "string"
12875 },
7aacca6f 12876 "snapname" : {
44660702 12877 "description" : "The name of the snapshot.",
7aacca6f
DM
12878 "format" : "pve-configid",
12879 "maxLength" : 40,
7aacca6f
DM
12880 "type" : "string"
12881 },
7aacca6f 12882 "vmid" : {
44660702 12883 "description" : "The (unique) ID of the VM.",
7aacca6f 12884 "format" : "pve-vmid",
44660702 12885 "minimum" : 1,
4bd7df8b
DM
12886 "type" : "integer",
12887 "typetext" : "integer (1- N)"
7aacca6f 12888 }
44660702
DM
12889 }
12890 },
12891 "permissions" : {
12892 "check" : [
12893 "perm",
12894 "/vms/{vmid}",
12895 [
12896 "VM.Snapshot"
12897 ]
12898 ]
7aacca6f 12899 },
44660702
DM
12900 "protected" : 1,
12901 "proxyto" : "node",
12902 "returns" : {
12903 "description" : "the task ID.",
12904 "type" : "string"
12905 }
7aacca6f
DM
12906 }
12907 },
7aacca6f 12908 "leaf" : 1,
44660702
DM
12909 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback",
12910 "text" : "rollback"
7aacca6f
DM
12911 },
12912 {
7aacca6f
DM
12913 "info" : {
12914 "GET" : {
7aacca6f 12915 "description" : "Get snapshot configuration",
44660702
DM
12916 "method" : "GET",
12917 "name" : "get_snapshot_config",
7aacca6f
DM
12918 "parameters" : {
12919 "additionalProperties" : 0,
12920 "properties" : {
7aacca6f 12921 "node" : {
7aacca6f 12922 "description" : "The cluster node name.",
44660702 12923 "format" : "pve-node",
7aacca6f
DM
12924 "type" : "string"
12925 },
12926 "snapname" : {
44660702 12927 "description" : "The name of the snapshot.",
7aacca6f
DM
12928 "format" : "pve-configid",
12929 "maxLength" : 40,
44660702
DM
12930 "type" : "string"
12931 },
12932 "vmid" : {
12933 "description" : "The (unique) ID of the VM.",
12934 "format" : "pve-vmid",
12935 "minimum" : 1,
4bd7df8b
DM
12936 "type" : "integer",
12937 "typetext" : "integer (1- N)"
7aacca6f
DM
12938 }
12939 }
12940 },
12941 "permissions" : {
12942 "check" : [
12943 "perm",
12944 "/vms/{vmid}",
12945 [
12946 "VM.Snapshot"
12947 ]
12948 ]
12949 },
44660702
DM
12950 "proxyto" : "node",
12951 "returns" : {
12952 "type" : "object"
12953 }
7aacca6f
DM
12954 },
12955 "PUT" : {
44660702
DM
12956 "description" : "Update snapshot metadata.",
12957 "method" : "PUT",
7aacca6f
DM
12958 "name" : "update_snapshot_config",
12959 "parameters" : {
12960 "additionalProperties" : 0,
12961 "properties" : {
44660702
DM
12962 "description" : {
12963 "description" : "A textual description or comment.",
12964 "optional" : 1,
12965 "type" : "string"
12966 },
7aacca6f 12967 "node" : {
7aacca6f 12968 "description" : "The cluster node name.",
44660702
DM
12969 "format" : "pve-node",
12970 "type" : "string"
7aacca6f
DM
12971 },
12972 "snapname" : {
12973 "description" : "The name of the snapshot.",
7aacca6f 12974 "format" : "pve-configid",
44660702
DM
12975 "maxLength" : 40,
12976 "type" : "string"
7aacca6f
DM
12977 },
12978 "vmid" : {
44660702 12979 "description" : "The (unique) ID of the VM.",
7aacca6f 12980 "format" : "pve-vmid",
44660702 12981 "minimum" : 1,
4bd7df8b
DM
12982 "type" : "integer",
12983 "typetext" : "integer (1- N)"
7aacca6f
DM
12984 }
12985 }
12986 },
7aacca6f
DM
12987 "permissions" : {
12988 "check" : [
12989 "perm",
12990 "/vms/{vmid}",
12991 [
12992 "VM.Snapshot"
12993 ]
12994 ]
12995 },
44660702
DM
12996 "protected" : 1,
12997 "proxyto" : "node",
7aacca6f
DM
12998 "returns" : {
12999 "type" : "null"
13000 }
13001 }
13002 },
44660702 13003 "leaf" : 1,
7aacca6f 13004 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config",
44660702 13005 "text" : "config"
7aacca6f
DM
13006 }
13007 ],
56122987 13008 "info" : {
44660702
DM
13009 "DELETE" : {
13010 "description" : "Delete a LXC snapshot.",
13011 "method" : "DELETE",
13012 "name" : "delsnapshot",
56122987 13013 "parameters" : {
44660702 13014 "additionalProperties" : 0,
56122987 13015 "properties" : {
44660702
DM
13016 "force" : {
13017 "description" : "For removal from config file, even if removing disk snapshots fails.",
13018 "optional" : 1,
13019 "type" : "boolean"
13020 },
13021 "node" : {
13022 "description" : "The cluster node name.",
13023 "format" : "pve-node",
13024 "type" : "string"
7aacca6f
DM
13025 },
13026 "snapname" : {
7aacca6f
DM
13027 "description" : "The name of the snapshot.",
13028 "format" : "pve-configid",
44660702 13029 "maxLength" : 40,
7aacca6f 13030 "type" : "string"
44660702
DM
13031 },
13032 "vmid" : {
13033 "description" : "The (unique) ID of the VM.",
13034 "format" : "pve-vmid",
13035 "minimum" : 1,
4bd7df8b
DM
13036 "type" : "integer",
13037 "typetext" : "integer (1- N)"
56122987 13038 }
44660702 13039 }
7aacca6f 13040 },
56122987
DM
13041 "permissions" : {
13042 "check" : [
13043 "perm",
13044 "/vms/{vmid}",
13045 [
7aacca6f 13046 "VM.Snapshot"
56122987
DM
13047 ]
13048 ]
13049 },
44660702 13050 "protected" : 1,
7aacca6f 13051 "proxyto" : "node",
56122987 13052 "returns" : {
7aacca6f 13053 "description" : "the task ID.",
56122987 13054 "type" : "string"
44660702
DM
13055 }
13056 },
13057 "GET" : {
13058 "description" : "",
13059 "method" : "GET",
13060 "name" : "snapshot_cmd_idx",
7aacca6f
DM
13061 "parameters" : {
13062 "additionalProperties" : 0,
13063 "properties" : {
7aacca6f 13064 "node" : {
44660702 13065 "description" : "The cluster node name.",
7aacca6f 13066 "format" : "pve-node",
44660702 13067 "type" : "string"
7aacca6f
DM
13068 },
13069 "snapname" : {
44660702 13070 "description" : "The name of the snapshot.",
7aacca6f 13071 "format" : "pve-configid",
44660702
DM
13072 "maxLength" : 40,
13073 "type" : "string"
13074 },
13075 "vmid" : {
13076 "description" : "The (unique) ID of the VM.",
13077 "format" : "pve-vmid",
13078 "minimum" : 1,
4bd7df8b
DM
13079 "type" : "integer",
13080 "typetext" : "integer (1- N)"
7aacca6f
DM
13081 }
13082 }
13083 },
44660702
DM
13084 "permissions" : {
13085 "user" : "all"
13086 },
13087 "returns" : {
13088 "items" : {
13089 "properties" : {},
13090 "type" : "object"
13091 },
13092 "links" : [
13093 {
13094 "href" : "{cmd}",
13095 "rel" : "child"
13096 }
13097 ],
13098 "type" : "array"
13099 }
13100 }
13101 },
13102 "leaf" : 0,
13103 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}",
13104 "text" : "{snapname}"
13105 }
13106 ],
13107 "info" : {
13108 "GET" : {
13109 "description" : "List all snapshots.",
13110 "method" : "GET",
13111 "name" : "list",
13112 "parameters" : {
13113 "additionalProperties" : 0,
13114 "properties" : {
13115 "node" : {
13116 "description" : "The cluster node name.",
13117 "format" : "pve-node",
13118 "type" : "string"
13119 },
13120 "vmid" : {
13121 "description" : "The (unique) ID of the VM.",
13122 "format" : "pve-vmid",
13123 "minimum" : 1,
4bd7df8b
DM
13124 "type" : "integer",
13125 "typetext" : "integer (1- N)"
44660702 13126 }
56122987
DM
13127 }
13128 },
56122987 13129 "permissions" : {
7aacca6f
DM
13130 "check" : [
13131 "perm",
13132 "/vms/{vmid}",
13133 [
13134 "VM.Audit"
13135 ]
13136 ]
13137 },
44660702 13138 "protected" : 1,
56122987 13139 "proxyto" : "node",
7aacca6f 13140 "returns" : {
44660702
DM
13141 "items" : {
13142 "properties" : {},
13143 "type" : "object"
13144 },
7aacca6f
DM
13145 "links" : [
13146 {
13147 "href" : "{name}",
13148 "rel" : "child"
13149 }
13150 ],
7aacca6f 13151 "type" : "array"
44660702 13152 }
7aacca6f
DM
13153 },
13154 "POST" : {
44660702
DM
13155 "description" : "Snapshot a container.",
13156 "method" : "POST",
13157 "name" : "snapshot",
56122987
DM
13158 "parameters" : {
13159 "additionalProperties" : 0,
13160 "properties" : {
7aacca6f 13161 "description" : {
44660702 13162 "description" : "A textual description or comment.",
7aacca6f 13163 "optional" : 1,
44660702
DM
13164 "type" : "string"
13165 },
13166 "node" : {
13167 "description" : "The cluster node name.",
13168 "format" : "pve-node",
13169 "type" : "string"
56122987
DM
13170 },
13171 "snapname" : {
56122987 13172 "description" : "The name of the snapshot.",
44660702 13173 "format" : "pve-configid",
7aacca6f 13174 "maxLength" : 40,
44660702 13175 "type" : "string"
56122987 13176 },
44660702
DM
13177 "vmid" : {
13178 "description" : "The (unique) ID of the VM.",
13179 "format" : "pve-vmid",
13180 "minimum" : 1,
4bd7df8b
DM
13181 "type" : "integer",
13182 "typetext" : "integer (1- N)"
56122987 13183 }
7aacca6f 13184 }
56122987 13185 },
56122987
DM
13186 "permissions" : {
13187 "check" : [
13188 "perm",
13189 "/vms/{vmid}",
13190 [
7aacca6f 13191 "VM.Snapshot"
56122987
DM
13192 ]
13193 ]
7aacca6f 13194 },
44660702 13195 "protected" : 1,
7aacca6f
DM
13196 "proxyto" : "node",
13197 "returns" : {
13198 "description" : "the task ID.",
13199 "type" : "string"
56122987
DM
13200 }
13201 }
44660702
DM
13202 },
13203 "leaf" : 0,
13204 "path" : "/nodes/{node}/lxc/{vmid}/snapshot",
13205 "text" : "snapshot"
7aacca6f
DM
13206 },
13207 {
56122987
DM
13208 "children" : [
13209 {
56122987
DM
13210 "children" : [
13211 {
56122987 13212 "info" : {
44660702
DM
13213 "DELETE" : {
13214 "description" : "Delete rule.",
13215 "method" : "DELETE",
13216 "name" : "delete_rule",
56122987 13217 "parameters" : {
44660702 13218 "additionalProperties" : 0,
56122987 13219 "properties" : {
44660702
DM
13220 "digest" : {
13221 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13222 "maxLength" : 40,
7aacca6f 13223 "optional" : 1,
44660702 13224 "type" : "string"
7aacca6f
DM
13225 },
13226 "node" : {
44660702 13227 "description" : "The cluster node name.",
7aacca6f 13228 "format" : "pve-node",
44660702
DM
13229 "type" : "string"
13230 },
13231 "pos" : {
13232 "description" : "Update rule at position <pos>.",
13233 "minimum" : 0,
13234 "optional" : 1,
4bd7df8b
DM
13235 "type" : "integer",
13236 "typetext" : "integer (0- N)"
44660702
DM
13237 },
13238 "vmid" : {
13239 "description" : "The (unique) ID of the VM.",
13240 "format" : "pve-vmid",
13241 "minimum" : 1,
4bd7df8b
DM
13242 "type" : "integer",
13243 "typetext" : "integer (1- N)"
56122987 13244 }
44660702 13245 }
56122987 13246 },
56122987
DM
13247 "permissions" : {
13248 "check" : [
13249 "perm",
13250 "/vms/{vmid}",
13251 [
44660702 13252 "VM.Config.Network"
56122987
DM
13253 ]
13254 ]
13255 },
44660702 13256 "protected" : 1,
7aacca6f 13257 "proxyto" : null,
44660702
DM
13258 "returns" : {
13259 "type" : "null"
13260 }
7aacca6f 13261 },
44660702
DM
13262 "GET" : {
13263 "description" : "Get single rule data.",
13264 "method" : "GET",
13265 "name" : "get_rule",
56122987 13266 "parameters" : {
44660702 13267 "additionalProperties" : 0,
56122987 13268 "properties" : {
7aacca6f 13269 "node" : {
7aacca6f 13270 "description" : "The cluster node name.",
44660702 13271 "format" : "pve-node",
56122987
DM
13272 "type" : "string"
13273 },
7aacca6f 13274 "pos" : {
7aacca6f 13275 "description" : "Update rule at position <pos>.",
44660702 13276 "minimum" : 0,
7aacca6f 13277 "optional" : 1,
4bd7df8b
DM
13278 "type" : "integer",
13279 "typetext" : "integer (0- N)"
56122987 13280 },
7aacca6f 13281 "vmid" : {
44660702 13282 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13283 "format" : "pve-vmid",
13284 "minimum" : 1,
4bd7df8b
DM
13285 "type" : "integer",
13286 "typetext" : "integer (1- N)"
56122987 13287 }
44660702 13288 }
56122987 13289 },
7aacca6f
DM
13290 "permissions" : {
13291 "check" : [
13292 "perm",
13293 "/vms/{vmid}",
13294 [
44660702 13295 "VM.Audit"
7aacca6f
DM
13296 ]
13297 ]
13298 },
7aacca6f
DM
13299 "proxyto" : null,
13300 "returns" : {
44660702
DM
13301 "properties" : {
13302 "pos" : {
13303 "type" : "integer"
13304 }
13305 },
13306 "type" : "object"
7aacca6f 13307 }
56122987 13308 },
44660702
DM
13309 "PUT" : {
13310 "description" : "Modify rule data.",
13311 "method" : "PUT",
13312 "name" : "update_rule",
56122987
DM
13313 "parameters" : {
13314 "additionalProperties" : 0,
13315 "properties" : {
44660702
DM
13316 "action" : {
13317 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
13318 "maxLength" : 20,
13319 "minLength" : 2,
13320 "optional" : 1,
13321 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13322 "type" : "string"
13323 },
13324 "comment" : {
13325 "optional" : 1,
13326 "type" : "string"
13327 },
13328 "delete" : {
13329 "description" : "A list of settings you want to delete.",
13330 "format" : "pve-configid-list",
13331 "optional" : 1,
13332 "type" : "string"
13333 },
13334 "dest" : {
13335 "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.",
13336 "format" : "pve-fw-addr-spec",
13337 "optional" : 1,
13338 "type" : "string"
13339 },
13340 "digest" : {
13341 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13342 "maxLength" : 40,
13343 "optional" : 1,
13344 "type" : "string"
13345 },
13346 "dport" : {
13347 "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.",
13348 "format" : "pve-fw-dport-spec",
13349 "optional" : 1,
13350 "type" : "string"
13351 },
13352 "enable" : {
13353 "minimum" : 0,
13354 "optional" : 1,
4bd7df8b
DM
13355 "type" : "integer",
13356 "typetext" : "integer (0- N)"
44660702
DM
13357 },
13358 "iface" : {
13359 "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.",
13360 "format" : "pve-iface",
13361 "maxLength" : 20,
13362 "minLength" : 2,
13363 "optional" : 1,
13364 "type" : "string"
13365 },
13366 "macro" : {
13367 "maxLength" : 128,
13368 "optional" : 1,
13369 "type" : "string"
13370 },
13371 "moveto" : {
13372 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
13373 "minimum" : 0,
13374 "optional" : 1,
4bd7df8b
DM
13375 "type" : "integer",
13376 "typetext" : "integer (0- N)"
44660702 13377 },
7aacca6f
DM
13378 "node" : {
13379 "description" : "The cluster node name.",
44660702
DM
13380 "format" : "pve-node",
13381 "type" : "string"
56122987
DM
13382 },
13383 "pos" : {
44660702 13384 "description" : "Update rule at position <pos>.",
56122987 13385 "minimum" : 0,
7aacca6f 13386 "optional" : 1,
4bd7df8b
DM
13387 "type" : "integer",
13388 "typetext" : "integer (0- N)"
56122987 13389 },
44660702
DM
13390 "proto" : {
13391 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13392 "format" : "pve-fw-protocol-spec",
13393 "optional" : 1,
13394 "type" : "string"
7aacca6f 13395 },
44660702
DM
13396 "source" : {
13397 "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.",
13398 "format" : "pve-fw-addr-spec",
13399 "optional" : 1,
13400 "type" : "string"
13401 },
13402 "sport" : {
13403 "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.",
13404 "format" : "pve-fw-sport-spec",
13405 "optional" : 1,
13406 "type" : "string"
13407 },
13408 "type" : {
13409 "enum" : [
13410 "in",
13411 "out",
13412 "group"
13413 ],
7aacca6f 13414 "optional" : 1,
44660702
DM
13415 "type" : "string"
13416 },
13417 "vmid" : {
13418 "description" : "The (unique) ID of the VM.",
13419 "format" : "pve-vmid",
13420 "minimum" : 1,
4bd7df8b
DM
13421 "type" : "integer",
13422 "typetext" : "integer (1- N)"
56122987
DM
13423 }
13424 }
13425 },
56122987
DM
13426 "permissions" : {
13427 "check" : [
13428 "perm",
13429 "/vms/{vmid}",
13430 [
7aacca6f 13431 "VM.Config.Network"
56122987
DM
13432 ]
13433 ]
13434 },
44660702 13435 "protected" : 1,
56122987 13436 "proxyto" : null,
56122987 13437 "returns" : {
7aacca6f
DM
13438 "type" : "null"
13439 }
56122987 13440 }
44660702
DM
13441 },
13442 "leaf" : 1,
13443 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}",
13444 "text" : "{pos}"
56122987
DM
13445 }
13446 ],
13447 "info" : {
7aacca6f 13448 "GET" : {
44660702
DM
13449 "description" : "List rules.",
13450 "method" : "GET",
13451 "name" : "get_rules",
7aacca6f 13452 "parameters" : {
44660702 13453 "additionalProperties" : 0,
7aacca6f
DM
13454 "properties" : {
13455 "node" : {
7aacca6f 13456 "description" : "The cluster node name.",
44660702
DM
13457 "format" : "pve-node",
13458 "type" : "string"
7aacca6f
DM
13459 },
13460 "vmid" : {
13461 "description" : "The (unique) ID of the VM.",
44660702 13462 "format" : "pve-vmid",
7aacca6f 13463 "minimum" : 1,
4bd7df8b
DM
13464 "type" : "integer",
13465 "typetext" : "integer (1- N)"
7aacca6f 13466 }
44660702 13467 }
56122987 13468 },
56122987
DM
13469 "permissions" : {
13470 "check" : [
13471 "perm",
13472 "/vms/{vmid}",
13473 [
7aacca6f 13474 "VM.Audit"
56122987
DM
13475 ]
13476 ]
13477 },
13478 "proxyto" : null,
7aacca6f 13479 "returns" : {
7aacca6f
DM
13480 "items" : {
13481 "properties" : {
13482 "pos" : {
13483 "type" : "integer"
13484 }
13485 },
13486 "type" : "object"
13487 },
13488 "links" : [
13489 {
44660702
DM
13490 "href" : "{pos}",
13491 "rel" : "child"
7aacca6f 13492 }
44660702
DM
13493 ],
13494 "type" : "array"
13495 }
7aacca6f
DM
13496 },
13497 "POST" : {
44660702
DM
13498 "description" : "Create new rule.",
13499 "method" : "POST",
7aacca6f 13500 "name" : "create_rule",
56122987 13501 "parameters" : {
44660702 13502 "additionalProperties" : 0,
56122987 13503 "properties" : {
7aacca6f 13504 "action" : {
44660702 13505 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 13506 "maxLength" : 20,
44660702 13507 "minLength" : 2,
7aacca6f
DM
13508 "optional" : 0,
13509 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
13510 "type" : "string"
13511 },
44660702 13512 "comment" : {
7aacca6f 13513 "optional" : 1,
44660702 13514 "type" : "string"
56122987 13515 },
44660702
DM
13516 "dest" : {
13517 "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.",
13518 "format" : "pve-fw-addr-spec",
56122987 13519 "optional" : 1,
44660702 13520 "type" : "string"
56122987 13521 },
44660702
DM
13522 "digest" : {
13523 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13524 "maxLength" : 40,
56122987 13525 "optional" : 1,
44660702 13526 "type" : "string"
56122987 13527 },
44660702
DM
13528 "dport" : {
13529 "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.",
13530 "format" : "pve-fw-dport-spec",
56122987 13531 "optional" : 1,
44660702 13532 "type" : "string"
56122987 13533 },
44660702
DM
13534 "enable" : {
13535 "minimum" : 0,
56122987 13536 "optional" : 1,
4bd7df8b
DM
13537 "type" : "integer",
13538 "typetext" : "integer (0- N)"
56122987 13539 },
44660702
DM
13540 "iface" : {
13541 "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.",
13542 "format" : "pve-iface",
13543 "maxLength" : 20,
13544 "minLength" : 2,
7aacca6f 13545 "optional" : 1,
56122987 13546 "type" : "string"
56122987 13547 },
44660702
DM
13548 "macro" : {
13549 "maxLength" : 128,
56122987
DM
13550 "optional" : 1,
13551 "type" : "string"
13552 },
13553 "node" : {
7aacca6f 13554 "description" : "The cluster node name.",
44660702
DM
13555 "format" : "pve-node",
13556 "type" : "string"
7aacca6f 13557 },
44660702
DM
13558 "pos" : {
13559 "description" : "Update rule at position <pos>.",
13560 "minimum" : 0,
13561 "optional" : 1,
4bd7df8b
DM
13562 "type" : "integer",
13563 "typetext" : "integer (0- N)"
44660702
DM
13564 },
13565 "proto" : {
13566 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13567 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
13568 "optional" : 1,
13569 "type" : "string"
7aacca6f 13570 },
44660702
DM
13571 "source" : {
13572 "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.",
13573 "format" : "pve-fw-addr-spec",
13574 "optional" : 1,
13575 "type" : "string"
56122987 13576 },
44660702
DM
13577 "sport" : {
13578 "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.",
13579 "format" : "pve-fw-sport-spec",
13580 "optional" : 1,
13581 "type" : "string"
7aacca6f 13582 },
44660702
DM
13583 "type" : {
13584 "enum" : [
13585 "in",
13586 "out",
13587 "group"
13588 ],
13589 "optional" : 0,
13590 "type" : "string"
13591 },
13592 "vmid" : {
13593 "description" : "The (unique) ID of the VM.",
13594 "format" : "pve-vmid",
13595 "minimum" : 1,
4bd7df8b
DM
13596 "type" : "integer",
13597 "typetext" : "integer (1- N)"
44660702
DM
13598 }
13599 }
13600 },
13601 "permissions" : {
13602 "check" : [
13603 "perm",
13604 "/vms/{vmid}",
13605 [
13606 "VM.Config.Network"
13607 ]
13608 ]
13609 },
13610 "protected" : 1,
13611 "proxyto" : null,
13612 "returns" : {
13613 "type" : "null"
13614 }
13615 }
13616 },
13617 "leaf" : 0,
13618 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules",
13619 "text" : "rules"
13620 },
13621 {
13622 "children" : [
13623 {
13624 "info" : {
13625 "DELETE" : {
13626 "description" : "Remove IP or Network alias.",
13627 "method" : "DELETE",
13628 "name" : "remove_alias",
56122987 13629 "parameters" : {
44660702 13630 "additionalProperties" : 0,
56122987 13631 "properties" : {
44660702
DM
13632 "digest" : {
13633 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13634 "maxLength" : 40,
56122987
DM
13635 "optional" : 1,
13636 "type" : "string"
13637 },
7aacca6f 13638 "name" : {
44660702 13639 "description" : "Alias name.",
7aacca6f 13640 "maxLength" : 64,
7aacca6f
DM
13641 "minLength" : 2,
13642 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13643 "type" : "string"
7aacca6f
DM
13644 },
13645 "node" : {
44660702 13646 "description" : "The cluster node name.",
56122987 13647 "format" : "pve-node",
44660702 13648 "type" : "string"
7aacca6f 13649 },
56122987 13650 "vmid" : {
44660702 13651 "description" : "The (unique) ID of the VM.",
56122987 13652 "format" : "pve-vmid",
44660702 13653 "minimum" : 1,
4bd7df8b
DM
13654 "type" : "integer",
13655 "typetext" : "integer (1- N)"
56122987 13656 }
44660702 13657 }
56122987 13658 },
56122987
DM
13659 "permissions" : {
13660 "check" : [
13661 "perm",
13662 "/vms/{vmid}",
13663 [
7aacca6f 13664 "VM.Config.Network"
56122987
DM
13665 ]
13666 ]
13667 },
44660702 13668 "protected" : 1,
56122987 13669 "returns" : {
7aacca6f 13670 "type" : "null"
44660702 13671 }
56122987 13672 },
44660702
DM
13673 "GET" : {
13674 "description" : "Read alias.",
13675 "method" : "GET",
13676 "name" : "read_alias",
13677 "parameters" : {
13678 "additionalProperties" : 0,
13679 "properties" : {
13680 "name" : {
13681 "description" : "Alias name.",
13682 "maxLength" : 64,
13683 "minLength" : 2,
13684 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13685 "type" : "string"
13686 },
13687 "node" : {
13688 "description" : "The cluster node name.",
13689 "format" : "pve-node",
13690 "type" : "string"
13691 },
13692 "vmid" : {
13693 "description" : "The (unique) ID of the VM.",
13694 "format" : "pve-vmid",
13695 "minimum" : 1,
4bd7df8b
DM
13696 "type" : "integer",
13697 "typetext" : "integer (1- N)"
44660702
DM
13698 }
13699 }
56122987 13700 },
7aacca6f
DM
13701 "permissions" : {
13702 "check" : [
13703 "perm",
13704 "/vms/{vmid}",
13705 [
44660702 13706 "VM.Audit"
7aacca6f
DM
13707 ]
13708 ]
13709 },
44660702
DM
13710 "returns" : {
13711 "type" : "object"
13712 }
13713 },
13714 "PUT" : {
13715 "description" : "Update IP or Network alias.",
13716 "method" : "PUT",
13717 "name" : "update_alias",
56122987
DM
13718 "parameters" : {
13719 "additionalProperties" : 0,
13720 "properties" : {
44660702
DM
13721 "cidr" : {
13722 "description" : "Network/IP specification in CIDR format.",
13723 "format" : "IPorCIDR",
13724 "type" : "string"
13725 },
13726 "comment" : {
13727 "optional" : 1,
13728 "type" : "string"
13729 },
13730 "digest" : {
13731 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13732 "maxLength" : 40,
13733 "optional" : 1,
13734 "type" : "string"
13735 },
56122987 13736 "name" : {
7aacca6f 13737 "description" : "Alias name.",
44660702
DM
13738 "maxLength" : 64,
13739 "minLength" : 2,
7aacca6f 13740 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13741 "type" : "string"
56122987
DM
13742 },
13743 "node" : {
13744 "description" : "The cluster node name.",
44660702
DM
13745 "format" : "pve-node",
13746 "type" : "string"
13747 },
13748 "rename" : {
13749 "description" : "Rename an existing alias.",
13750 "maxLength" : 64,
13751 "minLength" : 2,
13752 "optional" : 1,
13753 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13754 "type" : "string"
56122987 13755 },
7aacca6f 13756 "vmid" : {
7aacca6f 13757 "description" : "The (unique) ID of the VM.",
44660702 13758 "format" : "pve-vmid",
7aacca6f 13759 "minimum" : 1,
4bd7df8b
DM
13760 "type" : "integer",
13761 "typetext" : "integer (1- N)"
56122987
DM
13762 }
13763 }
13764 },
44660702
DM
13765 "permissions" : {
13766 "check" : [
13767 "perm",
13768 "/vms/{vmid}",
13769 [
13770 "VM.Config.Network"
13771 ]
13772 ]
7aacca6f 13773 },
44660702
DM
13774 "protected" : 1,
13775 "returns" : {
13776 "type" : "null"
7aacca6f
DM
13777 }
13778 }
13779 },
44660702
DM
13780 "leaf" : 1,
13781 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}",
13782 "text" : "{name}"
13783 }
13784 ],
13785 "info" : {
13786 "GET" : {
13787 "description" : "List aliases",
13788 "method" : "GET",
13789 "name" : "get_aliases",
56122987
DM
13790 "parameters" : {
13791 "additionalProperties" : 0,
13792 "properties" : {
13793 "node" : {
44660702 13794 "description" : "The cluster node name.",
56122987 13795 "format" : "pve-node",
44660702 13796 "type" : "string"
56122987
DM
13797 },
13798 "vmid" : {
7aacca6f 13799 "description" : "The (unique) ID of the VM.",
44660702 13800 "format" : "pve-vmid",
7aacca6f 13801 "minimum" : 1,
4bd7df8b
DM
13802 "type" : "integer",
13803 "typetext" : "integer (1- N)"
56122987
DM
13804 }
13805 }
13806 },
44660702
DM
13807 "permissions" : {
13808 "check" : [
13809 "perm",
13810 "/vms/{vmid}",
13811 [
13812 "VM.Audit"
13813 ]
13814 ]
13815 },
56122987
DM
13816 "returns" : {
13817 "items" : {
56122987 13818 "properties" : {
44660702
DM
13819 "cidr" : {
13820 "type" : "string"
7aacca6f 13821 },
44660702
DM
13822 "comment" : {
13823 "optional" : 1,
56122987
DM
13824 "type" : "string"
13825 },
56122987 13826 "digest" : {
56122987 13827 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
13828 "maxLength" : 40,
13829 "optional" : 0,
13830 "type" : "string"
13831 },
13832 "name" : {
13833 "type" : "string"
56122987 13834 }
44660702
DM
13835 },
13836 "type" : "object"
13837 },
13838 "links" : [
13839 {
13840 "href" : "{name}",
13841 "rel" : "child"
56122987 13842 }
44660702
DM
13843 ],
13844 "type" : "array"
7aacca6f
DM
13845 }
13846 },
13847 "POST" : {
44660702 13848 "description" : "Create IP or Network Alias.",
7aacca6f 13849 "method" : "POST",
44660702 13850 "name" : "create_alias",
7aacca6f
DM
13851 "parameters" : {
13852 "additionalProperties" : 0,
13853 "properties" : {
44660702
DM
13854 "cidr" : {
13855 "description" : "Network/IP specification in CIDR format.",
13856 "format" : "IPorCIDR",
7aacca6f
DM
13857 "type" : "string"
13858 },
13859 "comment" : {
13860 "optional" : 1,
13861 "type" : "string"
13862 },
44660702
DM
13863 "name" : {
13864 "description" : "Alias name.",
13865 "maxLength" : 64,
7aacca6f
DM
13866 "minLength" : 2,
13867 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13868 "type" : "string"
7aacca6f
DM
13869 },
13870 "node" : {
44660702 13871 "description" : "The cluster node name.",
7aacca6f 13872 "format" : "pve-node",
44660702 13873 "type" : "string"
7aacca6f 13874 },
44660702
DM
13875 "vmid" : {
13876 "description" : "The (unique) ID of the VM.",
13877 "format" : "pve-vmid",
13878 "minimum" : 1,
4bd7df8b
DM
13879 "type" : "integer",
13880 "typetext" : "integer (1- N)"
7aacca6f
DM
13881 }
13882 }
13883 },
44660702
DM
13884 "permissions" : {
13885 "check" : [
13886 "perm",
13887 "/vms/{vmid}",
13888 [
13889 "VM.Config.Network"
13890 ]
13891 ]
13892 },
13893 "protected" : 1,
13894 "returns" : {
13895 "type" : "null"
13896 }
56122987
DM
13897 }
13898 },
44660702
DM
13899 "leaf" : 0,
13900 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases",
13901 "text" : "aliases"
13902 },
13903 {
56122987
DM
13904 "children" : [
13905 {
56122987
DM
13906 "children" : [
13907 {
13908 "info" : {
13909 "DELETE" : {
44660702 13910 "description" : "Remove IP or Network from IPSet.",
7aacca6f 13911 "method" : "DELETE",
44660702 13912 "name" : "remove_ip",
56122987
DM
13913 "parameters" : {
13914 "additionalProperties" : 0,
13915 "properties" : {
44660702
DM
13916 "cidr" : {
13917 "description" : "Network/IP specification in CIDR format.",
13918 "format" : "IPorCIDRorAlias",
13919 "type" : "string"
56122987
DM
13920 },
13921 "digest" : {
44660702 13922 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987 13923 "maxLength" : 40,
7aacca6f 13924 "optional" : 1,
44660702 13925 "type" : "string"
56122987 13926 },
56122987 13927 "name" : {
44660702 13928 "description" : "IP set name.",
56122987 13929 "maxLength" : 64,
7aacca6f 13930 "minLength" : 2,
56122987 13931 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 13932 "type" : "string"
7aacca6f
DM
13933 },
13934 "node" : {
7aacca6f 13935 "description" : "The cluster node name.",
44660702
DM
13936 "format" : "pve-node",
13937 "type" : "string"
13938 },
13939 "vmid" : {
13940 "description" : "The (unique) ID of the VM.",
13941 "format" : "pve-vmid",
13942 "minimum" : 1,
4bd7df8b
DM
13943 "type" : "integer",
13944 "typetext" : "integer (1- N)"
56122987
DM
13945 }
13946 }
13947 },
44660702
DM
13948 "permissions" : {
13949 "check" : [
13950 "perm",
13951 "/vms/{vmid}",
13952 [
13953 "VM.Config.Network"
13954 ]
13955 ]
13956 },
7aacca6f 13957 "protected" : 1,
56122987
DM
13958 "returns" : {
13959 "type" : "null"
44660702
DM
13960 }
13961 },
13962 "GET" : {
13963 "description" : "Read IP or Network settings from IPSet.",
13964 "method" : "GET",
13965 "name" : "read_ip",
56122987
DM
13966 "parameters" : {
13967 "additionalProperties" : 0,
13968 "properties" : {
7aacca6f 13969 "cidr" : {
7aacca6f 13970 "description" : "Network/IP specification in CIDR format.",
44660702 13971 "format" : "IPorCIDRorAlias",
56122987
DM
13972 "type" : "string"
13973 },
7aacca6f 13974 "name" : {
44660702 13975 "description" : "IP set name.",
7aacca6f
DM
13976 "maxLength" : 64,
13977 "minLength" : 2,
7aacca6f
DM
13978 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13979 "type" : "string"
56122987 13980 },
44660702
DM
13981 "node" : {
13982 "description" : "The cluster node name.",
13983 "format" : "pve-node",
13984 "type" : "string"
13985 },
13986 "vmid" : {
13987 "description" : "The (unique) ID of the VM.",
13988 "format" : "pve-vmid",
13989 "minimum" : 1,
4bd7df8b
DM
13990 "type" : "integer",
13991 "typetext" : "integer (1- N)"
56122987
DM
13992 }
13993 }
13994 },
56122987
DM
13995 "permissions" : {
13996 "check" : [
13997 "perm",
13998 "/vms/{vmid}",
13999 [
44660702 14000 "VM.Audit"
56122987
DM
14001 ]
14002 ]
7aacca6f 14003 },
44660702 14004 "protected" : 1,
7aacca6f
DM
14005 "returns" : {
14006 "type" : "object"
44660702
DM
14007 }
14008 },
14009 "PUT" : {
14010 "description" : "Update IP or Network settings",
14011 "method" : "PUT",
14012 "name" : "update_ip",
7aacca6f 14013 "parameters" : {
44660702 14014 "additionalProperties" : 0,
7aacca6f
DM
14015 "properties" : {
14016 "cidr" : {
44660702 14017 "description" : "Network/IP specification in CIDR format.",
7aacca6f 14018 "format" : "IPorCIDRorAlias",
44660702 14019 "type" : "string"
7aacca6f 14020 },
44660702
DM
14021 "comment" : {
14022 "optional" : 1,
14023 "type" : "string"
14024 },
14025 "digest" : {
14026 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14027 "maxLength" : 40,
14028 "optional" : 1,
14029 "type" : "string"
14030 },
14031 "name" : {
14032 "description" : "IP set name.",
14033 "maxLength" : 64,
14034 "minLength" : 2,
14035 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14036 "type" : "string"
7aacca6f
DM
14037 },
14038 "node" : {
7aacca6f 14039 "description" : "The cluster node name.",
44660702 14040 "format" : "pve-node",
7aacca6f
DM
14041 "type" : "string"
14042 },
44660702
DM
14043 "nomatch" : {
14044 "optional" : 1,
14045 "type" : "boolean"
14046 },
14047 "vmid" : {
14048 "description" : "The (unique) ID of the VM.",
14049 "format" : "pve-vmid",
14050 "minimum" : 1,
4bd7df8b
DM
14051 "type" : "integer",
14052 "typetext" : "integer (1- N)"
7aacca6f 14053 }
44660702
DM
14054 }
14055 },
14056 "permissions" : {
14057 "check" : [
14058 "perm",
14059 "/vms/{vmid}",
14060 [
14061 "VM.Config.Network"
14062 ]
14063 ]
7aacca6f
DM
14064 },
14065 "protected" : 1,
44660702
DM
14066 "returns" : {
14067 "type" : "null"
14068 }
56122987
DM
14069 }
14070 },
56122987 14071 "leaf" : 1,
44660702
DM
14072 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}",
14073 "text" : "{cidr}"
56122987
DM
14074 }
14075 ],
14076 "info" : {
44660702
DM
14077 "DELETE" : {
14078 "description" : "Delete IPSet",
14079 "method" : "DELETE",
14080 "name" : "delete_ipset",
14081 "parameters" : {
14082 "additionalProperties" : 0,
14083 "properties" : {
14084 "name" : {
14085 "description" : "IP set name.",
14086 "maxLength" : 64,
14087 "minLength" : 2,
14088 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14089 "type" : "string"
14090 },
14091 "node" : {
14092 "description" : "The cluster node name.",
14093 "format" : "pve-node",
14094 "type" : "string"
14095 },
14096 "vmid" : {
14097 "description" : "The (unique) ID of the VM.",
14098 "format" : "pve-vmid",
14099 "minimum" : 1,
4bd7df8b
DM
14100 "type" : "integer",
14101 "typetext" : "integer (1- N)"
44660702
DM
14102 }
14103 }
14104 },
14105 "permissions" : {
14106 "check" : [
14107 "perm",
14108 "/vms/{vmid}",
14109 [
14110 "VM.Config.Network"
14111 ]
14112 ]
14113 },
14114 "protected" : 1,
14115 "returns" : {
14116 "type" : "null"
14117 }
14118 },
56122987 14119 "GET" : {
7aacca6f 14120 "description" : "List IPSet content",
44660702
DM
14121 "method" : "GET",
14122 "name" : "get_ipset",
7aacca6f
DM
14123 "parameters" : {
14124 "additionalProperties" : 0,
14125 "properties" : {
14126 "name" : {
14127 "description" : "IP set name.",
44660702 14128 "maxLength" : 64,
7aacca6f 14129 "minLength" : 2,
44660702
DM
14130 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14131 "type" : "string"
7aacca6f
DM
14132 },
14133 "node" : {
7aacca6f 14134 "description" : "The cluster node name.",
44660702 14135 "format" : "pve-node",
7aacca6f
DM
14136 "type" : "string"
14137 },
14138 "vmid" : {
14139 "description" : "The (unique) ID of the VM.",
44660702 14140 "format" : "pve-vmid",
7aacca6f 14141 "minimum" : 1,
4bd7df8b
DM
14142 "type" : "integer",
14143 "typetext" : "integer (1- N)"
56122987 14144 }
7aacca6f
DM
14145 }
14146 },
7aacca6f
DM
14147 "permissions" : {
14148 "check" : [
14149 "perm",
14150 "/vms/{vmid}",
14151 [
14152 "VM.Audit"
14153 ]
14154 ]
14155 },
14156 "returns" : {
56122987
DM
14157 "items" : {
14158 "properties" : {
14159 "cidr" : {
14160 "type" : "string"
14161 },
44660702
DM
14162 "comment" : {
14163 "optional" : 1,
14164 "type" : "string"
14165 },
56122987 14166 "digest" : {
56122987 14167 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 14168 "maxLength" : 40,
7aacca6f 14169 "optional" : 0,
56122987 14170 "type" : "string"
7aacca6f
DM
14171 },
14172 "nomatch" : {
44660702
DM
14173 "optional" : 1,
14174 "type" : "boolean"
56122987 14175 }
44660702
DM
14176 },
14177 "type" : "object"
56122987 14178 },
7aacca6f
DM
14179 "links" : [
14180 {
44660702
DM
14181 "href" : "{cidr}",
14182 "rel" : "child"
56122987 14183 }
44660702
DM
14184 ],
14185 "type" : "array"
14186 }
56122987 14187 },
7aacca6f
DM
14188 "POST" : {
14189 "description" : "Add IP or Network to IPSet.",
44660702 14190 "method" : "POST",
7aacca6f 14191 "name" : "create_ip",
56122987 14192 "parameters" : {
44660702 14193 "additionalProperties" : 0,
56122987 14194 "properties" : {
44660702
DM
14195 "cidr" : {
14196 "description" : "Network/IP specification in CIDR format.",
14197 "format" : "IPorCIDRorAlias",
14198 "type" : "string"
14199 },
14200 "comment" : {
14201 "optional" : 1,
14202 "type" : "string"
56122987
DM
14203 },
14204 "name" : {
56122987 14205 "description" : "IP set name.",
44660702 14206 "maxLength" : 64,
7aacca6f 14207 "minLength" : 2,
44660702 14208 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 14209 "type" : "string"
56122987 14210 },
7aacca6f 14211 "node" : {
7aacca6f 14212 "description" : "The cluster node name.",
44660702 14213 "format" : "pve-node",
56122987
DM
14214 "type" : "string"
14215 },
44660702
DM
14216 "nomatch" : {
14217 "optional" : 1,
14218 "type" : "boolean"
7aacca6f
DM
14219 },
14220 "vmid" : {
44660702 14221 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14222 "format" : "pve-vmid",
14223 "minimum" : 1,
4bd7df8b
DM
14224 "type" : "integer",
14225 "typetext" : "integer (1- N)"
56122987 14226 }
44660702
DM
14227 }
14228 },
14229 "permissions" : {
14230 "check" : [
14231 "perm",
14232 "/vms/{vmid}",
14233 [
14234 "VM.Config.Network"
14235 ]
14236 ]
14237 },
14238 "protected" : 1,
14239 "returns" : {
14240 "type" : "null"
14241 }
14242 }
14243 },
14244 "leaf" : 0,
14245 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}",
14246 "text" : "{name}"
14247 }
14248 ],
14249 "info" : {
14250 "GET" : {
14251 "description" : "List IPSets",
14252 "method" : "GET",
14253 "name" : "ipset_index",
14254 "parameters" : {
14255 "additionalProperties" : 0,
14256 "properties" : {
14257 "node" : {
14258 "description" : "The cluster node name.",
14259 "format" : "pve-node",
14260 "type" : "string"
14261 },
14262 "vmid" : {
14263 "description" : "The (unique) ID of the VM.",
14264 "format" : "pve-vmid",
14265 "minimum" : 1,
4bd7df8b
DM
14266 "type" : "integer",
14267 "typetext" : "integer (1- N)"
44660702
DM
14268 }
14269 }
14270 },
14271 "permissions" : {
14272 "check" : [
14273 "perm",
14274 "/vms/{vmid}",
14275 [
14276 "VM.Audit"
14277 ]
14278 ]
14279 },
14280 "returns" : {
14281 "items" : {
14282 "properties" : {
14283 "comment" : {
14284 "optional" : 1,
14285 "type" : "string"
14286 },
14287 "digest" : {
14288 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14289 "maxLength" : 40,
14290 "optional" : 0,
14291 "type" : "string"
7aacca6f 14292 },
44660702
DM
14293 "name" : {
14294 "description" : "IP set name.",
14295 "maxLength" : 64,
14296 "minLength" : 2,
14297 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14298 "type" : "string"
14299 }
14300 },
14301 "type" : "object"
14302 },
14303 "links" : [
14304 {
14305 "href" : "{name}",
14306 "rel" : "child"
14307 }
14308 ],
14309 "type" : "array"
14310 }
14311 },
14312 "POST" : {
14313 "description" : "Create new IPSet",
14314 "method" : "POST",
14315 "name" : "create_ipset",
14316 "parameters" : {
14317 "additionalProperties" : 0,
14318 "properties" : {
14319 "comment" : {
14320 "optional" : 1,
14321 "type" : "string"
14322 },
14323 "digest" : {
14324 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14325 "maxLength" : 40,
14326 "optional" : 1,
14327 "type" : "string"
56122987 14328 },
44660702
DM
14329 "name" : {
14330 "description" : "IP set name.",
14331 "maxLength" : 64,
14332 "minLength" : 2,
14333 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14334 "type" : "string"
14335 },
14336 "node" : {
14337 "description" : "The cluster node name.",
14338 "format" : "pve-node",
14339 "type" : "string"
7aacca6f 14340 },
44660702
DM
14341 "rename" : {
14342 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
14343 "maxLength" : 64,
14344 "minLength" : 2,
14345 "optional" : 1,
14346 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14347 "type" : "string"
14348 },
14349 "vmid" : {
14350 "description" : "The (unique) ID of the VM.",
14351 "format" : "pve-vmid",
14352 "minimum" : 1,
4bd7df8b
DM
14353 "type" : "integer",
14354 "typetext" : "integer (1- N)"
44660702 14355 }
56122987 14356 }
44660702
DM
14357 },
14358 "permissions" : {
14359 "check" : [
14360 "perm",
14361 "/vms/{vmid}",
14362 [
14363 "VM.Config.Network"
14364 ]
14365 ]
14366 },
14367 "protected" : 1,
14368 "returns" : {
14369 "type" : "null"
56122987
DM
14370 }
14371 }
44660702
DM
14372 },
14373 "leaf" : 0,
14374 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset",
14375 "text" : "ipset"
56122987
DM
14376 },
14377 {
56122987 14378 "info" : {
7aacca6f 14379 "GET" : {
44660702 14380 "description" : "Get VM firewall options.",
7aacca6f 14381 "method" : "GET",
44660702
DM
14382 "name" : "get_options",
14383 "parameters" : {
14384 "additionalProperties" : 0,
14385 "properties" : {
14386 "node" : {
14387 "description" : "The cluster node name.",
14388 "format" : "pve-node",
14389 "type" : "string"
14390 },
14391 "vmid" : {
14392 "description" : "The (unique) ID of the VM.",
14393 "format" : "pve-vmid",
14394 "minimum" : 1,
4bd7df8b
DM
14395 "type" : "integer",
14396 "typetext" : "integer (1- N)"
44660702
DM
14397 }
14398 }
14399 },
14400 "permissions" : {
14401 "check" : [
14402 "perm",
14403 "/vms/{vmid}",
14404 [
14405 "VM.Audit"
14406 ]
14407 ]
14408 },
14409 "proxyto" : "node",
56122987 14410 "returns" : {
56122987 14411 "properties" : {
44660702
DM
14412 "dhcp" : {
14413 "description" : "Enable DHCP.",
14414 "optional" : 1,
14415 "type" : "boolean"
14416 },
14417 "enable" : {
14418 "description" : "Enable/disable firewall rules.",
14419 "optional" : 1,
14420 "type" : "boolean"
14421 },
14422 "ipfilter" : {
14423 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
7aacca6f 14424 "optional" : 1,
44660702
DM
14425 "type" : "boolean"
14426 },
14427 "log_level_in" : {
7aacca6f
DM
14428 "description" : "Log level for incoming traffic.",
14429 "enum" : [
14430 "emerg",
14431 "alert",
14432 "crit",
14433 "err",
14434 "warning",
14435 "notice",
14436 "info",
14437 "debug",
14438 "nolog"
44660702
DM
14439 ],
14440 "optional" : 1,
14441 "type" : "string"
56122987 14442 },
44660702
DM
14443 "log_level_out" : {
14444 "description" : "Log level for outgoing traffic.",
56122987 14445 "enum" : [
44660702
DM
14446 "emerg",
14447 "alert",
14448 "crit",
14449 "err",
14450 "warning",
14451 "notice",
14452 "info",
14453 "debug",
14454 "nolog"
7aacca6f 14455 ],
7aacca6f
DM
14456 "optional" : 1,
14457 "type" : "string"
56122987 14458 },
44660702
DM
14459 "macfilter" : {
14460 "description" : "Enable/disable MAC address filter.",
14461 "optional" : 1,
14462 "type" : "boolean"
7aacca6f 14463 },
44660702
DM
14464 "ndp" : {
14465 "description" : "Enable NDP.",
56122987 14466 "optional" : 1,
44660702 14467 "type" : "boolean"
56122987
DM
14468 },
14469 "policy_in" : {
7aacca6f 14470 "description" : "Input policy.",
56122987
DM
14471 "enum" : [
14472 "ACCEPT",
14473 "REJECT",
14474 "DROP"
14475 ],
7aacca6f 14476 "optional" : 1,
44660702 14477 "type" : "string"
56122987 14478 },
44660702
DM
14479 "policy_out" : {
14480 "description" : "Output policy.",
56122987 14481 "enum" : [
44660702
DM
14482 "ACCEPT",
14483 "REJECT",
14484 "DROP"
56122987 14485 ],
7aacca6f 14486 "optional" : 1,
56122987
DM
14487 "type" : "string"
14488 },
44660702
DM
14489 "radv" : {
14490 "description" : "Allow sending Router Advertisement.",
56122987 14491 "optional" : 1,
7aacca6f
DM
14492 "type" : "boolean"
14493 }
7aacca6f 14494 },
44660702
DM
14495 "type" : "object"
14496 }
7aacca6f
DM
14497 },
14498 "PUT" : {
44660702
DM
14499 "description" : "Set Firewall options.",
14500 "method" : "PUT",
7aacca6f
DM
14501 "name" : "set_options",
14502 "parameters" : {
44660702 14503 "additionalProperties" : 0,
7aacca6f 14504 "properties" : {
44660702
DM
14505 "delete" : {
14506 "description" : "A list of settings you want to delete.",
14507 "format" : "pve-configid-list",
14508 "optional" : 1,
14509 "type" : "string"
14510 },
14511 "dhcp" : {
14512 "description" : "Enable DHCP.",
14513 "optional" : 1,
14514 "type" : "boolean"
14515 },
14516 "digest" : {
14517 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14518 "maxLength" : 40,
14519 "optional" : 1,
14520 "type" : "string"
14521 },
7aacca6f
DM
14522 "enable" : {
14523 "description" : "Enable/disable firewall rules.",
56122987 14524 "optional" : 1,
7aacca6f 14525 "type" : "boolean"
56122987 14526 },
44660702
DM
14527 "ipfilter" : {
14528 "description" : "Enable default IP filters. This is equivalent to adding an empty ipfilter-net<id> ipset for every interface. Such ipsets implicitly contain sane default restrictions such as restricting IPv6 link local addresses to the one derived from the interface's MAC address. For containers the configured IP addresses will be implicitly added.",
14529 "optional" : 1,
14530 "type" : "boolean"
14531 },
14532 "log_level_in" : {
14533 "description" : "Log level for incoming traffic.",
56122987
DM
14534 "enum" : [
14535 "emerg",
14536 "alert",
14537 "crit",
14538 "err",
14539 "warning",
14540 "notice",
14541 "info",
14542 "debug",
14543 "nolog"
14544 ],
56122987 14545 "optional" : 1,
44660702 14546 "type" : "string"
56122987 14547 },
44660702
DM
14548 "log_level_out" : {
14549 "description" : "Log level for outgoing traffic.",
56122987
DM
14550 "enum" : [
14551 "emerg",
14552 "alert",
14553 "crit",
14554 "err",
14555 "warning",
14556 "notice",
14557 "info",
14558 "debug",
14559 "nolog"
14560 ],
44660702
DM
14561 "optional" : 1,
14562 "type" : "string"
56122987 14563 },
44660702
DM
14564 "macfilter" : {
14565 "description" : "Enable/disable MAC address filter.",
14566 "optional" : 1,
14567 "type" : "boolean"
14568 },
14569 "ndp" : {
14570 "description" : "Enable NDP.",
56122987 14571 "optional" : 1,
56122987
DM
14572 "type" : "boolean"
14573 },
7aacca6f
DM
14574 "node" : {
14575 "description" : "The cluster node name.",
44660702
DM
14576 "format" : "pve-node",
14577 "type" : "string"
7aacca6f 14578 },
44660702
DM
14579 "policy_in" : {
14580 "description" : "Input policy.",
14581 "enum" : [
14582 "ACCEPT",
14583 "REJECT",
14584 "DROP"
14585 ],
7aacca6f 14586 "optional" : 1,
44660702 14587 "type" : "string"
7aacca6f 14588 },
44660702
DM
14589 "policy_out" : {
14590 "description" : "Output policy.",
56122987 14591 "enum" : [
7aacca6f
DM
14592 "ACCEPT",
14593 "REJECT",
14594 "DROP"
56122987
DM
14595 ],
14596 "optional" : 1,
56122987 14597 "type" : "string"
7aacca6f 14598 },
44660702
DM
14599 "radv" : {
14600 "description" : "Allow sending Router Advertisement.",
7aacca6f 14601 "optional" : 1,
44660702
DM
14602 "type" : "boolean"
14603 },
14604 "vmid" : {
14605 "description" : "The (unique) ID of the VM.",
14606 "format" : "pve-vmid",
14607 "minimum" : 1,
4bd7df8b
DM
14608 "type" : "integer",
14609 "typetext" : "integer (1- N)"
56122987 14610 }
44660702 14611 }
56122987 14612 },
7aacca6f
DM
14613 "permissions" : {
14614 "check" : [
14615 "perm",
14616 "/vms/{vmid}",
14617 [
14618 "VM.Config.Network"
14619 ]
14620 ]
14621 },
44660702
DM
14622 "protected" : 1,
14623 "proxyto" : "node",
7aacca6f
DM
14624 "returns" : {
14625 "type" : "null"
56122987
DM
14626 }
14627 }
14628 },
44660702 14629 "leaf" : 1,
7aacca6f 14630 "path" : "/nodes/{node}/lxc/{vmid}/firewall/options",
44660702 14631 "text" : "options"
56122987
DM
14632 },
14633 {
56122987
DM
14634 "info" : {
14635 "GET" : {
44660702 14636 "description" : "Read firewall log",
56122987 14637 "method" : "GET",
7aacca6f 14638 "name" : "log",
56122987
DM
14639 "parameters" : {
14640 "additionalProperties" : 0,
14641 "properties" : {
44660702
DM
14642 "limit" : {
14643 "minimum" : 0,
14644 "optional" : 1,
4bd7df8b
DM
14645 "type" : "integer",
14646 "typetext" : "integer (0- N)"
44660702 14647 },
56122987
DM
14648 "node" : {
14649 "description" : "The cluster node name.",
44660702
DM
14650 "format" : "pve-node",
14651 "type" : "string"
56122987 14652 },
44660702
DM
14653 "start" : {
14654 "minimum" : 0,
7aacca6f 14655 "optional" : 1,
4bd7df8b
DM
14656 "type" : "integer",
14657 "typetext" : "integer (0- N)"
56122987
DM
14658 },
14659 "vmid" : {
44660702 14660 "description" : "The (unique) ID of the VM.",
7aacca6f 14661 "format" : "pve-vmid",
56122987 14662 "minimum" : 1,
4bd7df8b
DM
14663 "type" : "integer",
14664 "typetext" : "integer (1- N)"
56122987
DM
14665 }
14666 }
14667 },
44660702
DM
14668 "permissions" : {
14669 "check" : [
14670 "perm",
14671 "/vms/{vmid}",
14672 [
14673 "VM.Console"
14674 ]
14675 ]
14676 },
56122987 14677 "protected" : 1,
44660702 14678 "proxyto" : "node",
7aacca6f
DM
14679 "returns" : {
14680 "items" : {
14681 "properties" : {
7aacca6f
DM
14682 "n" : {
14683 "description" : "Line number",
14684 "type" : "integer"
44660702
DM
14685 },
14686 "t" : {
14687 "description" : "Line text",
14688 "type" : "string"
7aacca6f
DM
14689 }
14690 },
14691 "type" : "object"
14692 },
14693 "type" : "array"
44660702 14694 }
56122987
DM
14695 }
14696 },
7aacca6f 14697 "leaf" : 1,
44660702
DM
14698 "path" : "/nodes/{node}/lxc/{vmid}/firewall/log",
14699 "text" : "log"
56122987
DM
14700 },
14701 {
56122987
DM
14702 "info" : {
14703 "GET" : {
7aacca6f 14704 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
14705 "method" : "GET",
14706 "name" : "refs",
56122987 14707 "parameters" : {
7aacca6f 14708 "additionalProperties" : 0,
56122987 14709 "properties" : {
44660702
DM
14710 "node" : {
14711 "description" : "The cluster node name.",
14712 "format" : "pve-node",
14713 "type" : "string"
7aacca6f 14714 },
56122987 14715 "type" : {
44660702 14716 "description" : "Only list references of specified type.",
56122987
DM
14717 "enum" : [
14718 "alias",
14719 "ipset"
14720 ],
44660702
DM
14721 "optional" : 1,
14722 "type" : "string"
56122987 14723 },
44660702
DM
14724 "vmid" : {
14725 "description" : "The (unique) ID of the VM.",
14726 "format" : "pve-vmid",
14727 "minimum" : 1,
4bd7df8b
DM
14728 "type" : "integer",
14729 "typetext" : "integer (1- N)"
56122987 14730 }
7aacca6f 14731 }
56122987 14732 },
44660702
DM
14733 "permissions" : {
14734 "check" : [
14735 "perm",
14736 "/vms/{vmid}",
14737 [
14738 "VM.Audit"
14739 ]
14740 ]
14741 },
56122987 14742 "returns" : {
56122987 14743 "items" : {
56122987 14744 "properties" : {
44660702
DM
14745 "comment" : {
14746 "optional" : 1,
14747 "type" : "string"
14748 },
14749 "name" : {
14750 "type" : "string"
14751 },
56122987 14752 "type" : {
56122987
DM
14753 "enum" : [
14754 "alias",
14755 "ipset"
44660702 14756 ],
7aacca6f 14757 "type" : "string"
56122987 14758 }
44660702
DM
14759 },
14760 "type" : "object"
14761 },
14762 "type" : "array"
56122987
DM
14763 }
14764 }
14765 },
44660702 14766 "leaf" : 1,
7aacca6f 14767 "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs",
44660702 14768 "text" : "refs"
56122987
DM
14769 }
14770 ],
56122987
DM
14771 "info" : {
14772 "GET" : {
7aacca6f 14773 "description" : "Directory index.",
44660702
DM
14774 "method" : "GET",
14775 "name" : "index",
56122987 14776 "parameters" : {
44660702 14777 "additionalProperties" : 0,
56122987 14778 "properties" : {
56122987 14779 "node" : {
44660702 14780 "description" : "The cluster node name.",
56122987 14781 "format" : "pve-node",
44660702
DM
14782 "type" : "string"
14783 },
14784 "vmid" : {
14785 "description" : "The (unique) ID of the VM.",
14786 "format" : "pve-vmid",
14787 "minimum" : 1,
4bd7df8b
DM
14788 "type" : "integer",
14789 "typetext" : "integer (1- N)"
56122987 14790 }
44660702
DM
14791 }
14792 },
14793 "permissions" : {
14794 "user" : "all"
56122987
DM
14795 },
14796 "returns" : {
7aacca6f 14797 "items" : {
44660702
DM
14798 "properties" : {},
14799 "type" : "object"
7aacca6f 14800 },
56122987
DM
14801 "links" : [
14802 {
44660702
DM
14803 "href" : "{name}",
14804 "rel" : "child"
56122987 14805 }
44660702
DM
14806 ],
14807 "type" : "array"
56122987
DM
14808 }
14809 }
14810 },
44660702 14811 "leaf" : 0,
7aacca6f 14812 "path" : "/nodes/{node}/lxc/{vmid}/firewall",
44660702 14813 "text" : "firewall"
56122987
DM
14814 },
14815 {
56122987
DM
14816 "info" : {
14817 "GET" : {
56122987 14818 "description" : "Read VM RRD statistics (returns PNG)",
44660702 14819 "method" : "GET",
7aacca6f 14820 "name" : "rrd",
56122987 14821 "parameters" : {
7aacca6f 14822 "additionalProperties" : 0,
56122987 14823 "properties" : {
44660702
DM
14824 "cf" : {
14825 "description" : "The RRD consolidation function",
14826 "enum" : [
14827 "AVERAGE",
14828 "MAX"
14829 ],
14830 "optional" : 1,
14831 "type" : "string"
14832 },
14833 "ds" : {
14834 "description" : "The list of datasources you want to display.",
14835 "format" : "pve-configid-list",
14836 "type" : "string"
14837 },
7aacca6f
DM
14838 "node" : {
14839 "description" : "The cluster node name.",
44660702
DM
14840 "format" : "pve-node",
14841 "type" : "string"
56122987
DM
14842 },
14843 "timeframe" : {
14844 "description" : "Specify the time frame you are interested in.",
14845 "enum" : [
14846 "hour",
14847 "day",
14848 "week",
14849 "month",
14850 "year"
7aacca6f 14851 ],
44660702 14852 "type" : "string"
7aacca6f
DM
14853 },
14854 "vmid" : {
44660702 14855 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14856 "format" : "pve-vmid",
14857 "minimum" : 1,
4bd7df8b
DM
14858 "type" : "integer",
14859 "typetext" : "integer (1- N)"
56122987 14860 }
7aacca6f
DM
14861 }
14862 },
14863 "permissions" : {
14864 "check" : [
14865 "perm",
14866 "/vms/{vmid}",
14867 [
14868 "VM.Audit"
14869 ]
14870 ]
56122987 14871 },
44660702 14872 "protected" : 1,
7aacca6f
DM
14873 "returns" : {
14874 "properties" : {
14875 "filename" : {
14876 "type" : "string"
14877 }
14878 },
14879 "type" : "object"
14880 }
56122987 14881 }
7aacca6f 14882 },
44660702 14883 "leaf" : 1,
7aacca6f 14884 "path" : "/nodes/{node}/lxc/{vmid}/rrd",
44660702 14885 "text" : "rrd"
56122987
DM
14886 },
14887 {
56122987
DM
14888 "info" : {
14889 "GET" : {
44660702
DM
14890 "description" : "Read VM RRD statistics",
14891 "method" : "GET",
14892 "name" : "rrddata",
56122987 14893 "parameters" : {
7aacca6f 14894 "additionalProperties" : 0,
56122987 14895 "properties" : {
44660702
DM
14896 "cf" : {
14897 "description" : "The RRD consolidation function",
14898 "enum" : [
14899 "AVERAGE",
14900 "MAX"
14901 ],
14902 "optional" : 1,
14903 "type" : "string"
14904 },
7aacca6f 14905 "node" : {
44660702 14906 "description" : "The cluster node name.",
7aacca6f 14907 "format" : "pve-node",
44660702 14908 "type" : "string"
7aacca6f 14909 },
56122987
DM
14910 "timeframe" : {
14911 "description" : "Specify the time frame you are interested in.",
14912 "enum" : [
14913 "hour",
14914 "day",
14915 "week",
14916 "month",
14917 "year"
44660702
DM
14918 ],
14919 "type" : "string"
7aacca6f
DM
14920 },
14921 "vmid" : {
14922 "description" : "The (unique) ID of the VM.",
44660702 14923 "format" : "pve-vmid",
7aacca6f 14924 "minimum" : 1,
4bd7df8b
DM
14925 "type" : "integer",
14926 "typetext" : "integer (1- N)"
56122987 14927 }
56122987
DM
14928 }
14929 },
56122987
DM
14930 "permissions" : {
14931 "check" : [
14932 "perm",
14933 "/vms/{vmid}",
14934 [
14935 "VM.Audit"
14936 ]
14937 ]
14938 },
7aacca6f
DM
14939 "protected" : 1,
14940 "returns" : {
7aacca6f
DM
14941 "items" : {
14942 "properties" : {},
14943 "type" : "object"
44660702
DM
14944 },
14945 "type" : "array"
14946 }
56122987
DM
14947 }
14948 },
44660702 14949 "leaf" : 1,
7aacca6f 14950 "path" : "/nodes/{node}/lxc/{vmid}/rrddata",
44660702 14951 "text" : "rrddata"
56122987
DM
14952 },
14953 {
14954 "info" : {
14955 "POST" : {
14956 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
14957 "method" : "POST",
14958 "name" : "vncproxy",
7aacca6f 14959 "parameters" : {
44660702 14960 "additionalProperties" : 0,
7aacca6f 14961 "properties" : {
44660702
DM
14962 "node" : {
14963 "description" : "The cluster node name.",
14964 "format" : "pve-node",
14965 "type" : "string"
14966 },
7aacca6f 14967 "vmid" : {
44660702 14968 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14969 "format" : "pve-vmid",
14970 "minimum" : 1,
4bd7df8b
DM
14971 "type" : "integer",
14972 "typetext" : "integer (1- N)"
7aacca6f
DM
14973 },
14974 "websocket" : {
44660702 14975 "description" : "use websocket instead of standard VNC.",
7aacca6f 14976 "optional" : 1,
44660702 14977 "type" : "boolean"
7aacca6f 14978 }
44660702 14979 }
7aacca6f 14980 },
56122987
DM
14981 "permissions" : {
14982 "check" : [
14983 "perm",
14984 "/vms/{vmid}",
14985 [
14986 "VM.Console"
14987 ]
14988 ]
14989 },
44660702 14990 "protected" : 1,
56122987 14991 "returns" : {
7aacca6f 14992 "additionalProperties" : 0,
56122987 14993 "properties" : {
7aacca6f 14994 "cert" : {
56122987
DM
14995 "type" : "string"
14996 },
44660702
DM
14997 "port" : {
14998 "type" : "integer"
56122987 14999 },
44660702 15000 "ticket" : {
56122987
DM
15001 "type" : "string"
15002 },
44660702 15003 "upid" : {
56122987
DM
15004 "type" : "string"
15005 },
44660702
DM
15006 "user" : {
15007 "type" : "string"
56122987 15008 }
7aacca6f 15009 }
56122987
DM
15010 }
15011 }
15012 },
44660702 15013 "leaf" : 1,
56122987 15014 "path" : "/nodes/{node}/lxc/{vmid}/vncproxy",
44660702 15015 "text" : "vncproxy"
56122987
DM
15016 },
15017 {
56122987
DM
15018 "info" : {
15019 "GET" : {
44660702
DM
15020 "description" : "Opens a weksocket for VNC traffic.",
15021 "method" : "GET",
15022 "name" : "vncwebsocket",
56122987 15023 "parameters" : {
44660702 15024 "additionalProperties" : 0,
56122987 15025 "properties" : {
56122987
DM
15026 "node" : {
15027 "description" : "The cluster node name.",
44660702 15028 "format" : "pve-node",
56122987 15029 "type" : "string"
7aacca6f 15030 },
44660702
DM
15031 "port" : {
15032 "description" : "Port number returned by previous vncproxy call.",
15033 "maximum" : 5999,
15034 "minimum" : 5900,
4bd7df8b
DM
15035 "type" : "integer",
15036 "typetext" : "integer (5900-5999)"
44660702 15037 },
7aacca6f
DM
15038 "vmid" : {
15039 "description" : "The (unique) ID of the VM.",
7aacca6f 15040 "format" : "pve-vmid",
44660702 15041 "minimum" : 1,
4bd7df8b
DM
15042 "type" : "integer",
15043 "typetext" : "integer (1- N)"
44660702
DM
15044 },
15045 "vncticket" : {
15046 "description" : "Ticket from previous call to vncproxy.",
15047 "maxLength" : 512,
15048 "type" : "string"
56122987 15049 }
44660702 15050 }
7aacca6f 15051 },
7aacca6f
DM
15052 "permissions" : {
15053 "check" : [
15054 "perm",
15055 "/vms/{vmid}",
15056 [
15057 "VM.Console"
15058 ]
15059 ],
15060 "description" : "You also need to pass a valid ticket (vncticket)."
56122987
DM
15061 },
15062 "returns" : {
56122987
DM
15063 "properties" : {
15064 "port" : {
15065 "type" : "string"
15066 }
44660702
DM
15067 },
15068 "type" : "object"
15069 }
56122987
DM
15070 }
15071 },
44660702 15072 "leaf" : 1,
7aacca6f 15073 "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket",
44660702 15074 "text" : "vncwebsocket"
56122987
DM
15075 },
15076 {
56122987
DM
15077 "info" : {
15078 "POST" : {
44660702
DM
15079 "description" : "Returns a SPICE configuration to connect to the CT.",
15080 "method" : "POST",
15081 "name" : "spiceproxy",
56122987
DM
15082 "parameters" : {
15083 "additionalProperties" : 0,
15084 "properties" : {
44660702
DM
15085 "node" : {
15086 "description" : "The cluster node name.",
15087 "format" : "pve-node",
15088 "type" : "string"
56122987
DM
15089 },
15090 "proxy" : {
7aacca6f 15091 "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).",
44660702
DM
15092 "format" : "address",
15093 "optional" : 1,
7aacca6f 15094 "type" : "string"
44660702
DM
15095 },
15096 "vmid" : {
15097 "description" : "The (unique) ID of the VM.",
15098 "format" : "pve-vmid",
15099 "minimum" : 1,
4bd7df8b
DM
15100 "type" : "integer",
15101 "typetext" : "integer (1- N)"
56122987
DM
15102 }
15103 }
15104 },
56122987
DM
15105 "permissions" : {
15106 "check" : [
15107 "perm",
15108 "/vms/{vmid}",
15109 [
15110 "VM.Console"
15111 ]
15112 ]
15113 },
44660702
DM
15114 "protected" : 1,
15115 "proxyto" : "node",
56122987 15116 "returns" : {
7aacca6f 15117 "additionalProperties" : 1,
44660702 15118 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 15119 "properties" : {
44660702 15120 "host" : {
56122987
DM
15121 "type" : "string"
15122 },
44660702 15123 "password" : {
56122987
DM
15124 "type" : "string"
15125 },
15126 "proxy" : {
15127 "type" : "string"
15128 },
56122987
DM
15129 "tls-port" : {
15130 "type" : "integer"
7aacca6f 15131 },
44660702 15132 "type" : {
7aacca6f 15133 "type" : "string"
56122987 15134 }
7aacca6f
DM
15135 }
15136 }
56122987 15137 }
44660702
DM
15138 },
15139 "leaf" : 1,
15140 "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy",
15141 "text" : "spiceproxy"
56122987
DM
15142 },
15143 {
56122987
DM
15144 "info" : {
15145 "POST" : {
44660702 15146 "description" : "Migrate the container to another node. Creates a new migration task.",
7aacca6f 15147 "method" : "POST",
44660702 15148 "name" : "migrate_vm",
56122987 15149 "parameters" : {
44660702 15150 "additionalProperties" : 0,
56122987 15151 "properties" : {
44660702
DM
15152 "force" : {
15153 "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.",
15154 "optional" : 1,
15155 "type" : "boolean"
15156 },
15157 "node" : {
15158 "description" : "The cluster node name.",
7aacca6f 15159 "format" : "pve-node",
7aacca6f
DM
15160 "type" : "string"
15161 },
56122987 15162 "online" : {
56122987 15163 "description" : "Use online/live migration.",
44660702
DM
15164 "optional" : 1,
15165 "type" : "boolean"
56122987 15166 },
44660702
DM
15167 "target" : {
15168 "description" : "Target node.",
56122987 15169 "format" : "pve-node",
44660702 15170 "type" : "string"
56122987 15171 },
44660702
DM
15172 "vmid" : {
15173 "description" : "The (unique) ID of the VM.",
15174 "format" : "pve-vmid",
15175 "minimum" : 1,
4bd7df8b
DM
15176 "type" : "integer",
15177 "typetext" : "integer (1- N)"
56122987 15178 }
44660702 15179 }
7aacca6f 15180 },
56122987
DM
15181 "permissions" : {
15182 "check" : [
15183 "perm",
15184 "/vms/{vmid}",
15185 [
15186 "VM.Migrate"
15187 ]
15188 ]
15189 },
44660702 15190 "protected" : 1,
7aacca6f 15191 "proxyto" : "node",
44660702
DM
15192 "returns" : {
15193 "description" : "the task ID.",
15194 "type" : "string"
15195 }
56122987
DM
15196 }
15197 },
44660702
DM
15198 "leaf" : 1,
15199 "path" : "/nodes/{node}/lxc/{vmid}/migrate",
7aacca6f 15200 "text" : "migrate"
56122987
DM
15201 },
15202 {
56122987
DM
15203 "info" : {
15204 "GET" : {
44660702
DM
15205 "description" : "Check if feature for virtual machine is available.",
15206 "method" : "GET",
56122987 15207 "name" : "vm_feature",
56122987 15208 "parameters" : {
7aacca6f 15209 "additionalProperties" : 0,
56122987 15210 "properties" : {
44660702
DM
15211 "feature" : {
15212 "description" : "Feature to check.",
15213 "enum" : [
15214 "snapshot"
15215 ],
15216 "type" : "string"
15217 },
7aacca6f 15218 "node" : {
44660702 15219 "description" : "The cluster node name.",
7aacca6f 15220 "format" : "pve-node",
44660702 15221 "type" : "string"
7aacca6f 15222 },
56122987 15223 "snapname" : {
7aacca6f
DM
15224 "description" : "The name of the snapshot.",
15225 "format" : "pve-configid",
44660702
DM
15226 "maxLength" : 40,
15227 "optional" : 1,
56122987
DM
15228 "type" : "string"
15229 },
15230 "vmid" : {
7aacca6f 15231 "description" : "The (unique) ID of the VM.",
44660702 15232 "format" : "pve-vmid",
7aacca6f 15233 "minimum" : 1,
4bd7df8b
DM
15234 "type" : "integer",
15235 "typetext" : "integer (1- N)"
56122987 15236 }
7aacca6f 15237 }
56122987
DM
15238 },
15239 "permissions" : {
15240 "check" : [
15241 "perm",
15242 "/vms/{vmid}",
15243 [
15244 "VM.Audit"
15245 ]
15246 ]
15247 },
44660702 15248 "protected" : 1,
7aacca6f 15249 "proxyto" : "node",
7aacca6f
DM
15250 "returns" : {
15251 "properties" : {
15252 "hasFeature" : {
15253 "type" : "boolean"
15254 }
15255 },
15256 "type" : "object"
15257 }
56122987
DM
15258 }
15259 },
7aacca6f 15260 "leaf" : 1,
44660702
DM
15261 "path" : "/nodes/{node}/lxc/{vmid}/feature",
15262 "text" : "feature"
56122987
DM
15263 },
15264 {
56122987
DM
15265 "info" : {
15266 "POST" : {
44660702
DM
15267 "description" : "Create a Template.",
15268 "method" : "POST",
56122987 15269 "name" : "template",
56122987
DM
15270 "parameters" : {
15271 "additionalProperties" : 0,
15272 "properties" : {
44660702
DM
15273 "experimental" : {
15274 "default" : 0,
15275 "description" : "The template feature is experimental, set this flag if you know what you are doing.",
15276 "type" : "boolean"
7aacca6f
DM
15277 },
15278 "node" : {
7aacca6f 15279 "description" : "The cluster node name.",
44660702 15280 "format" : "pve-node",
7aacca6f 15281 "type" : "string"
56122987 15282 },
44660702
DM
15283 "vmid" : {
15284 "description" : "The (unique) ID of the VM.",
15285 "format" : "pve-vmid",
15286 "minimum" : 1,
4bd7df8b
DM
15287 "type" : "integer",
15288 "typetext" : "integer (1- N)"
56122987
DM
15289 }
15290 }
15291 },
56122987 15292 "permissions" : {
56122987
DM
15293 "check" : [
15294 "perm",
15295 "/vms/{vmid}",
15296 [
15297 "VM.Allocate"
15298 ]
44660702
DM
15299 ],
15300 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
7aacca6f 15301 },
44660702 15302 "protected" : 1,
7aacca6f
DM
15303 "proxyto" : "node",
15304 "returns" : {
15305 "type" : "null"
56122987
DM
15306 }
15307 }
15308 },
44660702 15309 "leaf" : 1,
7aacca6f 15310 "path" : "/nodes/{node}/lxc/{vmid}/template",
44660702 15311 "text" : "template"
56122987
DM
15312 },
15313 {
56122987
DM
15314 "info" : {
15315 "POST" : {
44660702
DM
15316 "description" : "Create a container clone/copy",
15317 "method" : "POST",
56122987 15318 "name" : "clone_vm",
7aacca6f
DM
15319 "parameters" : {
15320 "additionalProperties" : 0,
15321 "properties" : {
44660702
DM
15322 "description" : {
15323 "description" : "Description for the new CT.",
7aacca6f 15324 "optional" : 1,
44660702 15325 "type" : "string"
7aacca6f
DM
15326 },
15327 "experimental" : {
7aacca6f 15328 "default" : 0,
44660702
DM
15329 "description" : "The clone feature is experimental, set this flag if you know what you are doing.",
15330 "type" : "boolean"
7aacca6f 15331 },
44660702
DM
15332 "full" : {
15333 "default" : 0,
15334 "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.",
7aacca6f 15335 "optional" : 1,
44660702 15336 "type" : "boolean"
7aacca6f
DM
15337 },
15338 "hostname" : {
44660702 15339 "description" : "Set a hostname for the new CT.",
7aacca6f 15340 "format" : "dns-name",
7aacca6f 15341 "optional" : 1,
44660702 15342 "type" : "string"
7aacca6f 15343 },
44660702
DM
15344 "newid" : {
15345 "description" : "VMID for the clone.",
7aacca6f 15346 "format" : "pve-vmid",
44660702 15347 "minimum" : 1,
4bd7df8b
DM
15348 "type" : "integer",
15349 "typetext" : "integer (1- N)"
7aacca6f
DM
15350 },
15351 "node" : {
15352 "description" : "The cluster node name.",
44660702
DM
15353 "format" : "pve-node",
15354 "type" : "string"
15355 },
15356 "pool" : {
15357 "description" : "Add the new CT to the specified pool.",
15358 "format" : "pve-poolid",
15359 "optional" : 1,
15360 "type" : "string"
7aacca6f
DM
15361 },
15362 "snapname" : {
44660702 15363 "description" : "The name of the snapshot.",
7aacca6f
DM
15364 "format" : "pve-configid",
15365 "maxLength" : 40,
7aacca6f 15366 "optional" : 1,
44660702 15367 "type" : "string"
7aacca6f
DM
15368 },
15369 "storage" : {
44660702 15370 "description" : "Target storage for full clone.",
7aacca6f
DM
15371 "format" : "pve-storage-id",
15372 "optional" : 1,
7aacca6f 15373 "requires" : "full",
44660702
DM
15374 "type" : "string"
15375 },
15376 "vmid" : {
15377 "description" : "The (unique) ID of the VM.",
15378 "format" : "pve-vmid",
15379 "minimum" : 1,
4bd7df8b
DM
15380 "type" : "integer",
15381 "typetext" : "integer (1- N)"
7aacca6f
DM
15382 }
15383 }
56122987
DM
15384 },
15385 "permissions" : {
56122987
DM
15386 "check" : [
15387 "and",
15388 [
15389 "perm",
15390 "/vms/{vmid}",
15391 [
15392 "VM.Clone"
15393 ]
15394 ],
15395 [
15396 "or",
15397 [
15398 "perm",
15399 "/vms/{newid}",
15400 [
15401 "VM.Allocate"
15402 ]
15403 ],
15404 [
15405 "perm",
15406 "/pool/{pool}",
15407 [
15408 "VM.Allocate"
15409 ],
15410 "require_param",
15411 "pool"
15412 ]
15413 ]
7aacca6f
DM
15414 ],
15415 "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."
56122987 15416 },
44660702 15417 "protected" : 1,
56122987 15418 "proxyto" : "node",
7aacca6f
DM
15419 "returns" : {
15420 "type" : "string"
56122987
DM
15421 }
15422 }
44660702
DM
15423 },
15424 "leaf" : 1,
15425 "path" : "/nodes/{node}/lxc/{vmid}/clone",
15426 "text" : "clone"
56122987
DM
15427 },
15428 {
56122987
DM
15429 "info" : {
15430 "PUT" : {
44660702
DM
15431 "description" : "Resize a container mountpoint.",
15432 "method" : "PUT",
15433 "name" : "resize_vm",
56122987 15434 "parameters" : {
44660702 15435 "additionalProperties" : 0,
56122987 15436 "properties" : {
44660702
DM
15437 "digest" : {
15438 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
15439 "maxLength" : 40,
15440 "optional" : 1,
15441 "type" : "string"
56122987
DM
15442 },
15443 "disk" : {
7aacca6f 15444 "description" : "The disk you want to resize.",
56122987
DM
15445 "enum" : [
15446 "rootfs",
15447 "mp0",
15448 "mp1",
15449 "mp2",
15450 "mp3",
15451 "mp4",
15452 "mp5",
15453 "mp6",
15454 "mp7",
15455 "mp8",
15456 "mp9"
15457 ],
7aacca6f
DM
15458 "type" : "string"
15459 },
44660702
DM
15460 "node" : {
15461 "description" : "The cluster node name.",
15462 "format" : "pve-node",
15463 "type" : "string"
15464 },
15465 "size" : {
15466 "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.",
15467 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
15468 "type" : "string"
15469 },
15470 "vmid" : {
15471 "description" : "The (unique) ID of the VM.",
15472 "format" : "pve-vmid",
15473 "minimum" : 1,
4bd7df8b
DM
15474 "type" : "integer",
15475 "typetext" : "integer (1- N)"
56122987 15476 }
44660702 15477 }
56122987 15478 },
7aacca6f
DM
15479 "permissions" : {
15480 "check" : [
15481 "perm",
15482 "/vms/{vmid}",
15483 [
15484 "VM.Config.Disk"
15485 ],
15486 "any",
15487 1
15488 ]
15489 },
44660702 15490 "protected" : 1,
7aacca6f
DM
15491 "proxyto" : "node",
15492 "returns" : {
15493 "description" : "the task ID.",
15494 "type" : "string"
15495 }
56122987
DM
15496 }
15497 },
44660702 15498 "leaf" : 1,
7aacca6f 15499 "path" : "/nodes/{node}/lxc/{vmid}/resize",
44660702 15500 "text" : "resize"
56122987
DM
15501 }
15502 ],
15503 "info" : {
15504 "DELETE" : {
7aacca6f 15505 "description" : "Destroy the container (also delete all uses files).",
44660702
DM
15506 "method" : "DELETE",
15507 "name" : "destroy_vm",
15508 "parameters" : {
15509 "additionalProperties" : 0,
15510 "properties" : {
15511 "node" : {
15512 "description" : "The cluster node name.",
15513 "format" : "pve-node",
15514 "type" : "string"
15515 },
15516 "vmid" : {
15517 "description" : "The (unique) ID of the VM.",
15518 "format" : "pve-vmid",
15519 "minimum" : 1,
4bd7df8b
DM
15520 "type" : "integer",
15521 "typetext" : "integer (1- N)"
44660702
DM
15522 }
15523 }
15524 },
7aacca6f
DM
15525 "permissions" : {
15526 "check" : [
15527 "perm",
15528 "/vms/{vmid}",
15529 [
15530 "VM.Allocate"
15531 ]
15532 ]
15533 },
44660702
DM
15534 "protected" : 1,
15535 "proxyto" : "node",
56122987
DM
15536 "returns" : {
15537 "type" : "string"
44660702 15538 }
56122987
DM
15539 },
15540 "GET" : {
7aacca6f 15541 "description" : "Directory index",
44660702 15542 "method" : "GET",
7aacca6f 15543 "name" : "vmdiridx",
56122987 15544 "parameters" : {
7aacca6f 15545 "additionalProperties" : 0,
56122987
DM
15546 "properties" : {
15547 "node" : {
7aacca6f 15548 "description" : "The cluster node name.",
44660702
DM
15549 "format" : "pve-node",
15550 "type" : "string"
56122987
DM
15551 },
15552 "vmid" : {
15553 "description" : "The (unique) ID of the VM.",
56122987 15554 "format" : "pve-vmid",
44660702 15555 "minimum" : 1,
4bd7df8b
DM
15556 "type" : "integer",
15557 "typetext" : "integer (1- N)"
56122987 15558 }
7aacca6f 15559 }
56122987 15560 },
56122987
DM
15561 "permissions" : {
15562 "user" : "all"
44660702
DM
15563 },
15564 "proxyto" : "node",
15565 "returns" : {
15566 "items" : {
15567 "properties" : {
15568 "subdir" : {
15569 "type" : "string"
15570 }
15571 },
15572 "type" : "object"
15573 },
15574 "links" : [
15575 {
15576 "href" : "{subdir}",
15577 "rel" : "child"
15578 }
15579 ],
15580 "type" : "array"
56122987
DM
15581 }
15582 }
44660702
DM
15583 },
15584 "leaf" : 0,
15585 "path" : "/nodes/{node}/lxc/{vmid}",
15586 "text" : "{vmid}"
56122987
DM
15587 }
15588 ],
56122987 15589 "info" : {
44660702
DM
15590 "GET" : {
15591 "description" : "LXC container index (per node).",
15592 "method" : "GET",
15593 "name" : "vmlist",
15594 "parameters" : {
15595 "additionalProperties" : 0,
15596 "properties" : {
15597 "node" : {
15598 "description" : "The cluster node name.",
15599 "format" : "pve-node",
15600 "type" : "string"
15601 }
15602 }
15603 },
15604 "permissions" : {
15605 "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.",
15606 "user" : "all"
15607 },
15608 "protected" : 1,
15609 "proxyto" : "node",
15610 "returns" : {
15611 "items" : {
15612 "properties" : {},
15613 "type" : "object"
15614 },
15615 "links" : [
15616 {
15617 "href" : "{vmid}",
15618 "rel" : "child"
15619 }
15620 ],
15621 "type" : "array"
15622 }
15623 },
56122987 15624 "POST" : {
44660702 15625 "description" : "Create or restore a container.",
7aacca6f
DM
15626 "method" : "POST",
15627 "name" : "create_vm",
56122987 15628 "parameters" : {
7aacca6f 15629 "additionalProperties" : 0,
56122987 15630 "properties" : {
44660702
DM
15631 "arch" : {
15632 "default" : "amd64",
15633 "description" : "OS architecture type.",
15634 "enum" : [
15635 "amd64",
15636 "i386"
15637 ],
7aacca6f 15638 "optional" : 1,
44660702 15639 "type" : "string"
7aacca6f 15640 },
44660702
DM
15641 "cmode" : {
15642 "default" : "tty",
15643 "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).",
15644 "enum" : [
15645 "shell",
15646 "console",
15647 "tty"
15648 ],
7aacca6f 15649 "optional" : 1,
44660702 15650 "type" : "string"
7aacca6f
DM
15651 },
15652 "console" : {
7aacca6f 15653 "default" : 1,
44660702 15654 "description" : "Attach a console device (/dev/console) to the container.",
56122987 15655 "optional" : 1,
7aacca6f 15656 "type" : "boolean"
56122987 15657 },
44660702
DM
15658 "cpulimit" : {
15659 "default" : 0,
15660 "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.",
15661 "maximum" : 128,
15662 "minimum" : 0,
56122987 15663 "optional" : 1,
4bd7df8b
DM
15664 "type" : "number",
15665 "typetext" : "number (0-128)"
56122987 15666 },
44660702
DM
15667 "cpuunits" : {
15668 "default" : 1024,
15669 "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.",
15670 "maximum" : 500000,
15671 "minimum" : 0,
56122987 15672 "optional" : 1,
4bd7df8b
DM
15673 "type" : "integer",
15674 "typetext" : "integer (0-500000)"
7aacca6f
DM
15675 },
15676 "description" : {
44660702 15677 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 15678 "optional" : 1,
44660702 15679 "type" : "string"
7aacca6f 15680 },
44660702
DM
15681 "force" : {
15682 "description" : "Allow to overwrite existing container.",
7aacca6f 15683 "optional" : 1,
44660702
DM
15684 "type" : "boolean"
15685 },
15686 "hostname" : {
15687 "description" : "Set a host name for the container.",
15688 "format" : "dns-name",
15689 "maxLength" : 255,
15690 "optional" : 1,
15691 "type" : "string"
15692 },
15693 "ignore-unpack-errors" : {
15694 "description" : "Ignore errors when extracting the template.",
15695 "optional" : 1,
15696 "type" : "boolean"
15697 },
15698 "lock" : {
15699 "description" : "Lock/unlock the VM.",
7aacca6f
DM
15700 "enum" : [
15701 "migrate",
15702 "backup",
15703 "snapshot",
15704 "rollback"
15705 ],
44660702
DM
15706 "optional" : 1,
15707 "type" : "string"
7aacca6f 15708 },
44660702
DM
15709 "memory" : {
15710 "default" : 512,
15711 "description" : "Amount of RAM for the VM in MB.",
15712 "minimum" : 16,
7aacca6f 15713 "optional" : 1,
4bd7df8b
DM
15714 "type" : "integer",
15715 "typetext" : "integer (16- N)"
44660702
DM
15716 },
15717 "mp[n]" : {
c2993fe5 15718 "description" : "Use volume as container mount point.",
56122987 15719 "format" : {
7aacca6f
DM
15720 "acl" : {
15721 "description" : "Explicitly enable or disable ACL support.",
15722 "optional" : 1,
44660702 15723 "type" : "boolean"
56122987
DM
15724 },
15725 "backup" : {
56122987 15726 "description" : "Whether to include the mountpoint in backups.",
44660702 15727 "optional" : 1,
4bd7df8b
DM
15728 "type" : "boolean",
15729 "verbose_description" : "Whether to include the mountpoint in backups (only used for volume mountpoints)."
44660702
DM
15730 },
15731 "mp" : {
4bd7df8b 15732 "description" : "Path to the mountpoint as seen from inside the container (must not contain symlinks).",
44660702
DM
15733 "format" : "pve-lxc-mp-string",
15734 "format_description" : "Path",
4bd7df8b
DM
15735 "type" : "string",
15736 "verbose_description" : "Path to the mountpoint as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons."
44660702
DM
15737 },
15738 "quota" : {
15739 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15740 "optional" : 1,
44660702
DM
15741 "type" : "boolean"
15742 },
15743 "ro" : {
4bd7df8b 15744 "description" : "Read-only mountpoint",
44660702
DM
15745 "optional" : 1,
15746 "type" : "boolean"
7aacca6f
DM
15747 },
15748 "size" : {
44660702 15749 "description" : "Volume size (read only value).",
7aacca6f
DM
15750 "format" : "disk-size",
15751 "format_description" : "DiskSize",
7aacca6f
DM
15752 "optional" : 1,
15753 "type" : "string"
56122987
DM
15754 },
15755 "volume" : {
7aacca6f 15756 "default_key" : 1,
44660702 15757 "description" : "Volume, device or directory to mount into the container.",
56122987 15758 "format" : "pve-lxc-mp-string",
56122987 15759 "format_description" : "volume",
44660702 15760 "type" : "string"
56122987 15761 }
44660702 15762 },
56122987 15763 "optional" : 1,
4bd7df8b
DM
15764 "type" : "string",
15765 "typetext" : "[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
56122987 15766 },
44660702
DM
15767 "nameserver" : {
15768 "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.",
15769 "format" : "address-list",
56122987 15770 "optional" : 1,
44660702 15771 "type" : "string"
56122987 15772 },
44660702
DM
15773 "net[n]" : {
15774 "description" : "Specifies network interfaces for the container.",
7aacca6f 15775 "format" : {
44660702
DM
15776 "bridge" : {
15777 "description" : "Bridge to attach the network device to.",
f004f5b9 15778 "format_description" : "bridge",
7aacca6f 15779 "optional" : 1,
44660702
DM
15780 "pattern" : "[-_.\\w\\d]+",
15781 "type" : "string"
7aacca6f 15782 },
44660702
DM
15783 "firewall" : {
15784 "description" : "Controls whether this interface's firewall rules should be used.",
7aacca6f 15785 "optional" : 1,
44660702 15786 "type" : "boolean"
7aacca6f 15787 },
44660702
DM
15788 "gw" : {
15789 "description" : "Default gateway for IPv4 traffic.",
15790 "format" : "ipv4",
15791 "format_description" : "GatewayIPv4",
7aacca6f 15792 "optional" : 1,
44660702 15793 "type" : "string"
7aacca6f 15794 },
44660702
DM
15795 "gw6" : {
15796 "description" : "Default gateway for IPv6 traffic.",
15797 "format" : "ipv6",
15798 "format_description" : "GatewayIPv6",
15799 "optional" : 1,
15800 "type" : "string"
7aacca6f 15801 },
44660702 15802 "hwaddr" : {
f004f5b9
DM
15803 "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)",
15804 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
15805 "optional" : 1,
15806 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
7aacca6f
DM
15807 "type" : "string"
15808 },
44660702
DM
15809 "ip" : {
15810 "description" : "IPv4 address in CIDR format.",
15811 "format" : "pve-ipv4-config",
15812 "format_description" : "IPv4Format/CIDR",
7aacca6f 15813 "optional" : 1,
44660702 15814 "type" : "string"
7aacca6f 15815 },
44660702
DM
15816 "ip6" : {
15817 "description" : "IPv6 address in CIDR format.",
15818 "format" : "pve-ipv6-config",
15819 "format_description" : "IPv6Format/CIDR",
15820 "optional" : 1,
15821 "type" : "string"
15822 },
15823 "mtu" : {
15824 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702
DM
15825 "minimum" : 64,
15826 "optional" : 1,
15827 "type" : "integer"
15828 },
15829 "name" : {
15830 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 15831 "format_description" : "string",
44660702
DM
15832 "pattern" : "[-_.\\w\\d]+",
15833 "type" : "string"
15834 },
15835 "rate" : {
15836 "description" : "Apply rate limiting to the interface",
15837 "format_description" : "mbps",
15838 "optional" : 1,
15839 "type" : "number"
15840 },
15841 "tag" : {
15842 "description" : "VLAN tag for this interface.",
4bd7df8b
DM
15843 "maximum" : 4094,
15844 "minimum" : 1,
44660702
DM
15845 "optional" : 1,
15846 "type" : "integer"
15847 },
15848 "trunks" : {
15849 "description" : "VLAN ids to pass through the interface",
15850 "format_description" : "vlanid[;vlanid...]",
15851 "optional" : 1,
15852 "pattern" : "(?^:\\d+(?:;\\d+)*)",
15853 "type" : "string"
15854 },
15855 "type" : {
15856 "description" : "Network interface type.",
15857 "enum" : [
15858 "veth"
15859 ],
15860 "optional" : 1,
15861 "type" : "string"
7aacca6f
DM
15862 }
15863 },
56122987 15864 "optional" : 1,
4bd7df8b
DM
15865 "type" : "string",
15866 "typetext" : "name=<string> [,bridge=<bridge>] [,firewall=<1|0>] [,gw=<GatewayIPv4>] [,gw6=<GatewayIPv6>] [,hwaddr=<XX:XX:XX:XX:XX:XX>] [,ip=<IPv4Format/CIDR>] [,ip6=<IPv6Format/CIDR>] [,mtu=<integer>] [,rate=<mbps>] [,tag=<integer>] [,trunks=<vlanid[;vlanid...]>] [,type=<veth>]"
56122987 15867 },
44660702
DM
15868 "node" : {
15869 "description" : "The cluster node name.",
15870 "format" : "pve-node",
15871 "type" : "string"
56122987 15872 },
44660702
DM
15873 "onboot" : {
15874 "default" : 0,
15875 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 15876 "optional" : 1,
44660702
DM
15877 "type" : "boolean"
15878 },
15879 "ostemplate" : {
15880 "description" : "The OS template or backup file.",
15881 "maxLength" : 255,
15882 "type" : "string"
56122987
DM
15883 },
15884 "ostype" : {
7aacca6f 15885 "description" : "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/<ostype>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup.",
56122987
DM
15886 "enum" : [
15887 "debian",
15888 "ubuntu",
15889 "centos",
15890 "fedora",
15891 "opensuse",
15892 "archlinux",
15893 "alpine",
57b78691 15894 "gentoo",
56122987 15895 "unmanaged"
44660702 15896 ],
56122987 15897 "optional" : 1,
7aacca6f 15898 "type" : "string"
56122987 15899 },
44660702
DM
15900 "password" : {
15901 "description" : "Sets root password inside container.",
15902 "minLength" : 5,
7aacca6f
DM
15903 "optional" : 1,
15904 "type" : "string"
15905 },
44660702
DM
15906 "pool" : {
15907 "description" : "Add the VM to the specified pool.",
15908 "format" : "pve-poolid",
7aacca6f 15909 "optional" : 1,
44660702 15910 "type" : "string"
7aacca6f 15911 },
44660702
DM
15912 "protection" : {
15913 "default" : 0,
15914 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
7aacca6f 15915 "optional" : 1,
44660702 15916 "type" : "boolean"
7aacca6f 15917 },
44660702
DM
15918 "restore" : {
15919 "description" : "Mark this as restore task.",
15920 "optional" : 1,
15921 "type" : "boolean"
7aacca6f 15922 },
44660702
DM
15923 "rootfs" : {
15924 "description" : "Use volume as container root.",
56122987 15925 "format" : {
44660702
DM
15926 "acl" : {
15927 "description" : "Explicitly enable or disable ACL support.",
56122987 15928 "optional" : 1,
44660702 15929 "type" : "boolean"
56122987 15930 },
44660702
DM
15931 "quota" : {
15932 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15933 "optional" : 1,
44660702 15934 "type" : "boolean"
7aacca6f 15935 },
44660702 15936 "ro" : {
4bd7df8b 15937 "description" : "Read-only mountpoint",
7aacca6f 15938 "optional" : 1,
44660702 15939 "type" : "boolean"
7aacca6f 15940 },
44660702
DM
15941 "size" : {
15942 "description" : "Volume size (read only value).",
15943 "format" : "disk-size",
15944 "format_description" : "DiskSize",
7aacca6f
DM
15945 "optional" : 1,
15946 "type" : "string"
15947 },
44660702
DM
15948 "volume" : {
15949 "default_key" : 1,
15950 "description" : "Volume, device or directory to mount into the container.",
15951 "format" : "pve-lxc-mp-string",
15952 "format_description" : "volume",
15953 "type" : "string"
56122987 15954 }
7aacca6f 15955 },
7aacca6f 15956 "optional" : 1,
4bd7df8b
DM
15957 "type" : "string",
15958 "typetext" : "[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
44660702
DM
15959 },
15960 "searchdomain" : {
15961 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15962 "format" : "dns-name-list",
15963 "optional" : 1,
15964 "type" : "string"
15965 },
15966 "ssh-public-keys" : {
15967 "description" : "Setup public SSH keys (one key per line, OpenSSH format).",
15968 "optional" : 1,
15969 "type" : "string"
15970 },
15971 "startup" : {
15972 "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.",
15973 "format" : "pve-startup-order",
15974 "optional" : 1,
7aacca6f 15975 "type" : "string",
44660702 15976 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 15977 },
44660702
DM
15978 "storage" : {
15979 "default" : "local",
15980 "description" : "Default Storage.",
15981 "format" : "pve-storage-id",
15982 "optional" : 1,
7aacca6f 15983 "type" : "string"
7aacca6f 15984 },
44660702
DM
15985 "swap" : {
15986 "default" : 512,
15987 "description" : "Amount of SWAP for the VM in MB.",
15988 "minimum" : 0,
15989 "optional" : 1,
4bd7df8b
DM
15990 "type" : "integer",
15991 "typetext" : "integer (0- N)"
44660702
DM
15992 },
15993 "template" : {
15994 "default" : 0,
15995 "description" : "Enable/disable Template.",
15996 "optional" : 1,
15997 "type" : "boolean"
7aacca6f 15998 },
44660702
DM
15999 "tty" : {
16000 "default" : 2,
16001 "description" : "Specify the number of tty available to the container",
16002 "maximum" : 6,
16003 "minimum" : 0,
16004 "optional" : 1,
4bd7df8b
DM
16005 "type" : "integer",
16006 "typetext" : "integer (0-6)"
7aacca6f 16007 },
44660702
DM
16008 "unprivileged" : {
16009 "default" : 0,
16010 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
16011 "optional" : 1,
16012 "type" : "boolean"
16013 },
16014 "unused[n]" : {
c2993fe5 16015 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702
DM
16016 "format" : "pve-volume-id",
16017 "optional" : 1,
16018 "type" : "string"
16019 },
16020 "vmid" : {
16021 "description" : "The (unique) ID of the VM.",
16022 "format" : "pve-vmid",
16023 "minimum" : 1,
4bd7df8b
DM
16024 "type" : "integer",
16025 "typetext" : "integer (1- N)"
44660702 16026 }
7aacca6f
DM
16027 }
16028 },
44660702
DM
16029 "permissions" : {
16030 "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.",
16031 "user" : "all"
16032 },
16033 "protected" : 1,
16034 "proxyto" : "node",
16035 "returns" : {
16036 "type" : "string"
16037 }
16038 }
16039 },
16040 "leaf" : 0,
16041 "path" : "/nodes/{node}/lxc",
16042 "text" : "lxc"
16043 },
16044 {
16045 "children" : [
16046 {
56122987
DM
16047 "children" : [
16048 {
7aacca6f
DM
16049 "children" : [
16050 {
7aacca6f
DM
16051 "info" : {
16052 "POST" : {
44660702
DM
16053 "description" : "ceph osd in",
16054 "method" : "POST",
16055 "name" : "in",
16056 "parameters" : {
16057 "additionalProperties" : 0,
16058 "properties" : {
16059 "node" : {
16060 "description" : "The cluster node name.",
16061 "format" : "pve-node",
16062 "type" : "string"
16063 },
16064 "osdid" : {
16065 "description" : "OSD ID",
16066 "type" : "integer"
16067 }
16068 }
16069 },
56122987
DM
16070 "permissions" : {
16071 "check" : [
16072 "perm",
16073 "/",
16074 [
16075 "Sys.Modify"
16076 ]
16077 ]
7aacca6f 16078 },
44660702 16079 "protected" : 1,
7aacca6f
DM
16080 "proxyto" : "node",
16081 "returns" : {
16082 "type" : "null"
44660702 16083 }
56122987
DM
16084 }
16085 },
44660702 16086 "leaf" : 1,
7aacca6f 16087 "path" : "/nodes/{node}/ceph/osd/{osdid}/in",
44660702 16088 "text" : "in"
56122987
DM
16089 },
16090 {
56122987
DM
16091 "info" : {
16092 "POST" : {
44660702
DM
16093 "description" : "ceph osd out",
16094 "method" : "POST",
16095 "name" : "out",
16096 "parameters" : {
16097 "additionalProperties" : 0,
16098 "properties" : {
16099 "node" : {
16100 "description" : "The cluster node name.",
16101 "format" : "pve-node",
16102 "type" : "string"
16103 },
16104 "osdid" : {
16105 "description" : "OSD ID",
16106 "type" : "integer"
16107 }
16108 }
16109 },
56122987
DM
16110 "permissions" : {
16111 "check" : [
16112 "perm",
16113 "/",
16114 [
16115 "Sys.Modify"
16116 ]
16117 ]
16118 },
44660702 16119 "protected" : 1,
56122987 16120 "proxyto" : "node",
7aacca6f
DM
16121 "returns" : {
16122 "type" : "null"
44660702
DM
16123 }
16124 }
16125 },
16126 "leaf" : 1,
16127 "path" : "/nodes/{node}/ceph/osd/{osdid}/out",
16128 "text" : "out"
16129 }
16130 ],
16131 "info" : {
16132 "DELETE" : {
16133 "description" : "Destroy OSD",
16134 "method" : "DELETE",
16135 "name" : "destroyosd",
16136 "parameters" : {
16137 "additionalProperties" : 0,
16138 "properties" : {
16139 "cleanup" : {
16140 "default" : 0,
16141 "description" : "If set, we remove partition table entries.",
16142 "optional" : 1,
16143 "type" : "boolean"
7aacca6f 16144 },
44660702
DM
16145 "node" : {
16146 "description" : "The cluster node name.",
16147 "format" : "pve-node",
16148 "type" : "string"
56122987 16149 },
44660702
DM
16150 "osdid" : {
16151 "description" : "OSD ID",
16152 "type" : "integer"
16153 }
56122987
DM
16154 }
16155 },
44660702
DM
16156 "protected" : 1,
16157 "proxyto" : "node",
16158 "returns" : {
16159 "type" : "string"
16160 }
16161 }
16162 },
16163 "leaf" : 0,
16164 "path" : "/nodes/{node}/ceph/osd/{osdid}",
16165 "text" : "{osdid}"
16166 }
16167 ],
16168 "info" : {
16169 "GET" : {
16170 "description" : "Get Ceph osd list/tree.",
16171 "method" : "GET",
16172 "name" : "index",
16173 "parameters" : {
16174 "additionalProperties" : 0,
16175 "properties" : {
16176 "node" : {
16177 "description" : "The cluster node name.",
16178 "format" : "pve-node",
16179 "type" : "string"
16180 }
16181 }
16182 },
16183 "permissions" : {
16184 "check" : [
16185 "perm",
16186 "/",
16187 [
16188 "Sys.Audit",
16189 "Datastore.Audit"
16190 ],
16191 "any",
16192 1
16193 ]
16194 },
16195 "protected" : 1,
16196 "proxyto" : "node",
16197 "returns" : {
16198 "type" : "object"
16199 }
16200 },
16201 "POST" : {
16202 "description" : "Create OSD",
16203 "method" : "POST",
16204 "name" : "createosd",
16205 "parameters" : {
16206 "additionalProperties" : 0,
16207 "properties" : {
16208 "dev" : {
16209 "description" : "Block device name.",
16210 "type" : "string"
16211 },
16212 "fstype" : {
16213 "default" : "xfs",
16214 "description" : "File system type.",
16215 "enum" : [
16216 "xfs",
16217 "ext4",
16218 "btrfs"
16219 ],
16220 "optional" : 1,
16221 "type" : "string"
16222 },
16223 "journal_dev" : {
16224 "description" : "Block device name for journal.",
16225 "optional" : 1,
16226 "type" : "string"
16227 },
16228 "node" : {
16229 "description" : "The cluster node name.",
16230 "format" : "pve-node",
16231 "type" : "string"
16232 }
56122987 16233 }
44660702
DM
16234 },
16235 "protected" : 1,
16236 "proxyto" : "node",
16237 "returns" : {
16238 "type" : "string"
16239 }
56122987 16240 }
44660702 16241 },
7aacca6f 16242 "leaf" : 0,
44660702
DM
16243 "path" : "/nodes/{node}/ceph/osd",
16244 "text" : "osd"
7aacca6f
DM
16245 },
16246 {
56122987
DM
16247 "info" : {
16248 "GET" : {
7aacca6f 16249 "description" : "List local disks.",
44660702
DM
16250 "method" : "GET",
16251 "name" : "disks",
16252 "parameters" : {
16253 "additionalProperties" : 0,
16254 "properties" : {
16255 "node" : {
16256 "description" : "The cluster node name.",
16257 "format" : "pve-node",
16258 "type" : "string"
16259 },
16260 "type" : {
16261 "description" : "Only list specific types of disks.",
16262 "enum" : [
16263 "unused",
16264 "journal_disks"
16265 ],
16266 "optional" : 1,
16267 "type" : "string"
16268 }
16269 }
16270 },
56122987
DM
16271 "permissions" : {
16272 "check" : [
16273 "perm",
16274 "/",
16275 [
16276 "Sys.Audit",
16277 "Datastore.Audit"
16278 ],
16279 "any",
16280 1
16281 ]
7aacca6f 16282 },
44660702
DM
16283 "protected" : 1,
16284 "proxyto" : "node",
56122987 16285 "returns" : {
7aacca6f
DM
16286 "items" : {
16287 "properties" : {
44660702
DM
16288 "dev" : {
16289 "type" : "string"
16290 },
16291 "gpt" : {
16292 "type" : "boolean"
16293 },
16294 "model" : {
16295 "optional" : 1,
16296 "type" : "string"
7aacca6f
DM
16297 },
16298 "osdid" : {
16299 "type" : "integer"
16300 },
16301 "serial" : {
7aacca6f
DM
16302 "optional" : 1,
16303 "type" : "string"
16304 },
16305 "size" : {
16306 "type" : "integer"
16307 },
44660702
DM
16308 "used" : {
16309 "optional" : 1,
7aacca6f
DM
16310 "type" : "string"
16311 },
44660702
DM
16312 "vendor" : {
16313 "optional" : 1,
16314 "type" : "string"
7aacca6f
DM
16315 }
16316 },
16317 "type" : "object"
44660702
DM
16318 },
16319 "type" : "array"
16320 }
56122987 16321 }
44660702
DM
16322 },
16323 "leaf" : 1,
16324 "path" : "/nodes/{node}/ceph/disks",
16325 "text" : "disks"
56122987
DM
16326 },
16327 {
56122987
DM
16328 "info" : {
16329 "GET" : {
7aacca6f 16330 "description" : "Get Ceph configuration.",
44660702
DM
16331 "method" : "GET",
16332 "name" : "config",
56122987 16333 "parameters" : {
7aacca6f 16334 "additionalProperties" : 0,
56122987 16335 "properties" : {
56122987 16336 "node" : {
7aacca6f 16337 "description" : "The cluster node name.",
44660702 16338 "format" : "pve-node",
56122987
DM
16339 "type" : "string"
16340 }
7aacca6f 16341 }
56122987 16342 },
56122987
DM
16343 "permissions" : {
16344 "check" : [
16345 "perm",
16346 "/",
16347 [
16348 "Sys.Audit",
16349 "Datastore.Audit"
16350 ],
16351 "any",
16352 1
16353 ]
44660702
DM
16354 },
16355 "returns" : {
16356 "type" : "string"
7aacca6f
DM
16357 }
16358 }
44660702
DM
16359 },
16360 "leaf" : 1,
16361 "path" : "/nodes/{node}/ceph/config",
16362 "text" : "config"
7aacca6f
DM
16363 },
16364 {
7aacca6f
DM
16365 "children" : [
16366 {
7aacca6f
DM
16367 "info" : {
16368 "DELETE" : {
7aacca6f 16369 "description" : "Destroy Ceph monitor.",
44660702
DM
16370 "method" : "DELETE",
16371 "name" : "destroymon",
16372 "parameters" : {
16373 "additionalProperties" : 0,
16374 "properties" : {
16375 "monid" : {
16376 "description" : "Monitor ID",
16377 "type" : "integer"
16378 },
16379 "node" : {
16380 "description" : "The cluster node name.",
16381 "format" : "pve-node",
16382 "type" : "string"
16383 }
16384 }
16385 },
7aacca6f
DM
16386 "permissions" : {
16387 "check" : [
16388 "perm",
16389 "/",
16390 [
16391 "Sys.Modify"
16392 ]
16393 ]
16394 },
44660702
DM
16395 "protected" : 1,
16396 "proxyto" : "node",
7aacca6f
DM
16397 "returns" : {
16398 "type" : "string"
44660702 16399 }
7aacca6f 16400 }
44660702
DM
16401 },
16402 "leaf" : 1,
16403 "path" : "/nodes/{node}/ceph/mon/{monid}",
16404 "text" : "{monid}"
7aacca6f
DM
16405 }
16406 ],
16407 "info" : {
16408 "GET" : {
44660702 16409 "description" : "Get Ceph monitor list.",
7aacca6f 16410 "method" : "GET",
44660702 16411 "name" : "listmon",
7aacca6f
DM
16412 "parameters" : {
16413 "additionalProperties" : 0,
16414 "properties" : {
16415 "node" : {
7aacca6f 16416 "description" : "The cluster node name.",
44660702
DM
16417 "format" : "pve-node",
16418 "type" : "string"
7aacca6f
DM
16419 }
16420 }
16421 },
44660702
DM
16422 "permissions" : {
16423 "check" : [
16424 "perm",
16425 "/",
16426 [
16427 "Sys.Audit",
16428 "Datastore.Audit"
16429 ],
16430 "any",
16431 1
16432 ]
16433 },
7aacca6f 16434 "protected" : 1,
44660702 16435 "proxyto" : "node",
7aacca6f
DM
16436 "returns" : {
16437 "items" : {
16438 "properties" : {
44660702 16439 "addr" : {
7aacca6f 16440 "type" : "string"
56122987 16441 },
44660702 16442 "name" : {
56122987
DM
16443 "type" : "string"
16444 }
7aacca6f
DM
16445 },
16446 "type" : "object"
56122987 16447 },
7aacca6f
DM
16448 "links" : [
16449 {
16450 "href" : "{name}",
16451 "rel" : "child"
16452 }
16453 ],
56122987 16454 "type" : "array"
44660702 16455 }
7aacca6f
DM
16456 },
16457 "POST" : {
44660702
DM
16458 "description" : "Create Ceph Monitor",
16459 "method" : "POST",
16460 "name" : "createmon",
16461 "parameters" : {
16462 "additionalProperties" : 0,
16463 "properties" : {
16464 "node" : {
16465 "description" : "The cluster node name.",
16466 "format" : "pve-node",
16467 "type" : "string"
16468 }
16469 }
16470 },
7aacca6f
DM
16471 "permissions" : {
16472 "check" : [
16473 "perm",
16474 "/",
16475 [
16476 "Sys.Modify"
16477 ]
16478 ]
16479 },
44660702 16480 "protected" : 1,
7aacca6f 16481 "proxyto" : "node",
56122987
DM
16482 "returns" : {
16483 "type" : "string"
44660702 16484 }
56122987 16485 }
44660702
DM
16486 },
16487 "leaf" : 0,
16488 "path" : "/nodes/{node}/ceph/mon",
16489 "text" : "mon"
56122987
DM
16490 },
16491 {
16492 "info" : {
16493 "POST" : {
44660702
DM
16494 "description" : "Create initial ceph default configuration and setup symlinks.",
16495 "method" : "POST",
16496 "name" : "init",
16497 "parameters" : {
16498 "additionalProperties" : 0,
16499 "properties" : {
16500 "network" : {
16501 "description" : "Use specific network for all ceph related traffic",
16502 "format" : "CIDR",
16503 "maxLength" : 128,
16504 "optional" : 1,
16505 "type" : "string"
16506 },
16507 "node" : {
16508 "description" : "The cluster node name.",
16509 "format" : "pve-node",
16510 "type" : "string"
16511 },
16512 "pg_bits" : {
16513 "default" : 6,
16514 "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.",
16515 "maximum" : 14,
16516 "minimum" : 6,
16517 "optional" : 1,
4bd7df8b
DM
16518 "type" : "integer",
16519 "typetext" : "integer (6-14)"
44660702
DM
16520 },
16521 "size" : {
16522 "default" : 2,
16523 "description" : "Number of replicas per object",
16524 "maximum" : 3,
16525 "minimum" : 1,
16526 "optional" : 1,
4bd7df8b
DM
16527 "type" : "integer",
16528 "typetext" : "integer (1-3)"
44660702
DM
16529 }
16530 }
7aacca6f 16531 },
56122987
DM
16532 "permissions" : {
16533 "check" : [
16534 "perm",
16535 "/",
16536 [
16537 "Sys.Modify"
16538 ]
16539 ]
16540 },
7aacca6f 16541 "protected" : 1,
44660702
DM
16542 "proxyto" : "node",
16543 "returns" : {
16544 "type" : "null"
7aacca6f
DM
16545 }
16546 }
16547 },
7aacca6f 16548 "leaf" : 1,
44660702
DM
16549 "path" : "/nodes/{node}/ceph/init",
16550 "text" : "init"
7aacca6f
DM
16551 },
16552 {
7aacca6f
DM
16553 "info" : {
16554 "POST" : {
44660702 16555 "description" : "Stop ceph services.",
7aacca6f
DM
16556 "method" : "POST",
16557 "name" : "stop",
16558 "parameters" : {
44660702 16559 "additionalProperties" : 0,
7aacca6f
DM
16560 "properties" : {
16561 "node" : {
7aacca6f 16562 "description" : "The cluster node name.",
44660702 16563 "format" : "pve-node",
56122987 16564 "type" : "string"
7aacca6f
DM
16565 },
16566 "service" : {
7aacca6f 16567 "description" : "Ceph service name.",
44660702
DM
16568 "optional" : 1,
16569 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
16570 "type" : "string"
56122987 16571 }
44660702 16572 }
7aacca6f
DM
16573 },
16574 "permissions" : {
16575 "check" : [
16576 "perm",
16577 "/",
16578 [
16579 "Sys.Modify"
16580 ]
16581 ]
16582 },
44660702
DM
16583 "protected" : 1,
16584 "proxyto" : "node",
16585 "returns" : {
16586 "type" : "string"
16587 }
7aacca6f 16588 }
44660702
DM
16589 },
16590 "leaf" : 1,
16591 "path" : "/nodes/{node}/ceph/stop",
16592 "text" : "stop"
7aacca6f
DM
16593 },
16594 {
7aacca6f
DM
16595 "info" : {
16596 "POST" : {
7aacca6f 16597 "description" : "Start ceph services.",
44660702 16598 "method" : "POST",
7aacca6f 16599 "name" : "start",
56122987
DM
16600 "parameters" : {
16601 "additionalProperties" : 0,
16602 "properties" : {
16603 "node" : {
7aacca6f 16604 "description" : "The cluster node name.",
44660702 16605 "format" : "pve-node",
7aacca6f
DM
16606 "type" : "string"
16607 },
16608 "service" : {
16609 "description" : "Ceph service name.",
44660702 16610 "optional" : 1,
7aacca6f 16611 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
44660702 16612 "type" : "string"
7aacca6f
DM
16613 }
16614 }
16615 },
44660702
DM
16616 "permissions" : {
16617 "check" : [
16618 "perm",
16619 "/",
16620 [
16621 "Sys.Modify"
16622 ]
16623 ]
16624 },
7aacca6f 16625 "protected" : 1,
44660702
DM
16626 "proxyto" : "node",
16627 "returns" : {
16628 "type" : "string"
16629 }
7aacca6f 16630 }
44660702
DM
16631 },
16632 "leaf" : 1,
16633 "path" : "/nodes/{node}/ceph/start",
16634 "text" : "start"
7aacca6f
DM
16635 },
16636 {
7aacca6f
DM
16637 "info" : {
16638 "GET" : {
44660702
DM
16639 "description" : "Get ceph status.",
16640 "method" : "GET",
16641 "name" : "status",
7aacca6f
DM
16642 "parameters" : {
16643 "additionalProperties" : 0,
16644 "properties" : {
16645 "node" : {
7aacca6f 16646 "description" : "The cluster node name.",
44660702 16647 "format" : "pve-node",
7aacca6f 16648 "type" : "string"
56122987
DM
16649 }
16650 }
16651 },
16652 "permissions" : {
16653 "check" : [
16654 "perm",
16655 "/",
16656 [
16657 "Sys.Audit",
16658 "Datastore.Audit"
16659 ],
16660 "any",
16661 1
16662 ]
16663 },
44660702
DM
16664 "protected" : 1,
16665 "proxyto" : "node",
56122987 16666 "returns" : {
7aacca6f
DM
16667 "type" : "object"
16668 }
16669 }
16670 },
44660702 16671 "leaf" : 1,
7aacca6f 16672 "path" : "/nodes/{node}/ceph/status",
44660702 16673 "text" : "status"
7aacca6f
DM
16674 },
16675 {
44660702
DM
16676 "children" : [
16677 {
16678 "info" : {
16679 "DELETE" : {
16680 "description" : "Destroy pool",
16681 "method" : "DELETE",
16682 "name" : "destroypool",
16683 "parameters" : {
16684 "additionalProperties" : 0,
16685 "properties" : {
4bd7df8b
DM
16686 "force" : {
16687 "default" : 0,
16688 "description" : "If true, destroys pool even if in use",
16689 "optional" : 1,
16690 "type" : "boolean"
16691 },
44660702
DM
16692 "name" : {
16693 "description" : "The name of the pool. It must be unique.",
16694 "type" : "string"
16695 },
16696 "node" : {
16697 "description" : "The cluster node name.",
16698 "format" : "pve-node",
16699 "type" : "string"
16700 }
16701 }
16702 },
16703 "permissions" : {
16704 "check" : [
16705 "perm",
16706 "/",
16707 [
16708 "Sys.Modify"
16709 ]
16710 ]
16711 },
16712 "protected" : 1,
16713 "proxyto" : "node",
16714 "returns" : {
16715 "type" : "null"
16716 }
16717 }
16718 },
16719 "leaf" : 1,
16720 "path" : "/nodes/{node}/ceph/pools/{name}",
16721 "text" : "{name}"
16722 }
16723 ],
7aacca6f
DM
16724 "info" : {
16725 "GET" : {
44660702
DM
16726 "description" : "List all pools.",
16727 "method" : "GET",
16728 "name" : "lspools",
7aacca6f
DM
16729 "parameters" : {
16730 "additionalProperties" : 0,
16731 "properties" : {
16732 "node" : {
7aacca6f 16733 "description" : "The cluster node name.",
44660702
DM
16734 "format" : "pve-node",
16735 "type" : "string"
7aacca6f
DM
16736 }
16737 }
16738 },
7aacca6f
DM
16739 "permissions" : {
16740 "check" : [
16741 "perm",
16742 "/",
16743 [
16744 "Sys.Audit",
16745 "Datastore.Audit"
16746 ],
16747 "any",
16748 1
16749 ]
16750 },
44660702
DM
16751 "protected" : 1,
16752 "proxyto" : "node",
7aacca6f 16753 "returns" : {
56122987 16754 "items" : {
56122987 16755 "properties" : {
7aacca6f
DM
16756 "pool" : {
16757 "type" : "integer"
16758 },
44660702
DM
16759 "pool_name" : {
16760 "type" : "string"
16761 },
7aacca6f
DM
16762 "size" : {
16763 "type" : "integer"
56122987 16764 }
44660702
DM
16765 },
16766 "type" : "object"
7aacca6f 16767 },
44660702
DM
16768 "links" : [
16769 {
16770 "href" : "{pool_name}",
16771 "rel" : "child"
16772 }
16773 ],
7aacca6f
DM
16774 "type" : "array"
16775 }
16776 },
16777 "POST" : {
7aacca6f 16778 "description" : "Create POOL",
7aacca6f 16779 "method" : "POST",
7aacca6f
DM
16780 "name" : "createpool",
16781 "parameters" : {
16782 "additionalProperties" : 0,
16783 "properties" : {
7aacca6f 16784 "crush_ruleset" : {
7aacca6f 16785 "default" : 0,
44660702 16786 "description" : "The ruleset to use for mapping object placement in the cluster.",
7aacca6f 16787 "maximum" : 32768,
44660702 16788 "minimum" : 0,
7aacca6f 16789 "optional" : 1,
4bd7df8b
DM
16790 "type" : "integer",
16791 "typetext" : "integer (0-32768)"
56122987 16792 },
44660702
DM
16793 "min_size" : {
16794 "default" : 1,
16795 "description" : "Minimum number of replicas per object",
16796 "maximum" : 3,
16797 "minimum" : 1,
16798 "optional" : 1,
4bd7df8b
DM
16799 "type" : "integer",
16800 "typetext" : "integer (1-3)"
7aacca6f 16801 },
44660702
DM
16802 "name" : {
16803 "description" : "The name of the pool. It must be unique.",
16804 "type" : "string"
16805 },
16806 "node" : {
16807 "description" : "The cluster node name.",
16808 "format" : "pve-node",
16809 "type" : "string"
16810 },
16811 "pg_num" : {
16812 "default" : 64,
16813 "description" : "Number of placement groups.",
16814 "maximum" : 32768,
16815 "minimum" : 8,
16816 "optional" : 1,
4bd7df8b
DM
16817 "type" : "integer",
16818 "typetext" : "integer (8-32768)"
44660702
DM
16819 },
16820 "size" : {
16821 "default" : 2,
16822 "description" : "Number of replicas per object",
16823 "maximum" : 3,
16824 "minimum" : 1,
16825 "optional" : 1,
4bd7df8b
DM
16826 "type" : "integer",
16827 "typetext" : "integer (1-3)"
56122987
DM
16828 }
16829 }
44660702
DM
16830 },
16831 "permissions" : {
16832 "check" : [
16833 "perm",
16834 "/",
16835 [
16836 "Sys.Modify"
16837 ]
16838 ]
16839 },
16840 "protected" : 1,
16841 "proxyto" : "node",
16842 "returns" : {
16843 "type" : "null"
7aacca6f 16844 }
56122987 16845 }
44660702 16846 },
56122987 16847 "leaf" : 0,
44660702
DM
16848 "path" : "/nodes/{node}/ceph/pools",
16849 "text" : "pools"
56122987
DM
16850 },
16851 {
56122987 16852 "info" : {
7aacca6f 16853 "GET" : {
44660702
DM
16854 "description" : "Get OSD crush map",
16855 "method" : "GET",
16856 "name" : "crush",
16857 "parameters" : {
16858 "additionalProperties" : 0,
16859 "properties" : {
16860 "node" : {
16861 "description" : "The cluster node name.",
16862 "format" : "pve-node",
16863 "type" : "string"
16864 }
16865 }
16866 },
7aacca6f
DM
16867 "permissions" : {
16868 "check" : [
16869 "perm",
16870 "/",
16871 [
16872 "Sys.Audit",
16873 "Datastore.Audit"
16874 ],
16875 "any",
16876 1
16877 ]
16878 },
44660702 16879 "protected" : 1,
7aacca6f 16880 "proxyto" : "node",
56122987 16881 "returns" : {
7aacca6f 16882 "type" : "string"
44660702 16883 }
56122987
DM
16884 }
16885 },
44660702
DM
16886 "leaf" : 1,
16887 "path" : "/nodes/{node}/ceph/crush",
7aacca6f 16888 "text" : "crush"
56122987
DM
16889 },
16890 {
56122987 16891 "info" : {
7aacca6f 16892 "GET" : {
44660702
DM
16893 "description" : "Read ceph log",
16894 "method" : "GET",
16895 "name" : "log",
16896 "parameters" : {
16897 "additionalProperties" : 0,
16898 "properties" : {
16899 "limit" : {
16900 "minimum" : 0,
16901 "optional" : 1,
4bd7df8b
DM
16902 "type" : "integer",
16903 "typetext" : "integer (0- N)"
7aacca6f 16904 },
44660702
DM
16905 "node" : {
16906 "description" : "The cluster node name.",
16907 "format" : "pve-node",
16908 "type" : "string"
16909 },
16910 "start" : {
16911 "minimum" : 0,
16912 "optional" : 1,
4bd7df8b
DM
16913 "type" : "integer",
16914 "typetext" : "integer (0- N)"
44660702 16915 }
7aacca6f 16916 }
56122987 16917 },
56122987
DM
16918 "permissions" : {
16919 "check" : [
16920 "perm",
7aacca6f 16921 "/nodes/{node}",
56122987 16922 [
7aacca6f 16923 "Sys.Syslog"
56122987
DM
16924 ]
16925 ]
16926 },
7aacca6f 16927 "protected" : 1,
44660702
DM
16928 "proxyto" : "node",
16929 "returns" : {
16930 "items" : {
16931 "properties" : {
16932 "n" : {
16933 "description" : "Line number",
16934 "type" : "integer"
16935 },
16936 "t" : {
16937 "description" : "Line text",
16938 "type" : "string"
16939 }
56122987 16940 },
44660702 16941 "type" : "object"
56122987 16942 },
44660702 16943 "type" : "array"
7aacca6f 16944 }
56122987
DM
16945 }
16946 },
16947 "leaf" : 1,
44660702
DM
16948 "path" : "/nodes/{node}/ceph/log",
16949 "text" : "log"
7aacca6f
DM
16950 }
16951 ],
44660702
DM
16952 "info" : {
16953 "GET" : {
16954 "description" : "Directory index.",
16955 "method" : "GET",
16956 "name" : "index",
16957 "parameters" : {
16958 "additionalProperties" : 0,
16959 "properties" : {
16960 "node" : {
16961 "description" : "The cluster node name.",
16962 "format" : "pve-node",
16963 "type" : "string"
16964 }
16965 }
16966 },
16967 "permissions" : {
16968 "check" : [
16969 "perm",
16970 "/",
16971 [
16972 "Sys.Audit",
16973 "Datastore.Audit"
16974 ],
16975 "any",
16976 1
16977 ]
16978 },
16979 "returns" : {
16980 "items" : {
16981 "properties" : {},
16982 "type" : "object"
16983 },
16984 "links" : [
16985 {
16986 "href" : "{name}",
16987 "rel" : "child"
16988 }
16989 ],
16990 "type" : "array"
16991 }
16992 }
16993 },
7aacca6f 16994 "leaf" : 0,
44660702
DM
16995 "path" : "/nodes/{node}/ceph",
16996 "text" : "ceph"
7aacca6f
DM
16997 },
16998 {
4bd7df8b
DM
16999 "children" : [
17000 {
17001 "info" : {
17002 "GET" : {
17003 "description" : "Extract configuration from vzdump backup archive.",
17004 "method" : "GET",
17005 "name" : "extractconfig",
17006 "parameters" : {
17007 "additionalProperties" : 0,
17008 "properties" : {
17009 "node" : {
17010 "description" : "The cluster node name.",
17011 "format" : "pve-node",
17012 "type" : "string"
17013 },
17014 "volume" : {
17015 "description" : "Volume identifier",
17016 "type" : "string"
17017 }
17018 }
17019 },
17020 "permissions" : {
17021 "description" : "The user needs 'VM.Backup' permissions on the backed up guest ID, and 'Datastore.AllocateSpace' on the backup storage.",
17022 "user" : "all"
17023 },
17024 "protected" : 1,
17025 "proxyto" : "node",
17026 "returns" : {
17027 "type" : "string"
17028 }
17029 }
17030 },
17031 "leaf" : 1,
17032 "path" : "/nodes/{node}/vzdump/extractconfig",
17033 "text" : "extractconfig"
17034 }
17035 ],
7aacca6f
DM
17036 "info" : {
17037 "POST" : {
7aacca6f 17038 "description" : "Create backup.",
44660702 17039 "method" : "POST",
7aacca6f
DM
17040 "name" : "vzdump",
17041 "parameters" : {
44660702 17042 "additionalProperties" : 0,
7aacca6f 17043 "properties" : {
44660702
DM
17044 "all" : {
17045 "default" : 0,
17046 "description" : "Backup all known guest systems on this host.",
7aacca6f 17047 "optional" : 1,
44660702 17048 "type" : "boolean"
56122987 17049 },
44660702 17050 "bwlimit" : {
7aacca6f 17051 "default" : 0,
44660702
DM
17052 "description" : "Limit I/O bandwidth (KBytes per second).",
17053 "minimum" : 0,
7aacca6f 17054 "optional" : 1,
4bd7df8b
DM
17055 "type" : "integer",
17056 "typetext" : "integer (0- N)"
56122987 17057 },
44660702
DM
17058 "compress" : {
17059 "default" : "0",
17060 "description" : "Compress dump file.",
17061 "enum" : [
17062 "0",
17063 "1",
17064 "gzip",
17065 "lzo"
17066 ],
7aacca6f 17067 "optional" : 1,
44660702 17068 "type" : "string"
56122987 17069 },
44660702
DM
17070 "dumpdir" : {
17071 "description" : "Store resulting files to specified directory.",
7aacca6f 17072 "optional" : 1,
44660702 17073 "type" : "string"
7aacca6f 17074 },
44660702
DM
17075 "exclude" : {
17076 "description" : "Exclude specified guest systems (assumes --all)",
17077 "format" : "pve-vmid-list",
7aacca6f 17078 "optional" : 1,
44660702 17079 "type" : "string"
7aacca6f 17080 },
44660702
DM
17081 "exclude-path" : {
17082 "description" : "Exclude certain files/directories (shell globs).",
17083 "format" : "string-alist",
7aacca6f 17084 "optional" : 1,
44660702 17085 "type" : "string"
7aacca6f 17086 },
44660702
DM
17087 "ionice" : {
17088 "default" : 7,
17089 "description" : "Set CFQ ionice priority.",
17090 "maximum" : 8,
17091 "minimum" : 0,
17092 "optional" : 1,
4bd7df8b
DM
17093 "type" : "integer",
17094 "typetext" : "integer (0-8)"
7aacca6f 17095 },
44660702
DM
17096 "lockwait" : {
17097 "default" : 180,
17098 "description" : "Maximal time to wait for the global lock (minutes).",
17099 "minimum" : 0,
7aacca6f 17100 "optional" : 1,
4bd7df8b
DM
17101 "type" : "integer",
17102 "typetext" : "integer (0- N)"
7aacca6f
DM
17103 },
17104 "mailnotification" : {
44660702 17105 "default" : "always",
7aacca6f
DM
17106 "description" : "Specify when to send an email",
17107 "enum" : [
17108 "always",
17109 "failure"
17110 ],
7aacca6f 17111 "optional" : 1,
44660702 17112 "type" : "string"
7aacca6f
DM
17113 },
17114 "mailto" : {
7aacca6f 17115 "description" : "Comma-separated list of email addresses that should receive email notifications.",
44660702 17116 "format" : "string-list",
7aacca6f 17117 "optional" : 1,
44660702 17118 "type" : "string"
56122987 17119 },
44660702
DM
17120 "maxfiles" : {
17121 "default" : 1,
17122 "description" : "Maximal number of backup files per guest system.",
17123 "minimum" : 1,
7aacca6f 17124 "optional" : 1,
4bd7df8b
DM
17125 "type" : "integer",
17126 "typetext" : "integer (1- N)"
56122987 17127 },
7aacca6f 17128 "mode" : {
44660702 17129 "default" : "snapshot",
7aacca6f
DM
17130 "description" : "Backup mode.",
17131 "enum" : [
17132 "snapshot",
17133 "suspend",
17134 "stop"
17135 ],
44660702
DM
17136 "optional" : 1,
17137 "type" : "string"
7aacca6f 17138 },
44660702
DM
17139 "node" : {
17140 "description" : "Only run if executed on this node.",
17141 "format" : "pve-node",
17142 "optional" : 1,
17143 "type" : "string"
17144 },
17145 "pigz" : {
17146 "default" : 0,
17147 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
17148 "optional" : 1,
17149 "type" : "integer"
17150 },
17151 "quiet" : {
17152 "default" : 0,
17153 "description" : "Be quiet.",
17154 "optional" : 1,
17155 "type" : "boolean"
17156 },
17157 "remove" : {
7aacca6f 17158 "default" : 1,
44660702 17159 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
7aacca6f 17160 "optional" : 1,
44660702 17161 "type" : "boolean"
7aacca6f 17162 },
44660702
DM
17163 "script" : {
17164 "description" : "Use specified hook script.",
17165 "optional" : 1,
17166 "type" : "string"
17167 },
17168 "size" : {
17169 "default" : 1024,
17170 "description" : "Unused, will be removed in a future release.",
17171 "minimum" : 500,
17172 "optional" : 1,
4bd7df8b
DM
17173 "type" : "integer",
17174 "typetext" : "integer (500- N)"
44660702
DM
17175 },
17176 "stdexcludes" : {
17177 "default" : 1,
17178 "description" : "Exclude temporary files and logs.",
17179 "optional" : 1,
17180 "type" : "boolean"
17181 },
17182 "stdout" : {
17183 "description" : "Write tar to stdout, not to a file.",
7aacca6f 17184 "optional" : 1,
44660702
DM
17185 "type" : "boolean"
17186 },
17187 "stop" : {
7aacca6f 17188 "default" : 0,
44660702
DM
17189 "description" : "Stop runnig backup jobs on this host.",
17190 "optional" : 1,
17191 "type" : "boolean"
7aacca6f 17192 },
44660702
DM
17193 "stopwait" : {
17194 "default" : 10,
17195 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
7aacca6f
DM
17196 "minimum" : 0,
17197 "optional" : 1,
4bd7df8b
DM
17198 "type" : "integer",
17199 "typetext" : "integer (0- N)"
7aacca6f 17200 },
44660702
DM
17201 "storage" : {
17202 "description" : "Store resulting file to this storage.",
17203 "format" : "pve-storage-id",
7aacca6f 17204 "optional" : 1,
44660702
DM
17205 "type" : "string"
17206 },
17207 "tmpdir" : {
17208 "description" : "Store temporary files to specified directory.",
17209 "optional" : 1,
17210 "type" : "string"
7aacca6f
DM
17211 },
17212 "vmid" : {
7aacca6f 17213 "description" : "The ID of the guest system you want to backup.",
44660702 17214 "format" : "pve-vmid-list",
7aacca6f
DM
17215 "optional" : 1,
17216 "type" : "string"
17217 }
7aacca6f
DM
17218 }
17219 },
7aacca6f 17220 "permissions" : {
44660702
DM
17221 "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
17222 "user" : "all"
7aacca6f 17223 },
44660702 17224 "protected" : 1,
7aacca6f 17225 "proxyto" : "node",
7aacca6f 17226 "returns" : {
44660702 17227 "type" : "string"
7aacca6f
DM
17228 }
17229 }
17230 },
4bd7df8b 17231 "leaf" : 0,
44660702
DM
17232 "path" : "/nodes/{node}/vzdump",
17233 "text" : "vzdump"
17234 },
17235 {
7aacca6f
DM
17236 "children" : [
17237 {
7aacca6f
DM
17238 "children" : [
17239 {
7aacca6f
DM
17240 "info" : {
17241 "GET" : {
7aacca6f
DM
17242 "description" : "Read service properties",
17243 "method" : "GET",
17244 "name" : "service_state",
17245 "parameters" : {
44660702 17246 "additionalProperties" : 0,
7aacca6f
DM
17247 "properties" : {
17248 "node" : {
7aacca6f 17249 "description" : "The cluster node name.",
44660702
DM
17250 "format" : "pve-node",
17251 "type" : "string"
7aacca6f
DM
17252 },
17253 "service" : {
44660702 17254 "description" : "Service ID",
7aacca6f
DM
17255 "enum" : [
17256 "pveproxy",
17257 "pvedaemon",
17258 "spiceproxy",
17259 "pvestatd",
17260 "pve-cluster",
17261 "corosync",
17262 "pve-firewall",
17263 "pvefw-logger",
17264 "pve-ha-crm",
17265 "pve-ha-lrm",
17266 "sshd",
17267 "syslog",
17268 "cron",
17269 "postfix",
17270 "ksmtuned",
17271 "systemd-timesyncd"
17272 ],
7aacca6f
DM
17273 "type" : "string"
17274 }
44660702 17275 }
56122987 17276 },
7aacca6f
DM
17277 "permissions" : {
17278 "check" : [
17279 "perm",
17280 "/nodes/{node}",
17281 [
44660702 17282 "Sys.Audit"
7aacca6f
DM
17283 ]
17284 ]
56122987 17285 },
44660702 17286 "protected" : 1,
7aacca6f 17287 "proxyto" : "node",
44660702
DM
17288 "returns" : {
17289 "properties" : {},
17290 "type" : "object"
17291 }
17292 }
17293 },
17294 "leaf" : 1,
17295 "path" : "/nodes/{node}/services/{service}/state",
17296 "text" : "state"
17297 },
17298 {
17299 "info" : {
17300 "POST" : {
17301 "description" : "Start service.",
7aacca6f
DM
17302 "method" : "POST",
17303 "name" : "service_start",
17304 "parameters" : {
44660702 17305 "additionalProperties" : 0,
7aacca6f 17306 "properties" : {
44660702
DM
17307 "node" : {
17308 "description" : "The cluster node name.",
17309 "format" : "pve-node",
17310 "type" : "string"
17311 },
7aacca6f 17312 "service" : {
44660702 17313 "description" : "Service ID",
7aacca6f
DM
17314 "enum" : [
17315 "pveproxy",
17316 "pvedaemon",
17317 "spiceproxy",
17318 "pvestatd",
17319 "pve-cluster",
17320 "corosync",
17321 "pve-firewall",
17322 "pvefw-logger",
17323 "pve-ha-crm",
17324 "pve-ha-lrm",
17325 "sshd",
17326 "syslog",
17327 "cron",
17328 "postfix",
17329 "ksmtuned",
17330 "systemd-timesyncd"
17331 ],
7aacca6f
DM
17332 "type" : "string"
17333 }
44660702 17334 }
56122987 17335 },
56122987
DM
17336 "permissions" : {
17337 "check" : [
17338 "perm",
17339 "/nodes/{node}",
17340 [
7aacca6f 17341 "Sys.Modify"
56122987
DM
17342 ]
17343 ]
7aacca6f 17344 },
7aacca6f 17345 "protected" : 1,
44660702
DM
17346 "proxyto" : "node",
17347 "returns" : {
17348 "type" : "string"
17349 }
17350 }
17351 },
17352 "leaf" : 1,
17353 "path" : "/nodes/{node}/services/{service}/start",
17354 "text" : "start"
17355 },
17356 {
17357 "info" : {
17358 "POST" : {
17359 "description" : "Stop service.",
17360 "method" : "POST",
7aacca6f 17361 "name" : "service_stop",
56122987 17362 "parameters" : {
7aacca6f 17363 "additionalProperties" : 0,
56122987
DM
17364 "properties" : {
17365 "node" : {
44660702 17366 "description" : "The cluster node name.",
56122987 17367 "format" : "pve-node",
44660702 17368 "type" : "string"
56122987
DM
17369 },
17370 "service" : {
44660702 17371 "description" : "Service ID",
56122987
DM
17372 "enum" : [
17373 "pveproxy",
17374 "pvedaemon",
17375 "spiceproxy",
17376 "pvestatd",
17377 "pve-cluster",
17378 "corosync",
17379 "pve-firewall",
17380 "pvefw-logger",
17381 "pve-ha-crm",
17382 "pve-ha-lrm",
17383 "sshd",
17384 "syslog",
17385 "cron",
17386 "postfix",
17387 "ksmtuned",
17388 "systemd-timesyncd"
17389 ],
56122987
DM
17390 "type" : "string"
17391 }
7aacca6f 17392 }
44660702 17393 },
56122987
DM
17394 "permissions" : {
17395 "check" : [
17396 "perm",
17397 "/nodes/{node}",
17398 [
17399 "Sys.Modify"
17400 ]
17401 ]
17402 },
44660702
DM
17403 "protected" : 1,
17404 "proxyto" : "node",
7aacca6f
DM
17405 "returns" : {
17406 "type" : "string"
44660702
DM
17407 }
17408 }
17409 },
17410 "leaf" : 1,
17411 "path" : "/nodes/{node}/services/{service}/stop",
17412 "text" : "stop"
17413 },
17414 {
17415 "info" : {
17416 "POST" : {
17417 "description" : "Restart service.",
17418 "method" : "POST",
17419 "name" : "service_restart",
56122987
DM
17420 "parameters" : {
17421 "additionalProperties" : 0,
17422 "properties" : {
7aacca6f
DM
17423 "node" : {
17424 "description" : "The cluster node name.",
44660702
DM
17425 "format" : "pve-node",
17426 "type" : "string"
7aacca6f
DM
17427 },
17428 "service" : {
44660702 17429 "description" : "Service ID",
56122987
DM
17430 "enum" : [
17431 "pveproxy",
17432 "pvedaemon",
17433 "spiceproxy",
17434 "pvestatd",
17435 "pve-cluster",
17436 "corosync",
17437 "pve-firewall",
17438 "pvefw-logger",
17439 "pve-ha-crm",
17440 "pve-ha-lrm",
17441 "sshd",
17442 "syslog",
17443 "cron",
17444 "postfix",
17445 "ksmtuned",
17446 "systemd-timesyncd"
7aacca6f 17447 ],
7aacca6f 17448 "type" : "string"
56122987
DM
17449 }
17450 }
17451 },
44660702
DM
17452 "permissions" : {
17453 "check" : [
17454 "perm",
17455 "/nodes/{node}",
17456 [
17457 "Sys.Modify"
17458 ]
17459 ]
17460 },
17461 "protected" : 1,
17462 "proxyto" : "node",
17463 "returns" : {
17464 "type" : "string"
17465 }
56122987 17466 }
44660702
DM
17467 },
17468 "leaf" : 1,
17469 "path" : "/nodes/{node}/services/{service}/restart",
17470 "text" : "restart"
56122987
DM
17471 },
17472 {
56122987
DM
17473 "info" : {
17474 "POST" : {
44660702
DM
17475 "description" : "Reload service.",
17476 "method" : "POST",
7aacca6f 17477 "name" : "service_reload",
56122987
DM
17478 "parameters" : {
17479 "additionalProperties" : 0,
17480 "properties" : {
44660702
DM
17481 "node" : {
17482 "description" : "The cluster node name.",
17483 "format" : "pve-node",
17484 "type" : "string"
17485 },
56122987 17486 "service" : {
56122987
DM
17487 "description" : "Service ID",
17488 "enum" : [
17489 "pveproxy",
17490 "pvedaemon",
17491 "spiceproxy",
17492 "pvestatd",
17493 "pve-cluster",
17494 "corosync",
17495 "pve-firewall",
17496 "pvefw-logger",
17497 "pve-ha-crm",
17498 "pve-ha-lrm",
17499 "sshd",
17500 "syslog",
17501 "cron",
17502 "postfix",
17503 "ksmtuned",
17504 "systemd-timesyncd"
44660702
DM
17505 ],
17506 "type" : "string"
56122987
DM
17507 }
17508 }
17509 },
56122987
DM
17510 "permissions" : {
17511 "check" : [
17512 "perm",
17513 "/nodes/{node}",
17514 [
17515 "Sys.Modify"
17516 ]
17517 ]
17518 },
44660702 17519 "protected" : 1,
56122987 17520 "proxyto" : "node",
7aacca6f
DM
17521 "returns" : {
17522 "type" : "string"
56122987
DM
17523 }
17524 }
44660702
DM
17525 },
17526 "leaf" : 1,
17527 "path" : "/nodes/{node}/services/{service}/reload",
17528 "text" : "reload"
17529 }
17530 ],
17531 "info" : {
17532 "GET" : {
17533 "description" : "Directory index",
17534 "method" : "GET",
17535 "name" : "srvcmdidx",
17536 "parameters" : {
17537 "additionalProperties" : 0,
17538 "properties" : {
17539 "node" : {
17540 "description" : "The cluster node name.",
17541 "format" : "pve-node",
17542 "type" : "string"
17543 },
17544 "service" : {
17545 "description" : "Service ID",
17546 "enum" : [
17547 "pveproxy",
17548 "pvedaemon",
17549 "spiceproxy",
17550 "pvestatd",
17551 "pve-cluster",
17552 "corosync",
17553 "pve-firewall",
17554 "pvefw-logger",
17555 "pve-ha-crm",
17556 "pve-ha-lrm",
17557 "sshd",
17558 "syslog",
17559 "cron",
17560 "postfix",
17561 "ksmtuned",
17562 "systemd-timesyncd"
17563 ],
17564 "type" : "string"
17565 }
17566 }
17567 },
17568 "permissions" : {
17569 "check" : [
17570 "perm",
17571 "/nodes/{node}",
17572 [
17573 "Sys.Audit"
17574 ]
17575 ]
17576 },
17577 "returns" : {
17578 "items" : {
17579 "properties" : {
17580 "subdir" : {
17581 "type" : "string"
17582 }
17583 },
17584 "type" : "object"
17585 },
17586 "links" : [
17587 {
17588 "href" : "{subdir}",
17589 "rel" : "child"
17590 }
17591 ],
17592 "type" : "array"
17593 }
17594 }
17595 },
17596 "leaf" : 0,
17597 "path" : "/nodes/{node}/services/{service}",
17598 "text" : "{service}"
17599 }
17600 ],
17601 "info" : {
17602 "GET" : {
17603 "description" : "Service list.",
17604 "method" : "GET",
17605 "name" : "index",
17606 "parameters" : {
17607 "additionalProperties" : 0,
17608 "properties" : {
17609 "node" : {
17610 "description" : "The cluster node name.",
17611 "format" : "pve-node",
17612 "type" : "string"
17613 }
17614 }
17615 },
17616 "permissions" : {
17617 "check" : [
17618 "perm",
17619 "/nodes/{node}",
17620 [
17621 "Sys.Audit"
17622 ]
17623 ]
17624 },
17625 "protected" : 1,
17626 "proxyto" : "node",
17627 "returns" : {
17628 "items" : {
17629 "properties" : {},
17630 "type" : "object"
17631 },
17632 "links" : [
17633 {
17634 "href" : "{service}",
17635 "rel" : "child"
56122987 17636 }
44660702
DM
17637 ],
17638 "type" : "array"
17639 }
7aacca6f 17640 }
44660702 17641 },
7aacca6f 17642 "leaf" : 0,
44660702
DM
17643 "path" : "/nodes/{node}/services",
17644 "text" : "services"
7aacca6f
DM
17645 },
17646 {
7aacca6f
DM
17647 "info" : {
17648 "GET" : {
44660702
DM
17649 "description" : "Read subscription info.",
17650 "method" : "GET",
17651 "name" : "get",
7aacca6f 17652 "parameters" : {
44660702 17653 "additionalProperties" : 0,
7aacca6f
DM
17654 "properties" : {
17655 "node" : {
17656 "description" : "The cluster node name.",
44660702
DM
17657 "format" : "pve-node",
17658 "type" : "string"
7aacca6f 17659 }
44660702
DM
17660 }
17661 },
17662 "permissions" : {
17663 "user" : "all"
7aacca6f 17664 },
7aacca6f
DM
17665 "proxyto" : "node",
17666 "returns" : {
17667 "type" : "object"
44660702 17668 }
7aacca6f 17669 },
44660702
DM
17670 "POST" : {
17671 "description" : "Update subscription info.",
17672 "method" : "POST",
17673 "name" : "update",
7aacca6f
DM
17674 "parameters" : {
17675 "additionalProperties" : 0,
17676 "properties" : {
44660702
DM
17677 "force" : {
17678 "default" : 0,
17679 "description" : "Always connect to server, even if we have up to date info inside local cache.",
17680 "optional" : 1,
17681 "type" : "boolean"
17682 },
7aacca6f 17683 "node" : {
7aacca6f 17684 "description" : "The cluster node name.",
44660702 17685 "format" : "pve-node",
7aacca6f
DM
17686 "type" : "string"
17687 }
17688 }
17689 },
7aacca6f 17690 "protected" : 1,
7aacca6f 17691 "proxyto" : "node",
44660702
DM
17692 "returns" : {
17693 "type" : "null"
17694 }
17695 },
17696 "PUT" : {
17697 "description" : "Set subscription key.",
17698 "method" : "PUT",
17699 "name" : "set",
7aacca6f
DM
17700 "parameters" : {
17701 "additionalProperties" : 0,
17702 "properties" : {
44660702
DM
17703 "key" : {
17704 "description" : "Proxmox VE subscription key",
17705 "type" : "string"
7aacca6f
DM
17706 },
17707 "node" : {
7aacca6f 17708 "description" : "The cluster node name.",
44660702
DM
17709 "format" : "pve-node",
17710 "type" : "string"
7aacca6f
DM
17711 }
17712 }
17713 },
44660702
DM
17714 "protected" : 1,
17715 "proxyto" : "node",
7aacca6f
DM
17716 "returns" : {
17717 "type" : "null"
44660702 17718 }
7aacca6f
DM
17719 }
17720 },
44660702 17721 "leaf" : 1,
7aacca6f 17722 "path" : "/nodes/{node}/subscription",
44660702 17723 "text" : "subscription"
7aacca6f
DM
17724 },
17725 {
7aacca6f
DM
17726 "children" : [
17727 {
56122987 17728 "info" : {
7aacca6f 17729 "DELETE" : {
44660702
DM
17730 "description" : "Delete network device configuration",
17731 "method" : "DELETE",
17732 "name" : "delete_network",
17733 "parameters" : {
17734 "additionalProperties" : 0,
17735 "properties" : {
17736 "iface" : {
17737 "description" : "Network interface name.",
17738 "format" : "pve-iface",
17739 "maxLength" : 20,
17740 "minLength" : 2,
17741 "type" : "string"
17742 },
17743 "node" : {
17744 "description" : "The cluster node name.",
17745 "format" : "pve-node",
17746 "type" : "string"
17747 }
17748 }
7aacca6f
DM
17749 },
17750 "permissions" : {
17751 "check" : [
17752 "perm",
17753 "/nodes/{node}",
17754 [
17755 "Sys.Modify"
17756 ]
17757 ]
17758 },
44660702 17759 "protected" : 1,
7aacca6f 17760 "proxyto" : "node",
44660702
DM
17761 "returns" : {
17762 "type" : "null"
17763 }
17764 },
17765 "GET" : {
17766 "description" : "Read network device configuration",
17767 "method" : "GET",
17768 "name" : "network_config",
56122987 17769 "parameters" : {
44660702 17770 "additionalProperties" : 0,
56122987 17771 "properties" : {
7aacca6f 17772 "iface" : {
7aacca6f 17773 "description" : "Network interface name.",
44660702
DM
17774 "format" : "pve-iface",
17775 "maxLength" : 20,
7aacca6f
DM
17776 "minLength" : 2,
17777 "type" : "string"
44660702
DM
17778 },
17779 "node" : {
17780 "description" : "The cluster node name.",
17781 "format" : "pve-node",
17782 "type" : "string"
56122987 17783 }
44660702 17784 }
7aacca6f
DM
17785 },
17786 "permissions" : {
17787 "check" : [
17788 "perm",
17789 "/nodes/{node}",
17790 [
44660702 17791 "Sys.Audit"
7aacca6f
DM
17792 ]
17793 ]
17794 },
17795 "proxyto" : "node",
44660702
DM
17796 "returns" : {
17797 "properties" : {
17798 "method" : {
17799 "type" : "string"
17800 },
17801 "type" : {
17802 "type" : "string"
17803 }
17804 },
17805 "type" : "object"
17806 }
17807 },
17808 "PUT" : {
7aacca6f
DM
17809 "description" : "Update network device configuration",
17810 "method" : "PUT",
17811 "name" : "update_network",
17812 "parameters" : {
17813 "additionalProperties" : 0,
17814 "properties" : {
7aacca6f 17815 "address" : {
44660702 17816 "description" : "IP address.",
7aacca6f 17817 "format" : "ipv4",
44660702 17818 "optional" : 1,
7aacca6f 17819 "requires" : "netmask",
44660702 17820 "type" : "string"
7aacca6f 17821 },
44660702
DM
17822 "address6" : {
17823 "description" : "IP address.",
17824 "format" : "ipv6",
17825 "optional" : 1,
17826 "requires" : "netmask6",
17827 "type" : "string"
7aacca6f
DM
17828 },
17829 "autostart" : {
44660702 17830 "description" : "Automatically start interface on boot.",
7aacca6f 17831 "optional" : 1,
44660702 17832 "type" : "boolean"
7aacca6f 17833 },
44660702
DM
17834 "bond_mode" : {
17835 "description" : "Bonding mode.",
7aacca6f 17836 "enum" : [
44660702
DM
17837 "balance-rr",
17838 "active-backup",
17839 "balance-xor",
17840 "broadcast",
17841 "802.3ad",
17842 "balance-tlb",
17843 "balance-alb",
17844 "balance-slb",
17845 "lacp-balance-slb",
17846 "lacp-balance-tcp"
17847 ],
7aacca6f 17848 "optional" : 1,
44660702 17849 "type" : "string"
7aacca6f 17850 },
44660702
DM
17851 "bond_xmit_hash_policy" : {
17852 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17853 "enum" : [
17854 "layer2",
17855 "layer2+3",
17856 "layer3+4"
17857 ],
7aacca6f 17858 "optional" : 1,
44660702 17859 "type" : "string"
7aacca6f 17860 },
44660702
DM
17861 "bridge_ports" : {
17862 "description" : "Specify the iterfaces you want to add to your bridge.",
17863 "format" : "pve-iface-list",
7aacca6f 17864 "optional" : 1,
44660702 17865 "type" : "string"
7aacca6f 17866 },
44660702
DM
17867 "bridge_vlan_aware" : {
17868 "description" : "Enable bridge vlan support.",
7aacca6f 17869 "optional" : 1,
44660702 17870 "type" : "boolean"
7aacca6f
DM
17871 },
17872 "comments" : {
44660702 17873 "description" : "Comments",
7aacca6f 17874 "optional" : 1,
44660702 17875 "type" : "string"
7aacca6f 17876 },
44660702
DM
17877 "comments6" : {
17878 "description" : "Comments",
7aacca6f 17879 "optional" : 1,
44660702 17880 "type" : "string"
7aacca6f 17881 },
44660702
DM
17882 "delete" : {
17883 "description" : "A list of settings you want to delete.",
17884 "format" : "pve-configid-list",
7aacca6f
DM
17885 "optional" : 1,
17886 "type" : "string"
17887 },
44660702
DM
17888 "gateway" : {
17889 "description" : "Default gateway address.",
17890 "format" : "ipv4",
7aacca6f
DM
17891 "optional" : 1,
17892 "type" : "string"
17893 },
44660702
DM
17894 "gateway6" : {
17895 "description" : "Default ipv6 gateway address.",
17896 "format" : "ipv6",
7aacca6f 17897 "optional" : 1,
44660702 17898 "type" : "string"
7aacca6f
DM
17899 },
17900 "iface" : {
44660702 17901 "description" : "Network interface name.",
7aacca6f
DM
17902 "format" : "pve-iface",
17903 "maxLength" : 20,
17904 "minLength" : 2,
7aacca6f
DM
17905 "type" : "string"
17906 },
44660702
DM
17907 "netmask" : {
17908 "description" : "Network mask.",
17909 "format" : "ipv4mask",
7aacca6f 17910 "optional" : 1,
44660702
DM
17911 "requires" : "address",
17912 "type" : "string"
7aacca6f
DM
17913 },
17914 "netmask6" : {
44660702 17915 "description" : "Network mask.",
7aacca6f 17916 "maximum" : 128,
44660702 17917 "minimum" : 0,
7aacca6f
DM
17918 "optional" : 1,
17919 "requires" : "address6",
4bd7df8b
DM
17920 "type" : "integer",
17921 "typetext" : "integer (0-128)"
44660702 17922 },
7aacca6f 17923 "node" : {
44660702 17924 "description" : "The cluster node name.",
7aacca6f 17925 "format" : "pve-node",
44660702 17926 "type" : "string"
7aacca6f 17927 },
44660702
DM
17928 "ovs_bonds" : {
17929 "description" : "Specify the interfaces used by the bonding device.",
17930 "format" : "pve-iface-list",
17931 "optional" : 1,
17932 "type" : "string"
17933 },
17934 "ovs_bridge" : {
17935 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17936 "format" : "pve-iface",
17937 "optional" : 1,
17938 "type" : "string"
17939 },
17940 "ovs_options" : {
17941 "description" : "OVS interface options.",
17942 "maxLength" : 1024,
17943 "optional" : 1,
17944 "type" : "string"
17945 },
17946 "ovs_ports" : {
17947 "description" : "Specify the iterfaces you want to add to your bridge.",
17948 "format" : "pve-iface-list",
17949 "optional" : 1,
17950 "type" : "string"
17951 },
17952 "ovs_tag" : {
17953 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17954 "maximum" : 4094,
17955 "minimum" : 1,
17956 "optional" : 1,
4bd7df8b
DM
17957 "type" : "integer",
17958 "typetext" : "integer (1-4094)"
44660702
DM
17959 },
17960 "slaves" : {
17961 "description" : "Specify the interfaces used by the bonding device.",
17962 "format" : "pve-iface-list",
17963 "optional" : 1,
17964 "type" : "string"
17965 },
17966 "type" : {
17967 "description" : "Network interface type",
17968 "enum" : [
17969 "bridge",
17970 "bond",
17971 "eth",
17972 "alias",
17973 "vlan",
17974 "OVSBridge",
17975 "OVSBond",
17976 "OVSPort",
17977 "OVSIntPort",
17978 "unknown"
17979 ],
17980 "type" : "string"
7aacca6f
DM
17981 }
17982 }
17983 },
7aacca6f
DM
17984 "permissions" : {
17985 "check" : [
17986 "perm",
17987 "/nodes/{node}",
17988 [
44660702 17989 "Sys.Modify"
7aacca6f
DM
17990 ]
17991 ]
17992 },
44660702
DM
17993 "protected" : 1,
17994 "proxyto" : "node",
7aacca6f 17995 "returns" : {
44660702
DM
17996 "type" : "null"
17997 }
7aacca6f
DM
17998 }
17999 },
7aacca6f 18000 "leaf" : 1,
44660702
DM
18001 "path" : "/nodes/{node}/network/{iface}",
18002 "text" : "{iface}"
7aacca6f
DM
18003 }
18004 ],
7aacca6f 18005 "info" : {
44660702
DM
18006 "DELETE" : {
18007 "description" : "Revert network configuration changes.",
18008 "method" : "DELETE",
18009 "name" : "revert_network_changes",
7aacca6f
DM
18010 "parameters" : {
18011 "additionalProperties" : 0,
18012 "properties" : {
7aacca6f 18013 "node" : {
7aacca6f 18014 "description" : "The cluster node name.",
44660702 18015 "format" : "pve-node",
7aacca6f
DM
18016 "type" : "string"
18017 }
18018 }
44660702 18019 },
7aacca6f
DM
18020 "permissions" : {
18021 "check" : [
18022 "perm",
18023 "/nodes/{node}",
18024 [
18025 "Sys.Modify"
18026 ]
18027 ]
18028 },
44660702
DM
18029 "protected" : 1,
18030 "proxyto" : "node",
7aacca6f
DM
18031 "returns" : {
18032 "type" : "null"
44660702 18033 }
7aacca6f 18034 },
44660702
DM
18035 "GET" : {
18036 "description" : "List available networks",
18037 "method" : "GET",
18038 "name" : "index",
7aacca6f 18039 "parameters" : {
44660702 18040 "additionalProperties" : 0,
7aacca6f 18041 "properties" : {
7aacca6f 18042 "node" : {
44660702
DM
18043 "description" : "The cluster node name.",
18044 "format" : "pve-node",
18045 "type" : "string"
7aacca6f
DM
18046 },
18047 "type" : {
44660702 18048 "description" : "Only list specific interface types.",
7aacca6f
DM
18049 "enum" : [
18050 "bridge",
18051 "bond",
18052 "eth",
18053 "alias",
18054 "vlan",
18055 "OVSBridge",
18056 "OVSBond",
18057 "OVSPort",
18058 "OVSIntPort",
44660702 18059 "any_bridge"
7aacca6f 18060 ],
7aacca6f 18061 "optional" : 1,
44660702
DM
18062 "type" : "string"
18063 }
18064 }
18065 },
18066 "permissions" : {
18067 "user" : "all"
18068 },
18069 "proxyto" : "node",
18070 "returns" : {
18071 "items" : {
18072 "properties" : {},
18073 "type" : "object"
18074 },
18075 "links" : [
18076 {
18077 "href" : "{iface}",
18078 "rel" : "child"
18079 }
18080 ],
18081 "type" : "array"
18082 }
18083 },
18084 "POST" : {
18085 "description" : "Create network device configuration",
18086 "method" : "POST",
18087 "name" : "create_network",
18088 "parameters" : {
18089 "additionalProperties" : 0,
18090 "properties" : {
7aacca6f 18091 "address" : {
44660702
DM
18092 "description" : "IP address.",
18093 "format" : "ipv4",
18094 "optional" : 1,
7aacca6f 18095 "requires" : "netmask",
44660702
DM
18096 "type" : "string"
18097 },
18098 "address6" : {
7aacca6f 18099 "description" : "IP address.",
44660702
DM
18100 "format" : "ipv6",
18101 "optional" : 1,
18102 "requires" : "netmask6",
18103 "type" : "string"
18104 },
18105 "autostart" : {
18106 "description" : "Automatically start interface on boot.",
7aacca6f 18107 "optional" : 1,
44660702 18108 "type" : "boolean"
7aacca6f
DM
18109 },
18110 "bond_mode" : {
18111 "description" : "Bonding mode.",
18112 "enum" : [
18113 "balance-rr",
18114 "active-backup",
18115 "balance-xor",
18116 "broadcast",
18117 "802.3ad",
18118 "balance-tlb",
18119 "balance-alb",
18120 "balance-slb",
18121 "lacp-balance-slb",
18122 "lacp-balance-tcp"
18123 ],
18124 "optional" : 1,
18125 "type" : "string"
18126 },
44660702
DM
18127 "bond_xmit_hash_policy" : {
18128 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
18129 "enum" : [
18130 "layer2",
18131 "layer2+3",
18132 "layer3+4"
18133 ],
18134 "optional" : 1,
18135 "type" : "string"
18136 },
18137 "bridge_ports" : {
18138 "description" : "Specify the iterfaces you want to add to your bridge.",
7aacca6f 18139 "format" : "pve-iface-list",
7aacca6f 18140 "optional" : 1,
44660702 18141 "type" : "string"
7aacca6f 18142 },
44660702
DM
18143 "bridge_vlan_aware" : {
18144 "description" : "Enable bridge vlan support.",
7aacca6f 18145 "optional" : 1,
44660702 18146 "type" : "boolean"
7aacca6f 18147 },
44660702
DM
18148 "comments" : {
18149 "description" : "Comments",
7aacca6f 18150 "optional" : 1,
44660702
DM
18151 "type" : "string"
18152 },
18153 "comments6" : {
18154 "description" : "Comments",
18155 "optional" : 1,
18156 "type" : "string"
18157 },
18158 "gateway" : {
18159 "description" : "Default gateway address.",
18160 "format" : "ipv4",
18161 "optional" : 1,
18162 "type" : "string"
18163 },
18164 "gateway6" : {
18165 "description" : "Default ipv6 gateway address.",
18166 "format" : "ipv6",
18167 "optional" : 1,
18168 "type" : "string"
56122987 18169 },
7aacca6f 18170 "iface" : {
44660702 18171 "description" : "Network interface name.",
7aacca6f
DM
18172 "format" : "pve-iface",
18173 "maxLength" : 20,
44660702
DM
18174 "minLength" : 2,
18175 "type" : "string"
56122987 18176 },
44660702
DM
18177 "netmask" : {
18178 "description" : "Network mask.",
18179 "format" : "ipv4mask",
7aacca6f 18180 "optional" : 1,
44660702
DM
18181 "requires" : "address",
18182 "type" : "string"
7aacca6f 18183 },
44660702
DM
18184 "netmask6" : {
18185 "description" : "Network mask.",
18186 "maximum" : 128,
18187 "minimum" : 0,
7aacca6f 18188 "optional" : 1,
44660702 18189 "requires" : "address6",
4bd7df8b
DM
18190 "type" : "integer",
18191 "typetext" : "integer (0-128)"
7aacca6f 18192 },
44660702
DM
18193 "node" : {
18194 "description" : "The cluster node name.",
18195 "format" : "pve-node",
18196 "type" : "string"
18197 },
18198 "ovs_bonds" : {
18199 "description" : "Specify the interfaces used by the bonding device.",
18200 "format" : "pve-iface-list",
7aacca6f
DM
18201 "optional" : 1,
18202 "type" : "string"
18203 },
44660702
DM
18204 "ovs_bridge" : {
18205 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
18206 "format" : "pve-iface",
18207 "optional" : 1,
18208 "type" : "string"
18209 },
18210 "ovs_options" : {
18211 "description" : "OVS interface options.",
18212 "maxLength" : 1024,
18213 "optional" : 1,
18214 "type" : "string"
18215 },
18216 "ovs_ports" : {
18217 "description" : "Specify the iterfaces you want to add to your bridge.",
18218 "format" : "pve-iface-list",
18219 "optional" : 1,
18220 "type" : "string"
18221 },
18222 "ovs_tag" : {
18223 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
18224 "maximum" : 4094,
18225 "minimum" : 1,
18226 "optional" : 1,
4bd7df8b
DM
18227 "type" : "integer",
18228 "typetext" : "integer (1-4094)"
44660702
DM
18229 },
18230 "slaves" : {
18231 "description" : "Specify the interfaces used by the bonding device.",
18232 "format" : "pve-iface-list",
7aacca6f 18233 "optional" : 1,
44660702
DM
18234 "type" : "string"
18235 },
18236 "type" : {
18237 "description" : "Network interface type",
7aacca6f 18238 "enum" : [
44660702
DM
18239 "bridge",
18240 "bond",
18241 "eth",
18242 "alias",
18243 "vlan",
18244 "OVSBridge",
18245 "OVSBond",
18246 "OVSPort",
18247 "OVSIntPort",
18248 "unknown"
7aacca6f 18249 ],
44660702 18250 "type" : "string"
56122987 18251 }
44660702 18252 }
56122987 18253 },
56122987
DM
18254 "permissions" : {
18255 "check" : [
18256 "perm",
18257 "/nodes/{node}",
18258 [
7aacca6f 18259 "Sys.Modify"
44660702
DM
18260 ]
18261 ]
7aacca6f 18262 },
44660702
DM
18263 "protected" : 1,
18264 "proxyto" : "node",
18265 "returns" : {
18266 "type" : "null"
18267 }
18268 }
18269 },
18270 "leaf" : 0,
18271 "path" : "/nodes/{node}/network",
18272 "text" : "network"
18273 },
18274 {
18275 "children" : [
18276 {
7aacca6f
DM
18277 "children" : [
18278 {
18279 "info" : {
18280 "GET" : {
44660702 18281 "description" : "Read task log.",
7aacca6f
DM
18282 "method" : "GET",
18283 "name" : "read_task_log",
18284 "parameters" : {
44660702 18285 "additionalProperties" : 0,
7aacca6f 18286 "properties" : {
44660702
DM
18287 "limit" : {
18288 "minimum" : 0,
7aacca6f 18289 "optional" : 1,
4bd7df8b
DM
18290 "type" : "integer",
18291 "typetext" : "integer (0- N)"
7aacca6f
DM
18292 },
18293 "node" : {
18294 "description" : "The cluster node name.",
44660702
DM
18295 "format" : "pve-node",
18296 "type" : "string"
7aacca6f 18297 },
44660702
DM
18298 "start" : {
18299 "minimum" : 0,
7aacca6f 18300 "optional" : 1,
4bd7df8b
DM
18301 "type" : "integer",
18302 "typetext" : "integer (0- N)"
44660702
DM
18303 },
18304 "upid" : {
18305 "type" : "string"
7aacca6f 18306 }
44660702
DM
18307 }
18308 },
18309 "permissions" : {
18310 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
18311 "user" : "all"
7aacca6f
DM
18312 },
18313 "protected" : 1,
44660702 18314 "proxyto" : "node",
7aacca6f 18315 "returns" : {
7aacca6f 18316 "items" : {
7aacca6f
DM
18317 "properties" : {
18318 "n" : {
44660702
DM
18319 "description" : "Line number",
18320 "type" : "integer"
7aacca6f
DM
18321 },
18322 "t" : {
44660702
DM
18323 "description" : "Line text",
18324 "type" : "string"
7aacca6f 18325 }
44660702
DM
18326 },
18327 "type" : "object"
18328 },
18329 "type" : "array"
18330 }
7aacca6f 18331 }
56122987 18332 },
7aacca6f 18333 "leaf" : 1,
44660702
DM
18334 "path" : "/nodes/{node}/tasks/{upid}/log",
18335 "text" : "log"
7aacca6f
DM
18336 },
18337 {
7aacca6f
DM
18338 "info" : {
18339 "GET" : {
44660702
DM
18340 "description" : "Read task status.",
18341 "method" : "GET",
7aacca6f
DM
18342 "name" : "read_task_status",
18343 "parameters" : {
18344 "additionalProperties" : 0,
18345 "properties" : {
18346 "node" : {
7aacca6f 18347 "description" : "The cluster node name.",
44660702 18348 "format" : "pve-node",
7aacca6f
DM
18349 "type" : "string"
18350 },
18351 "upid" : {
18352 "type" : "string"
18353 }
18354 }
18355 },
7aacca6f
DM
18356 "permissions" : {
18357 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
18358 "user" : "all"
56122987 18359 },
44660702 18360 "protected" : 1,
7aacca6f 18361 "proxyto" : "node",
7aacca6f
DM
18362 "returns" : {
18363 "properties" : {
18364 "pid" : {
18365 "type" : "integer"
18366 },
18367 "status" : {
7aacca6f
DM
18368 "enum" : [
18369 "running",
18370 "stopped"
44660702
DM
18371 ],
18372 "type" : "string"
7aacca6f
DM
18373 }
18374 },
18375 "type" : "object"
56122987 18376 }
7aacca6f 18377 }
44660702
DM
18378 },
18379 "leaf" : 1,
18380 "path" : "/nodes/{node}/tasks/{upid}/status",
18381 "text" : "status"
56122987 18382 }
7aacca6f 18383 ],
44660702
DM
18384 "info" : {
18385 "DELETE" : {
18386 "description" : "Stop a task.",
18387 "method" : "DELETE",
18388 "name" : "stop_task",
18389 "parameters" : {
18390 "additionalProperties" : 0,
18391 "properties" : {
18392 "node" : {
18393 "description" : "The cluster node name.",
18394 "format" : "pve-node",
18395 "type" : "string"
18396 },
18397 "upid" : {
18398 "type" : "string"
18399 }
7aacca6f 18400 }
44660702
DM
18401 },
18402 "permissions" : {
18403 "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him.",
18404 "user" : "all"
18405 },
18406 "protected" : 1,
18407 "proxyto" : "node",
18408 "returns" : {
18409 "type" : "null"
7aacca6f 18410 }
56122987 18411 },
44660702
DM
18412 "GET" : {
18413 "description" : "",
18414 "method" : "GET",
18415 "name" : "upid_index",
18416 "parameters" : {
18417 "additionalProperties" : 0,
18418 "properties" : {
18419 "node" : {
18420 "description" : "The cluster node name.",
18421 "format" : "pve-node",
18422 "type" : "string"
18423 },
18424 "upid" : {
18425 "type" : "string"
18426 }
18427 }
18428 },
18429 "permissions" : {
18430 "user" : "all"
18431 },
18432 "returns" : {
18433 "items" : {
18434 "properties" : {},
18435 "type" : "object"
18436 },
18437 "links" : [
18438 {
18439 "href" : "{name}",
18440 "rel" : "child"
18441 }
18442 ],
18443 "type" : "array"
56122987 18444 }
44660702 18445 }
56122987 18446 },
44660702
DM
18447 "leaf" : 0,
18448 "path" : "/nodes/{node}/tasks/{upid}",
18449 "text" : "{upid}"
18450 }
18451 ],
18452 "info" : {
18453 "GET" : {
7aacca6f 18454 "description" : "Read task list for one node (finished tasks).",
44660702
DM
18455 "method" : "GET",
18456 "name" : "node_tasks",
56122987 18457 "parameters" : {
7aacca6f 18458 "additionalProperties" : 0,
56122987 18459 "properties" : {
44660702 18460 "errors" : {
56122987 18461 "optional" : 1,
44660702 18462 "type" : "boolean"
56122987 18463 },
44660702 18464 "limit" : {
56122987 18465 "minimum" : 0,
56122987 18466 "optional" : 1,
4bd7df8b
DM
18467 "type" : "integer",
18468 "typetext" : "integer (0- N)"
56122987 18469 },
56122987
DM
18470 "node" : {
18471 "description" : "The cluster node name.",
44660702
DM
18472 "format" : "pve-node",
18473 "type" : "string"
56122987 18474 },
44660702 18475 "start" : {
7aacca6f 18476 "minimum" : 0,
44660702 18477 "optional" : 1,
4bd7df8b
DM
18478 "type" : "integer",
18479 "typetext" : "integer (0- N)"
56122987 18480 },
7aacca6f 18481 "userfilter" : {
44660702
DM
18482 "optional" : 1,
18483 "type" : "string"
18484 },
18485 "vmid" : {
18486 "description" : "Only list tasks for this VM.",
18487 "format" : "pve-vmid",
18488 "minimum" : 1,
18489 "optional" : 1,
4bd7df8b
DM
18490 "type" : "integer",
18491 "typetext" : "integer (1- N)"
56122987
DM
18492 }
18493 }
18494 },
7aacca6f 18495 "permissions" : {
44660702 18496 "description" : "List task associated with the current user, or all task the user has 'Sys.Audit' permissions on /nodes/<node> (the <node> the task runs on).",
7aacca6f
DM
18497 "user" : "all"
18498 },
44660702 18499 "proxyto" : "node",
56122987
DM
18500 "returns" : {
18501 "items" : {
18502 "properties" : {
44660702 18503 "upid" : {
56122987
DM
18504 "type" : "string"
18505 }
18506 },
18507 "type" : "object"
18508 },
56122987
DM
18509 "links" : [
18510 {
44660702
DM
18511 "href" : "{upid}",
18512 "rel" : "child"
56122987 18513 }
44660702
DM
18514 ],
18515 "type" : "array"
56122987
DM
18516 }
18517 }
18518 },
44660702
DM
18519 "leaf" : 0,
18520 "path" : "/nodes/{node}/tasks",
18521 "text" : "tasks"
18522 },
18523 {
56122987
DM
18524 "children" : [
18525 {
56122987
DM
18526 "info" : {
18527 "GET" : {
7aacca6f 18528 "description" : "Scan zfs pool list on local node.",
44660702
DM
18529 "method" : "GET",
18530 "name" : "zfsscan",
56122987 18531 "parameters" : {
44660702 18532 "additionalProperties" : 0,
56122987 18533 "properties" : {
56122987
DM
18534 "node" : {
18535 "description" : "The cluster node name.",
44660702
DM
18536 "format" : "pve-node",
18537 "type" : "string"
56122987 18538 }
44660702
DM
18539 }
18540 },
7aacca6f
DM
18541 "permissions" : {
18542 "check" : [
18543 "perm",
18544 "/storage",
18545 [
18546 "Datastore.Allocate"
18547 ]
18548 ]
18549 },
44660702
DM
18550 "protected" : 1,
18551 "proxyto" : "node",
56122987 18552 "returns" : {
56122987
DM
18553 "items" : {
18554 "properties" : {
44660702 18555 "pool" : {
56122987
DM
18556 "type" : "string"
18557 }
44660702
DM
18558 },
18559 "type" : "object"
18560 },
18561 "type" : "array"
18562 }
18563 }
18564 },
18565 "leaf" : 1,
18566 "path" : "/nodes/{node}/scan/zfs",
18567 "text" : "zfs"
18568 },
18569 {
18570 "info" : {
18571 "GET" : {
18572 "description" : "Scan remote NFS server.",
18573 "method" : "GET",
7aacca6f 18574 "name" : "nfsscan",
56122987 18575 "parameters" : {
44660702 18576 "additionalProperties" : 0,
56122987
DM
18577 "properties" : {
18578 "node" : {
7aacca6f 18579 "description" : "The cluster node name.",
44660702 18580 "format" : "pve-node",
7aacca6f
DM
18581 "type" : "string"
18582 },
18583 "server" : {
18584 "format" : "pve-storage-server",
18585 "type" : "string"
56122987 18586 }
44660702 18587 }
56122987 18588 },
56122987
DM
18589 "permissions" : {
18590 "check" : [
18591 "perm",
18592 "/storage",
18593 [
18594 "Datastore.Allocate"
18595 ]
18596 ]
18597 },
44660702 18598 "protected" : 1,
56122987 18599 "proxyto" : "node",
44660702
DM
18600 "returns" : {
18601 "items" : {
18602 "properties" : {
18603 "options" : {
18604 "type" : "string"
18605 },
18606 "path" : {
18607 "type" : "string"
18608 }
18609 },
18610 "type" : "object"
18611 },
18612 "type" : "array"
18613 }
18614 }
18615 },
18616 "leaf" : 1,
18617 "path" : "/nodes/{node}/scan/nfs",
18618 "text" : "nfs"
18619 },
18620 {
18621 "info" : {
18622 "GET" : {
18623 "description" : "Scan remote GlusterFS server.",
7aacca6f
DM
18624 "method" : "GET",
18625 "name" : "glusterfsscan",
56122987 18626 "parameters" : {
44660702 18627 "additionalProperties" : 0,
56122987 18628 "properties" : {
56122987 18629 "node" : {
44660702 18630 "description" : "The cluster node name.",
56122987 18631 "format" : "pve-node",
44660702 18632 "type" : "string"
7aacca6f
DM
18633 },
18634 "server" : {
18635 "format" : "pve-storage-server",
18636 "type" : "string"
56122987 18637 }
44660702
DM
18638 }
18639 },
18640 "permissions" : {
18641 "check" : [
18642 "perm",
18643 "/storage",
18644 [
18645 "Datastore.Allocate"
18646 ]
18647 ]
7aacca6f 18648 },
44660702
DM
18649 "protected" : 1,
18650 "proxyto" : "node",
18651 "returns" : {
18652 "items" : {
18653 "properties" : {
18654 "volname" : {
18655 "type" : "string"
18656 }
18657 },
18658 "type" : "object"
18659 },
18660 "type" : "array"
18661 }
56122987
DM
18662 }
18663 },
44660702
DM
18664 "leaf" : 1,
18665 "path" : "/nodes/{node}/scan/glusterfs",
7aacca6f 18666 "text" : "glusterfs"
56122987
DM
18667 },
18668 {
56122987
DM
18669 "info" : {
18670 "GET" : {
7aacca6f 18671 "description" : "Scan remote iSCSI server.",
44660702
DM
18672 "method" : "GET",
18673 "name" : "iscsiscan",
18674 "parameters" : {
18675 "additionalProperties" : 0,
18676 "properties" : {
18677 "node" : {
18678 "description" : "The cluster node name.",
18679 "format" : "pve-node",
18680 "type" : "string"
18681 },
18682 "portal" : {
18683 "format" : "pve-storage-portal-dns",
18684 "type" : "string"
18685 }
18686 }
18687 },
56122987
DM
18688 "permissions" : {
18689 "check" : [
18690 "perm",
18691 "/storage",
18692 [
18693 "Datastore.Allocate"
18694 ]
18695 ]
18696 },
44660702
DM
18697 "protected" : 1,
18698 "proxyto" : "node",
56122987 18699 "returns" : {
56122987
DM
18700 "items" : {
18701 "properties" : {
44660702 18702 "portal" : {
56122987
DM
18703 "type" : "string"
18704 },
44660702 18705 "target" : {
56122987
DM
18706 "type" : "string"
18707 }
18708 },
18709 "type" : "object"
56122987 18710 },
44660702
DM
18711 "type" : "array"
18712 }
56122987
DM
18713 }
18714 },
44660702 18715 "leaf" : 1,
7aacca6f 18716 "path" : "/nodes/{node}/scan/iscsi",
44660702 18717 "text" : "iscsi"
56122987
DM
18718 },
18719 {
56122987
DM
18720 "info" : {
18721 "GET" : {
44660702
DM
18722 "description" : "List local LVM volume groups.",
18723 "method" : "GET",
18724 "name" : "lvmscan",
18725 "parameters" : {
18726 "additionalProperties" : 0,
18727 "properties" : {
18728 "node" : {
18729 "description" : "The cluster node name.",
18730 "format" : "pve-node",
18731 "type" : "string"
56122987 18732 }
7aacca6f 18733 }
56122987 18734 },
56122987
DM
18735 "permissions" : {
18736 "check" : [
18737 "perm",
18738 "/storage",
18739 [
18740 "Datastore.Allocate"
18741 ]
18742 ]
18743 },
7aacca6f 18744 "protected" : 1,
44660702
DM
18745 "proxyto" : "node",
18746 "returns" : {
18747 "items" : {
18748 "properties" : {
18749 "vg" : {
18750 "type" : "string"
18751 }
18752 },
18753 "type" : "object"
18754 },
18755 "type" : "array"
7aacca6f 18756 }
56122987
DM
18757 }
18758 },
18759 "leaf" : 1,
44660702
DM
18760 "path" : "/nodes/{node}/scan/lvm",
18761 "text" : "lvm"
56122987
DM
18762 },
18763 {
56122987
DM
18764 "info" : {
18765 "GET" : {
44660702
DM
18766 "description" : "List local LVM Thin Pools.",
18767 "method" : "GET",
18768 "name" : "lvmthinscan",
56122987 18769 "parameters" : {
44660702 18770 "additionalProperties" : 0,
56122987
DM
18771 "properties" : {
18772 "node" : {
44660702 18773 "description" : "The cluster node name.",
56122987 18774 "format" : "pve-node",
44660702 18775 "type" : "string"
56122987
DM
18776 },
18777 "vg" : {
44660702 18778 "maxLength" : 100,
56122987 18779 "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+",
44660702 18780 "type" : "string"
56122987 18781 }
44660702 18782 }
56122987 18783 },
7aacca6f
DM
18784 "permissions" : {
18785 "check" : [
18786 "perm",
18787 "/storage",
18788 [
18789 "Datastore.Allocate"
18790 ]
18791 ]
18792 },
44660702 18793 "protected" : 1,
7aacca6f 18794 "proxyto" : "node",
56122987 18795 "returns" : {
56122987
DM
18796 "items" : {
18797 "properties" : {
18798 "lv" : {
18799 "type" : "string"
18800 }
18801 },
18802 "type" : "object"
44660702
DM
18803 },
18804 "type" : "array"
7aacca6f 18805 }
56122987
DM
18806 }
18807 },
7aacca6f 18808 "leaf" : 1,
44660702
DM
18809 "path" : "/nodes/{node}/scan/lvmthin",
18810 "text" : "lvmthin"
56122987
DM
18811 },
18812 {
56122987
DM
18813 "info" : {
18814 "GET" : {
44660702
DM
18815 "description" : "List local USB devices.",
18816 "method" : "GET",
18817 "name" : "usbscan",
18818 "parameters" : {
18819 "additionalProperties" : 0,
18820 "properties" : {
18821 "node" : {
18822 "description" : "The cluster node name.",
18823 "format" : "pve-node",
18824 "type" : "string"
18825 }
18826 }
18827 },
7aacca6f
DM
18828 "permissions" : {
18829 "check" : [
18830 "perm",
18831 "/",
18832 [
18833 "Sys.Modify"
18834 ]
18835 ]
18836 },
44660702 18837 "protected" : 1,
7aacca6f 18838 "proxyto" : "node",
56122987
DM
18839 "returns" : {
18840 "items" : {
18841 "properties" : {
44660702
DM
18842 "busnum" : {
18843 "type" : "integer"
56122987 18844 },
44660702
DM
18845 "class" : {
18846 "type" : "integer"
56122987 18847 },
7aacca6f 18848 "devnum" : {
56122987
DM
18849 "type" : "integer"
18850 },
44660702
DM
18851 "level" : {
18852 "type" : "integer"
18853 },
18854 "manufacturer" : {
18855 "optional" : 1,
7aacca6f
DM
18856 "type" : "string"
18857 },
44660702 18858 "port" : {
56122987
DM
18859 "type" : "integer"
18860 },
44660702
DM
18861 "prodid" : {
18862 "type" : "string"
56122987 18863 },
44660702
DM
18864 "product" : {
18865 "optional" : 1,
18866 "type" : "string"
18867 },
18868 "serial" : {
7aacca6f 18869 "optional" : 1,
56122987
DM
18870 "type" : "string"
18871 },
44660702 18872 "speed" : {
7aacca6f 18873 "type" : "string"
56122987 18874 },
44660702 18875 "usbpath" : {
56122987
DM
18876 "optional" : 1,
18877 "type" : "string"
18878 },
44660702
DM
18879 "vendid" : {
18880 "type" : "string"
56122987
DM
18881 }
18882 },
18883 "type" : "object"
7aacca6f
DM
18884 },
18885 "type" : "array"
44660702
DM
18886 }
18887 }
18888 },
18889 "leaf" : 1,
18890 "path" : "/nodes/{node}/scan/usb",
18891 "text" : "usb"
18892 }
18893 ],
18894 "info" : {
18895 "GET" : {
18896 "description" : "Index of available scan methods",
18897 "method" : "GET",
18898 "name" : "index",
18899 "parameters" : {
18900 "additionalProperties" : 0,
18901 "properties" : {
18902 "node" : {
18903 "description" : "The cluster node name.",
18904 "format" : "pve-node",
18905 "type" : "string"
18906 }
18907 }
18908 },
18909 "permissions" : {
18910 "user" : "all"
18911 },
18912 "returns" : {
18913 "items" : {
18914 "properties" : {
18915 "method" : {
18916 "type" : "string"
56122987
DM
18917 }
18918 },
44660702
DM
18919 "type" : "object"
18920 },
18921 "links" : [
18922 {
18923 "href" : "{method}",
18924 "rel" : "child"
18925 }
18926 ],
18927 "type" : "array"
56122987
DM
18928 }
18929 }
44660702
DM
18930 },
18931 "leaf" : 0,
18932 "path" : "/nodes/{node}/scan",
7aacca6f 18933 "text" : "scan"
56122987
DM
18934 },
18935 {
56122987
DM
18936 "children" : [
18937 {
56122987
DM
18938 "children" : [
18939 {
7aacca6f
DM
18940 "children" : [
18941 {
18942 "info" : {
44660702
DM
18943 "DELETE" : {
18944 "description" : "Delete volume",
18945 "method" : "DELETE",
18946 "name" : "delete",
7aacca6f
DM
18947 "parameters" : {
18948 "additionalProperties" : 0,
18949 "properties" : {
7aacca6f
DM
18950 "node" : {
18951 "description" : "The cluster node name.",
44660702
DM
18952 "format" : "pve-node",
18953 "type" : "string"
18954 },
18955 "storage" : {
18956 "description" : "The storage identifier.",
18957 "format" : "pve-storage-id",
18958 "optional" : 1,
18959 "type" : "string"
7aacca6f
DM
18960 },
18961 "volume" : {
18962 "description" : "Volume identifier",
18963 "type" : "string"
18964 }
18965 }
18966 },
44660702
DM
18967 "permissions" : {
18968 "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).",
18969 "user" : "all"
18970 },
18971 "protected" : 1,
18972 "proxyto" : "node",
18973 "returns" : {
18974 "type" : "null"
18975 }
7aacca6f 18976 },
44660702
DM
18977 "GET" : {
18978 "description" : "Get volume attributes",
18979 "method" : "GET",
18980 "name" : "info",
7aacca6f
DM
18981 "parameters" : {
18982 "additionalProperties" : 0,
18983 "properties" : {
7aacca6f
DM
18984 "node" : {
18985 "description" : "The cluster node name.",
44660702
DM
18986 "format" : "pve-node",
18987 "type" : "string"
7aacca6f
DM
18988 },
18989 "storage" : {
7aacca6f 18990 "description" : "The storage identifier.",
44660702 18991 "format" : "pve-storage-id",
7aacca6f
DM
18992 "optional" : 1,
18993 "type" : "string"
44660702
DM
18994 },
18995 "volume" : {
18996 "description" : "Volume identifier",
18997 "type" : "string"
7aacca6f
DM
18998 }
18999 }
19000 },
7aacca6f 19001 "permissions" : {
44660702 19002 "description" : "You need read access for the volume.",
7aacca6f
DM
19003 "user" : "all"
19004 },
44660702 19005 "protected" : 1,
7aacca6f 19006 "proxyto" : "node",
7aacca6f 19007 "returns" : {
44660702 19008 "type" : "object"
7aacca6f
DM
19009 }
19010 },
19011 "POST" : {
44660702
DM
19012 "description" : "Copy a volume. This is experimental code - do not use.",
19013 "method" : "POST",
19014 "name" : "copy",
7aacca6f
DM
19015 "parameters" : {
19016 "additionalProperties" : 0,
19017 "properties" : {
44660702
DM
19018 "node" : {
19019 "description" : "The cluster node name.",
19020 "format" : "pve-node",
19021 "type" : "string"
19022 },
19023 "storage" : {
19024 "description" : "The storage identifier.",
19025 "format" : "pve-storage-id",
19026 "optional" : 1,
19027 "type" : "string"
19028 },
7aacca6f 19029 "target" : {
44660702
DM
19030 "description" : "Target volume identifier",
19031 "type" : "string"
7aacca6f
DM
19032 },
19033 "target_node" : {
7aacca6f 19034 "description" : "Target node. Default is local node.",
44660702
DM
19035 "format" : "pve-node",
19036 "optional" : 1,
19037 "type" : "string"
7aacca6f
DM
19038 },
19039 "volume" : {
44660702
DM
19040 "description" : "Source volume identifier",
19041 "type" : "string"
7aacca6f
DM
19042 }
19043 }
19044 },
7aacca6f
DM
19045 "protected" : 1,
19046 "proxyto" : "node",
19047 "returns" : {
19048 "type" : "string"
44660702 19049 }
7aacca6f
DM
19050 }
19051 },
7aacca6f 19052 "leaf" : 1,
44660702
DM
19053 "path" : "/nodes/{node}/storage/{storage}/content/{volume}",
19054 "text" : "{volume}"
7aacca6f
DM
19055 }
19056 ],
56122987
DM
19057 "info" : {
19058 "GET" : {
44660702
DM
19059 "description" : "List storage content.",
19060 "method" : "GET",
19061 "name" : "index",
19062 "parameters" : {
19063 "additionalProperties" : 0,
19064 "properties" : {
19065 "content" : {
19066 "description" : "Only list content of this type.",
19067 "format" : "pve-storage-content",
19068 "optional" : 1,
19069 "type" : "string"
19070 },
19071 "node" : {
19072 "description" : "The cluster node name.",
19073 "format" : "pve-node",
19074 "type" : "string"
19075 },
19076 "storage" : {
19077 "description" : "The storage identifier.",
19078 "format" : "pve-storage-id",
19079 "type" : "string"
19080 },
19081 "vmid" : {
19082 "description" : "Only list images for this VM",
19083 "format" : "pve-vmid",
19084 "minimum" : 1,
19085 "optional" : 1,
4bd7df8b
DM
19086 "type" : "integer",
19087 "typetext" : "integer (1- N)"
44660702
DM
19088 }
19089 }
19090 },
7aacca6f
DM
19091 "permissions" : {
19092 "check" : [
19093 "perm",
19094 "/storage/{storage}",
19095 [
19096 "Datastore.Audit",
19097 "Datastore.AllocateSpace"
19098 ],
19099 "any",
19100 1
19101 ]
19102 },
44660702 19103 "protected" : 1,
7aacca6f 19104 "proxyto" : "node",
56122987 19105 "returns" : {
44660702
DM
19106 "items" : {
19107 "properties" : {
19108 "volid" : {
19109 "type" : "string"
19110 }
19111 },
19112 "type" : "object"
19113 },
19114 "links" : [
19115 {
19116 "href" : "{volid}",
19117 "rel" : "child"
19118 }
19119 ],
19120 "type" : "array"
19121 }
19122 },
19123 "POST" : {
19124 "description" : "Allocate disk images.",
19125 "method" : "POST",
19126 "name" : "create",
56122987 19127 "parameters" : {
44660702 19128 "additionalProperties" : 0,
56122987 19129 "properties" : {
44660702
DM
19130 "filename" : {
19131 "description" : "The name of the file to create.",
19132 "type" : "string"
19133 },
19134 "format" : {
19135 "enum" : [
19136 "raw",
19137 "qcow2",
19138 "subvol"
19139 ],
19140 "optional" : 1,
19141 "requires" : "size",
19142 "type" : "string"
19143 },
19144 "node" : {
19145 "description" : "The cluster node name.",
19146 "format" : "pve-node",
19147 "type" : "string"
19148 },
19149 "size" : {
19150 "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)",
19151 "pattern" : "\\d+[MG]?",
19152 "type" : "string"
19153 },
56122987
DM
19154 "storage" : {
19155 "description" : "The storage identifier.",
44660702
DM
19156 "format" : "pve-storage-id",
19157 "type" : "string"
56122987 19158 },
44660702
DM
19159 "vmid" : {
19160 "description" : "Specify owner VM",
19161 "format" : "pve-vmid",
19162 "minimum" : 1,
4bd7df8b
DM
19163 "type" : "integer",
19164 "typetext" : "integer (1- N)"
44660702
DM
19165 }
19166 }
19167 },
19168 "permissions" : {
19169 "check" : [
19170 "perm",
19171 "/storage/{storage}",
19172 [
19173 "Datastore.AllocateSpace"
19174 ]
19175 ]
19176 },
19177 "protected" : 1,
19178 "proxyto" : "node",
19179 "returns" : {
19180 "description" : "Volume identifier",
19181 "type" : "string"
19182 }
19183 }
19184 },
19185 "leaf" : 0,
19186 "path" : "/nodes/{node}/storage/{storage}/content",
19187 "text" : "content"
19188 },
19189 {
19190 "info" : {
19191 "GET" : {
19192 "description" : "Read storage status.",
19193 "method" : "GET",
19194 "name" : "read_status",
19195 "parameters" : {
19196 "additionalProperties" : 0,
19197 "properties" : {
56122987
DM
19198 "node" : {
19199 "description" : "The cluster node name.",
44660702
DM
19200 "format" : "pve-node",
19201 "type" : "string"
19202 },
19203 "storage" : {
19204 "description" : "The storage identifier.",
19205 "format" : "pve-storage-id",
19206 "type" : "string"
56122987 19207 }
44660702
DM
19208 }
19209 },
19210 "permissions" : {
19211 "check" : [
19212 "perm",
19213 "/storage/{storage}",
19214 [
19215 "Datastore.Audit",
19216 "Datastore.AllocateSpace"
19217 ],
19218 "any",
19219 1
19220 ]
56122987
DM
19221 },
19222 "protected" : 1,
44660702
DM
19223 "proxyto" : "node",
19224 "returns" : {
19225 "properties" : {},
19226 "type" : "object"
19227 }
56122987
DM
19228 }
19229 },
44660702
DM
19230 "leaf" : 1,
19231 "path" : "/nodes/{node}/storage/{storage}/status",
7aacca6f 19232 "text" : "status"
56122987
DM
19233 },
19234 {
56122987
DM
19235 "info" : {
19236 "GET" : {
44660702
DM
19237 "description" : "Read storage RRD statistics (returns PNG).",
19238 "method" : "GET",
19239 "name" : "rrd",
56122987 19240 "parameters" : {
44660702 19241 "additionalProperties" : 0,
56122987 19242 "properties" : {
44660702
DM
19243 "cf" : {
19244 "description" : "The RRD consolidation function",
19245 "enum" : [
19246 "AVERAGE",
19247 "MAX"
19248 ],
19249 "optional" : 1,
19250 "type" : "string"
19251 },
7aacca6f 19252 "ds" : {
7aacca6f 19253 "description" : "The list of datasources you want to display.",
44660702
DM
19254 "format" : "pve-configid-list",
19255 "type" : "string"
56122987 19256 },
7aacca6f
DM
19257 "node" : {
19258 "description" : "The cluster node name.",
44660702
DM
19259 "format" : "pve-node",
19260 "type" : "string"
56122987 19261 },
7aacca6f 19262 "storage" : {
7aacca6f 19263 "description" : "The storage identifier.",
44660702
DM
19264 "format" : "pve-storage-id",
19265 "type" : "string"
19266 },
19267 "timeframe" : {
19268 "description" : "Specify the time frame you are interested in.",
7aacca6f 19269 "enum" : [
44660702
DM
19270 "hour",
19271 "day",
19272 "week",
19273 "month",
19274 "year"
7aacca6f 19275 ],
44660702 19276 "type" : "string"
56122987 19277 }
44660702 19278 }
56122987
DM
19279 },
19280 "permissions" : {
19281 "check" : [
19282 "perm",
19283 "/storage/{storage}",
19284 [
19285 "Datastore.Audit",
19286 "Datastore.AllocateSpace"
19287 ],
19288 "any",
19289 1
19290 ]
19291 },
44660702
DM
19292 "protected" : 1,
19293 "proxyto" : "node",
7aacca6f
DM
19294 "returns" : {
19295 "properties" : {
19296 "filename" : {
19297 "type" : "string"
19298 }
19299 },
19300 "type" : "object"
19301 }
56122987
DM
19302 }
19303 },
19304 "leaf" : 1,
44660702
DM
19305 "path" : "/nodes/{node}/storage/{storage}/rrd",
19306 "text" : "rrd"
56122987
DM
19307 },
19308 {
56122987
DM
19309 "info" : {
19310 "GET" : {
44660702
DM
19311 "description" : "Read storage RRD statistics.",
19312 "method" : "GET",
19313 "name" : "rrddata",
56122987 19314 "parameters" : {
44660702 19315 "additionalProperties" : 0,
56122987 19316 "properties" : {
44660702
DM
19317 "cf" : {
19318 "description" : "The RRD consolidation function",
19319 "enum" : [
19320 "AVERAGE",
19321 "MAX"
19322 ],
19323 "optional" : 1,
19324 "type" : "string"
19325 },
7aacca6f 19326 "node" : {
7aacca6f 19327 "description" : "The cluster node name.",
44660702
DM
19328 "format" : "pve-node",
19329 "type" : "string"
19330 },
19331 "storage" : {
19332 "description" : "The storage identifier.",
19333 "format" : "pve-storage-id",
7aacca6f
DM
19334 "type" : "string"
19335 },
56122987 19336 "timeframe" : {
7aacca6f 19337 "description" : "Specify the time frame you are interested in.",
56122987
DM
19338 "enum" : [
19339 "hour",
19340 "day",
19341 "week",
19342 "month",
19343 "year"
56122987 19344 ],
44660702 19345 "type" : "string"
56122987 19346 }
44660702 19347 }
7aacca6f 19348 },
7aacca6f
DM
19349 "permissions" : {
19350 "check" : [
19351 "perm",
19352 "/storage/{storage}",
19353 [
19354 "Datastore.Audit",
19355 "Datastore.AllocateSpace"
19356 ],
19357 "any",
19358 1
19359 ]
19360 },
44660702
DM
19361 "protected" : 1,
19362 "proxyto" : "node",
7aacca6f
DM
19363 "returns" : {
19364 "items" : {
44660702
DM
19365 "properties" : {},
19366 "type" : "object"
7aacca6f
DM
19367 },
19368 "type" : "array"
56122987
DM
19369 }
19370 }
7aacca6f 19371 },
7aacca6f 19372 "leaf" : 1,
44660702
DM
19373 "path" : "/nodes/{node}/storage/{storage}/rrddata",
19374 "text" : "rrddata"
56122987
DM
19375 },
19376 {
56122987
DM
19377 "info" : {
19378 "POST" : {
7aacca6f 19379 "description" : "Upload templates and ISO images.",
44660702
DM
19380 "method" : "POST",
19381 "name" : "upload",
56122987 19382 "parameters" : {
7aacca6f 19383 "additionalProperties" : 0,
56122987 19384 "properties" : {
56122987 19385 "content" : {
7aacca6f 19386 "description" : "Content type.",
44660702
DM
19387 "format" : "pve-storage-content",
19388 "type" : "string"
56122987
DM
19389 },
19390 "filename" : {
44660702
DM
19391 "description" : "The name of the file to create.",
19392 "type" : "string"
56122987
DM
19393 },
19394 "node" : {
19395 "description" : "The cluster node name.",
44660702
DM
19396 "format" : "pve-node",
19397 "type" : "string"
19398 },
19399 "storage" : {
19400 "description" : "The storage identifier.",
19401 "format" : "pve-storage-id",
19402 "type" : "string"
19403 },
19404 "tmpfilename" : {
19405 "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.",
19406 "optional" : 1,
19407 "type" : "string"
56122987 19408 }
7aacca6f 19409 }
56122987 19410 },
56122987
DM
19411 "permissions" : {
19412 "check" : [
19413 "perm",
19414 "/storage/{storage}",
19415 [
19416 "Datastore.AllocateTemplate"
19417 ]
19418 ]
44660702
DM
19419 },
19420 "protected" : 1,
19421 "returns" : {
19422 "type" : "string"
19423 }
19424 }
19425 },
19426 "leaf" : 1,
19427 "path" : "/nodes/{node}/storage/{storage}/upload",
19428 "text" : "upload"
19429 }
19430 ],
19431 "info" : {
19432 "GET" : {
19433 "description" : "",
19434 "method" : "GET",
19435 "name" : "diridx",
19436 "parameters" : {
19437 "additionalProperties" : 0,
19438 "properties" : {
19439 "node" : {
19440 "description" : "The cluster node name.",
19441 "format" : "pve-node",
19442 "type" : "string"
19443 },
19444 "storage" : {
19445 "description" : "The storage identifier.",
19446 "format" : "pve-storage-id",
19447 "type" : "string"
56122987
DM
19448 }
19449 }
44660702
DM
19450 },
19451 "permissions" : {
19452 "check" : [
19453 "perm",
19454 "/storage/{storage}",
19455 [
19456 "Datastore.Audit",
19457 "Datastore.AllocateSpace"
19458 ],
19459 "any",
19460 1
19461 ]
19462 },
19463 "returns" : {
19464 "items" : {
19465 "properties" : {
19466 "subdir" : {
19467 "type" : "string"
19468 }
19469 },
19470 "type" : "object"
19471 },
19472 "links" : [
19473 {
19474 "href" : "{subdir}",
19475 "rel" : "child"
19476 }
19477 ],
19478 "type" : "array"
56122987
DM
19479 }
19480 }
44660702
DM
19481 },
19482 "leaf" : 0,
19483 "path" : "/nodes/{node}/storage/{storage}",
19484 "text" : "{storage}"
56122987
DM
19485 }
19486 ],
56122987
DM
19487 "info" : {
19488 "GET" : {
44660702
DM
19489 "description" : "Get status for all datastores.",
19490 "method" : "GET",
19491 "name" : "index",
19492 "parameters" : {
19493 "additionalProperties" : 0,
19494 "properties" : {
19495 "content" : {
19496 "description" : "Only list stores which support this content type.",
19497 "format" : "pve-storage-content-list",
19498 "optional" : 1,
19499 "type" : "string"
19500 },
19501 "enabled" : {
19502 "default" : 0,
19503 "description" : "Only list stores which are enabled (not disabled in config).",
19504 "optional" : 1,
19505 "type" : "boolean"
19506 },
19507 "node" : {
19508 "description" : "The cluster node name.",
19509 "format" : "pve-node",
19510 "type" : "string"
19511 },
19512 "storage" : {
19513 "description" : "Only list status for specified storage",
19514 "format" : "pve-storage-id",
19515 "optional" : 1,
19516 "type" : "string"
19517 },
19518 "target" : {
19519 "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.",
19520 "format" : "pve-node",
19521 "optional" : 1,
19522 "type" : "string"
19523 }
19524 }
19525 },
7aacca6f
DM
19526 "permissions" : {
19527 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
19528 "user" : "all"
19529 },
44660702 19530 "protected" : 1,
7aacca6f 19531 "proxyto" : "node",
56122987
DM
19532 "returns" : {
19533 "items" : {
56122987
DM
19534 "properties" : {
19535 "storage" : {
19536 "type" : "string"
19537 }
44660702
DM
19538 },
19539 "type" : "object"
56122987 19540 },
56122987
DM
19541 "links" : [
19542 {
7aacca6f
DM
19543 "href" : "{storage}",
19544 "rel" : "child"
56122987 19545 }
44660702
DM
19546 ],
19547 "type" : "array"
19548 }
56122987 19549 }
44660702
DM
19550 },
19551 "leaf" : 0,
19552 "path" : "/nodes/{node}/storage",
19553 "text" : "storage"
56122987
DM
19554 },
19555 {
56122987
DM
19556 "children" : [
19557 {
19558 "info" : {
44660702
DM
19559 "GET" : {
19560 "description" : "List available updates.",
19561 "method" : "GET",
19562 "name" : "list_updates",
19563 "parameters" : {
19564 "additionalProperties" : 0,
19565 "properties" : {
19566 "node" : {
19567 "description" : "The cluster node name.",
19568 "format" : "pve-node",
19569 "type" : "string"
19570 }
19571 }
7aacca6f
DM
19572 },
19573 "permissions" : {
19574 "check" : [
19575 "perm",
19576 "/nodes/{node}",
19577 [
19578 "Sys.Modify"
19579 ]
19580 ]
19581 },
44660702 19582 "protected" : 1,
56122987 19583 "proxyto" : "node",
44660702
DM
19584 "returns" : {
19585 "items" : {
19586 "properties" : {},
19587 "type" : "object"
19588 },
19589 "type" : "array"
19590 }
19591 },
19592 "POST" : {
19593 "description" : "This is used to resynchronize the package index files from their sources (apt-get update).",
7aacca6f
DM
19594 "method" : "POST",
19595 "name" : "update_database",
56122987
DM
19596 "parameters" : {
19597 "additionalProperties" : 0,
19598 "properties" : {
44660702
DM
19599 "node" : {
19600 "description" : "The cluster node name.",
19601 "format" : "pve-node",
19602 "type" : "string"
19603 },
56122987 19604 "notify" : {
56122987 19605 "default" : 0,
44660702
DM
19606 "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').",
19607 "optional" : 1,
19608 "type" : "boolean"
56122987
DM
19609 },
19610 "quiet" : {
56122987 19611 "default" : 0,
44660702 19612 "description" : "Only produces output suitable for logging, omitting progress indicators.",
56122987 19613 "optional" : 1,
44660702 19614 "type" : "boolean"
56122987 19615 }
7aacca6f
DM
19616 }
19617 },
19618 "permissions" : {
19619 "check" : [
19620 "perm",
19621 "/nodes/{node}",
19622 [
19623 "Sys.Modify"
19624 ]
19625 ]
19626 },
44660702
DM
19627 "protected" : 1,
19628 "proxyto" : "node",
19629 "returns" : {
19630 "type" : "string"
19631 }
56122987
DM
19632 }
19633 },
7aacca6f 19634 "leaf" : 1,
44660702
DM
19635 "path" : "/nodes/{node}/apt/update",
19636 "text" : "update"
56122987
DM
19637 },
19638 {
56122987
DM
19639 "info" : {
19640 "GET" : {
44660702 19641 "description" : "Get package changelogs.",
56122987 19642 "method" : "GET",
7aacca6f 19643 "name" : "changelog",
56122987 19644 "parameters" : {
44660702 19645 "additionalProperties" : 0,
56122987
DM
19646 "properties" : {
19647 "name" : {
19648 "description" : "Package name.",
19649 "type" : "string"
19650 },
44660702
DM
19651 "node" : {
19652 "description" : "The cluster node name.",
19653 "format" : "pve-node",
19654 "type" : "string"
19655 },
56122987 19656 "version" : {
7aacca6f 19657 "description" : "Package version.",
44660702
DM
19658 "optional" : 1,
19659 "type" : "string"
56122987 19660 }
44660702 19661 }
56122987 19662 },
44660702
DM
19663 "permissions" : {
19664 "check" : [
19665 "perm",
19666 "/nodes/{node}",
19667 [
19668 "Sys.Modify"
19669 ]
19670 ]
19671 },
19672 "proxyto" : "node",
19673 "returns" : {
19674 "type" : "string"
19675 }
56122987
DM
19676 }
19677 },
44660702
DM
19678 "leaf" : 1,
19679 "path" : "/nodes/{node}/apt/changelog",
7aacca6f 19680 "text" : "changelog"
56122987
DM
19681 },
19682 {
56122987
DM
19683 "info" : {
19684 "GET" : {
44660702
DM
19685 "description" : "Get package information for important Proxmox packages.",
19686 "method" : "GET",
7aacca6f
DM
19687 "name" : "versions",
19688 "parameters" : {
44660702 19689 "additionalProperties" : 0,
7aacca6f
DM
19690 "properties" : {
19691 "node" : {
44660702 19692 "description" : "The cluster node name.",
7aacca6f 19693 "format" : "pve-node",
44660702 19694 "type" : "string"
7aacca6f 19695 }
44660702 19696 }
7aacca6f 19697 },
56122987
DM
19698 "permissions" : {
19699 "check" : [
19700 "perm",
19701 "/nodes/{node}",
19702 [
19703 "Sys.Audit"
19704 ]
19705 ]
19706 },
7aacca6f 19707 "proxyto" : "node",
56122987
DM
19708 "returns" : {
19709 "items" : {
7aacca6f
DM
19710 "properties" : {},
19711 "type" : "object"
44660702
DM
19712 },
19713 "type" : "array"
56122987
DM
19714 }
19715 }
19716 },
44660702 19717 "leaf" : 1,
7aacca6f 19718 "path" : "/nodes/{node}/apt/versions",
44660702 19719 "text" : "versions"
56122987
DM
19720 }
19721 ],
56122987
DM
19722 "info" : {
19723 "GET" : {
44660702 19724 "description" : "Directory index for apt (Advanced Package Tool).",
7aacca6f 19725 "method" : "GET",
44660702 19726 "name" : "index",
7aacca6f
DM
19727 "parameters" : {
19728 "additionalProperties" : 0,
19729 "properties" : {
19730 "node" : {
44660702 19731 "description" : "The cluster node name.",
7aacca6f 19732 "format" : "pve-node",
44660702 19733 "type" : "string"
7aacca6f
DM
19734 }
19735 }
19736 },
7aacca6f
DM
19737 "permissions" : {
19738 "user" : "all"
19739 },
44660702
DM
19740 "returns" : {
19741 "items" : {
19742 "properties" : {
19743 "id" : {
19744 "type" : "string"
19745 }
19746 },
19747 "type" : "object"
19748 },
19749 "links" : [
19750 {
19751 "href" : "{id}",
19752 "rel" : "child"
19753 }
19754 ],
19755 "type" : "array"
19756 }
56122987 19757 }
7aacca6f 19758 },
44660702 19759 "leaf" : 0,
7aacca6f 19760 "path" : "/nodes/{node}/apt",
44660702 19761 "text" : "apt"
56122987
DM
19762 },
19763 {
56122987
DM
19764 "children" : [
19765 {
19766 "children" : [
19767 {
56122987
DM
19768 "info" : {
19769 "DELETE" : {
44660702 19770 "description" : "Delete rule.",
7aacca6f 19771 "method" : "DELETE",
44660702 19772 "name" : "delete_rule",
56122987
DM
19773 "parameters" : {
19774 "additionalProperties" : 0,
19775 "properties" : {
56122987
DM
19776 "digest" : {
19777 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 19778 "maxLength" : 40,
56122987 19779 "optional" : 1,
56122987
DM
19780 "type" : "string"
19781 },
44660702
DM
19782 "node" : {
19783 "description" : "The cluster node name.",
19784 "format" : "pve-node",
19785 "type" : "string"
19786 },
7aacca6f 19787 "pos" : {
7aacca6f 19788 "description" : "Update rule at position <pos>.",
44660702
DM
19789 "minimum" : 0,
19790 "optional" : 1,
4bd7df8b
DM
19791 "type" : "integer",
19792 "typetext" : "integer (0- N)"
56122987
DM
19793 }
19794 }
19795 },
44660702
DM
19796 "permissions" : {
19797 "check" : [
19798 "perm",
19799 "/nodes/{node}",
19800 [
19801 "Sys.Modify"
19802 ]
19803 ]
19804 },
19805 "protected" : 1,
19806 "proxyto" : "node",
56122987
DM
19807 "returns" : {
19808 "type" : "null"
44660702
DM
19809 }
19810 },
19811 "GET" : {
19812 "description" : "Get single rule data.",
19813 "method" : "GET",
19814 "name" : "get_rule",
19815 "parameters" : {
19816 "additionalProperties" : 0,
19817 "properties" : {
19818 "node" : {
19819 "description" : "The cluster node name.",
19820 "format" : "pve-node",
19821 "type" : "string"
19822 },
19823 "pos" : {
19824 "description" : "Update rule at position <pos>.",
19825 "minimum" : 0,
19826 "optional" : 1,
4bd7df8b
DM
19827 "type" : "integer",
19828 "typetext" : "integer (0- N)"
44660702
DM
19829 }
19830 }
56122987 19831 },
56122987
DM
19832 "permissions" : {
19833 "check" : [
19834 "perm",
19835 "/nodes/{node}",
19836 [
44660702 19837 "Sys.Audit"
56122987
DM
19838 ]
19839 ]
44660702
DM
19840 },
19841 "proxyto" : "node",
19842 "returns" : {
19843 "properties" : {
19844 "pos" : {
19845 "type" : "integer"
19846 }
19847 },
19848 "type" : "object"
7aacca6f 19849 }
56122987
DM
19850 },
19851 "PUT" : {
44660702
DM
19852 "description" : "Modify rule data.",
19853 "method" : "PUT",
56122987 19854 "name" : "update_rule",
56122987 19855 "parameters" : {
44660702 19856 "additionalProperties" : 0,
56122987 19857 "properties" : {
44660702
DM
19858 "action" : {
19859 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
19860 "maxLength" : 20,
19861 "minLength" : 2,
56122987 19862 "optional" : 1,
44660702
DM
19863 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19864 "type" : "string"
56122987 19865 },
7aacca6f 19866 "comment" : {
56122987 19867 "optional" : 1,
56122987
DM
19868 "type" : "string"
19869 },
44660702
DM
19870 "delete" : {
19871 "description" : "A list of settings you want to delete.",
19872 "format" : "pve-configid-list",
56122987 19873 "optional" : 1,
44660702 19874 "type" : "string"
56122987 19875 },
44660702
DM
19876 "dest" : {
19877 "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.",
19878 "format" : "pve-fw-addr-spec",
56122987 19879 "optional" : 1,
44660702 19880 "type" : "string"
56122987 19881 },
44660702
DM
19882 "digest" : {
19883 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19884 "maxLength" : 40,
56122987 19885 "optional" : 1,
44660702 19886 "type" : "string"
56122987 19887 },
7aacca6f 19888 "dport" : {
7aacca6f 19889 "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.",
44660702
DM
19890 "format" : "pve-fw-dport-spec",
19891 "optional" : 1,
19892 "type" : "string"
7aacca6f 19893 },
44660702
DM
19894 "enable" : {
19895 "minimum" : 0,
56122987 19896 "optional" : 1,
4bd7df8b
DM
19897 "type" : "integer",
19898 "typetext" : "integer (0- N)"
56122987 19899 },
7aacca6f 19900 "iface" : {
44660702 19901 "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.",
7aacca6f 19902 "format" : "pve-iface",
44660702 19903 "maxLength" : 20,
56122987 19904 "minLength" : 2,
44660702
DM
19905 "optional" : 1,
19906 "type" : "string"
56122987 19907 },
44660702
DM
19908 "macro" : {
19909 "maxLength" : 128,
19910 "optional" : 1,
19911 "type" : "string"
19912 },
19913 "moveto" : {
19914 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
19915 "minimum" : 0,
7aacca6f 19916 "optional" : 1,
4bd7df8b
DM
19917 "type" : "integer",
19918 "typetext" : "integer (0- N)"
44660702
DM
19919 },
19920 "node" : {
19921 "description" : "The cluster node name.",
19922 "format" : "pve-node",
19923 "type" : "string"
56122987
DM
19924 },
19925 "pos" : {
44660702 19926 "description" : "Update rule at position <pos>.",
7aacca6f 19927 "minimum" : 0,
7aacca6f 19928 "optional" : 1,
4bd7df8b
DM
19929 "type" : "integer",
19930 "typetext" : "integer (0- N)"
7aacca6f 19931 },
44660702
DM
19932 "proto" : {
19933 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19934 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
19935 "optional" : 1,
19936 "type" : "string"
19937 },
44660702
DM
19938 "source" : {
19939 "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.",
19940 "format" : "pve-fw-addr-spec",
56122987 19941 "optional" : 1,
44660702 19942 "type" : "string"
7aacca6f 19943 },
44660702
DM
19944 "sport" : {
19945 "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.",
19946 "format" : "pve-fw-sport-spec",
19947 "optional" : 1,
19948 "type" : "string"
19949 },
19950 "type" : {
19951 "enum" : [
19952 "in",
19953 "out",
19954 "group"
19955 ],
19956 "optional" : 1,
19957 "type" : "string"
56122987 19958 }
44660702 19959 }
56122987 19960 },
56122987
DM
19961 "permissions" : {
19962 "check" : [
19963 "perm",
19964 "/nodes/{node}",
19965 [
19966 "Sys.Modify"
19967 ]
19968 ]
7aacca6f 19969 },
44660702 19970 "protected" : 1,
7aacca6f 19971 "proxyto" : "node",
7aacca6f
DM
19972 "returns" : {
19973 "type" : "null"
56122987
DM
19974 }
19975 }
7aacca6f 19976 },
44660702 19977 "leaf" : 1,
7aacca6f 19978 "path" : "/nodes/{node}/firewall/rules/{pos}",
44660702 19979 "text" : "{pos}"
56122987
DM
19980 }
19981 ],
56122987
DM
19982 "info" : {
19983 "GET" : {
44660702
DM
19984 "description" : "List rules.",
19985 "method" : "GET",
19986 "name" : "get_rules",
19987 "parameters" : {
19988 "additionalProperties" : 0,
19989 "properties" : {
19990 "node" : {
19991 "description" : "The cluster node name.",
19992 "format" : "pve-node",
19993 "type" : "string"
19994 }
19995 }
19996 },
19997 "permissions" : {
19998 "check" : [
19999 "perm",
20000 "/nodes/{node}",
20001 [
20002 "Sys.Audit"
20003 ]
20004 ]
20005 },
20006 "proxyto" : "node",
56122987 20007 "returns" : {
56122987
DM
20008 "items" : {
20009 "properties" : {
20010 "pos" : {
20011 "type" : "integer"
20012 }
44660702
DM
20013 },
20014 "type" : "object"
56122987 20015 },
7aacca6f
DM
20016 "links" : [
20017 {
20018 "href" : "{pos}",
20019 "rel" : "child"
20020 }
20021 ],
20022 "type" : "array"
44660702 20023 }
56122987
DM
20024 },
20025 "POST" : {
44660702 20026 "description" : "Create new rule.",
7aacca6f
DM
20027 "method" : "POST",
20028 "name" : "create_rule",
56122987 20029 "parameters" : {
44660702 20030 "additionalProperties" : 0,
56122987 20031 "properties" : {
7aacca6f 20032 "action" : {
7aacca6f 20033 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
44660702 20034 "maxLength" : 20,
7aacca6f
DM
20035 "minLength" : 2,
20036 "optional" : 0,
44660702
DM
20037 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
20038 "type" : "string"
56122987 20039 },
44660702 20040 "comment" : {
56122987 20041 "optional" : 1,
44660702 20042 "type" : "string"
56122987 20043 },
44660702
DM
20044 "dest" : {
20045 "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.",
20046 "format" : "pve-fw-addr-spec",
7aacca6f 20047 "optional" : 1,
44660702 20048 "type" : "string"
56122987 20049 },
44660702
DM
20050 "digest" : {
20051 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
20052 "maxLength" : 40,
20053 "optional" : 1,
20054 "type" : "string"
56122987 20055 },
44660702
DM
20056 "dport" : {
20057 "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.",
20058 "format" : "pve-fw-dport-spec",
7aacca6f
DM
20059 "optional" : 1,
20060 "type" : "string"
56122987 20061 },
44660702
DM
20062 "enable" : {
20063 "minimum" : 0,
20064 "optional" : 1,
4bd7df8b
DM
20065 "type" : "integer",
20066 "typetext" : "integer (0- N)"
44660702 20067 },
7aacca6f 20068 "iface" : {
44660702 20069 "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.",
7aacca6f 20070 "format" : "pve-iface",
56122987 20071 "maxLength" : 20,
7aacca6f 20072 "minLength" : 2,
7aacca6f 20073 "optional" : 1,
56122987
DM
20074 "type" : "string"
20075 },
44660702
DM
20076 "macro" : {
20077 "maxLength" : 128,
7aacca6f
DM
20078 "optional" : 1,
20079 "type" : "string"
56122987 20080 },
44660702
DM
20081 "node" : {
20082 "description" : "The cluster node name.",
20083 "format" : "pve-node",
20084 "type" : "string"
20085 },
20086 "pos" : {
20087 "description" : "Update rule at position <pos>.",
20088 "minimum" : 0,
20089 "optional" : 1,
4bd7df8b
DM
20090 "type" : "integer",
20091 "typetext" : "integer (0- N)"
44660702
DM
20092 },
20093 "proto" : {
20094 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
20095 "format" : "pve-fw-protocol-spec",
56122987 20096 "optional" : 1,
44660702 20097 "type" : "string"
56122987 20098 },
7aacca6f 20099 "source" : {
7aacca6f 20100 "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.",
44660702
DM
20101 "format" : "pve-fw-addr-spec",
20102 "optional" : 1,
20103 "type" : "string"
7aacca6f 20104 },
44660702
DM
20105 "sport" : {
20106 "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.",
20107 "format" : "pve-fw-sport-spec",
7aacca6f 20108 "optional" : 1,
44660702
DM
20109 "type" : "string"
20110 },
20111 "type" : {
20112 "enum" : [
20113 "in",
20114 "out",
20115 "group"
20116 ],
20117 "optional" : 0,
20118 "type" : "string"
56122987 20119 }
44660702 20120 }
7aacca6f 20121 },
56122987
DM
20122 "permissions" : {
20123 "check" : [
20124 "perm",
20125 "/nodes/{node}",
20126 [
20127 "Sys.Modify"
20128 ]
20129 ]
20130 },
44660702
DM
20131 "protected" : 1,
20132 "proxyto" : "node",
20133 "returns" : {
20134 "type" : "null"
20135 }
56122987
DM
20136 }
20137 },
44660702 20138 "leaf" : 0,
7aacca6f 20139 "path" : "/nodes/{node}/firewall/rules",
44660702 20140 "text" : "rules"
56122987
DM
20141 },
20142 {
56122987 20143 "info" : {
44660702
DM
20144 "GET" : {
20145 "description" : "Get host firewall options.",
20146 "method" : "GET",
20147 "name" : "get_options",
56122987 20148 "parameters" : {
7aacca6f 20149 "additionalProperties" : 0,
56122987 20150 "properties" : {
44660702
DM
20151 "node" : {
20152 "description" : "The cluster node name.",
20153 "format" : "pve-node",
20154 "type" : "string"
20155 }
20156 }
20157 },
20158 "permissions" : {
20159 "check" : [
20160 "perm",
20161 "/nodes/{node}",
20162 [
20163 "Sys.Audit"
20164 ]
20165 ]
20166 },
20167 "proxyto" : "node",
20168 "returns" : {
20169 "properties" : {
20170 "enable" : {
20171 "description" : "Enable host firewall rules.",
7aacca6f 20172 "optional" : 1,
44660702 20173 "type" : "boolean"
7aacca6f 20174 },
44660702
DM
20175 "log_level_in" : {
20176 "description" : "Log level for incoming traffic.",
56122987
DM
20177 "enum" : [
20178 "emerg",
20179 "alert",
20180 "crit",
20181 "err",
20182 "warning",
20183 "notice",
20184 "info",
20185 "debug",
20186 "nolog"
20187 ],
56122987 20188 "optional" : 1,
44660702
DM
20189 "type" : "string"
20190 },
20191 "log_level_out" : {
20192 "description" : "Log level for outgoing traffic.",
56122987
DM
20193 "enum" : [
20194 "emerg",
20195 "alert",
20196 "crit",
20197 "err",
20198 "warning",
20199 "notice",
20200 "info",
20201 "debug",
20202 "nolog"
20203 ],
44660702
DM
20204 "optional" : 1,
20205 "type" : "string"
20206 },
20207 "ndp" : {
20208 "description" : "Enable NDP.",
20209 "optional" : 1,
20210 "type" : "boolean"
20211 },
20212 "nf_conntrack_max" : {
20213 "description" : "Maximum number of tracked connections.",
20214 "minimum" : 32768,
20215 "optional" : 1,
20216 "type" : "integer"
20217 },
20218 "nf_conntrack_tcp_timeout_established" : {
20219 "description" : "Conntrack established timeout.",
20220 "minimum" : 7875,
20221 "optional" : 1,
20222 "type" : "integer"
20223 },
20224 "nosmurfs" : {
20225 "description" : "Enable SMURFS filter.",
20226 "optional" : 1,
20227 "type" : "boolean"
56122987 20228 },
7aacca6f 20229 "smurf_log_level" : {
44660702 20230 "description" : "Log level for SMURFS filter.",
56122987
DM
20231 "enum" : [
20232 "emerg",
20233 "alert",
20234 "crit",
20235 "err",
20236 "warning",
20237 "notice",
20238 "info",
20239 "debug",
20240 "nolog"
7aacca6f 20241 ],
7aacca6f
DM
20242 "optional" : 1,
20243 "type" : "string"
56122987 20244 },
44660702
DM
20245 "tcp_flags_log_level" : {
20246 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
20247 "enum" : [
20248 "emerg",
20249 "alert",
20250 "crit",
20251 "err",
20252 "warning",
20253 "notice",
20254 "info",
20255 "debug",
20256 "nolog"
20257 ],
44660702
DM
20258 "optional" : 1,
20259 "type" : "string"
7aacca6f 20260 },
44660702
DM
20261 "tcpflags" : {
20262 "description" : "Filter illegal combinations of TCP flags.",
56122987 20263 "optional" : 1,
44660702 20264 "type" : "boolean"
56122987 20265 }
44660702
DM
20266 },
20267 "type" : "object"
7aacca6f 20268 }
56122987 20269 },
44660702
DM
20270 "PUT" : {
20271 "description" : "Set Firewall options.",
20272 "method" : "PUT",
20273 "name" : "set_options",
7aacca6f 20274 "parameters" : {
44660702 20275 "additionalProperties" : 0,
7aacca6f 20276 "properties" : {
44660702
DM
20277 "delete" : {
20278 "description" : "A list of settings you want to delete.",
20279 "format" : "pve-configid-list",
7aacca6f 20280 "optional" : 1,
44660702 20281 "type" : "string"
56122987 20282 },
44660702
DM
20283 "digest" : {
20284 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
20285 "maxLength" : 40,
20286 "optional" : 1,
20287 "type" : "string"
56122987 20288 },
44660702
DM
20289 "enable" : {
20290 "description" : "Enable host firewall rules.",
7aacca6f 20291 "optional" : 1,
44660702
DM
20292 "type" : "boolean"
20293 },
20294 "log_level_in" : {
20295 "description" : "Log level for incoming traffic.",
56122987
DM
20296 "enum" : [
20297 "emerg",
20298 "alert",
20299 "crit",
20300 "err",
20301 "warning",
20302 "notice",
20303 "info",
20304 "debug",
20305 "nolog"
44660702 20306 ],
7aacca6f 20307 "optional" : 1,
44660702 20308 "type" : "string"
7aacca6f 20309 },
44660702
DM
20310 "log_level_out" : {
20311 "description" : "Log level for outgoing traffic.",
56122987
DM
20312 "enum" : [
20313 "emerg",
20314 "alert",
20315 "crit",
20316 "err",
20317 "warning",
20318 "notice",
20319 "info",
20320 "debug",
20321 "nolog"
20322 ],
20323 "optional" : 1,
7aacca6f 20324 "type" : "string"
56122987 20325 },
44660702
DM
20326 "ndp" : {
20327 "description" : "Enable NDP.",
7aacca6f 20328 "optional" : 1,
44660702
DM
20329 "type" : "boolean"
20330 },
20331 "nf_conntrack_max" : {
20332 "description" : "Maximum number of tracked connections.",
20333 "minimum" : 32768,
20334 "optional" : 1,
4bd7df8b
DM
20335 "type" : "integer",
20336 "typetext" : "integer (32768- N)"
44660702
DM
20337 },
20338 "nf_conntrack_tcp_timeout_established" : {
20339 "description" : "Conntrack established timeout.",
20340 "minimum" : 7875,
20341 "optional" : 1,
4bd7df8b
DM
20342 "type" : "integer",
20343 "typetext" : "integer (7875- N)"
44660702
DM
20344 },
20345 "node" : {
20346 "description" : "The cluster node name.",
20347 "format" : "pve-node",
20348 "type" : "string"
20349 },
20350 "nosmurfs" : {
20351 "description" : "Enable SMURFS filter.",
20352 "optional" : 1,
20353 "type" : "boolean"
20354 },
20355 "smurf_log_level" : {
20356 "description" : "Log level for SMURFS filter.",
56122987
DM
20357 "enum" : [
20358 "emerg",
20359 "alert",
20360 "crit",
20361 "err",
20362 "warning",
20363 "notice",
20364 "info",
20365 "debug",
20366 "nolog"
44660702
DM
20367 ],
20368 "optional" : 1,
20369 "type" : "string"
56122987 20370 },
44660702
DM
20371 "tcp_flags_log_level" : {
20372 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
20373 "enum" : [
20374 "emerg",
20375 "alert",
20376 "crit",
20377 "err",
20378 "warning",
20379 "notice",
20380 "info",
20381 "debug",
20382 "nolog"
20383 ],
44660702
DM
20384 "optional" : 1,
20385 "type" : "string"
7aacca6f 20386 },
44660702
DM
20387 "tcpflags" : {
20388 "description" : "Filter illegal combinations of TCP flags.",
56122987 20389 "optional" : 1,
7aacca6f 20390 "type" : "boolean"
56122987 20391 }
7aacca6f 20392 }
56122987 20393 },
44660702
DM
20394 "permissions" : {
20395 "check" : [
20396 "perm",
20397 "/nodes/{node}",
20398 [
20399 "Sys.Modify"
20400 ]
20401 ]
20402 },
20403 "protected" : 1,
20404 "proxyto" : "node",
20405 "returns" : {
20406 "type" : "null"
20407 }
7aacca6f
DM
20408 }
20409 },
44660702
DM
20410 "leaf" : 1,
20411 "path" : "/nodes/{node}/firewall/options",
7aacca6f
DM
20412 "text" : "options"
20413 },
20414 {
7aacca6f
DM
20415 "info" : {
20416 "GET" : {
44660702
DM
20417 "description" : "Read firewall log",
20418 "method" : "GET",
7aacca6f 20419 "name" : "log",
56122987 20420 "parameters" : {
44660702 20421 "additionalProperties" : 0,
56122987 20422 "properties" : {
7aacca6f 20423 "limit" : {
44660702 20424 "minimum" : 0,
7aacca6f 20425 "optional" : 1,
4bd7df8b
DM
20426 "type" : "integer",
20427 "typetext" : "integer (0- N)"
7aacca6f 20428 },
56122987 20429 "node" : {
7aacca6f 20430 "description" : "The cluster node name.",
44660702 20431 "format" : "pve-node",
7aacca6f 20432 "type" : "string"
44660702
DM
20433 },
20434 "start" : {
20435 "minimum" : 0,
20436 "optional" : 1,
4bd7df8b
DM
20437 "type" : "integer",
20438 "typetext" : "integer (0- N)"
56122987 20439 }
44660702 20440 }
7aacca6f 20441 },
56122987
DM
20442 "permissions" : {
20443 "check" : [
20444 "perm",
20445 "/nodes/{node}",
20446 [
20447 "Sys.Syslog"
20448 ]
20449 ]
20450 },
44660702
DM
20451 "protected" : 1,
20452 "proxyto" : "node",
56122987
DM
20453 "returns" : {
20454 "items" : {
56122987 20455 "properties" : {
56122987 20456 "n" : {
44660702
DM
20457 "description" : "Line number",
20458 "type" : "integer"
7aacca6f
DM
20459 },
20460 "t" : {
44660702
DM
20461 "description" : "Line text",
20462 "type" : "string"
56122987 20463 }
44660702
DM
20464 },
20465 "type" : "object"
56122987
DM
20466 },
20467 "type" : "array"
7aacca6f 20468 }
56122987
DM
20469 }
20470 },
44660702
DM
20471 "leaf" : 1,
20472 "path" : "/nodes/{node}/firewall/log",
7aacca6f 20473 "text" : "log"
56122987
DM
20474 }
20475 ],
20476 "info" : {
20477 "GET" : {
44660702
DM
20478 "description" : "Directory index.",
20479 "method" : "GET",
20480 "name" : "index",
56122987 20481 "parameters" : {
44660702 20482 "additionalProperties" : 0,
56122987
DM
20483 "properties" : {
20484 "node" : {
20485 "description" : "The cluster node name.",
44660702
DM
20486 "format" : "pve-node",
20487 "type" : "string"
56122987 20488 }
44660702 20489 }
56122987 20490 },
7aacca6f
DM
20491 "permissions" : {
20492 "user" : "all"
20493 },
56122987
DM
20494 "returns" : {
20495 "items" : {
20496 "properties" : {},
20497 "type" : "object"
20498 },
56122987
DM
20499 "links" : [
20500 {
44660702
DM
20501 "href" : "{name}",
20502 "rel" : "child"
56122987 20503 }
44660702
DM
20504 ],
20505 "type" : "array"
20506 }
56122987 20507 }
7aacca6f 20508 },
44660702 20509 "leaf" : 0,
7aacca6f 20510 "path" : "/nodes/{node}/firewall",
44660702 20511 "text" : "firewall"
56122987
DM
20512 },
20513 {
56122987
DM
20514 "info" : {
20515 "GET" : {
44660702
DM
20516 "description" : "API version details",
20517 "method" : "GET",
20518 "name" : "version",
56122987 20519 "parameters" : {
44660702 20520 "additionalProperties" : 0,
56122987
DM
20521 "properties" : {
20522 "node" : {
56122987 20523 "description" : "The cluster node name.",
44660702 20524 "format" : "pve-node",
7aacca6f 20525 "type" : "string"
56122987 20526 }
44660702 20527 }
56122987 20528 },
56122987 20529 "permissions" : {
7aacca6f 20530 "user" : "all"
56122987 20531 },
56122987 20532 "proxyto" : "node",
56122987 20533 "returns" : {
56122987 20534 "properties" : {
44660702 20535 "release" : {
56122987
DM
20536 "type" : "string"
20537 },
44660702 20538 "repoid" : {
7aacca6f
DM
20539 "type" : "string"
20540 },
20541 "version" : {
20542 "type" : "string"
20543 }
44660702
DM
20544 },
20545 "type" : "object"
7aacca6f 20546 }
56122987
DM
20547 }
20548 },
56122987 20549 "leaf" : 1,
44660702
DM
20550 "path" : "/nodes/{node}/version",
20551 "text" : "version"
56122987
DM
20552 },
20553 {
56122987
DM
20554 "info" : {
20555 "GET" : {
7aacca6f 20556 "description" : "Read node status",
44660702 20557 "method" : "GET",
7aacca6f 20558 "name" : "status",
56122987 20559 "parameters" : {
44660702 20560 "additionalProperties" : 0,
56122987
DM
20561 "properties" : {
20562 "node" : {
7aacca6f 20563 "description" : "The cluster node name.",
44660702
DM
20564 "format" : "pve-node",
20565 "type" : "string"
56122987 20566 }
44660702 20567 }
56122987 20568 },
56122987
DM
20569 "permissions" : {
20570 "check" : [
20571 "perm",
20572 "/nodes/{node}",
20573 [
20574 "Sys.Audit"
20575 ]
20576 ]
44660702
DM
20577 },
20578 "proxyto" : "node",
20579 "returns" : {
20580 "properties" : {},
20581 "type" : "object"
7aacca6f
DM
20582 }
20583 },
20584 "POST" : {
44660702
DM
20585 "description" : "Reboot or shutdown a node.",
20586 "method" : "POST",
7aacca6f 20587 "name" : "node_cmd",
56122987 20588 "parameters" : {
44660702 20589 "additionalProperties" : 0,
56122987 20590 "properties" : {
7aacca6f
DM
20591 "command" : {
20592 "description" : "Specify the command.",
56122987 20593 "enum" : [
7aacca6f
DM
20594 "reboot",
20595 "shutdown"
56122987
DM
20596 ],
20597 "type" : "string"
44660702
DM
20598 },
20599 "node" : {
20600 "description" : "The cluster node name.",
20601 "format" : "pve-node",
20602 "type" : "string"
56122987 20603 }
44660702 20604 }
7aacca6f 20605 },
7aacca6f
DM
20606 "permissions" : {
20607 "check" : [
20608 "perm",
20609 "/nodes/{node}",
20610 [
20611 "Sys.PowerMgmt"
20612 ]
20613 ]
20614 },
44660702 20615 "protected" : 1,
7aacca6f 20616 "proxyto" : "node",
7aacca6f
DM
20617 "returns" : {
20618 "type" : "null"
56122987
DM
20619 }
20620 }
20621 },
7aacca6f 20622 "leaf" : 1,
44660702
DM
20623 "path" : "/nodes/{node}/status",
20624 "text" : "status"
56122987
DM
20625 },
20626 {
56122987
DM
20627 "info" : {
20628 "GET" : {
44660702
DM
20629 "description" : "Read tap/vm network device interface counters",
20630 "method" : "GET",
20631 "name" : "netstat",
20632 "parameters" : {
20633 "additionalProperties" : 0,
20634 "properties" : {
20635 "node" : {
20636 "description" : "The cluster node name.",
20637 "format" : "pve-node",
20638 "type" : "string"
20639 }
56122987
DM
20640 }
20641 },
20642 "permissions" : {
20643 "check" : [
20644 "perm",
20645 "/nodes/{node}",
20646 [
7aacca6f 20647 "Sys.Audit"
56122987
DM
20648 ]
20649 ]
20650 },
7aacca6f 20651 "proxyto" : "node",
44660702
DM
20652 "returns" : {
20653 "items" : {
20654 "properties" : {},
20655 "type" : "object"
20656 },
20657 "type" : "array"
20658 }
7aacca6f
DM
20659 }
20660 },
44660702
DM
20661 "leaf" : 1,
20662 "path" : "/nodes/{node}/netstat",
7aacca6f
DM
20663 "text" : "netstat"
20664 },
20665 {
20666 "info" : {
20667 "POST" : {
7aacca6f 20668 "description" : "Execute multiple commands in order.",
7aacca6f 20669 "method" : "POST",
7aacca6f 20670 "name" : "execute",
56122987
DM
20671 "parameters" : {
20672 "additionalProperties" : 0,
20673 "properties" : {
7aacca6f
DM
20674 "commands" : {
20675 "description" : "JSON encoded array of commands.",
56122987
DM
20676 "type" : "string"
20677 },
20678 "node" : {
44660702 20679 "description" : "The cluster node name.",
56122987 20680 "format" : "pve-node",
44660702 20681 "type" : "string"
56122987
DM
20682 }
20683 }
44660702
DM
20684 },
20685 "permissions" : {
20686 "check" : [
20687 "perm",
20688 "/nodes/{node}",
20689 [
20690 "Sys.Audit"
20691 ]
20692 ]
20693 },
20694 "protected" : 1,
20695 "proxyto" : "node",
20696 "returns" : {
20697 "properties" : {},
20698 "type" : "array"
56122987
DM
20699 }
20700 }
20701 },
56122987 20702 "leaf" : 1,
44660702
DM
20703 "path" : "/nodes/{node}/execute",
20704 "text" : "execute"
56122987
DM
20705 },
20706 {
20707 "info" : {
7aacca6f 20708 "GET" : {
44660702
DM
20709 "description" : "Read node RRD statistics (returns PNG)",
20710 "method" : "GET",
7aacca6f 20711 "name" : "rrd",
56122987 20712 "parameters" : {
7aacca6f 20713 "additionalProperties" : 0,
56122987 20714 "properties" : {
44660702
DM
20715 "cf" : {
20716 "description" : "The RRD consolidation function",
20717 "enum" : [
20718 "AVERAGE",
20719 "MAX"
20720 ],
20721 "optional" : 1,
20722 "type" : "string"
20723 },
7aacca6f 20724 "ds" : {
7aacca6f 20725 "description" : "The list of datasources you want to display.",
44660702
DM
20726 "format" : "pve-configid-list",
20727 "type" : "string"
20728 },
20729 "node" : {
20730 "description" : "The cluster node name.",
20731 "format" : "pve-node",
20732 "type" : "string"
7aacca6f
DM
20733 },
20734 "timeframe" : {
20735 "description" : "Specify the time frame you are interested in.",
20736 "enum" : [
20737 "hour",
20738 "day",
20739 "week",
20740 "month",
20741 "year"
20742 ],
20743 "type" : "string"
56122987 20744 }
7aacca6f 20745 }
56122987 20746 },
56122987 20747 "permissions" : {
56122987
DM
20748 "check" : [
20749 "perm",
20750 "/nodes/{node}",
20751 [
7aacca6f 20752 "Sys.Audit"
56122987
DM
20753 ]
20754 ]
20755 },
7aacca6f 20756 "protected" : 1,
56122987 20757 "returns" : {
56122987 20758 "properties" : {
7aacca6f 20759 "filename" : {
56122987
DM
20760 "type" : "string"
20761 }
44660702
DM
20762 },
20763 "type" : "object"
20764 }
56122987
DM
20765 }
20766 },
44660702 20767 "leaf" : 1,
7aacca6f 20768 "path" : "/nodes/{node}/rrd",
44660702 20769 "text" : "rrd"
56122987
DM
20770 },
20771 {
20772 "info" : {
7aacca6f 20773 "GET" : {
44660702
DM
20774 "description" : "Read node RRD statistics",
20775 "method" : "GET",
7aacca6f 20776 "name" : "rrddata",
56122987 20777 "parameters" : {
44660702 20778 "additionalProperties" : 0,
56122987 20779 "properties" : {
7aacca6f 20780 "cf" : {
7aacca6f
DM
20781 "description" : "The RRD consolidation function",
20782 "enum" : [
20783 "AVERAGE",
20784 "MAX"
44660702
DM
20785 ],
20786 "optional" : 1,
20787 "type" : "string"
56122987
DM
20788 },
20789 "node" : {
44660702 20790 "description" : "The cluster node name.",
56122987 20791 "format" : "pve-node",
44660702 20792 "type" : "string"
56122987 20793 },
7aacca6f 20794 "timeframe" : {
7aacca6f
DM
20795 "description" : "Specify the time frame you are interested in.",
20796 "enum" : [
20797 "hour",
20798 "day",
20799 "week",
20800 "month",
20801 "year"
44660702
DM
20802 ],
20803 "type" : "string"
56122987 20804 }
56122987
DM
20805 }
20806 },
56122987
DM
20807 "permissions" : {
20808 "check" : [
20809 "perm",
20810 "/nodes/{node}",
20811 [
44660702 20812 "Sys.Audit"
56122987
DM
20813 ]
20814 ]
7aacca6f 20815 },
44660702 20816 "protected" : 1,
56122987 20817 "returns" : {
7aacca6f 20818 "items" : {
44660702 20819 "properties" : {},
7aacca6f
DM
20820 "type" : "object"
20821 },
20822 "type" : "array"
44660702
DM
20823 }
20824 }
20825 },
20826 "leaf" : 1,
20827 "path" : "/nodes/{node}/rrddata",
20828 "text" : "rrddata"
20829 },
20830 {
20831 "info" : {
20832 "GET" : {
20833 "description" : "Read system log",
20834 "method" : "GET",
20835 "name" : "syslog",
56122987 20836 "parameters" : {
44660702 20837 "additionalProperties" : 0,
56122987 20838 "properties" : {
44660702
DM
20839 "limit" : {
20840 "minimum" : 0,
7aacca6f 20841 "optional" : 1,
4bd7df8b
DM
20842 "type" : "integer",
20843 "typetext" : "integer (0- N)"
7aacca6f 20844 },
56122987 20845 "node" : {
7aacca6f 20846 "description" : "The cluster node name.",
44660702
DM
20847 "format" : "pve-node",
20848 "type" : "string"
56122987 20849 },
44660702
DM
20850 "since" : {
20851 "description" : "Display all log since this date-time string.",
20852 "optional" : 1,
20853 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
20854 "type" : "string"
20855 },
20856 "start" : {
7aacca6f
DM
20857 "minimum" : 0,
20858 "optional" : 1,
4bd7df8b
DM
20859 "type" : "integer",
20860 "typetext" : "integer (0- N)"
7aacca6f
DM
20861 },
20862 "until" : {
20863 "description" : "Display all log until this date-time string.",
7aacca6f 20864 "optional" : 1,
44660702 20865 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
56122987
DM
20866 "type" : "string"
20867 }
44660702 20868 }
56122987 20869 },
44660702
DM
20870 "permissions" : {
20871 "check" : [
20872 "perm",
20873 "/nodes/{node}",
20874 [
20875 "Sys.Syslog"
20876 ]
20877 ]
20878 },
20879 "protected" : 1,
20880 "proxyto" : "node",
20881 "returns" : {
20882 "items" : {
20883 "properties" : {
20884 "n" : {
20885 "description" : "Line number",
20886 "type" : "integer"
20887 },
20888 "t" : {
20889 "description" : "Line text",
20890 "type" : "string"
20891 }
20892 },
20893 "type" : "object"
20894 },
20895 "type" : "array"
20896 }
56122987
DM
20897 }
20898 },
44660702
DM
20899 "leaf" : 1,
20900 "path" : "/nodes/{node}/syslog",
7aacca6f 20901 "text" : "syslog"
56122987
DM
20902 },
20903 {
56122987
DM
20904 "info" : {
20905 "POST" : {
44660702
DM
20906 "description" : "Creates a VNC Shell proxy.",
20907 "method" : "POST",
20908 "name" : "vncshell",
20909 "parameters" : {
20910 "additionalProperties" : 0,
56122987 20911 "properties" : {
44660702
DM
20912 "node" : {
20913 "description" : "The cluster node name.",
20914 "format" : "pve-node",
7aacca6f
DM
20915 "type" : "string"
20916 },
44660702
DM
20917 "upgrade" : {
20918 "default" : 0,
20919 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20920 "optional" : 1,
20921 "type" : "boolean"
7aacca6f 20922 },
44660702
DM
20923 "websocket" : {
20924 "description" : "use websocket instead of standard vnc.",
20925 "optional" : 1,
20926 "type" : "boolean"
56122987 20927 }
44660702 20928 }
56122987 20929 },
56122987
DM
20930 "permissions" : {
20931 "check" : [
20932 "perm",
7aacca6f 20933 "/nodes/{node}",
56122987 20934 [
7aacca6f 20935 "Sys.Console"
56122987 20936 ]
44660702
DM
20937 ],
20938 "description" : "Restricted to users on realm 'pam'"
56122987 20939 },
44660702
DM
20940 "protected" : 1,
20941 "returns" : {
20942 "additionalProperties" : 0,
56122987 20943 "properties" : {
44660702
DM
20944 "cert" : {
20945 "type" : "string"
7aacca6f 20946 },
44660702
DM
20947 "port" : {
20948 "type" : "integer"
7aacca6f 20949 },
44660702
DM
20950 "ticket" : {
20951 "type" : "string"
20952 },
20953 "upid" : {
20954 "type" : "string"
20955 },
20956 "user" : {
20957 "type" : "string"
56122987 20958 }
44660702
DM
20959 }
20960 }
56122987
DM
20961 }
20962 },
7aacca6f 20963 "leaf" : 1,
44660702
DM
20964 "path" : "/nodes/{node}/vncshell",
20965 "text" : "vncshell"
56122987
DM
20966 },
20967 {
20968 "info" : {
20969 "GET" : {
7aacca6f 20970 "description" : "Opens a weksocket for VNC traffic.",
44660702
DM
20971 "method" : "GET",
20972 "name" : "vncwebsocket",
56122987 20973 "parameters" : {
44660702 20974 "additionalProperties" : 0,
56122987
DM
20975 "properties" : {
20976 "node" : {
20977 "description" : "The cluster node name.",
44660702 20978 "format" : "pve-node",
7aacca6f
DM
20979 "type" : "string"
20980 },
20981 "port" : {
7aacca6f
DM
20982 "description" : "Port number returned by previous vncproxy call.",
20983 "maximum" : 5999,
44660702 20984 "minimum" : 5900,
4bd7df8b
DM
20985 "type" : "integer",
20986 "typetext" : "integer (5900-5999)"
44660702
DM
20987 },
20988 "vncticket" : {
20989 "description" : "Ticket from previous call to vncproxy.",
20990 "maxLength" : 512,
20991 "type" : "string"
56122987 20992 }
44660702 20993 }
56122987 20994 },
56122987
DM
20995 "permissions" : {
20996 "check" : [
20997 "perm",
20998 "/nodes/{node}",
20999 [
7aacca6f 21000 "Sys.Console"
56122987 21001 ]
44660702
DM
21002 ],
21003 "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)."
21004 },
21005 "returns" : {
21006 "properties" : {
21007 "port" : {
21008 "type" : "string"
21009 }
21010 },
21011 "type" : "object"
7aacca6f 21012 }
56122987
DM
21013 }
21014 },
44660702 21015 "leaf" : 1,
7aacca6f 21016 "path" : "/nodes/{node}/vncwebsocket",
44660702 21017 "text" : "vncwebsocket"
56122987
DM
21018 },
21019 {
21020 "info" : {
21021 "POST" : {
44660702 21022 "description" : "Creates a SPICE shell.",
7aacca6f 21023 "method" : "POST",
44660702 21024 "name" : "spiceshell",
56122987 21025 "parameters" : {
7aacca6f 21026 "additionalProperties" : 0,
56122987 21027 "properties" : {
7aacca6f 21028 "node" : {
44660702 21029 "description" : "The cluster node name.",
56122987 21030 "format" : "pve-node",
7aacca6f
DM
21031 "type" : "string"
21032 },
44660702
DM
21033 "proxy" : {
21034 "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).",
21035 "format" : "address",
21036 "optional" : 1,
7aacca6f
DM
21037 "type" : "string"
21038 },
44660702
DM
21039 "upgrade" : {
21040 "default" : 0,
21041 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
21042 "optional" : 1,
21043 "type" : "boolean"
56122987 21044 }
7aacca6f 21045 }
56122987 21046 },
56122987
DM
21047 "permissions" : {
21048 "check" : [
21049 "perm",
7aacca6f 21050 "/nodes/{node}",
56122987 21051 [
7aacca6f 21052 "Sys.Console"
56122987 21053 ]
7aacca6f
DM
21054 ],
21055 "description" : "Restricted to users on realm 'pam'"
44660702
DM
21056 },
21057 "protected" : 1,
21058 "proxyto" : "node",
21059 "returns" : {
21060 "additionalProperties" : 1,
21061 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
21062 "properties" : {
21063 "host" : {
21064 "type" : "string"
21065 },
21066 "password" : {
21067 "type" : "string"
21068 },
21069 "proxy" : {
21070 "type" : "string"
21071 },
21072 "tls-port" : {
21073 "type" : "integer"
21074 },
21075 "type" : {
21076 "type" : "string"
21077 }
21078 }
7aacca6f 21079 }
56122987
DM
21080 }
21081 },
56122987 21082 "leaf" : 1,
44660702
DM
21083 "path" : "/nodes/{node}/spiceshell",
21084 "text" : "spiceshell"
56122987
DM
21085 },
21086 {
56122987 21087 "info" : {
7aacca6f 21088 "GET" : {
44660702 21089 "description" : "Read DNS settings.",
7aacca6f 21090 "method" : "GET",
44660702
DM
21091 "name" : "dns",
21092 "parameters" : {
7aacca6f
DM
21093 "additionalProperties" : 0,
21094 "properties" : {
44660702
DM
21095 "node" : {
21096 "description" : "The cluster node name.",
21097 "format" : "pve-node",
21098 "type" : "string"
7aacca6f
DM
21099 }
21100 }
21101 },
7aacca6f
DM
21102 "permissions" : {
21103 "check" : [
21104 "perm",
21105 "/nodes/{node}",
21106 [
21107 "Sys.Audit"
21108 ]
21109 ]
21110 },
44660702
DM
21111 "proxyto" : "node",
21112 "returns" : {
56122987
DM
21113 "additionalProperties" : 0,
21114 "properties" : {
44660702
DM
21115 "dns1" : {
21116 "description" : "First name server IP address.",
21117 "optional" : 1,
21118 "type" : "string"
21119 },
21120 "dns2" : {
21121 "description" : "Second name server IP address.",
21122 "optional" : 1,
21123 "type" : "string"
21124 },
21125 "dns3" : {
21126 "description" : "Third name server IP address.",
21127 "optional" : 1,
21128 "type" : "string"
21129 },
21130 "search" : {
21131 "description" : "Search domain for host-name lookup.",
21132 "optional" : 1,
21133 "type" : "string"
7aacca6f 21134 }
44660702
DM
21135 },
21136 "type" : "object"
21137 }
7aacca6f
DM
21138 },
21139 "PUT" : {
44660702
DM
21140 "description" : "Write DNS settings.",
21141 "method" : "PUT",
7aacca6f
DM
21142 "name" : "update_dns",
21143 "parameters" : {
21144 "additionalProperties" : 0,
21145 "properties" : {
44660702
DM
21146 "dns1" : {
21147 "description" : "First name server IP address.",
21148 "format" : "ip",
21149 "optional" : 1,
7aacca6f
DM
21150 "type" : "string"
21151 },
44660702
DM
21152 "dns2" : {
21153 "description" : "Second name server IP address.",
21154 "format" : "ip",
7aacca6f 21155 "optional" : 1,
44660702 21156 "type" : "string"
7aacca6f 21157 },
44660702
DM
21158 "dns3" : {
21159 "description" : "Third name server IP address.",
21160 "format" : "ip",
7aacca6f 21161 "optional" : 1,
44660702 21162 "type" : "string"
7aacca6f
DM
21163 },
21164 "node" : {
44660702 21165 "description" : "The cluster node name.",
56122987 21166 "format" : "pve-node",
44660702 21167 "type" : "string"
7aacca6f 21168 },
44660702
DM
21169 "search" : {
21170 "description" : "Search domain for host-name lookup.",
21171 "type" : "string"
56122987
DM
21172 }
21173 }
21174 },
21175 "permissions" : {
21176 "check" : [
21177 "perm",
7aacca6f 21178 "/nodes/{node}",
56122987 21179 [
7aacca6f 21180 "Sys.Modify"
56122987
DM
21181 ]
21182 ]
21183 },
44660702 21184 "protected" : 1,
7aacca6f 21185 "proxyto" : "node",
56122987 21186 "returns" : {
7aacca6f
DM
21187 "type" : "null"
21188 }
56122987 21189 }
44660702
DM
21190 },
21191 "leaf" : 1,
21192 "path" : "/nodes/{node}/dns",
21193 "text" : "dns"
56122987
DM
21194 },
21195 {
21196 "info" : {
7aacca6f 21197 "GET" : {
7aacca6f 21198 "description" : "Read server time and time zone settings.",
44660702
DM
21199 "method" : "GET",
21200 "name" : "time",
56122987 21201 "parameters" : {
44660702 21202 "additionalProperties" : 0,
56122987
DM
21203 "properties" : {
21204 "node" : {
44660702 21205 "description" : "The cluster node name.",
56122987 21206 "format" : "pve-node",
44660702 21207 "type" : "string"
56122987 21208 }
44660702 21209 }
56122987
DM
21210 },
21211 "permissions" : {
21212 "check" : [
21213 "perm",
7aacca6f 21214 "/nodes/{node}",
56122987 21215 [
7aacca6f 21216 "Sys.Audit"
56122987
DM
21217 ]
21218 ]
44660702
DM
21219 },
21220 "proxyto" : "node",
21221 "returns" : {
21222 "additionalProperties" : 0,
21223 "properties" : {
21224 "localtime" : {
21225 "description" : "Seconds since 1970-01-01 00:00:00 (local time)",
21226 "minimum" : 1297163644,
21227 "type" : "integer"
21228 },
21229 "time" : {
21230 "description" : "Seconds since 1970-01-01 00:00:00 UTC.",
21231 "minimum" : 1297163644,
21232 "type" : "integer"
21233 },
21234 "timezone" : {
21235 "description" : "Time zone",
21236 "type" : "string"
21237 }
21238 },
21239 "type" : "object"
7aacca6f
DM
21240 }
21241 },
21242 "PUT" : {
7aacca6f 21243 "description" : "Set time zone.",
44660702
DM
21244 "method" : "PUT",
21245 "name" : "set_timezone",
21246 "parameters" : {
21247 "additionalProperties" : 0,
21248 "properties" : {
21249 "node" : {
21250 "description" : "The cluster node name.",
21251 "format" : "pve-node",
21252 "type" : "string"
21253 },
21254 "timezone" : {
21255 "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
21256 "type" : "string"
21257 }
21258 }
21259 },
7aacca6f
DM
21260 "permissions" : {
21261 "check" : [
21262 "perm",
21263 "/nodes/{node}",
21264 [
21265 "Sys.Modify"
21266 ]
21267 ]
56122987 21268 },
7aacca6f 21269 "protected" : 1,
44660702
DM
21270 "proxyto" : "node",
21271 "returns" : {
21272 "type" : "null"
21273 }
7aacca6f
DM
21274 }
21275 },
7aacca6f 21276 "leaf" : 1,
44660702
DM
21277 "path" : "/nodes/{node}/time",
21278 "text" : "time"
7aacca6f
DM
21279 },
21280 {
21281 "info" : {
44660702
DM
21282 "GET" : {
21283 "description" : "Get list of appliances.",
21284 "method" : "GET",
21285 "name" : "aplinfo",
7aacca6f
DM
21286 "parameters" : {
21287 "additionalProperties" : 0,
21288 "properties" : {
7aacca6f 21289 "node" : {
44660702 21290 "description" : "The cluster node name.",
7aacca6f 21291 "format" : "pve-node",
44660702 21292 "type" : "string"
7aacca6f
DM
21293 }
21294 }
56122987 21295 },
7aacca6f 21296 "permissions" : {
44660702 21297 "user" : "all"
56122987 21298 },
44660702 21299 "proxyto" : "node",
7aacca6f
DM
21300 "returns" : {
21301 "items" : {
44660702
DM
21302 "properties" : {},
21303 "type" : "object"
7aacca6f
DM
21304 },
21305 "type" : "array"
44660702
DM
21306 }
21307 },
21308 "POST" : {
21309 "description" : "Download appliance templates.",
21310 "method" : "POST",
21311 "name" : "apl_download",
7aacca6f
DM
21312 "parameters" : {
21313 "additionalProperties" : 0,
21314 "properties" : {
21315 "node" : {
7aacca6f 21316 "description" : "The cluster node name.",
44660702
DM
21317 "format" : "pve-node",
21318 "type" : "string"
21319 },
21320 "storage" : {
4bd7df8b 21321 "description" : "The storage where the template will be stored",
44660702
DM
21322 "format" : "pve-storage-id",
21323 "type" : "string"
21324 },
21325 "template" : {
21326 "description" : "The template wich will downloaded",
21327 "maxLength" : 255,
7aacca6f
DM
21328 "type" : "string"
21329 }
21330 }
56122987 21331 },
7aacca6f 21332 "permissions" : {
44660702
DM
21333 "check" : [
21334 "perm",
21335 "/storage/{storage}",
21336 [
21337 "Datastore.AllocateTemplate"
21338 ]
21339 ]
21340 },
21341 "protected" : 1,
21342 "proxyto" : "node",
21343 "returns" : {
21344 "type" : "string"
7aacca6f
DM
21345 }
21346 }
21347 },
7aacca6f 21348 "leaf" : 1,
44660702
DM
21349 "path" : "/nodes/{node}/aplinfo",
21350 "text" : "aplinfo"
7aacca6f
DM
21351 },
21352 {
21353 "info" : {
21354 "GET" : {
44660702
DM
21355 "description" : "Gather various systems information about a node",
21356 "method" : "GET",
21357 "name" : "report",
7aacca6f 21358 "parameters" : {
44660702 21359 "additionalProperties" : 0,
7aacca6f
DM
21360 "properties" : {
21361 "node" : {
7aacca6f 21362 "description" : "The cluster node name.",
44660702 21363 "format" : "pve-node",
7aacca6f
DM
21364 "type" : "string"
21365 }
44660702 21366 }
56122987 21367 },
7aacca6f
DM
21368 "permissions" : {
21369 "check" : [
21370 "perm",
21371 "/nodes/{node}",
21372 [
21373 "Sys.Audit"
21374 ]
21375 ]
56122987 21376 },
44660702 21377 "protected" : 1,
7aacca6f
DM
21378 "proxyto" : "node",
21379 "returns" : {
56122987 21380 "type" : "string"
7aacca6f
DM
21381 }
21382 }
21383 },
7aacca6f 21384 "leaf" : 1,
44660702
DM
21385 "path" : "/nodes/{node}/report",
21386 "text" : "report"
7aacca6f
DM
21387 },
21388 {
7aacca6f
DM
21389 "info" : {
21390 "POST" : {
44660702 21391 "description" : "Start all VMs and containers (when onboot=1).",
7aacca6f 21392 "method" : "POST",
44660702 21393 "name" : "startall",
7aacca6f 21394 "parameters" : {
44660702 21395 "additionalProperties" : 0,
7aacca6f
DM
21396 "properties" : {
21397 "force" : {
44660702 21398 "description" : "force if onboot=0.",
7aacca6f 21399 "optional" : 1,
44660702 21400 "type" : "boolean"
7aacca6f
DM
21401 },
21402 "node" : {
7aacca6f 21403 "description" : "The cluster node name.",
44660702
DM
21404 "format" : "pve-node",
21405 "type" : "string"
7aacca6f 21406 }
44660702 21407 }
56122987 21408 },
7aacca6f
DM
21409 "permissions" : {
21410 "check" : [
21411 "perm",
21412 "/",
21413 [
21414 "VM.PowerMgmt"
21415 ]
21416 ]
44660702
DM
21417 },
21418 "protected" : 1,
21419 "proxyto" : "node",
21420 "returns" : {
21421 "type" : "string"
7aacca6f
DM
21422 }
21423 }
21424 },
44660702 21425 "leaf" : 1,
7aacca6f 21426 "path" : "/nodes/{node}/startall",
44660702 21427 "text" : "startall"
7aacca6f
DM
21428 },
21429 {
7aacca6f
DM
21430 "info" : {
21431 "POST" : {
21432 "description" : "Stop all VMs and Containers.",
44660702
DM
21433 "method" : "POST",
21434 "name" : "stopall",
7aacca6f 21435 "parameters" : {
44660702 21436 "additionalProperties" : 0,
7aacca6f
DM
21437 "properties" : {
21438 "node" : {
44660702 21439 "description" : "The cluster node name.",
7aacca6f 21440 "format" : "pve-node",
44660702 21441 "type" : "string"
7aacca6f 21442 }
44660702 21443 }
56122987 21444 },
7aacca6f
DM
21445 "permissions" : {
21446 "check" : [
21447 "perm",
21448 "/",
21449 [
44660702 21450 "VM.PowerMgmt"
7aacca6f
DM
21451 ]
21452 ]
56122987 21453 },
44660702 21454 "protected" : 1,
7aacca6f 21455 "proxyto" : "node",
44660702
DM
21456 "returns" : {
21457 "type" : "string"
21458 }
21459 }
56122987 21460 },
44660702
DM
21461 "leaf" : 1,
21462 "path" : "/nodes/{node}/stopall",
21463 "text" : "stopall"
21464 },
21465 {
21466 "info" : {
21467 "POST" : {
21468 "description" : "Migrate all VMs and Containers.",
21469 "method" : "POST",
21470 "name" : "migrateall",
21471 "parameters" : {
21472 "additionalProperties" : 0,
21473 "properties" : {
21474 "maxworkers" : {
21475 "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!",
21476 "minimum" : 1,
21477 "optional" : 1,
4bd7df8b
DM
21478 "type" : "integer",
21479 "typetext" : "integer (1- N)"
44660702
DM
21480 },
21481 "node" : {
21482 "description" : "The cluster node name.",
21483 "format" : "pve-node",
21484 "type" : "string"
21485 },
21486 "target" : {
21487 "description" : "Target node.",
21488 "format" : "pve-node",
21489 "type" : "string"
21490 }
21491 }
21492 },
21493 "permissions" : {
21494 "check" : [
21495 "perm",
21496 "/",
21497 [
21498 "VM.Migrate"
21499 ]
21500 ]
21501 },
21502 "protected" : 1,
21503 "proxyto" : "node",
21504 "returns" : {
21505 "type" : "string"
21506 }
21507 }
56122987 21508 },
44660702
DM
21509 "leaf" : 1,
21510 "path" : "/nodes/{node}/migrateall",
21511 "text" : "migrateall"
21512 }
21513 ],
21514 "info" : {
21515 "GET" : {
21516 "description" : "Node index.",
21517 "method" : "GET",
21518 "name" : "index",
21519 "parameters" : {
21520 "additionalProperties" : 0,
21521 "properties" : {
21522 "node" : {
21523 "description" : "The cluster node name.",
21524 "format" : "pve-node",
21525 "type" : "string"
21526 }
21527 }
56122987 21528 },
44660702
DM
21529 "permissions" : {
21530 "user" : "all"
56122987 21531 },
44660702
DM
21532 "returns" : {
21533 "items" : {
21534 "properties" : {},
21535 "type" : "object"
21536 },
21537 "links" : [
21538 {
21539 "href" : "{name}",
21540 "rel" : "child"
21541 }
56122987 21542 ],
44660702 21543 "type" : "array"
7aacca6f
DM
21544 }
21545 }
21546 },
44660702
DM
21547 "leaf" : 0,
21548 "path" : "/nodes/{node}",
21549 "text" : "{node}"
21550 }
21551 ],
21552 "info" : {
7aacca6f 21553 "GET" : {
44660702 21554 "description" : "Cluster node index.",
7aacca6f 21555 "method" : "GET",
44660702 21556 "name" : "index",
7aacca6f 21557 "parameters" : {
7aacca6f
DM
21558 "additionalProperties" : 0
21559 },
21560 "permissions" : {
7aacca6f
DM
21561 "user" : "all"
21562 },
44660702
DM
21563 "returns" : {
21564 "items" : {
21565 "properties" : {},
21566 "type" : "object"
21567 },
21568 "links" : [
21569 {
21570 "href" : "{node}",
21571 "rel" : "child"
21572 }
21573 ],
21574 "type" : "array"
21575 }
7aacca6f
DM
21576 }
21577 },
44660702
DM
21578 "leaf" : 0,
21579 "path" : "/nodes",
21580 "text" : "nodes"
21581 },
21582 {
7aacca6f
DM
21583 "children" : [
21584 {
7aacca6f 21585 "info" : {
44660702
DM
21586 "DELETE" : {
21587 "description" : "Delete storage configuration.",
21588 "method" : "DELETE",
21589 "name" : "delete",
7aacca6f
DM
21590 "parameters" : {
21591 "additionalProperties" : 0,
21592 "properties" : {
21593 "storage" : {
7aacca6f 21594 "description" : "The storage identifier.",
44660702 21595 "format" : "pve-storage-id",
7aacca6f
DM
21596 "type" : "string"
21597 }
21598 }
56122987 21599 },
7aacca6f
DM
21600 "permissions" : {
21601 "check" : [
21602 "perm",
21603 "/storage",
21604 [
21605 "Datastore.Allocate"
21606 ]
21607 ]
56122987 21608 },
44660702
DM
21609 "protected" : 1,
21610 "returns" : {
21611 "type" : "null"
21612 }
21613 },
21614 "GET" : {
21615 "description" : "Read storage configuration.",
21616 "method" : "GET",
21617 "name" : "read",
7aacca6f
DM
21618 "parameters" : {
21619 "additionalProperties" : 0,
21620 "properties" : {
21621 "storage" : {
44660702 21622 "description" : "The storage identifier.",
7aacca6f 21623 "format" : "pve-storage-id",
44660702 21624 "type" : "string"
7aacca6f
DM
21625 }
21626 }
21627 },
44660702
DM
21628 "permissions" : {
21629 "check" : [
21630 "perm",
21631 "/storage/{storage}",
21632 [
21633 "Datastore.Allocate"
21634 ]
21635 ]
21636 },
21637 "returns" : {}
7aacca6f
DM
21638 },
21639 "PUT" : {
44660702
DM
21640 "description" : "Update storage configuration.",
21641 "method" : "PUT",
21642 "name" : "update",
21643 "parameters" : {
21644 "additionalProperties" : 0,
21645 "properties" : {
21646 "blocksize" : {
21647 "description" : "block size",
7aacca6f 21648 "optional" : 1,
44660702 21649 "type" : "string"
7aacca6f 21650 },
44660702
DM
21651 "comstar_hg" : {
21652 "description" : "host group for comstar views",
21653 "optional" : 1,
21654 "type" : "string"
7aacca6f 21655 },
44660702
DM
21656 "comstar_tg" : {
21657 "description" : "target group for comstar views",
7aacca6f 21658 "optional" : 1,
44660702 21659 "type" : "string"
7aacca6f 21660 },
44660702
DM
21661 "content" : {
21662 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21663 "format" : "pve-storage-content-list",
7aacca6f 21664 "optional" : 1,
44660702 21665 "type" : "string"
7aacca6f 21666 },
44660702
DM
21667 "delete" : {
21668 "description" : "A list of settings you want to delete.",
21669 "format" : "pve-configid-list",
21670 "maxLength" : 4096,
7aacca6f 21671 "optional" : 1,
44660702 21672 "type" : "string"
7aacca6f
DM
21673 },
21674 "digest" : {
44660702 21675 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 21676 "maxLength" : 40,
7aacca6f 21677 "optional" : 1,
7aacca6f
DM
21678 "type" : "string"
21679 },
44660702
DM
21680 "disable" : {
21681 "description" : "Flag to disable the storage.",
21682 "optional" : 1,
21683 "type" : "boolean"
7aacca6f
DM
21684 },
21685 "format" : {
21686 "description" : "Default image format.",
44660702 21687 "format" : "pve-storage-format",
7aacca6f 21688 "optional" : 1,
44660702 21689 "type" : "string"
7aacca6f 21690 },
44660702
DM
21691 "krbd" : {
21692 "description" : "Access rbd through krbd kernel module.",
7aacca6f 21693 "optional" : 1,
44660702 21694 "type" : "boolean"
7aacca6f 21695 },
44660702
DM
21696 "maxfiles" : {
21697 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21698 "minimum" : 0,
21699 "optional" : 1,
4bd7df8b
DM
21700 "type" : "integer",
21701 "typetext" : "integer (0- N)"
21702 },
21703 "mkdir" : {
21704 "default" : "yes",
21705 "description" : "Create the directory if it doesn't exist.",
21706 "optional" : 1,
21707 "type" : "boolean"
7aacca6f
DM
21708 },
21709 "nodes" : {
44660702 21710 "description" : "List of cluster node names.",
7aacca6f
DM
21711 "format" : "pve-node-list",
21712 "optional" : 1,
44660702 21713 "type" : "string"
7aacca6f 21714 },
44660702
DM
21715 "nowritecache" : {
21716 "description" : "disable write caching on the target",
7aacca6f 21717 "optional" : 1,
44660702 21718 "type" : "boolean"
7aacca6f
DM
21719 },
21720 "options" : {
7aacca6f 21721 "description" : "NFS mount options (see 'man nfs')",
44660702
DM
21722 "format" : "pve-storage-options",
21723 "optional" : 1,
21724 "type" : "string"
21725 },
21726 "pool" : {
21727 "description" : "Pool.",
21728 "optional" : 1,
21729 "type" : "string"
21730 },
21731 "redundancy" : {
21732 "default" : 2,
21733 "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.",
21734 "maximum" : 16,
21735 "minimum" : 1,
21736 "optional" : 1,
4bd7df8b
DM
21737 "type" : "integer",
21738 "typetext" : "integer (1-16)"
44660702
DM
21739 },
21740 "saferemove" : {
21741 "description" : "Zero-out data when removing LVs.",
21742 "optional" : 1,
21743 "type" : "boolean"
7aacca6f
DM
21744 },
21745 "saferemove_throughput" : {
44660702 21746 "description" : "Wipe throughput (cstream -t parameter value).",
7aacca6f 21747 "optional" : 1,
44660702 21748 "type" : "string"
7aacca6f 21749 },
44660702
DM
21750 "server" : {
21751 "description" : "Server IP or DNS name.",
21752 "format" : "pve-storage-server",
7aacca6f 21753 "optional" : 1,
44660702 21754 "type" : "string"
7aacca6f 21755 },
44660702
DM
21756 "server2" : {
21757 "description" : "Backup volfile server IP or DNS name.",
21758 "format" : "pve-storage-server",
7aacca6f 21759 "optional" : 1,
44660702
DM
21760 "requires" : "server",
21761 "type" : "string"
21762 },
21763 "shared" : {
21764 "description" : "Mark storage as shared.",
21765 "optional" : 1,
21766 "type" : "boolean"
21767 },
21768 "sparse" : {
21769 "description" : "use sparse volumes",
21770 "optional" : 1,
21771 "type" : "boolean"
21772 },
21773 "storage" : {
21774 "description" : "The storage identifier.",
21775 "format" : "pve-storage-id",
21776 "type" : "string"
21777 },
4bd7df8b
DM
21778 "tagged_only" : {
21779 "description" : "Only use logical volumes tagged with 'pve-vm-ID'.",
21780 "optional" : 1,
21781 "type" : "boolean"
21782 },
44660702
DM
21783 "transport" : {
21784 "description" : "Gluster transport: tcp or rdma",
21785 "enum" : [
21786 "tcp",
21787 "rdma",
21788 "unix"
21789 ],
21790 "optional" : 1,
21791 "type" : "string"
7aacca6f
DM
21792 },
21793 "username" : {
21794 "description" : "RBD Id.",
44660702
DM
21795 "optional" : 1,
21796 "type" : "string"
7aacca6f 21797 }
44660702
DM
21798 },
21799 "type" : "object"
21800 },
21801 "permissions" : {
21802 "check" : [
21803 "perm",
21804 "/storage",
21805 [
21806 "Datastore.Allocate"
21807 ]
21808 ]
21809 },
21810 "protected" : 1,
21811 "returns" : {
21812 "type" : "null"
21813 }
21814 }
21815 },
21816 "leaf" : 1,
21817 "path" : "/storage/{storage}",
21818 "text" : "{storage}"
21819 }
21820 ],
21821 "info" : {
21822 "GET" : {
21823 "description" : "Storage index.",
21824 "method" : "GET",
21825 "name" : "index",
21826 "parameters" : {
21827 "additionalProperties" : 0,
21828 "properties" : {
21829 "type" : {
21830 "description" : "Only list storage of specific type",
21831 "enum" : [
21832 "dir",
21833 "drbd",
21834 "glusterfs",
21835 "iscsi",
21836 "iscsidirect",
21837 "lvm",
21838 "lvmthin",
21839 "nfs",
21840 "rbd",
21841 "sheepdog",
21842 "zfs",
21843 "zfspool"
21844 ],
21845 "optional" : 1,
21846 "type" : "string"
21847 }
21848 }
21849 },
21850 "permissions" : {
21851 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
21852 "user" : "all"
21853 },
21854 "returns" : {
21855 "items" : {
21856 "properties" : {
21857 "storage" : {
21858 "type" : "string"
7aacca6f 21859 }
56122987 21860 },
44660702
DM
21861 "type" : "object"
21862 },
21863 "links" : [
21864 {
21865 "href" : "{storage}",
21866 "rel" : "child"
21867 }
21868 ],
21869 "type" : "array"
21870 }
21871 },
21872 "POST" : {
21873 "description" : "Create a new storage.",
21874 "method" : "POST",
21875 "name" : "create",
21876 "parameters" : {
21877 "additionalProperties" : 0,
21878 "properties" : {
21879 "authsupported" : {
21880 "description" : "Authsupported.",
21881 "optional" : 1,
21882 "type" : "string"
21883 },
21884 "base" : {
21885 "description" : "Base volume. This volume is automatically activated.",
21886 "format" : "pve-volume-id",
21887 "optional" : 1,
21888 "type" : "string"
21889 },
21890 "blocksize" : {
21891 "description" : "block size",
21892 "optional" : 1,
21893 "type" : "string"
21894 },
21895 "comstar_hg" : {
21896 "description" : "host group for comstar views",
21897 "optional" : 1,
21898 "type" : "string"
21899 },
21900 "comstar_tg" : {
21901 "description" : "target group for comstar views",
21902 "optional" : 1,
21903 "type" : "string"
21904 },
21905 "content" : {
21906 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21907 "format" : "pve-storage-content-list",
21908 "optional" : 1,
21909 "type" : "string"
21910 },
21911 "disable" : {
21912 "description" : "Flag to disable the storage.",
21913 "optional" : 1,
21914 "type" : "boolean"
21915 },
21916 "export" : {
21917 "description" : "NFS export path.",
21918 "format" : "pve-storage-path",
21919 "optional" : 1,
21920 "type" : "string"
21921 },
21922 "format" : {
21923 "description" : "Default image format.",
21924 "format" : "pve-storage-format",
21925 "optional" : 1,
21926 "type" : "string"
21927 },
21928 "iscsiprovider" : {
21929 "description" : "iscsi provider",
21930 "optional" : 1,
21931 "type" : "string"
21932 },
21933 "krbd" : {
21934 "description" : "Access rbd through krbd kernel module.",
21935 "optional" : 1,
21936 "type" : "boolean"
56122987 21937 },
44660702
DM
21938 "maxfiles" : {
21939 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21940 "minimum" : 0,
21941 "optional" : 1,
4bd7df8b
DM
21942 "type" : "integer",
21943 "typetext" : "integer (0- N)"
21944 },
21945 "mkdir" : {
21946 "default" : "yes",
21947 "description" : "Create the directory if it doesn't exist.",
21948 "optional" : 1,
21949 "type" : "boolean"
7aacca6f 21950 },
44660702
DM
21951 "monhost" : {
21952 "description" : "Monitors daemon ips.",
4bd7df8b 21953 "format" : "pve-storage-portal-dns-list",
44660702
DM
21954 "optional" : 1,
21955 "type" : "string"
7aacca6f 21956 },
44660702
DM
21957 "nodes" : {
21958 "description" : "List of cluster node names.",
21959 "format" : "pve-node-list",
21960 "optional" : 1,
21961 "type" : "string"
7aacca6f 21962 },
44660702
DM
21963 "nowritecache" : {
21964 "description" : "disable write caching on the target",
21965 "optional" : 1,
21966 "type" : "boolean"
21967 },
21968 "options" : {
21969 "description" : "NFS mount options (see 'man nfs')",
21970 "format" : "pve-storage-options",
21971 "optional" : 1,
21972 "type" : "string"
21973 },
21974 "path" : {
21975 "description" : "File system path.",
21976 "format" : "pve-storage-path",
21977 "optional" : 1,
21978 "type" : "string"
21979 },
21980 "pool" : {
21981 "description" : "Pool.",
21982 "optional" : 1,
21983 "type" : "string"
21984 },
21985 "portal" : {
21986 "description" : "iSCSI portal (IP or DNS name with optional port).",
21987 "format" : "pve-storage-portal-dns",
21988 "optional" : 1,
21989 "type" : "string"
21990 },
21991 "redundancy" : {
21992 "default" : 2,
21993 "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.",
21994 "maximum" : 16,
21995 "minimum" : 1,
21996 "optional" : 1,
4bd7df8b
DM
21997 "type" : "integer",
21998 "typetext" : "integer (1-16)"
44660702
DM
21999 },
22000 "saferemove" : {
22001 "description" : "Zero-out data when removing LVs.",
22002 "optional" : 1,
22003 "type" : "boolean"
22004 },
22005 "saferemove_throughput" : {
22006 "description" : "Wipe throughput (cstream -t parameter value).",
22007 "optional" : 1,
22008 "type" : "string"
22009 },
22010 "server" : {
22011 "description" : "Server IP or DNS name.",
22012 "format" : "pve-storage-server",
22013 "optional" : 1,
22014 "type" : "string"
22015 },
22016 "server2" : {
22017 "description" : "Backup volfile server IP or DNS name.",
22018 "format" : "pve-storage-server",
22019 "optional" : 1,
22020 "requires" : "server",
22021 "type" : "string"
22022 },
22023 "shared" : {
22024 "description" : "Mark storage as shared.",
22025 "optional" : 1,
22026 "type" : "boolean"
22027 },
22028 "sparse" : {
22029 "description" : "use sparse volumes",
22030 "optional" : 1,
22031 "type" : "boolean"
22032 },
22033 "storage" : {
22034 "description" : "The storage identifier.",
22035 "format" : "pve-storage-id",
22036 "type" : "string"
22037 },
4bd7df8b
DM
22038 "tagged_only" : {
22039 "description" : "Only use logical volumes tagged with 'pve-vm-ID'.",
22040 "optional" : 1,
22041 "type" : "boolean"
22042 },
44660702
DM
22043 "target" : {
22044 "description" : "iSCSI target.",
22045 "optional" : 1,
22046 "type" : "string"
22047 },
22048 "thinpool" : {
22049 "description" : "LVM thin pool LV name.",
22050 "format" : "pve-storage-vgname",
22051 "optional" : 1,
22052 "type" : "string"
22053 },
22054 "transport" : {
22055 "description" : "Gluster transport: tcp or rdma",
22056 "enum" : [
22057 "tcp",
22058 "rdma",
22059 "unix"
7aacca6f 22060 ],
44660702
DM
22061 "optional" : 1,
22062 "type" : "string"
56122987 22063 },
44660702
DM
22064 "type" : {
22065 "description" : "Storage type.",
22066 "enum" : [
22067 "dir",
22068 "drbd",
22069 "glusterfs",
22070 "iscsi",
22071 "iscsidirect",
22072 "lvm",
22073 "lvmthin",
22074 "nfs",
22075 "rbd",
22076 "sheepdog",
22077 "zfs",
22078 "zfspool"
22079 ],
22080 "type" : "string"
56122987 22081 },
44660702
DM
22082 "username" : {
22083 "description" : "RBD Id.",
22084 "optional" : 1,
22085 "type" : "string"
7aacca6f 22086 },
44660702
DM
22087 "vgname" : {
22088 "description" : "Volume group name.",
22089 "format" : "pve-storage-vgname",
22090 "optional" : 1,
22091 "type" : "string"
22092 },
22093 "volume" : {
22094 "description" : "Glusterfs Volume.",
22095 "optional" : 1,
22096 "type" : "string"
22097 }
22098 },
22099 "type" : "object"
22100 },
22101 "permissions" : {
22102 "check" : [
22103 "perm",
22104 "/storage",
22105 [
22106 "Datastore.Allocate"
22107 ]
22108 ]
56122987 22109 },
44660702
DM
22110 "protected" : 1,
22111 "returns" : {
22112 "type" : "null"
22113 }
22114 }
22115 },
22116 "leaf" : 0,
22117 "path" : "/storage",
22118 "text" : "storage"
22119 },
22120 {
22121 "children" : [
22122 {
56122987
DM
22123 "children" : [
22124 {
56122987 22125 "info" : {
44660702
DM
22126 "DELETE" : {
22127 "description" : "Delete user.",
22128 "method" : "DELETE",
22129 "name" : "delete_user",
56122987 22130 "parameters" : {
7aacca6f 22131 "additionalProperties" : 0,
56122987 22132 "properties" : {
56122987 22133 "userid" : {
56122987
DM
22134 "description" : "User ID",
22135 "format" : "pve-userid",
44660702 22136 "maxLength" : 64,
56122987
DM
22137 "type" : "string"
22138 }
7aacca6f 22139 }
56122987 22140 },
56122987
DM
22141 "permissions" : {
22142 "check" : [
44660702 22143 "and",
56122987 22144 [
44660702
DM
22145 "userid-param",
22146 "Realm.AllocateUser"
56122987 22147 ],
44660702
DM
22148 [
22149 "userid-group",
22150 [
22151 "User.Modify"
22152 ]
22153 ]
56122987 22154 ]
7aacca6f 22155 },
44660702 22156 "protected" : 1,
56122987
DM
22157 "returns" : {
22158 "type" : "null"
44660702 22159 }
7aacca6f 22160 },
44660702
DM
22161 "GET" : {
22162 "description" : "Get user configuration.",
22163 "method" : "GET",
22164 "name" : "read_user",
56122987
DM
22165 "parameters" : {
22166 "additionalProperties" : 0,
22167 "properties" : {
22168 "userid" : {
44660702 22169 "description" : "User ID",
56122987 22170 "format" : "pve-userid",
44660702
DM
22171 "maxLength" : 64,
22172 "type" : "string"
56122987
DM
22173 }
22174 }
22175 },
56122987
DM
22176 "permissions" : {
22177 "check" : [
44660702 22178 "userid-group",
56122987 22179 [
44660702
DM
22180 "User.Modify",
22181 "Sys.Audit"
56122987
DM
22182 ]
22183 ]
22184 },
56122987 22185 "returns" : {
7aacca6f 22186 "additionalProperties" : 0,
56122987 22187 "properties" : {
44660702
DM
22188 "comment" : {
22189 "optional" : 1,
22190 "type" : "string"
56122987 22191 },
44660702
DM
22192 "email" : {
22193 "optional" : 1,
22194 "type" : "string"
7aacca6f
DM
22195 },
22196 "enable" : {
22197 "type" : "boolean"
22198 },
44660702
DM
22199 "expire" : {
22200 "optional" : 1,
22201 "type" : "integer"
22202 },
22203 "firstname" : {
56122987
DM
22204 "optional" : 1,
22205 "type" : "string"
22206 },
44660702
DM
22207 "groups" : {
22208 "type" : "array"
56122987 22209 },
44660702
DM
22210 "keys" : {
22211 "optional" : 1,
22212 "type" : "string"
7aacca6f 22213 },
44660702
DM
22214 "lastname" : {
22215 "optional" : 1,
22216 "type" : "string"
56122987 22217 }
7aacca6f 22218 }
44660702
DM
22219 }
22220 },
22221 "PUT" : {
22222 "description" : "Update user configuration.",
22223 "method" : "PUT",
22224 "name" : "update_user",
56122987 22225 "parameters" : {
44660702 22226 "additionalProperties" : 0,
56122987 22227 "properties" : {
44660702
DM
22228 "append" : {
22229 "optional" : 1,
22230 "requires" : "groups",
22231 "type" : "boolean"
22232 },
22233 "comment" : {
22234 "optional" : 1,
22235 "type" : "string"
22236 },
22237 "email" : {
22238 "format" : "email-opt",
22239 "optional" : 1,
22240 "type" : "string"
22241 },
22242 "enable" : {
22243 "description" : "Enable/disable the account.",
22244 "optional" : 1,
22245 "type" : "boolean"
22246 },
22247 "expire" : {
22248 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
22249 "minimum" : 0,
22250 "optional" : 1,
4bd7df8b
DM
22251 "type" : "integer",
22252 "typetext" : "integer (0- N)"
44660702
DM
22253 },
22254 "firstname" : {
22255 "optional" : 1,
22256 "type" : "string"
22257 },
22258 "groups" : {
22259 "format" : "pve-groupid-list",
22260 "optional" : 1,
22261 "type" : "string"
22262 },
22263 "keys" : {
22264 "description" : "Keys for two factor auth (yubico).",
22265 "optional" : 1,
22266 "type" : "string"
22267 },
22268 "lastname" : {
22269 "optional" : 1,
22270 "type" : "string"
22271 },
56122987 22272 "userid" : {
56122987
DM
22273 "description" : "User ID",
22274 "format" : "pve-userid",
44660702
DM
22275 "maxLength" : 64,
22276 "type" : "string"
56122987 22277 }
44660702 22278 }
56122987 22279 },
56122987
DM
22280 "permissions" : {
22281 "check" : [
22282 "userid-group",
22283 [
44660702
DM
22284 "User.Modify"
22285 ],
22286 "groups_param",
22287 1
56122987
DM
22288 ]
22289 },
44660702
DM
22290 "protected" : 1,
22291 "returns" : {
22292 "type" : "null"
22293 }
56122987
DM
22294 }
22295 },
44660702
DM
22296 "leaf" : 1,
22297 "path" : "/access/users/{userid}",
7aacca6f 22298 "text" : "{userid}"
56122987 22299 }
7aacca6f 22300 ],
56122987 22301 "info" : {
7aacca6f 22302 "GET" : {
44660702
DM
22303 "description" : "User index.",
22304 "method" : "GET",
7aacca6f 22305 "name" : "index",
56122987 22306 "parameters" : {
44660702
DM
22307 "additionalProperties" : 0,
22308 "properties" : {
22309 "enabled" : {
22310 "description" : "Optional filter for enable property.",
22311 "optional" : 1,
22312 "type" : "boolean"
22313 }
22314 }
22315 },
22316 "permissions" : {
22317 "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.",
22318 "user" : "all"
56122987 22319 },
7aacca6f 22320 "returns" : {
7aacca6f
DM
22321 "items" : {
22322 "properties" : {
44660702 22323 "userid" : {
7aacca6f
DM
22324 "type" : "string"
22325 }
22326 },
22327 "type" : "object"
22328 },
44660702
DM
22329 "links" : [
22330 {
22331 "href" : "{userid}",
22332 "rel" : "child"
22333 }
22334 ],
7aacca6f
DM
22335 "type" : "array"
22336 }
22337 },
22338 "POST" : {
44660702 22339 "description" : "Create new user.",
7aacca6f 22340 "method" : "POST",
44660702 22341 "name" : "create_user",
56122987 22342 "parameters" : {
7aacca6f
DM
22343 "additionalProperties" : 0,
22344 "properties" : {
44660702
DM
22345 "comment" : {
22346 "optional" : 1,
7aacca6f
DM
22347 "type" : "string"
22348 },
44660702
DM
22349 "email" : {
22350 "format" : "email-opt",
22351 "optional" : 1,
22352 "type" : "string"
22353 },
22354 "enable" : {
22355 "default" : 1,
22356 "description" : "Enable the account (default). You can set this to '0' to disable the accout",
22357 "optional" : 1,
22358 "type" : "boolean"
22359 },
22360 "expire" : {
22361 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
22362 "minimum" : 0,
22363 "optional" : 1,
4bd7df8b
DM
22364 "type" : "integer",
22365 "typetext" : "integer (0- N)"
44660702
DM
22366 },
22367 "firstname" : {
22368 "optional" : 1,
22369 "type" : "string"
22370 },
22371 "groups" : {
22372 "format" : "pve-groupid-list",
22373 "optional" : 1,
22374 "type" : "string"
22375 },
22376 "keys" : {
22377 "description" : "Keys for two factor auth (yubico).",
22378 "optional" : 1,
22379 "type" : "string"
22380 },
22381 "lastname" : {
7aacca6f
DM
22382 "optional" : 1,
22383 "type" : "string"
44660702
DM
22384 },
22385 "password" : {
22386 "description" : "Initial password.",
22387 "maxLength" : 64,
22388 "minLength" : 5,
22389 "optional" : 1,
22390 "type" : "string"
22391 },
22392 "userid" : {
22393 "description" : "User ID",
22394 "format" : "pve-userid",
22395 "maxLength" : 64,
22396 "type" : "string"
56122987 22397 }
7aacca6f 22398 }
56122987 22399 },
44660702
DM
22400 "permissions" : {
22401 "check" : [
22402 "and",
22403 [
22404 "userid-param",
22405 "Realm.AllocateUser"
22406 ],
22407 [
22408 "userid-group",
22409 [
22410 "User.Modify"
22411 ],
22412 "groups_param",
22413 1
22414 ]
22415 ],
22416 "description" : "You need 'Realm.AllocateUser' on '/access/realm/<realm>' on the realm of user <userid>, and 'User.Modify' permissions to '/access/groups/<group>' for any group specified (or 'User.Modify' on '/access/groups' if you pass no groups."
22417 },
22418 "protected" : 1,
22419 "returns" : {
22420 "type" : "null"
22421 }
56122987
DM
22422 }
22423 },
44660702
DM
22424 "leaf" : 0,
22425 "path" : "/access/users",
22426 "text" : "users"
22427 },
22428 {
56122987
DM
22429 "children" : [
22430 {
56122987
DM
22431 "info" : {
22432 "DELETE" : {
44660702
DM
22433 "description" : "Delete group.",
22434 "method" : "DELETE",
22435 "name" : "delete_group",
22436 "parameters" : {
22437 "additionalProperties" : 0,
22438 "properties" : {
22439 "groupid" : {
22440 "format" : "pve-groupid",
22441 "type" : "string"
22442 }
22443 }
22444 },
7aacca6f
DM
22445 "permissions" : {
22446 "check" : [
22447 "perm",
22448 "/access/groups",
22449 [
22450 "Group.Allocate"
22451 ]
22452 ]
22453 },
7aacca6f 22454 "protected" : 1,
7aacca6f
DM
22455 "returns" : {
22456 "type" : "null"
44660702 22457 }
7aacca6f 22458 },
44660702
DM
22459 "GET" : {
22460 "description" : "Get group configuration.",
22461 "method" : "GET",
22462 "name" : "read_group",
22463 "parameters" : {
22464 "additionalProperties" : 0,
22465 "properties" : {
22466 "groupid" : {
22467 "format" : "pve-groupid",
22468 "type" : "string"
22469 }
22470 }
56122987 22471 },
7aacca6f
DM
22472 "permissions" : {
22473 "check" : [
22474 "perm",
22475 "/access/groups",
22476 [
44660702 22477 "Sys.Audit",
7aacca6f 22478 "Group.Allocate"
44660702
DM
22479 ],
22480 "any",
22481 1
7aacca6f
DM
22482 ]
22483 },
7aacca6f 22484 "returns" : {
44660702 22485 "additionalProperties" : 0,
7aacca6f
DM
22486 "properties" : {
22487 "comment" : {
44660702
DM
22488 "optional" : 1,
22489 "type" : "string"
7aacca6f
DM
22490 },
22491 "members" : {
22492 "items" : {
22493 "type" : "string"
22494 },
22495 "type" : "array"
22496 }
22497 },
44660702
DM
22498 "type" : "object"
22499 }
22500 },
22501 "PUT" : {
22502 "description" : "Update group data.",
22503 "method" : "PUT",
22504 "name" : "update_group",
56122987 22505 "parameters" : {
44660702 22506 "additionalProperties" : 0,
56122987 22507 "properties" : {
44660702
DM
22508 "comment" : {
22509 "optional" : 1,
22510 "type" : "string"
22511 },
56122987
DM
22512 "groupid" : {
22513 "format" : "pve-groupid",
22514 "type" : "string"
22515 }
44660702 22516 }
56122987 22517 },
56122987
DM
22518 "permissions" : {
22519 "check" : [
22520 "perm",
22521 "/access/groups",
22522 [
22523 "Group.Allocate"
44660702 22524 ]
56122987
DM
22525 ]
22526 },
44660702
DM
22527 "protected" : 1,
22528 "returns" : {
22529 "type" : "null"
22530 }
7aacca6f
DM
22531 }
22532 },
7aacca6f 22533 "leaf" : 1,
44660702
DM
22534 "path" : "/access/groups/{groupid}",
22535 "text" : "{groupid}"
22536 }
22537 ],
22538 "info" : {
22539 "GET" : {
22540 "description" : "Group index.",
22541 "method" : "GET",
22542 "name" : "index",
22543 "parameters" : {
22544 "additionalProperties" : 0
22545 },
22546 "permissions" : {
22547 "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>.",
22548 "user" : "all"
22549 },
22550 "returns" : {
22551 "items" : {
22552 "properties" : {
22553 "groupid" : {
22554 "type" : "string"
22555 }
22556 },
22557 "type" : "object"
22558 },
22559 "links" : [
22560 {
22561 "href" : "{groupid}",
22562 "rel" : "child"
22563 }
22564 ],
22565 "type" : "array"
22566 }
22567 },
22568 "POST" : {
22569 "description" : "Create new group.",
22570 "method" : "POST",
22571 "name" : "create_group",
22572 "parameters" : {
22573 "additionalProperties" : 0,
22574 "properties" : {
22575 "comment" : {
22576 "optional" : 1,
22577 "type" : "string"
22578 },
22579 "groupid" : {
22580 "format" : "pve-groupid",
22581 "type" : "string"
22582 }
22583 }
22584 },
22585 "permissions" : {
22586 "check" : [
22587 "perm",
22588 "/access/groups",
22589 [
22590 "Group.Allocate"
22591 ]
22592 ]
22593 },
22594 "protected" : 1,
22595 "returns" : {
22596 "type" : "null"
22597 }
7aacca6f 22598 }
44660702 22599 },
7aacca6f 22600 "leaf" : 0,
44660702
DM
22601 "path" : "/access/groups",
22602 "text" : "groups"
7aacca6f
DM
22603 },
22604 {
22605 "children" : [
22606 {
7aacca6f 22607 "info" : {
7aacca6f 22608 "DELETE" : {
7aacca6f 22609 "description" : "Delete role.",
44660702 22610 "method" : "DELETE",
7aacca6f 22611 "name" : "delete_role",
56122987
DM
22612 "parameters" : {
22613 "additionalProperties" : 0,
22614 "properties" : {
7aacca6f
DM
22615 "roleid" : {
22616 "format" : "pve-roleid",
22617 "type" : "string"
56122987
DM
22618 }
22619 }
22620 },
56122987
DM
22621 "permissions" : {
22622 "check" : [
22623 "perm",
7aacca6f 22624 "/access",
56122987 22625 [
7aacca6f
DM
22626 "Sys.Modify"
22627 ]
56122987 22628 ]
44660702
DM
22629 },
22630 "protected" : 1,
22631 "returns" : {
22632 "type" : "null"
56122987
DM
22633 }
22634 },
44660702
DM
22635 "GET" : {
22636 "description" : "Get role configuration.",
22637 "method" : "GET",
22638 "name" : "read_role",
22639 "parameters" : {
22640 "additionalProperties" : 0,
22641 "properties" : {
22642 "roleid" : {
22643 "format" : "pve-roleid",
22644 "type" : "string"
22645 }
22646 }
22647 },
7aacca6f 22648 "permissions" : {
44660702 22649 "user" : "all"
56122987 22650 },
44660702
DM
22651 "returns" : {}
22652 },
22653 "PUT" : {
22654 "description" : "Create new role.",
22655 "method" : "PUT",
22656 "name" : "update_role",
56122987
DM
22657 "parameters" : {
22658 "additionalProperties" : 0,
22659 "properties" : {
7aacca6f 22660 "append" : {
44660702 22661 "optional" : 1,
7aacca6f 22662 "requires" : "privs",
44660702 22663 "type" : "boolean"
7aacca6f
DM
22664 },
22665 "privs" : {
22666 "format" : "pve-priv-list",
56122987 22667 "type" : "string"
44660702
DM
22668 },
22669 "roleid" : {
22670 "format" : "pve-roleid",
22671 "type" : "string"
56122987
DM
22672 }
22673 }
22674 },
44660702
DM
22675 "permissions" : {
22676 "check" : [
22677 "perm",
22678 "/access",
22679 [
22680 "Sys.Modify"
22681 ]
22682 ]
22683 },
56122987 22684 "protected" : 1,
7aacca6f
DM
22685 "returns" : {
22686 "type" : "null"
56122987
DM
22687 }
22688 }
22689 },
44660702 22690 "leaf" : 1,
7aacca6f 22691 "path" : "/access/roles/{roleid}",
44660702 22692 "text" : "{roleid}"
56122987
DM
22693 }
22694 ],
56122987 22695 "info" : {
7aacca6f
DM
22696 "GET" : {
22697 "description" : "Role index.",
44660702 22698 "method" : "GET",
7aacca6f 22699 "name" : "index",
56122987 22700 "parameters" : {
56122987
DM
22701 "additionalProperties" : 0
22702 },
7aacca6f
DM
22703 "permissions" : {
22704 "user" : "all"
22705 },
56122987 22706 "returns" : {
7aacca6f 22707 "items" : {
7aacca6f
DM
22708 "properties" : {
22709 "roleid" : {
22710 "type" : "string"
22711 }
44660702
DM
22712 },
22713 "type" : "object"
22714 },
22715 "links" : [
22716 {
22717 "href" : "{roleid}",
22718 "rel" : "child"
7aacca6f 22719 }
44660702
DM
22720 ],
22721 "type" : "array"
22722 }
7aacca6f
DM
22723 },
22724 "POST" : {
22725 "description" : "Create new role.",
44660702
DM
22726 "method" : "POST",
22727 "name" : "create_role",
7aacca6f
DM
22728 "parameters" : {
22729 "additionalProperties" : 0,
22730 "properties" : {
7aacca6f
DM
22731 "privs" : {
22732 "format" : "pve-priv-list",
22733 "optional" : 1,
22734 "type" : "string"
44660702
DM
22735 },
22736 "roleid" : {
22737 "format" : "pve-roleid",
22738 "type" : "string"
7aacca6f
DM
22739 }
22740 }
22741 },
44660702
DM
22742 "permissions" : {
22743 "check" : [
22744 "perm",
22745 "/access",
22746 [
22747 "Sys.Modify"
22748 ]
22749 ]
22750 },
22751 "protected" : 1,
7aacca6f
DM
22752 "returns" : {
22753 "type" : "null"
22754 }
22755 }
22756 },
44660702 22757 "leaf" : 0,
7aacca6f 22758 "path" : "/access/roles",
44660702 22759 "text" : "roles"
7aacca6f
DM
22760 },
22761 {
22762 "info" : {
56122987 22763 "GET" : {
44660702
DM
22764 "description" : "Get Access Control List (ACLs).",
22765 "method" : "GET",
22766 "name" : "read_acl",
7aacca6f
DM
22767 "parameters" : {
22768 "additionalProperties" : 0
22769 },
44660702
DM
22770 "permissions" : {
22771 "description" : "The returned list is restricted to objects where you have rights to modify permissions.",
22772 "user" : "all"
22773 },
56122987 22774 "returns" : {
56122987 22775 "items" : {
44660702 22776 "additionalProperties" : 0,
56122987 22777 "properties" : {
7aacca6f
DM
22778 "path" : {
22779 "type" : "string"
22780 },
44660702
DM
22781 "propagate" : {
22782 "type" : "boolean"
22783 },
22784 "roleid" : {
22785 "type" : "string"
22786 },
7aacca6f
DM
22787 "type" : {
22788 "enum" : [
22789 "user",
22790 "group"
22791 ],
22792 "type" : "string"
22793 },
7aacca6f
DM
22794 "ugid" : {
22795 "type" : "string"
56122987 22796 }
7aacca6f 22797 },
44660702 22798 "type" : "object"
7aacca6f
DM
22799 },
22800 "type" : "array"
44660702 22801 }
7aacca6f
DM
22802 },
22803 "PUT" : {
44660702
DM
22804 "description" : "Update Access Control List (add or remove permissions).",
22805 "method" : "PUT",
7aacca6f
DM
22806 "name" : "update_acl",
22807 "parameters" : {
22808 "additionalProperties" : 0,
22809 "properties" : {
22810 "delete" : {
44660702 22811 "description" : "Remove permissions (instead of adding it).",
7aacca6f 22812 "optional" : 1,
44660702 22813 "type" : "boolean"
7aacca6f 22814 },
44660702
DM
22815 "groups" : {
22816 "description" : "List of groups.",
22817 "format" : "pve-groupid-list",
7aacca6f 22818 "optional" : 1,
44660702 22819 "type" : "string"
7aacca6f
DM
22820 },
22821 "path" : {
22822 "description" : "Access control path",
22823 "type" : "string"
22824 },
7aacca6f 22825 "propagate" : {
44660702 22826 "default" : 1,
7aacca6f 22827 "description" : "Allow to propagate (inherit) permissions.",
7aacca6f 22828 "optional" : 1,
44660702 22829 "type" : "boolean"
7aacca6f 22830 },
44660702
DM
22831 "roles" : {
22832 "description" : "List of roles.",
22833 "format" : "pve-roleid-list",
22834 "type" : "string"
22835 },
22836 "users" : {
22837 "description" : "List of users.",
22838 "format" : "pve-userid-list",
7aacca6f 22839 "optional" : 1,
44660702 22840 "type" : "string"
56122987
DM
22841 }
22842 }
22843 },
56122987 22844 "permissions" : {
7aacca6f
DM
22845 "check" : [
22846 "perm-modify",
22847 "{path}"
22848 ]
22849 },
7aacca6f
DM
22850 "protected" : 1,
22851 "returns" : {
22852 "type" : "null"
44660702 22853 }
56122987
DM
22854 }
22855 },
7aacca6f 22856 "leaf" : 1,
44660702
DM
22857 "path" : "/access/acl",
22858 "text" : "acl"
7aacca6f
DM
22859 },
22860 {
56122987
DM
22861 "children" : [
22862 {
56122987 22863 "info" : {
44660702
DM
22864 "DELETE" : {
22865 "description" : "Delete an authentication server.",
22866 "method" : "DELETE",
22867 "name" : "delete",
22868 "parameters" : {
22869 "additionalProperties" : 0,
22870 "properties" : {
22871 "realm" : {
22872 "description" : "Authentication domain ID",
22873 "format" : "pve-realm",
22874 "maxLength" : 32,
22875 "type" : "string"
56122987 22876 }
44660702 22877 }
56122987 22878 },
56122987
DM
22879 "permissions" : {
22880 "check" : [
22881 "perm",
7aacca6f 22882 "/access/realm",
56122987 22883 [
7aacca6f 22884 "Realm.Allocate"
56122987
DM
22885 ]
22886 ]
22887 },
7aacca6f 22888 "protected" : 1,
7aacca6f
DM
22889 "returns" : {
22890 "type" : "null"
44660702 22891 }
7aacca6f 22892 },
44660702
DM
22893 "GET" : {
22894 "description" : "Get auth server configuration.",
22895 "method" : "GET",
22896 "name" : "read",
56122987 22897 "parameters" : {
44660702 22898 "additionalProperties" : 0,
56122987 22899 "properties" : {
7aacca6f 22900 "realm" : {
44660702 22901 "description" : "Authentication domain ID",
7aacca6f
DM
22902 "format" : "pve-realm",
22903 "maxLength" : 32,
44660702 22904 "type" : "string"
56122987 22905 }
44660702 22906 }
7aacca6f 22907 },
7aacca6f
DM
22908 "permissions" : {
22909 "check" : [
22910 "perm",
22911 "/access/realm",
22912 [
44660702
DM
22913 "Realm.Allocate",
22914 "Sys.Audit"
22915 ],
22916 "any",
22917 1
7aacca6f 22918 ]
44660702
DM
22919 },
22920 "returns" : {}
7aacca6f 22921 },
44660702
DM
22922 "PUT" : {
22923 "description" : "Update authentication server settings.",
22924 "method" : "PUT",
22925 "name" : "update",
7aacca6f 22926 "parameters" : {
44660702 22927 "additionalProperties" : 0,
7aacca6f 22928 "properties" : {
44660702
DM
22929 "base_dn" : {
22930 "description" : "LDAP base domain name",
22931 "maxLength" : 256,
22932 "optional" : 1,
22933 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22934 "type" : "string"
22935 },
4bd7df8b
DM
22936 "bind_dn" : {
22937 "description" : "LDAP bind domain name",
22938 "maxLength" : 256,
22939 "optional" : 1,
22940 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22941 "type" : "string"
22942 },
44660702
DM
22943 "comment" : {
22944 "description" : "Description.",
22945 "maxLength" : 4096,
22946 "optional" : 1,
22947 "type" : "string"
22948 },
22949 "default" : {
22950 "description" : "Use this as default realm",
22951 "optional" : 1,
22952 "type" : "boolean"
22953 },
22954 "delete" : {
22955 "description" : "A list of settings you want to delete.",
22956 "format" : "pve-configid-list",
22957 "maxLength" : 4096,
22958 "optional" : 1,
22959 "type" : "string"
22960 },
22961 "digest" : {
22962 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
22963 "maxLength" : 40,
22964 "optional" : 1,
22965 "type" : "string"
22966 },
22967 "domain" : {
22968 "description" : "AD domain name",
22969 "maxLength" : 256,
22970 "optional" : 1,
22971 "pattern" : "\\S+",
22972 "type" : "string"
22973 },
22974 "port" : {
22975 "description" : "Server port.",
22976 "maximum" : 65535,
22977 "minimum" : 1,
22978 "optional" : 1,
4bd7df8b
DM
22979 "type" : "integer",
22980 "typetext" : "integer (1-65535)"
44660702 22981 },
7aacca6f 22982 "realm" : {
7aacca6f
DM
22983 "description" : "Authentication domain ID",
22984 "format" : "pve-realm",
44660702
DM
22985 "maxLength" : 32,
22986 "type" : "string"
22987 },
22988 "secure" : {
22989 "description" : "Use secure LDAPS protocol.",
22990 "optional" : 1,
22991 "type" : "boolean"
22992 },
22993 "server1" : {
22994 "description" : "Server IP address (or DNS name)",
22995 "format" : "address",
22996 "maxLength" : 256,
22997 "optional" : 1,
22998 "type" : "string"
22999 },
23000 "server2" : {
23001 "description" : "Fallback Server IP address (or DNS name)",
23002 "format" : "address",
23003 "maxLength" : 256,
23004 "optional" : 1,
23005 "type" : "string"
23006 },
23007 "tfa" : {
23008 "description" : "Use Two-factor authentication.",
23009 "format" : "pve-tfa-config",
23010 "maxLength" : 128,
23011 "optional" : 1,
23012 "type" : "string"
23013 },
23014 "user_attr" : {
23015 "description" : "LDAP user attribute name",
23016 "maxLength" : 256,
23017 "optional" : 1,
23018 "pattern" : "\\S{2,}",
23019 "type" : "string"
7aacca6f 23020 }
56122987 23021 },
44660702 23022 "type" : "object"
56122987 23023 },
7aacca6f
DM
23024 "permissions" : {
23025 "check" : [
23026 "perm",
23027 "/access/realm",
23028 [
44660702
DM
23029 "Realm.Allocate"
23030 ]
7aacca6f
DM
23031 ]
23032 },
44660702
DM
23033 "protected" : 1,
23034 "returns" : {
23035 "type" : "null"
23036 }
56122987 23037 }
44660702
DM
23038 },
23039 "leaf" : 1,
23040 "path" : "/access/domains/{realm}",
23041 "text" : "{realm}"
56122987 23042 }
7aacca6f 23043 ],
56122987
DM
23044 "info" : {
23045 "GET" : {
44660702
DM
23046 "description" : "Authentication domain index.",
23047 "method" : "GET",
23048 "name" : "index",
23049 "parameters" : {
23050 "additionalProperties" : 0
23051 },
23052 "permissions" : {
23053 "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).",
23054 "user" : "world"
23055 },
56122987 23056 "returns" : {
56122987
DM
23057 "items" : {
23058 "properties" : {
7aacca6f
DM
23059 "comment" : {
23060 "optional" : 1,
23061 "type" : "string"
23062 },
56122987
DM
23063 "realm" : {
23064 "type" : "string"
23065 },
23066 "tfa" : {
7aacca6f 23067 "description" : "Two-factor authentication provider.",
56122987
DM
23068 "enum" : [
23069 "yubico",
23070 "oath"
23071 ],
44660702
DM
23072 "optional" : 1,
23073 "type" : "string"
56122987
DM
23074 }
23075 },
23076 "type" : "object"
44660702
DM
23077 },
23078 "links" : [
23079 {
23080 "href" : "{realm}",
23081 "rel" : "child"
23082 }
23083 ],
23084 "type" : "array"
23085 }
56122987
DM
23086 },
23087 "POST" : {
7aacca6f 23088 "description" : "Add an authentication server.",
44660702 23089 "method" : "POST",
7aacca6f 23090 "name" : "create",
56122987 23091 "parameters" : {
44660702 23092 "additionalProperties" : 0,
56122987 23093 "properties" : {
44660702
DM
23094 "base_dn" : {
23095 "description" : "LDAP base domain name",
56122987 23096 "maxLength" : 256,
44660702
DM
23097 "optional" : 1,
23098 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
7aacca6f 23099 "type" : "string"
56122987 23100 },
4bd7df8b
DM
23101 "bind_dn" : {
23102 "description" : "LDAP bind domain name",
23103 "maxLength" : 256,
23104 "optional" : 1,
23105 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
23106 "type" : "string"
23107 },
44660702
DM
23108 "comment" : {
23109 "description" : "Description.",
23110 "maxLength" : 4096,
56122987 23111 "optional" : 1,
44660702 23112 "type" : "string"
56122987 23113 },
44660702
DM
23114 "default" : {
23115 "description" : "Use this as default realm",
7aacca6f 23116 "optional" : 1,
44660702 23117 "type" : "boolean"
56122987 23118 },
44660702
DM
23119 "domain" : {
23120 "description" : "AD domain name",
23121 "maxLength" : 256,
7aacca6f 23122 "optional" : 1,
44660702
DM
23123 "pattern" : "\\S+",
23124 "type" : "string"
56122987 23125 },
7aacca6f 23126 "port" : {
44660702 23127 "description" : "Server port.",
7aacca6f 23128 "maximum" : 65535,
44660702 23129 "minimum" : 1,
7aacca6f 23130 "optional" : 1,
4bd7df8b
DM
23131 "type" : "integer",
23132 "typetext" : "integer (1-65535)"
56122987 23133 },
44660702
DM
23134 "realm" : {
23135 "description" : "Authentication domain ID",
23136 "format" : "pve-realm",
23137 "maxLength" : 32,
23138 "type" : "string"
23139 },
23140 "secure" : {
23141 "description" : "Use secure LDAPS protocol.",
7aacca6f 23142 "optional" : 1,
44660702 23143 "type" : "boolean"
56122987 23144 },
44660702
DM
23145 "server1" : {
23146 "description" : "Server IP address (or DNS name)",
23147 "format" : "address",
23148 "maxLength" : 256,
23149 "optional" : 1,
23150 "type" : "string"
56122987 23151 },
44660702
DM
23152 "server2" : {
23153 "description" : "Fallback Server IP address (or DNS name)",
23154 "format" : "address",
7aacca6f 23155 "maxLength" : 256,
7aacca6f 23156 "optional" : 1,
44660702 23157 "type" : "string"
7aacca6f 23158 },
44660702
DM
23159 "tfa" : {
23160 "description" : "Use Two-factor authentication.",
23161 "format" : "pve-tfa-config",
23162 "maxLength" : 128,
23163 "optional" : 1,
23164 "type" : "string"
23165 },
23166 "type" : {
23167 "description" : "Realm type.",
23168 "enum" : [
23169 "ad",
23170 "ldap",
23171 "pam",
23172 "pve"
23173 ],
23174 "type" : "string"
23175 },
23176 "user_attr" : {
23177 "description" : "LDAP user attribute name",
7aacca6f 23178 "maxLength" : 256,
7aacca6f 23179 "optional" : 1,
44660702
DM
23180 "pattern" : "\\S{2,}",
23181 "type" : "string"
7aacca6f
DM
23182 }
23183 },
7aacca6f 23184 "type" : "object"
56122987 23185 },
7aacca6f
DM
23186 "permissions" : {
23187 "check" : [
23188 "perm",
23189 "/access/realm",
23190 [
23191 "Realm.Allocate"
23192 ]
23193 ]
44660702
DM
23194 },
23195 "protected" : 1,
23196 "returns" : {
23197 "type" : "null"
7aacca6f 23198 }
56122987 23199 }
7aacca6f 23200 },
44660702 23201 "leaf" : 0,
56122987 23202 "path" : "/access/domains",
44660702 23203 "text" : "domains"
56122987
DM
23204 },
23205 {
56122987 23206 "info" : {
44660702
DM
23207 "GET" : {
23208 "description" : "Dummy. Useful for formaters which want to priovde a login page.",
23209 "method" : "GET",
23210 "name" : "get_ticket",
23211 "parameters" : {
23212 "additionalProperties" : 0
23213 },
23214 "permissions" : {
23215 "user" : "world"
23216 },
23217 "returns" : {
23218 "type" : "null"
23219 }
23220 },
56122987 23221 "POST" : {
44660702 23222 "description" : "Create or verify authentication ticket.",
56122987 23223 "method" : "POST",
44660702
DM
23224 "name" : "create_ticket",
23225 "parameters" : {
23226 "additionalProperties" : 0,
56122987 23227 "properties" : {
44660702
DM
23228 "otp" : {
23229 "description" : "One-time password for Two-factor authentication.",
7aacca6f
DM
23230 "optional" : 1,
23231 "type" : "string"
56122987 23232 },
7aacca6f
DM
23233 "password" : {
23234 "description" : "The secret password. This can also be a valid ticket.",
23235 "type" : "string"
23236 },
44660702
DM
23237 "path" : {
23238 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
7aacca6f 23239 "maxLength" : 64,
56122987 23240 "optional" : 1,
56122987 23241 "requires" : "privs",
44660702
DM
23242 "type" : "string"
23243 },
23244 "privs" : {
7aacca6f 23245 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
44660702
DM
23246 "format" : "pve-priv-list",
23247 "maxLength" : 64,
56122987 23248 "optional" : 1,
44660702
DM
23249 "requires" : "path",
23250 "type" : "string"
56122987
DM
23251 },
23252 "realm" : {
56122987 23253 "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.",
44660702 23254 "format" : "pve-realm",
7aacca6f 23255 "maxLength" : 32,
44660702
DM
23256 "optional" : 1,
23257 "type" : "string"
56122987
DM
23258 },
23259 "username" : {
23260 "description" : "User name",
44660702
DM
23261 "maxLength" : 64,
23262 "type" : "string"
56122987 23263 }
44660702 23264 }
7aacca6f 23265 },
56122987 23266 "permissions" : {
44660702 23267 "description" : "You need to pass valid credientials.",
56122987
DM
23268 "user" : "world"
23269 },
44660702 23270 "protected" : 1,
7aacca6f 23271 "returns" : {
56122987 23272 "properties" : {
44660702
DM
23273 "CSRFPreventionToken" : {
23274 "optional" : 1,
23275 "type" : "string"
56122987 23276 },
44660702
DM
23277 "ticket" : {
23278 "optional" : 1,
23279 "type" : "string"
23280 },
23281 "username" : {
56122987
DM
23282 "type" : "string"
23283 }
23284 },
44660702 23285 "type" : "object"
7aacca6f 23286 }
7aacca6f
DM
23287 }
23288 },
44660702
DM
23289 "leaf" : 1,
23290 "path" : "/access/ticket",
23291 "text" : "ticket"
7aacca6f 23292 },
56122987 23293 {
56122987 23294 "info" : {
7aacca6f 23295 "PUT" : {
44660702 23296 "description" : "Change user password.",
7aacca6f 23297 "method" : "PUT",
44660702 23298 "name" : "change_passsword",
56122987
DM
23299 "parameters" : {
23300 "additionalProperties" : 0,
23301 "properties" : {
44660702
DM
23302 "password" : {
23303 "description" : "The new password.",
23304 "maxLength" : 64,
23305 "minLength" : 5,
23306 "type" : "string"
7aacca6f 23307 },
44660702
DM
23308 "userid" : {
23309 "description" : "User ID",
23310 "format" : "pve-userid",
23311 "maxLength" : 64,
7aacca6f 23312 "type" : "string"
56122987 23313 }
7aacca6f 23314 }
56122987
DM
23315 },
23316 "permissions" : {
23317 "check" : [
44660702 23318 "or",
56122987 23319 [
44660702
DM
23320 "userid-param",
23321 "self"
23322 ],
23323 [
23324 "and",
23325 [
23326 "userid-param",
23327 "Realm.AllocateUser"
23328 ],
23329 [
23330 "userid-group",
23331 [
23332 "User.Modify"
23333 ]
23334 ]
56122987 23335 ]
7aacca6f 23336 ],
44660702 23337 "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 <userid>) and 'User.Modify' permission on /access/groups/<group> on a group where user <userid> is member of."
56122987 23338 },
44660702 23339 "protected" : 1,
7aacca6f
DM
23340 "returns" : {
23341 "type" : "null"
44660702
DM
23342 }
23343 }
23344 },
23345 "leaf" : 1,
23346 "path" : "/access/password",
23347 "text" : "password"
23348 }
23349 ],
23350 "info" : {
23351 "GET" : {
23352 "description" : "Directory index.",
23353 "method" : "GET",
23354 "name" : "index",
23355 "parameters" : {
23356 "additionalProperties" : 0
23357 },
23358 "permissions" : {
23359 "user" : "all"
23360 },
23361 "returns" : {
23362 "items" : {
23363 "properties" : {
23364 "subdir" : {
23365 "type" : "string"
23366 }
7aacca6f 23367 },
44660702
DM
23368 "type" : "object"
23369 },
23370 "links" : [
23371 {
23372 "href" : "{subdir}",
23373 "rel" : "child"
23374 }
23375 ],
23376 "type" : "array"
23377 }
23378 }
23379 },
23380 "leaf" : 0,
23381 "path" : "/access",
23382 "text" : "access"
23383 },
23384 {
23385 "children" : [
23386 {
23387 "info" : {
23388 "DELETE" : {
7aacca6f 23389 "description" : "Delete pool.",
44660702
DM
23390 "method" : "DELETE",
23391 "name" : "delete_pool",
7aacca6f
DM
23392 "parameters" : {
23393 "additionalProperties" : 0,
23394 "properties" : {
23395 "poolid" : {
23396 "format" : "pve-poolid",
23397 "type" : "string"
23398 }
23399 }
23400 },
56122987
DM
23401 "permissions" : {
23402 "check" : [
23403 "perm",
23404 "/pool/{poolid}",
23405 [
23406 "Pool.Allocate"
23407 ]
44660702
DM
23408 ],
23409 "description" : "You can only delete empty pools (no members)."
23410 },
23411 "protected" : 1,
23412 "returns" : {
23413 "type" : "null"
7aacca6f
DM
23414 }
23415 },
23416 "GET" : {
23417 "description" : "Get pool configuration.",
44660702 23418 "method" : "GET",
7aacca6f 23419 "name" : "read_pool",
56122987 23420 "parameters" : {
44660702 23421 "additionalProperties" : 0,
56122987
DM
23422 "properties" : {
23423 "poolid" : {
44660702
DM
23424 "format" : "pve-poolid",
23425 "type" : "string"
56122987 23426 }
44660702 23427 }
56122987 23428 },
56122987 23429 "permissions" : {
56122987
DM
23430 "check" : [
23431 "perm",
23432 "/pool/{poolid}",
23433 [
23434 "Pool.Allocate"
23435 ]
23436 ]
23437 },
7aacca6f 23438 "returns" : {
44660702 23439 "additionalProperties" : 0,
56122987 23440 "properties" : {
44660702
DM
23441 "comment" : {
23442 "optional" : 1,
23443 "type" : "string"
23444 },
7aacca6f 23445 "members" : {
7aacca6f
DM
23446 "items" : {
23447 "additionalProperties" : 1,
7aacca6f 23448 "properties" : {
7aacca6f
DM
23449 "id" : {
23450 "type" : "string"
23451 },
23452 "node" : {
23453 "type" : "string"
23454 },
44660702
DM
23455 "storage" : {
23456 "optional" : 1,
23457 "type" : "string"
23458 },
7aacca6f 23459 "type" : {
7aacca6f
DM
23460 "enum" : [
23461 "qemu",
23462 "lxc",
23463 "openvz",
23464 "storage"
44660702
DM
23465 ],
23466 "type" : "string"
23467 },
23468 "vmid" : {
23469 "optional" : 1,
23470 "type" : "integer"
7aacca6f 23471 }
44660702
DM
23472 },
23473 "type" : "object"
23474 },
23475 "type" : "array"
23476 }
23477 },
23478 "type" : "object"
23479 }
23480 },
23481 "PUT" : {
23482 "description" : "Update pool data.",
23483 "method" : "PUT",
23484 "name" : "update_pool",
23485 "parameters" : {
23486 "additionalProperties" : 0,
23487 "properties" : {
56122987
DM
23488 "comment" : {
23489 "optional" : 1,
23490 "type" : "string"
44660702
DM
23491 },
23492 "delete" : {
23493 "description" : "Remove vms/storage (instead of adding it).",
23494 "optional" : 1,
23495 "type" : "boolean"
23496 },
23497 "poolid" : {
23498 "format" : "pve-poolid",
23499 "type" : "string"
23500 },
23501 "storage" : {
23502 "description" : "List of storage IDs.",
23503 "format" : "pve-storage-id-list",
23504 "optional" : 1,
23505 "type" : "string"
23506 },
23507 "vms" : {
23508 "description" : "List of virtual machines.",
23509 "format" : "pve-vmid-list",
23510 "optional" : 1,
23511 "type" : "string"
56122987 23512 }
44660702
DM
23513 }
23514 },
23515 "permissions" : {
23516 "check" : [
23517 "perm",
23518 "/pool/{poolid}",
23519 [
23520 "Pool.Allocate"
23521 ]
23522 ],
23523 "description" : "You also need the right to modify permissions on any object you add/delete."
23524 },
23525 "protected" : 1,
23526 "returns" : {
23527 "type" : "null"
56122987
DM
23528 }
23529 }
23530 },
44660702
DM
23531 "leaf" : 1,
23532 "path" : "/pools/{poolid}",
7aacca6f 23533 "text" : "{poolid}"
56122987 23534 }
7aacca6f 23535 ],
56122987
DM
23536 "info" : {
23537 "GET" : {
44660702
DM
23538 "description" : "Pool index.",
23539 "method" : "GET",
23540 "name" : "index",
23541 "parameters" : {
23542 "additionalProperties" : 0
23543 },
23544 "permissions" : {
23545 "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>.",
23546 "user" : "all"
23547 },
56122987 23548 "returns" : {
44660702
DM
23549 "items" : {
23550 "properties" : {
23551 "poolid" : {
23552 "type" : "string"
23553 }
56122987 23554 },
44660702
DM
23555 "type" : "object"
23556 },
23557 "links" : [
23558 {
23559 "href" : "{poolid}",
23560 "rel" : "child"
23561 }
23562 ],
23563 "type" : "array"
23564 }
23565 },
23566 "POST" : {
23567 "description" : "Create new pool.",
23568 "method" : "POST",
23569 "name" : "create_pool",
23570 "parameters" : {
23571 "additionalProperties" : 0,
23572 "properties" : {
23573 "comment" : {
23574 "optional" : 1,
56122987 23575 "type" : "string"
7aacca6f 23576 },
44660702
DM
23577 "poolid" : {
23578 "format" : "pve-poolid",
7aacca6f 23579 "type" : "string"
56122987
DM
23580 }
23581 }
23582 },
56122987 23583 "permissions" : {
44660702
DM
23584 "check" : [
23585 "perm",
23586 "/pool/{poolid}",
23587 [
23588 "Pool.Allocate"
23589 ]
23590 ]
56122987 23591 },
44660702
DM
23592 "protected" : 1,
23593 "returns" : {
23594 "type" : "null"
23595 }
23596 }
23597 },
23598 "leaf" : 0,
23599 "path" : "/pools",
23600 "text" : "pools"
23601 },
23602 {
23603 "info" : {
23604 "GET" : {
23605 "description" : "API version details. The result also includes the global datacenter confguration.",
23606 "method" : "GET",
23607 "name" : "version",
7aacca6f
DM
23608 "parameters" : {
23609 "additionalProperties" : 0
23610 },
44660702
DM
23611 "permissions" : {
23612 "user" : "all"
23613 },
23614 "returns" : {
23615 "properties" : {
23616 "release" : {
23617 "type" : "string"
23618 },
23619 "repoid" : {
23620 "type" : "string"
23621 },
23622 "version" : {
23623 "type" : "string"
23624 }
23625 },
23626 "type" : "object"
23627 }
56122987
DM
23628 }
23629 },
44660702
DM
23630 "leaf" : 1,
23631 "path" : "/version",
56122987
DM
23632 "text" : "version"
23633 }
23634]
23635;
23636