]> git.proxmox.com Git - pve-docs.git/blame - api-viewer/apidata.js
pct: include information about pct restore
[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" : {
e94f0d56 114 "description" : "Descriptive comment.",
7aacca6f 115 "optional" : 1,
44660702 116 "type" : "string"
7aacca6f 117 },
44660702
DM
118 "delete" : {
119 "description" : "A list of settings you want to delete.",
120 "format" : "pve-configid-list",
7aacca6f 121 "optional" : 1,
44660702 122 "type" : "string"
7aacca6f 123 },
44660702
DM
124 "dest" : {
125 "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.",
126 "format" : "pve-fw-addr-spec",
7aacca6f 127 "optional" : 1,
44660702 128 "type" : "string"
7aacca6f
DM
129 },
130 "digest" : {
131 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 132 "maxLength" : 40,
7aacca6f 133 "optional" : 1,
44660702 134 "type" : "string"
7aacca6f 135 },
44660702
DM
136 "dport" : {
137 "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.",
138 "format" : "pve-fw-dport-spec",
7aacca6f 139 "optional" : 1,
44660702 140 "type" : "string"
7aacca6f 141 },
44660702 142 "enable" : {
e94f0d56 143 "description" : "Flag to enable/disable a rule.",
44660702 144 "minimum" : 0,
7aacca6f 145 "optional" : 1,
4bd7df8b
DM
146 "type" : "integer",
147 "typetext" : "integer (0- N)"
7aacca6f 148 },
44660702
DM
149 "group" : {
150 "description" : "Security Group name.",
4bd7df8b 151 "maxLength" : 18,
44660702
DM
152 "minLength" : 2,
153 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
154 "type" : "string"
155 },
156 "iface" : {
157 "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.",
158 "format" : "pve-iface",
159 "maxLength" : 20,
160 "minLength" : 2,
7aacca6f 161 "optional" : 1,
44660702 162 "type" : "string"
7aacca6f 163 },
44660702 164 "macro" : {
e94f0d56 165 "description" : "Use predefined standard macro.",
44660702
DM
166 "maxLength" : 128,
167 "optional" : 1,
168 "type" : "string"
7aacca6f
DM
169 },
170 "moveto" : {
171 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
44660702 172 "minimum" : 0,
7aacca6f 173 "optional" : 1,
4bd7df8b
DM
174 "type" : "integer",
175 "typetext" : "integer (0- N)"
7aacca6f 176 },
44660702
DM
177 "pos" : {
178 "description" : "Update rule at position <pos>.",
179 "minimum" : 0,
180 "optional" : 1,
4bd7df8b
DM
181 "type" : "integer",
182 "typetext" : "integer (0- N)"
7aacca6f 183 },
44660702
DM
184 "proto" : {
185 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
186 "format" : "pve-fw-protocol-spec",
7aacca6f 187 "optional" : 1,
44660702
DM
188 "type" : "string"
189 },
190 "source" : {
191 "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.",
192 "format" : "pve-fw-addr-spec",
193 "optional" : 1,
194 "type" : "string"
195 },
196 "sport" : {
197 "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.",
198 "format" : "pve-fw-sport-spec",
199 "optional" : 1,
200 "type" : "string"
7aacca6f
DM
201 },
202 "type" : {
e94f0d56 203 "description" : "Rule type.",
7aacca6f
DM
204 "enum" : [
205 "in",
206 "out",
207 "group"
208 ],
209 "optional" : 1,
210 "type" : "string"
211 }
212 }
213 },
7aacca6f
DM
214 "permissions" : {
215 "check" : [
216 "perm",
217 "/",
218 [
219 "Sys.Modify"
220 ]
221 ]
222 },
44660702 223 "protected" : 1,
7aacca6f
DM
224 "proxyto" : null,
225 "returns" : {
226 "type" : "null"
227 }
7aacca6f
DM
228 }
229 },
44660702 230 "leaf" : 1,
7aacca6f 231 "path" : "/cluster/firewall/groups/{group}/{pos}",
44660702 232 "text" : "{pos}"
7aacca6f
DM
233 }
234 ],
44660702
DM
235 "info" : {
236 "DELETE" : {
237 "description" : "Delete security group.",
238 "method" : "DELETE",
239 "name" : "delete_security_group",
240 "parameters" : {
241 "additionalProperties" : 0,
242 "properties" : {
243 "group" : {
244 "description" : "Security Group name.",
4bd7df8b 245 "maxLength" : 18,
44660702
DM
246 "minLength" : 2,
247 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
248 "type" : "string"
249 }
56122987 250 }
7aacca6f 251 },
44660702
DM
252 "permissions" : {
253 "check" : [
254 "perm",
255 "/",
256 [
257 "Sys.Modify"
258 ]
7aacca6f 259 ]
56122987 260 },
44660702
DM
261 "protected" : 1,
262 "returns" : {
263 "type" : "null"
56122987 264 }
7aacca6f 265 },
7aacca6f 266 "GET" : {
44660702 267 "description" : "List rules.",
7aacca6f 268 "method" : "GET",
44660702
DM
269 "name" : "get_rules",
270 "parameters" : {
271 "additionalProperties" : 0,
7aacca6f 272 "properties" : {
44660702
DM
273 "group" : {
274 "description" : "Security Group name.",
4bd7df8b 275 "maxLength" : 18,
44660702
DM
276 "minLength" : 2,
277 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
278 "type" : "string"
7aacca6f 279 }
44660702 280 }
7aacca6f
DM
281 },
282 "permissions" : {
283 "check" : [
284 "perm",
285 "/",
286 [
287 "Sys.Audit"
288 ]
289 ]
290 },
44660702
DM
291 "proxyto" : null,
292 "returns" : {
293 "items" : {
294 "properties" : {
295 "pos" : {
296 "type" : "integer"
297 }
298 },
299 "type" : "object"
300 },
301 "links" : [
302 {
303 "href" : "{pos}",
304 "rel" : "child"
305 }
306 ],
307 "type" : "array"
308 }
309 },
310 "POST" : {
311 "description" : "Create new rule.",
312 "method" : "POST",
313 "name" : "create_rule",
7aacca6f
DM
314 "parameters" : {
315 "additionalProperties" : 0,
316 "properties" : {
44660702
DM
317 "action" : {
318 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
319 "maxLength" : 20,
56122987 320 "minLength" : 2,
44660702
DM
321 "optional" : 0,
322 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 323 "type" : "string"
56122987 324 },
44660702 325 "comment" : {
e94f0d56 326 "description" : "Descriptive comment.",
56122987 327 "optional" : 1,
7aacca6f 328 "type" : "string"
56122987 329 },
44660702
DM
330 "dest" : {
331 "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
332 "format" : "pve-fw-addr-spec",
333 "optional" : 1,
44660702 334 "type" : "string"
56122987 335 },
44660702
DM
336 "digest" : {
337 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
338 "maxLength" : 40,
7aacca6f 339 "optional" : 1,
44660702 340 "type" : "string"
56122987 341 },
44660702
DM
342 "dport" : {
343 "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.",
344 "format" : "pve-fw-dport-spec",
56122987 345 "optional" : 1,
44660702 346 "type" : "string"
56122987 347 },
7aacca6f 348 "enable" : {
e94f0d56 349 "description" : "Flag to enable/disable a rule.",
44660702 350 "minimum" : 0,
7aacca6f 351 "optional" : 1,
4bd7df8b
DM
352 "type" : "integer",
353 "typetext" : "integer (0- N)"
56122987 354 },
44660702
DM
355 "group" : {
356 "description" : "Security Group name.",
4bd7df8b 357 "maxLength" : 18,
44660702 358 "minLength" : 2,
7aacca6f 359 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702
DM
360 "type" : "string"
361 },
362 "iface" : {
363 "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.",
364 "format" : "pve-iface",
365 "maxLength" : 20,
7aacca6f 366 "minLength" : 2,
44660702
DM
367 "optional" : 1,
368 "type" : "string"
56122987 369 },
7aacca6f 370 "macro" : {
e94f0d56 371 "description" : "Use predefined standard macro.",
44660702 372 "maxLength" : 128,
7aacca6f 373 "optional" : 1,
44660702 374 "type" : "string"
7aacca6f
DM
375 },
376 "pos" : {
377 "description" : "Update rule at position <pos>.",
44660702 378 "minimum" : 0,
56122987 379 "optional" : 1,
4bd7df8b
DM
380 "type" : "integer",
381 "typetext" : "integer (0- N)"
7aacca6f
DM
382 },
383 "proto" : {
384 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
44660702 385 "format" : "pve-fw-protocol-spec",
7aacca6f 386 "optional" : 1,
44660702
DM
387 "type" : "string"
388 },
389 "source" : {
390 "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.",
391 "format" : "pve-fw-addr-spec",
392 "optional" : 1,
393 "type" : "string"
394 },
395 "sport" : {
396 "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.",
397 "format" : "pve-fw-sport-spec",
398 "optional" : 1,
399 "type" : "string"
400 },
401 "type" : {
e94f0d56 402 "description" : "Rule type.",
44660702
DM
403 "enum" : [
404 "in",
405 "out",
406 "group"
407 ],
408 "optional" : 0,
409 "type" : "string"
56122987 410 }
44660702 411 }
56122987 412 },
56122987
DM
413 "permissions" : {
414 "check" : [
415 "perm",
416 "/",
417 [
418 "Sys.Modify"
419 ]
420 ]
421 },
44660702
DM
422 "protected" : 1,
423 "proxyto" : null,
56122987
DM
424 "returns" : {
425 "type" : "null"
7aacca6f 426 }
44660702
DM
427 }
428 },
429 "leaf" : 0,
430 "path" : "/cluster/firewall/groups/{group}",
431 "text" : "{group}"
432 }
433 ],
434 "info" : {
435 "GET" : {
436 "description" : "List security groups.",
437 "method" : "GET",
438 "name" : "list_security_groups",
439 "parameters" : {
440 "additionalProperties" : 0
441 },
442 "permissions" : {
443 "user" : "all"
444 },
445 "returns" : {
446 "items" : {
447 "properties" : {
448 "comment" : {
449 "optional" : 1,
450 "type" : "string"
451 },
452 "digest" : {
453 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
454 "maxLength" : 40,
455 "optional" : 0,
456 "type" : "string"
457 },
458 "group" : {
459 "description" : "Security Group name.",
4bd7df8b 460 "maxLength" : 18,
44660702
DM
461 "minLength" : 2,
462 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
463 "type" : "string"
464 }
465 },
466 "type" : "object"
56122987 467 },
44660702
DM
468 "links" : [
469 {
470 "href" : "{group}",
471 "rel" : "child"
472 }
473 ],
474 "type" : "array"
475 }
476 },
477 "POST" : {
478 "description" : "Create new security group.",
479 "method" : "POST",
480 "name" : "create_security_group",
481 "parameters" : {
482 "additionalProperties" : 0,
483 "properties" : {
484 "comment" : {
485 "optional" : 1,
486 "type" : "string"
487 },
488 "digest" : {
489 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
490 "maxLength" : 40,
491 "optional" : 1,
492 "type" : "string"
493 },
494 "group" : {
495 "description" : "Security Group name.",
4bd7df8b 496 "maxLength" : 18,
44660702
DM
497 "minLength" : 2,
498 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
499 "type" : "string"
500 },
501 "rename" : {
502 "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 503 "maxLength" : 18,
44660702
DM
504 "minLength" : 2,
505 "optional" : 1,
506 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
507 "type" : "string"
508 }
509 }
510 },
511 "permissions" : {
512 "check" : [
513 "perm",
514 "/",
515 [
516 "Sys.Modify"
517 ]
518 ]
519 },
520 "protected" : 1,
521 "returns" : {
522 "type" : "null"
523 }
524 }
525 },
526 "leaf" : 0,
527 "path" : "/cluster/firewall/groups",
528 "text" : "groups"
529 },
530 {
531 "children" : [
532 {
533 "info" : {
7aacca6f 534 "DELETE" : {
44660702
DM
535 "description" : "Delete rule.",
536 "method" : "DELETE",
537 "name" : "delete_rule",
538 "parameters" : {
539 "additionalProperties" : 0,
540 "properties" : {
541 "digest" : {
542 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
543 "maxLength" : 40,
544 "optional" : 1,
545 "type" : "string"
546 },
547 "pos" : {
548 "description" : "Update rule at position <pos>.",
549 "minimum" : 0,
550 "optional" : 1,
4bd7df8b
DM
551 "type" : "integer",
552 "typetext" : "integer (0- N)"
44660702
DM
553 }
554 }
555 },
56122987
DM
556 "permissions" : {
557 "check" : [
558 "perm",
559 "/",
560 [
7aacca6f 561 "Sys.Modify"
56122987
DM
562 ]
563 ]
564 },
44660702 565 "protected" : 1,
56122987
DM
566 "proxyto" : null,
567 "returns" : {
7aacca6f 568 "type" : "null"
44660702
DM
569 }
570 },
571 "GET" : {
572 "description" : "Get single rule data.",
573 "method" : "GET",
574 "name" : "get_rule",
56122987
DM
575 "parameters" : {
576 "additionalProperties" : 0,
577 "properties" : {
578 "pos" : {
7aacca6f 579 "description" : "Update rule at position <pos>.",
44660702 580 "minimum" : 0,
56122987 581 "optional" : 1,
4bd7df8b
DM
582 "type" : "integer",
583 "typetext" : "integer (0- N)"
7aacca6f
DM
584 }
585 }
586 },
7aacca6f
DM
587 "permissions" : {
588 "check" : [
589 "perm",
590 "/",
591 [
592 "Sys.Audit"
593 ]
594 ]
56122987 595 },
44660702
DM
596 "proxyto" : null,
597 "returns" : {
7aacca6f 598 "properties" : {
44660702
DM
599 "pos" : {
600 "type" : "integer"
7aacca6f 601 }
44660702
DM
602 },
603 "type" : "object"
604 }
56122987 605 },
44660702
DM
606 "PUT" : {
607 "description" : "Modify rule data.",
608 "method" : "PUT",
609 "name" : "update_rule",
7aacca6f
DM
610 "parameters" : {
611 "additionalProperties" : 0,
612 "properties" : {
44660702
DM
613 "action" : {
614 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
615 "maxLength" : 20,
616 "minLength" : 2,
617 "optional" : 1,
618 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
619 "type" : "string"
7aacca6f 620 },
44660702 621 "comment" : {
e94f0d56 622 "description" : "Descriptive comment.",
44660702
DM
623 "optional" : 1,
624 "type" : "string"
7aacca6f 625 },
44660702
DM
626 "delete" : {
627 "description" : "A list of settings you want to delete.",
628 "format" : "pve-configid-list",
629 "optional" : 1,
630 "type" : "string"
631 },
632 "dest" : {
633 "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.",
634 "format" : "pve-fw-addr-spec",
635 "optional" : 1,
636 "type" : "string"
637 },
638 "digest" : {
639 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
640 "maxLength" : 40,
641 "optional" : 1,
642 "type" : "string"
643 },
644 "dport" : {
645 "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.",
646 "format" : "pve-fw-dport-spec",
647 "optional" : 1,
648 "type" : "string"
649 },
650 "enable" : {
e94f0d56 651 "description" : "Flag to enable/disable a rule.",
44660702
DM
652 "minimum" : 0,
653 "optional" : 1,
4bd7df8b
DM
654 "type" : "integer",
655 "typetext" : "integer (0- N)"
44660702
DM
656 },
657 "iface" : {
658 "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.",
659 "format" : "pve-iface",
660 "maxLength" : 20,
7aacca6f 661 "minLength" : 2,
44660702
DM
662 "optional" : 1,
663 "type" : "string"
7aacca6f 664 },
44660702 665 "macro" : {
e94f0d56 666 "description" : "Use predefined standard macro.",
44660702
DM
667 "maxLength" : 128,
668 "optional" : 1,
669 "type" : "string"
670 },
671 "moveto" : {
672 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
673 "minimum" : 0,
674 "optional" : 1,
4bd7df8b
DM
675 "type" : "integer",
676 "typetext" : "integer (0- N)"
44660702
DM
677 },
678 "pos" : {
679 "description" : "Update rule at position <pos>.",
680 "minimum" : 0,
681 "optional" : 1,
4bd7df8b
DM
682 "type" : "integer",
683 "typetext" : "integer (0- N)"
44660702
DM
684 },
685 "proto" : {
686 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
687 "format" : "pve-fw-protocol-spec",
688 "optional" : 1,
689 "type" : "string"
690 },
691 "source" : {
692 "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.",
693 "format" : "pve-fw-addr-spec",
694 "optional" : 1,
695 "type" : "string"
696 },
697 "sport" : {
698 "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.",
699 "format" : "pve-fw-sport-spec",
700 "optional" : 1,
701 "type" : "string"
702 },
703 "type" : {
e94f0d56 704 "description" : "Rule type.",
44660702
DM
705 "enum" : [
706 "in",
707 "out",
708 "group"
709 ],
710 "optional" : 1,
711 "type" : "string"
7aacca6f 712 }
56122987
DM
713 }
714 },
7aacca6f
DM
715 "permissions" : {
716 "check" : [
717 "perm",
718 "/",
719 [
720 "Sys.Modify"
721 ]
722 ]
723 },
44660702
DM
724 "protected" : 1,
725 "proxyto" : null,
726 "returns" : {
727 "type" : "null"
728 }
7aacca6f 729 }
56122987 730 },
44660702
DM
731 "leaf" : 1,
732 "path" : "/cluster/firewall/rules/{pos}",
733 "text" : "{pos}"
7aacca6f
DM
734 }
735 ],
7aacca6f 736 "info" : {
44660702
DM
737 "GET" : {
738 "description" : "List rules.",
739 "method" : "GET",
740 "name" : "get_rules",
7aacca6f 741 "parameters" : {
44660702 742 "additionalProperties" : 0
7aacca6f
DM
743 },
744 "permissions" : {
745 "check" : [
746 "perm",
747 "/",
748 [
44660702 749 "Sys.Audit"
7aacca6f
DM
750 ]
751 ]
752 },
44660702 753 "proxyto" : null,
7aacca6f 754 "returns" : {
7aacca6f
DM
755 "items" : {
756 "properties" : {
44660702
DM
757 "pos" : {
758 "type" : "integer"
7aacca6f
DM
759 }
760 },
761 "type" : "object"
56122987 762 },
7aacca6f
DM
763 "links" : [
764 {
44660702 765 "href" : "{pos}",
7aacca6f
DM
766 "rel" : "child"
767 }
44660702
DM
768 ],
769 "type" : "array"
7aacca6f 770 }
44660702 771 },
7aacca6f 772 "POST" : {
44660702 773 "description" : "Create new rule.",
7aacca6f 774 "method" : "POST",
44660702 775 "name" : "create_rule",
7aacca6f
DM
776 "parameters" : {
777 "additionalProperties" : 0,
778 "properties" : {
44660702
DM
779 "action" : {
780 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
781 "maxLength" : 20,
7aacca6f 782 "minLength" : 2,
44660702
DM
783 "optional" : 0,
784 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
785 "type" : "string"
7aacca6f
DM
786 },
787 "comment" : {
e94f0d56 788 "description" : "Descriptive comment.",
7aacca6f
DM
789 "optional" : 1,
790 "type" : "string"
44660702
DM
791 },
792 "dest" : {
793 "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.",
794 "format" : "pve-fw-addr-spec",
795 "optional" : 1,
796 "type" : "string"
797 },
798 "digest" : {
799 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
800 "maxLength" : 40,
801 "optional" : 1,
802 "type" : "string"
803 },
804 "dport" : {
805 "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.",
806 "format" : "pve-fw-dport-spec",
807 "optional" : 1,
808 "type" : "string"
809 },
810 "enable" : {
e94f0d56 811 "description" : "Flag to enable/disable a rule.",
44660702
DM
812 "minimum" : 0,
813 "optional" : 1,
4bd7df8b
DM
814 "type" : "integer",
815 "typetext" : "integer (0- N)"
44660702
DM
816 },
817 "iface" : {
818 "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.",
819 "format" : "pve-iface",
820 "maxLength" : 20,
821 "minLength" : 2,
822 "optional" : 1,
823 "type" : "string"
824 },
825 "macro" : {
e94f0d56 826 "description" : "Use predefined standard macro.",
44660702
DM
827 "maxLength" : 128,
828 "optional" : 1,
829 "type" : "string"
830 },
831 "pos" : {
832 "description" : "Update rule at position <pos>.",
833 "minimum" : 0,
834 "optional" : 1,
4bd7df8b
DM
835 "type" : "integer",
836 "typetext" : "integer (0- N)"
44660702
DM
837 },
838 "proto" : {
839 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
840 "format" : "pve-fw-protocol-spec",
841 "optional" : 1,
842 "type" : "string"
843 },
844 "source" : {
845 "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.",
846 "format" : "pve-fw-addr-spec",
847 "optional" : 1,
848 "type" : "string"
849 },
850 "sport" : {
851 "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.",
852 "format" : "pve-fw-sport-spec",
853 "optional" : 1,
854 "type" : "string"
855 },
856 "type" : {
e94f0d56 857 "description" : "Rule type.",
44660702
DM
858 "enum" : [
859 "in",
860 "out",
861 "group"
862 ],
863 "optional" : 0,
864 "type" : "string"
7aacca6f
DM
865 }
866 }
867 },
868 "permissions" : {
869 "check" : [
870 "perm",
871 "/",
872 [
873 "Sys.Modify"
874 ]
875 ]
876 },
44660702
DM
877 "protected" : 1,
878 "proxyto" : null,
7aacca6f 879 "returns" : {
44660702
DM
880 "type" : "null"
881 }
882 }
883 },
884 "leaf" : 0,
885 "path" : "/cluster/firewall/rules",
886 "text" : "rules"
887 },
888 {
889 "children" : [
890 {
891 "children" : [
892 {
893 "info" : {
894 "DELETE" : {
895 "description" : "Remove IP or Network from IPSet.",
896 "method" : "DELETE",
897 "name" : "remove_ip",
898 "parameters" : {
899 "additionalProperties" : 0,
900 "properties" : {
901 "cidr" : {
902 "description" : "Network/IP specification in CIDR format.",
903 "format" : "IPorCIDRorAlias",
904 "type" : "string"
905 },
906 "digest" : {
907 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
908 "maxLength" : 40,
909 "optional" : 1,
910 "type" : "string"
911 },
912 "name" : {
913 "description" : "IP set name.",
914 "maxLength" : 64,
915 "minLength" : 2,
916 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
917 "type" : "string"
918 }
919 }
920 },
921 "permissions" : {
922 "check" : [
923 "perm",
924 "/",
925 [
926 "Sys.Modify"
927 ]
928 ]
929 },
930 "protected" : 1,
931 "returns" : {
932 "type" : "null"
933 }
7aacca6f 934 },
44660702
DM
935 "GET" : {
936 "description" : "Read IP or Network settings from IPSet.",
937 "method" : "GET",
938 "name" : "read_ip",
939 "parameters" : {
940 "additionalProperties" : 0,
941 "properties" : {
942 "cidr" : {
943 "description" : "Network/IP specification in CIDR format.",
944 "format" : "IPorCIDRorAlias",
945 "type" : "string"
946 },
947 "name" : {
948 "description" : "IP set name.",
949 "maxLength" : 64,
950 "minLength" : 2,
951 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
952 "type" : "string"
953 }
954 }
955 },
956 "permissions" : {
957 "check" : [
958 "perm",
959 "/",
960 [
961 "Sys.Audit"
962 ]
963 ]
964 },
965 "protected" : 1,
966 "returns" : {
967 "type" : "object"
968 }
7aacca6f 969 },
44660702
DM
970 "PUT" : {
971 "description" : "Update IP or Network settings",
972 "method" : "PUT",
973 "name" : "update_ip",
974 "parameters" : {
975 "additionalProperties" : 0,
976 "properties" : {
977 "cidr" : {
978 "description" : "Network/IP specification in CIDR format.",
979 "format" : "IPorCIDRorAlias",
980 "type" : "string"
981 },
982 "comment" : {
983 "optional" : 1,
984 "type" : "string"
985 },
986 "digest" : {
987 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
988 "maxLength" : 40,
989 "optional" : 1,
990 "type" : "string"
991 },
992 "name" : {
993 "description" : "IP set name.",
994 "maxLength" : 64,
995 "minLength" : 2,
996 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
997 "type" : "string"
998 },
999 "nomatch" : {
1000 "optional" : 1,
1001 "type" : "boolean"
1002 }
1003 }
1004 },
1005 "permissions" : {
1006 "check" : [
1007 "perm",
1008 "/",
1009 [
1010 "Sys.Modify"
1011 ]
1012 ]
1013 },
1014 "protected" : 1,
1015 "returns" : {
1016 "type" : "null"
1017 }
7aacca6f
DM
1018 }
1019 },
44660702
DM
1020 "leaf" : 1,
1021 "path" : "/cluster/firewall/ipset/{name}/{cidr}",
1022 "text" : "{cidr}"
7aacca6f 1023 }
44660702 1024 ],
7aacca6f
DM
1025 "info" : {
1026 "DELETE" : {
44660702
DM
1027 "description" : "Delete IPSet",
1028 "method" : "DELETE",
1029 "name" : "delete_ipset",
56122987 1030 "parameters" : {
44660702 1031 "additionalProperties" : 0,
56122987
DM
1032 "properties" : {
1033 "name" : {
44660702 1034 "description" : "IP set name.",
56122987 1035 "maxLength" : 64,
44660702 1036 "minLength" : 2,
56122987 1037 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 1038 "type" : "string"
56122987 1039 }
44660702 1040 }
7aacca6f 1041 },
56122987
DM
1042 "permissions" : {
1043 "check" : [
1044 "perm",
1045 "/",
1046 [
1047 "Sys.Modify"
1048 ]
1049 ]
1050 },
7aacca6f
DM
1051 "protected" : 1,
1052 "returns" : {
1053 "type" : "null"
44660702 1054 }
7aacca6f 1055 },
44660702
DM
1056 "GET" : {
1057 "description" : "List IPSet content",
1058 "method" : "GET",
1059 "name" : "get_ipset",
56122987
DM
1060 "parameters" : {
1061 "additionalProperties" : 0,
1062 "properties" : {
7aacca6f 1063 "name" : {
44660702 1064 "description" : "IP set name.",
7aacca6f 1065 "maxLength" : 64,
7aacca6f 1066 "minLength" : 2,
44660702 1067 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 1068 "type" : "string"
56122987 1069 }
7aacca6f 1070 }
56122987 1071 },
56122987
DM
1072 "permissions" : {
1073 "check" : [
1074 "perm",
1075 "/",
1076 [
44660702 1077 "Sys.Audit"
56122987
DM
1078 ]
1079 ]
44660702
DM
1080 },
1081 "returns" : {
1082 "items" : {
1083 "properties" : {
1084 "cidr" : {
1085 "type" : "string"
1086 },
1087 "comment" : {
1088 "optional" : 1,
1089 "type" : "string"
1090 },
1091 "digest" : {
1092 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1093 "maxLength" : 40,
1094 "optional" : 0,
1095 "type" : "string"
1096 },
1097 "nomatch" : {
1098 "optional" : 1,
1099 "type" : "boolean"
1100 }
1101 },
1102 "type" : "object"
1103 },
1104 "links" : [
1105 {
1106 "href" : "{cidr}",
1107 "rel" : "child"
1108 }
1109 ],
1110 "type" : "array"
7aacca6f
DM
1111 }
1112 },
44660702
DM
1113 "POST" : {
1114 "description" : "Add IP or Network to IPSet.",
1115 "method" : "POST",
1116 "name" : "create_ip",
56122987
DM
1117 "parameters" : {
1118 "additionalProperties" : 0,
1119 "properties" : {
44660702
DM
1120 "cidr" : {
1121 "description" : "Network/IP specification in CIDR format.",
1122 "format" : "IPorCIDRorAlias",
1123 "type" : "string"
1124 },
1125 "comment" : {
1126 "optional" : 1,
1127 "type" : "string"
1128 },
1129 "name" : {
1130 "description" : "IP set name.",
1131 "maxLength" : 64,
1132 "minLength" : 2,
1133 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1134 "type" : "string"
1135 },
1136 "nomatch" : {
1137 "optional" : 1,
1138 "type" : "boolean"
56122987
DM
1139 }
1140 }
1141 },
56122987
DM
1142 "permissions" : {
1143 "check" : [
1144 "perm",
1145 "/",
1146 [
44660702 1147 "Sys.Modify"
56122987
DM
1148 ]
1149 ]
1150 },
44660702 1151 "protected" : 1,
56122987 1152 "returns" : {
44660702
DM
1153 "type" : "null"
1154 }
56122987
DM
1155 }
1156 },
44660702
DM
1157 "leaf" : 0,
1158 "path" : "/cluster/firewall/ipset/{name}",
1159 "text" : "{name}"
56122987
DM
1160 }
1161 ],
56122987 1162 "info" : {
44660702
DM
1163 "GET" : {
1164 "description" : "List IPSets",
1165 "method" : "GET",
1166 "name" : "ipset_index",
56122987 1167 "parameters" : {
7aacca6f 1168 "additionalProperties" : 0
56122987 1169 },
56122987
DM
1170 "permissions" : {
1171 "check" : [
1172 "perm",
1173 "/",
1174 [
7aacca6f 1175 "Sys.Audit"
56122987
DM
1176 ]
1177 ]
1178 },
56122987
DM
1179 "returns" : {
1180 "items" : {
1181 "properties" : {
44660702
DM
1182 "comment" : {
1183 "optional" : 1,
1184 "type" : "string"
56122987 1185 },
44660702
DM
1186 "digest" : {
1187 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1188 "maxLength" : 40,
1189 "optional" : 0,
1190 "type" : "string"
1191 },
1192 "name" : {
1193 "description" : "IP set name.",
1194 "maxLength" : 64,
1195 "minLength" : 2,
1196 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 1197 "type" : "string"
56122987
DM
1198 }
1199 },
1200 "type" : "object"
44660702
DM
1201 },
1202 "links" : [
1203 {
1204 "href" : "{name}",
1205 "rel" : "child"
1206 }
1207 ],
1208 "type" : "array"
56122987 1209 }
44660702
DM
1210 },
1211 "POST" : {
1212 "description" : "Create new IPSet",
1213 "method" : "POST",
1214 "name" : "create_ipset",
7aacca6f
DM
1215 "parameters" : {
1216 "additionalProperties" : 0,
1217 "properties" : {
44660702
DM
1218 "comment" : {
1219 "optional" : 1,
1220 "type" : "string"
1221 },
1222 "digest" : {
1223 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1224 "maxLength" : 40,
1225 "optional" : 1,
1226 "type" : "string"
1227 },
1228 "name" : {
1229 "description" : "IP set name.",
1230 "maxLength" : 64,
1231 "minLength" : 2,
1232 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1233 "type" : "string"
1234 },
1235 "rename" : {
1236 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
1237 "maxLength" : 64,
1238 "minLength" : 2,
1239 "optional" : 1,
1240 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1241 "type" : "string"
7aacca6f
DM
1242 }
1243 }
1244 },
56122987
DM
1245 "permissions" : {
1246 "check" : [
1247 "perm",
1248 "/",
1249 [
44660702 1250 "Sys.Modify"
56122987
DM
1251 ]
1252 ]
1253 },
44660702 1254 "protected" : 1,
56122987 1255 "returns" : {
44660702
DM
1256 "type" : "null"
1257 }
56122987 1258 }
7aacca6f 1259 },
44660702
DM
1260 "leaf" : 0,
1261 "path" : "/cluster/firewall/ipset",
1262 "text" : "ipset"
1263 },
56122987 1264 {
44660702
DM
1265 "children" : [
1266 {
1267 "info" : {
1268 "DELETE" : {
1269 "description" : "Remove IP or Network alias.",
1270 "method" : "DELETE",
1271 "name" : "remove_alias",
1272 "parameters" : {
1273 "additionalProperties" : 0,
1274 "properties" : {
1275 "digest" : {
1276 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1277 "maxLength" : 40,
1278 "optional" : 1,
1279 "type" : "string"
1280 },
1281 "name" : {
1282 "description" : "Alias name.",
1283 "maxLength" : 64,
1284 "minLength" : 2,
1285 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1286 "type" : "string"
1287 }
1288 }
1289 },
1290 "permissions" : {
1291 "check" : [
1292 "perm",
1293 "/",
1294 [
1295 "Sys.Modify"
1296 ]
1297 ]
1298 },
1299 "protected" : 1,
1300 "returns" : {
1301 "type" : "null"
1302 }
1303 },
1304 "GET" : {
1305 "description" : "Read alias.",
1306 "method" : "GET",
1307 "name" : "read_alias",
1308 "parameters" : {
1309 "additionalProperties" : 0,
1310 "properties" : {
1311 "name" : {
1312 "description" : "Alias name.",
1313 "maxLength" : 64,
1314 "minLength" : 2,
1315 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1316 "type" : "string"
1317 }
1318 }
1319 },
1320 "permissions" : {
1321 "check" : [
1322 "perm",
1323 "/",
1324 [
1325 "Sys.Audit"
1326 ]
1327 ]
1328 },
1329 "returns" : {
1330 "type" : "object"
1331 }
1332 },
1333 "PUT" : {
1334 "description" : "Update IP or Network alias.",
1335 "method" : "PUT",
1336 "name" : "update_alias",
1337 "parameters" : {
1338 "additionalProperties" : 0,
1339 "properties" : {
1340 "cidr" : {
1341 "description" : "Network/IP specification in CIDR format.",
1342 "format" : "IPorCIDR",
1343 "type" : "string"
1344 },
1345 "comment" : {
1346 "optional" : 1,
1347 "type" : "string"
1348 },
1349 "digest" : {
1350 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1351 "maxLength" : 40,
1352 "optional" : 1,
1353 "type" : "string"
1354 },
1355 "name" : {
1356 "description" : "Alias name.",
1357 "maxLength" : 64,
1358 "minLength" : 2,
1359 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1360 "type" : "string"
1361 },
1362 "rename" : {
1363 "description" : "Rename an existing alias.",
1364 "maxLength" : 64,
1365 "minLength" : 2,
1366 "optional" : 1,
1367 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1368 "type" : "string"
1369 }
1370 }
1371 },
1372 "permissions" : {
1373 "check" : [
1374 "perm",
1375 "/",
1376 [
1377 "Sys.Modify"
1378 ]
1379 ]
1380 },
1381 "protected" : 1,
1382 "returns" : {
1383 "type" : "null"
1384 }
1385 }
1386 },
1387 "leaf" : 1,
1388 "path" : "/cluster/firewall/aliases/{name}",
1389 "text" : "{name}"
1390 }
1391 ],
1392 "info" : {
1393 "GET" : {
1394 "description" : "List aliases",
1395 "method" : "GET",
1396 "name" : "get_aliases",
1397 "parameters" : {
1398 "additionalProperties" : 0
1399 },
1400 "permissions" : {
1401 "check" : [
1402 "perm",
1403 "/",
1404 [
1405 "Sys.Audit"
1406 ]
1407 ]
1408 },
1409 "returns" : {
1410 "items" : {
1411 "properties" : {
1412 "cidr" : {
1413 "type" : "string"
1414 },
1415 "comment" : {
1416 "optional" : 1,
1417 "type" : "string"
1418 },
1419 "digest" : {
1420 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1421 "maxLength" : 40,
1422 "optional" : 0,
1423 "type" : "string"
1424 },
1425 "name" : {
1426 "type" : "string"
1427 }
1428 },
1429 "type" : "object"
1430 },
1431 "links" : [
1432 {
1433 "href" : "{name}",
1434 "rel" : "child"
1435 }
1436 ],
1437 "type" : "array"
1438 }
1439 },
1440 "POST" : {
1441 "description" : "Create IP or Network Alias.",
1442 "method" : "POST",
1443 "name" : "create_alias",
56122987
DM
1444 "parameters" : {
1445 "additionalProperties" : 0,
1446 "properties" : {
44660702
DM
1447 "cidr" : {
1448 "description" : "Network/IP specification in CIDR format.",
1449 "format" : "IPorCIDR",
1450 "type" : "string"
1451 },
1452 "comment" : {
1453 "optional" : 1,
1454 "type" : "string"
1455 },
1456 "name" : {
1457 "description" : "Alias name.",
1458 "maxLength" : 64,
1459 "minLength" : 2,
1460 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
1461 "type" : "string"
56122987
DM
1462 }
1463 }
1464 },
56122987
DM
1465 "permissions" : {
1466 "check" : [
1467 "perm",
1468 "/",
1469 [
1470 "Sys.Modify"
1471 ]
1472 ]
1473 },
44660702 1474 "protected" : 1,
56122987
DM
1475 "returns" : {
1476 "type" : "null"
1477 }
44660702
DM
1478 }
1479 },
1480 "leaf" : 0,
1481 "path" : "/cluster/firewall/aliases",
1482 "text" : "aliases"
1483 },
1484 {
1485 "info" : {
1486 "GET" : {
1487 "description" : "Get Firewall options.",
1488 "method" : "GET",
1489 "name" : "get_options",
1490 "parameters" : {
1491 "additionalProperties" : 0
7aacca6f 1492 },
56122987
DM
1493 "permissions" : {
1494 "check" : [
1495 "perm",
1496 "/",
1497 [
44660702 1498 "Sys.Audit"
56122987
DM
1499 ]
1500 ]
1501 },
44660702 1502 "returns" : {
56122987 1503 "properties" : {
44660702
DM
1504 "enable" : {
1505 "description" : "Enable or disable the firewall cluster wide.",
1506 "minimum" : 0,
56122987 1507 "optional" : 1,
7aacca6f 1508 "type" : "integer"
56122987 1509 },
44660702
DM
1510 "policy_in" : {
1511 "description" : "Input policy.",
1512 "enum" : [
1513 "ACCEPT",
1514 "REJECT",
1515 "DROP"
1516 ],
56122987 1517 "optional" : 1,
44660702 1518 "type" : "string"
7aacca6f 1519 },
44660702
DM
1520 "policy_out" : {
1521 "description" : "Output policy.",
1522 "enum" : [
1523 "ACCEPT",
1524 "REJECT",
1525 "DROP"
1526 ],
7aacca6f 1527 "optional" : 1,
44660702
DM
1528 "type" : "string"
1529 }
1530 },
1531 "type" : "object"
1532 }
1533 },
1534 "PUT" : {
1535 "description" : "Set Firewall options.",
1536 "method" : "PUT",
1537 "name" : "set_options",
1538 "parameters" : {
1539 "additionalProperties" : 0,
1540 "properties" : {
1541 "delete" : {
1542 "description" : "A list of settings you want to delete.",
1543 "format" : "pve-configid-list",
56122987 1544 "optional" : 1,
44660702 1545 "type" : "string"
56122987 1546 },
44660702
DM
1547 "digest" : {
1548 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
1549 "maxLength" : 40,
56122987 1550 "optional" : 1,
44660702 1551 "type" : "string"
56122987 1552 },
44660702
DM
1553 "enable" : {
1554 "description" : "Enable or disable the firewall cluster wide.",
7aacca6f 1555 "minimum" : 0,
56122987 1556 "optional" : 1,
4bd7df8b
DM
1557 "type" : "integer",
1558 "typetext" : "integer (0- N)"
56122987 1559 },
44660702
DM
1560 "policy_in" : {
1561 "description" : "Input policy.",
56122987 1562 "enum" : [
44660702
DM
1563 "ACCEPT",
1564 "REJECT",
1565 "DROP"
56122987 1566 ],
56122987 1567 "optional" : 1,
44660702 1568 "type" : "string"
56122987 1569 },
44660702
DM
1570 "policy_out" : {
1571 "description" : "Output policy.",
56122987 1572 "enum" : [
44660702
DM
1573 "ACCEPT",
1574 "REJECT",
1575 "DROP"
56122987 1576 ],
7aacca6f 1577 "optional" : 1,
44660702 1578 "type" : "string"
56122987 1579 }
44660702
DM
1580 }
1581 },
1582 "permissions" : {
1583 "check" : [
1584 "perm",
1585 "/",
1586 [
1587 "Sys.Modify"
1588 ]
1589 ]
7aacca6f
DM
1590 },
1591 "protected" : 1,
44660702
DM
1592 "returns" : {
1593 "type" : "null"
1594 }
1595 }
1596 },
1597 "leaf" : 1,
1598 "path" : "/cluster/firewall/options",
1599 "text" : "options"
1600 },
1601 {
1602 "info" : {
7aacca6f 1603 "GET" : {
44660702 1604 "description" : "List available macros",
7aacca6f 1605 "method" : "GET",
44660702
DM
1606 "name" : "get_macros",
1607 "parameters" : {
1608 "additionalProperties" : 0
7aacca6f 1609 },
44660702
DM
1610 "permissions" : {
1611 "user" : "all"
1612 },
1613 "returns" : {
1614 "items" : {
1615 "properties" : {
1616 "descr" : {
1617 "description" : "More verbose description (if available).",
1618 "type" : "string"
1619 },
1620 "macro" : {
1621 "description" : "Macro name.",
1622 "type" : "string"
1623 }
1624 },
1625 "type" : "object"
1626 },
1627 "type" : "array"
1628 }
1629 }
1630 },
1631 "leaf" : 1,
1632 "path" : "/cluster/firewall/macros",
1633 "text" : "macros"
1634 },
1635 {
1636 "info" : {
1637 "GET" : {
1638 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
1639 "method" : "GET",
1640 "name" : "refs",
7aacca6f 1641 "parameters" : {
44660702 1642 "additionalProperties" : 0,
7aacca6f 1643 "properties" : {
44660702
DM
1644 "type" : {
1645 "description" : "Only list references of specified type.",
1646 "enum" : [
1647 "alias",
1648 "ipset"
1649 ],
1650 "optional" : 1,
1651 "type" : "string"
7aacca6f 1652 }
44660702 1653 }
7aacca6f
DM
1654 },
1655 "permissions" : {
1656 "check" : [
1657 "perm",
1658 "/",
1659 [
1660 "Sys.Audit"
1661 ]
1662 ]
1663 },
44660702
DM
1664 "returns" : {
1665 "items" : {
1666 "properties" : {
1667 "comment" : {
1668 "optional" : 1,
1669 "type" : "string"
1670 },
1671 "name" : {
1672 "type" : "string"
1673 },
1674 "ref" : {
1675 "type" : "string"
1676 },
1677 "type" : {
1678 "enum" : [
1679 "alias",
1680 "ipset"
1681 ],
1682 "type" : "string"
1683 }
1684 },
1685 "type" : "object"
1686 },
1687 "type" : "array"
1688 }
56122987
DM
1689 }
1690 },
7aacca6f 1691 "leaf" : 1,
44660702
DM
1692 "path" : "/cluster/firewall/refs",
1693 "text" : "refs"
56122987
DM
1694 }
1695 ],
56122987 1696 "info" : {
44660702
DM
1697 "GET" : {
1698 "description" : "Directory index.",
1699 "method" : "GET",
1700 "name" : "index",
56122987 1701 "parameters" : {
56122987
DM
1702 "additionalProperties" : 0
1703 },
44660702
DM
1704 "permissions" : {
1705 "user" : "all"
1706 },
56122987 1707 "returns" : {
44660702
DM
1708 "items" : {
1709 "properties" : {},
1710 "type" : "object"
1711 },
7aacca6f
DM
1712 "links" : [
1713 {
44660702
DM
1714 "href" : "{name}",
1715 "rel" : "child"
7aacca6f
DM
1716 }
1717 ],
7aacca6f 1718 "type" : "array"
7aacca6f 1719 }
56122987
DM
1720 }
1721 },
44660702
DM
1722 "leaf" : 0,
1723 "path" : "/cluster/firewall",
1724 "text" : "firewall"
7aacca6f
DM
1725 },
1726 {
56122987
DM
1727 "children" : [
1728 {
56122987 1729 "info" : {
44660702
DM
1730 "DELETE" : {
1731 "description" : "Delete vzdump backup job definition.",
1732 "method" : "DELETE",
1733 "name" : "delete_job",
1734 "parameters" : {
1735 "additionalProperties" : 0,
1736 "properties" : {
1737 "id" : {
1738 "description" : "The job ID.",
1739 "maxLength" : 50,
1740 "type" : "string"
1741 }
1742 }
1743 },
1744 "permissions" : {
1745 "check" : [
1746 "perm",
1747 "/",
1748 [
1749 "Sys.Modify"
1750 ]
1751 ]
1752 },
1753 "protected" : 1,
56122987
DM
1754 "returns" : {
1755 "type" : "null"
44660702
DM
1756 }
1757 },
1758 "GET" : {
1759 "description" : "Read vzdump backup job definition.",
1760 "method" : "GET",
1761 "name" : "read_job",
1762 "parameters" : {
1763 "additionalProperties" : 0,
1764 "properties" : {
1765 "id" : {
1766 "description" : "The job ID.",
1767 "maxLength" : 50,
1768 "type" : "string"
1769 }
1770 }
56122987 1771 },
7aacca6f
DM
1772 "permissions" : {
1773 "check" : [
1774 "perm",
1775 "/",
1776 [
44660702 1777 "Sys.Audit"
7aacca6f
DM
1778 ]
1779 ]
1780 },
44660702
DM
1781 "returns" : {
1782 "type" : "object"
1783 }
1784 },
1785 "PUT" : {
1786 "description" : "Update vzdump backup job definition.",
1787 "method" : "PUT",
1788 "name" : "update_job",
56122987 1789 "parameters" : {
44660702 1790 "additionalProperties" : 0,
56122987 1791 "properties" : {
44660702
DM
1792 "all" : {
1793 "default" : 0,
1794 "description" : "Backup all known guest systems on this host.",
7aacca6f 1795 "optional" : 1,
44660702 1796 "type" : "boolean"
7aacca6f 1797 },
44660702
DM
1798 "bwlimit" : {
1799 "default" : 0,
1800 "description" : "Limit I/O bandwidth (KBytes per second).",
1801 "minimum" : 0,
1802 "optional" : 1,
4bd7df8b
DM
1803 "type" : "integer",
1804 "typetext" : "integer (0- N)"
44660702
DM
1805 },
1806 "compress" : {
1807 "default" : "0",
1808 "description" : "Compress dump file.",
7aacca6f 1809 "enum" : [
44660702
DM
1810 "0",
1811 "1",
1812 "gzip",
1813 "lzo"
7aacca6f 1814 ],
44660702
DM
1815 "optional" : 1,
1816 "type" : "string"
7aacca6f 1817 },
44660702
DM
1818 "delete" : {
1819 "description" : "A list of settings you want to delete.",
1820 "format" : "pve-configid-list",
7aacca6f 1821 "optional" : 1,
44660702 1822 "type" : "string"
56122987 1823 },
44660702
DM
1824 "dow" : {
1825 "description" : "Day of week selection.",
1826 "format" : "pve-day-of-week-list",
7aacca6f 1827 "optional" : 1,
44660702 1828 "type" : "string"
56122987 1829 },
44660702
DM
1830 "dumpdir" : {
1831 "description" : "Store resulting files to specified directory.",
56122987 1832 "optional" : 1,
44660702 1833 "type" : "string"
56122987 1834 },
44660702
DM
1835 "enabled" : {
1836 "default" : "1",
1837 "description" : "Enable or disable the job.",
1838 "optional" : 1,
1839 "type" : "boolean"
1840 },
1841 "exclude" : {
1842 "description" : "Exclude specified guest systems (assumes --all)",
1843 "format" : "pve-vmid-list",
1844 "optional" : 1,
1845 "type" : "string"
1846 },
1847 "exclude-path" : {
1848 "description" : "Exclude certain files/directories (shell globs).",
1849 "format" : "string-alist",
1850 "optional" : 1,
1851 "type" : "string"
1852 },
1853 "id" : {
1854 "description" : "The job ID.",
1855 "maxLength" : 50,
1856 "type" : "string"
1857 },
1858 "ionice" : {
1859 "default" : 7,
1860 "description" : "Set CFQ ionice priority.",
1861 "maximum" : 8,
1862 "minimum" : 0,
1863 "optional" : 1,
4bd7df8b
DM
1864 "type" : "integer",
1865 "typetext" : "integer (0-8)"
44660702
DM
1866 },
1867 "lockwait" : {
1868 "default" : 180,
1869 "description" : "Maximal time to wait for the global lock (minutes).",
1870 "minimum" : 0,
1871 "optional" : 1,
4bd7df8b
DM
1872 "type" : "integer",
1873 "typetext" : "integer (0- N)"
44660702
DM
1874 },
1875 "mailnotification" : {
1876 "default" : "always",
1877 "description" : "Specify when to send an email",
56122987 1878 "enum" : [
44660702
DM
1879 "always",
1880 "failure"
56122987 1881 ],
44660702
DM
1882 "optional" : 1,
1883 "type" : "string"
1884 },
1885 "mailto" : {
1886 "description" : "Comma-separated list of email addresses that should receive email notifications.",
1887 "format" : "string-list",
1888 "optional" : 1,
1889 "type" : "string"
1890 },
1891 "maxfiles" : {
1892 "default" : 1,
1893 "description" : "Maximal number of backup files per guest system.",
1894 "minimum" : 1,
1895 "optional" : 1,
4bd7df8b
DM
1896 "type" : "integer",
1897 "typetext" : "integer (1- N)"
44660702
DM
1898 },
1899 "mode" : {
1900 "default" : "snapshot",
1901 "description" : "Backup mode.",
1902 "enum" : [
1903 "snapshot",
1904 "suspend",
1905 "stop"
1906 ],
1907 "optional" : 1,
1908 "type" : "string"
1909 },
1910 "node" : {
1911 "description" : "Only run if executed on this node.",
1912 "format" : "pve-node",
1913 "optional" : 1,
1914 "type" : "string"
1915 },
1916 "pigz" : {
1917 "default" : 0,
1918 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
1919 "optional" : 1,
1920 "type" : "integer"
1921 },
1922 "quiet" : {
1923 "default" : 0,
1924 "description" : "Be quiet.",
1925 "optional" : 1,
1926 "type" : "boolean"
1927 },
1928 "remove" : {
1929 "default" : 1,
1930 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
1931 "optional" : 1,
1932 "type" : "boolean"
1933 },
1934 "script" : {
1935 "description" : "Use specified hook script.",
1936 "optional" : 1,
1937 "type" : "string"
1938 },
1939 "size" : {
1940 "default" : 1024,
1941 "description" : "Unused, will be removed in a future release.",
1942 "minimum" : 500,
1943 "optional" : 1,
4bd7df8b
DM
1944 "type" : "integer",
1945 "typetext" : "integer (500- N)"
44660702
DM
1946 },
1947 "starttime" : {
1948 "description" : "Job Start time.",
1949 "pattern" : "\\d{1,2}:\\d{1,2}",
56122987 1950 "type" : "string",
44660702 1951 "typetext" : "HH:MM"
7aacca6f 1952 },
44660702
DM
1953 "stdexcludes" : {
1954 "default" : 1,
1955 "description" : "Exclude temporary files and logs.",
1956 "optional" : 1,
1957 "type" : "boolean"
1958 },
1959 "stop" : {
1960 "default" : 0,
1961 "description" : "Stop runnig backup jobs on this host.",
1962 "optional" : 1,
1963 "type" : "boolean"
1964 },
1965 "stopwait" : {
1966 "default" : 10,
1967 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
1968 "minimum" : 0,
1969 "optional" : 1,
4bd7df8b
DM
1970 "type" : "integer",
1971 "typetext" : "integer (0- N)"
44660702
DM
1972 },
1973 "storage" : {
1974 "description" : "Store resulting file to this storage.",
1975 "format" : "pve-storage-id",
1976 "optional" : 1,
7aacca6f 1977 "type" : "string"
56122987 1978 },
44660702
DM
1979 "tmpdir" : {
1980 "description" : "Store temporary files to specified directory.",
1981 "optional" : 1,
1982 "type" : "string"
1983 },
1984 "vmid" : {
1985 "description" : "The ID of the guest system you want to backup.",
1986 "format" : "pve-vmid-list",
1987 "optional" : 1,
1988 "type" : "string"
56122987 1989 }
44660702 1990 }
56122987
DM
1991 },
1992 "permissions" : {
1993 "check" : [
1994 "perm",
1995 "/",
1996 [
44660702 1997 "Sys.Modify"
56122987
DM
1998 ]
1999 ]
2000 },
44660702
DM
2001 "protected" : 1,
2002 "returns" : {
2003 "type" : "null"
7aacca6f 2004 }
56122987
DM
2005 }
2006 },
44660702
DM
2007 "leaf" : 1,
2008 "path" : "/cluster/backup/{id}",
2009 "text" : "{id}"
2010 }
2011 ],
2012 "info" : {
2013 "GET" : {
2014 "description" : "List vzdump backup schedule.",
2015 "method" : "GET",
2016 "name" : "index",
2017 "parameters" : {
2018 "additionalProperties" : 0
2019 },
2020 "permissions" : {
2021 "check" : [
2022 "perm",
2023 "/",
2024 [
2025 "Sys.Audit"
2026 ]
2027 ]
2028 },
2029 "returns" : {
2030 "items" : {
2031 "properties" : {
2032 "id" : {
2033 "type" : "string"
2034 }
2035 },
2036 "type" : "object"
2037 },
2038 "links" : [
2039 {
2040 "href" : "{id}",
2041 "rel" : "child"
2042 }
2043 ],
2044 "type" : "array"
2045 }
2046 },
2047 "POST" : {
2048 "description" : "Create new vzdump backup job.",
2049 "method" : "POST",
2050 "name" : "create_job",
2051 "parameters" : {
2052 "additionalProperties" : 0,
2053 "properties" : {
2054 "all" : {
2055 "default" : 0,
2056 "description" : "Backup all known guest systems on this host.",
2057 "optional" : 1,
2058 "type" : "boolean"
2059 },
2060 "bwlimit" : {
2061 "default" : 0,
2062 "description" : "Limit I/O bandwidth (KBytes per second).",
2063 "minimum" : 0,
2064 "optional" : 1,
4bd7df8b
DM
2065 "type" : "integer",
2066 "typetext" : "integer (0- N)"
44660702
DM
2067 },
2068 "compress" : {
2069 "default" : "0",
2070 "description" : "Compress dump file.",
2071 "enum" : [
2072 "0",
2073 "1",
2074 "gzip",
2075 "lzo"
2076 ],
2077 "optional" : 1,
2078 "type" : "string"
2079 },
2080 "dow" : {
2081 "default" : "mon,tue,wed,thu,fri,sat,sun",
2082 "description" : "Day of week selection.",
2083 "format" : "pve-day-of-week-list",
2084 "optional" : 1,
2085 "type" : "string"
2086 },
2087 "dumpdir" : {
2088 "description" : "Store resulting files to specified directory.",
2089 "optional" : 1,
2090 "type" : "string"
2091 },
2092 "enabled" : {
2093 "default" : "1",
2094 "description" : "Enable or disable the job.",
2095 "optional" : 1,
2096 "type" : "boolean"
2097 },
2098 "exclude" : {
2099 "description" : "Exclude specified guest systems (assumes --all)",
2100 "format" : "pve-vmid-list",
2101 "optional" : 1,
2102 "type" : "string"
2103 },
2104 "exclude-path" : {
2105 "description" : "Exclude certain files/directories (shell globs).",
2106 "format" : "string-alist",
2107 "optional" : 1,
2108 "type" : "string"
2109 },
2110 "ionice" : {
2111 "default" : 7,
2112 "description" : "Set CFQ ionice priority.",
2113 "maximum" : 8,
2114 "minimum" : 0,
2115 "optional" : 1,
4bd7df8b
DM
2116 "type" : "integer",
2117 "typetext" : "integer (0-8)"
44660702
DM
2118 },
2119 "lockwait" : {
2120 "default" : 180,
2121 "description" : "Maximal time to wait for the global lock (minutes).",
2122 "minimum" : 0,
2123 "optional" : 1,
4bd7df8b
DM
2124 "type" : "integer",
2125 "typetext" : "integer (0- N)"
44660702
DM
2126 },
2127 "mailnotification" : {
2128 "default" : "always",
2129 "description" : "Specify when to send an email",
2130 "enum" : [
2131 "always",
2132 "failure"
2133 ],
2134 "optional" : 1,
2135 "type" : "string"
2136 },
2137 "mailto" : {
2138 "description" : "Comma-separated list of email addresses that should receive email notifications.",
2139 "format" : "string-list",
2140 "optional" : 1,
2141 "type" : "string"
2142 },
2143 "maxfiles" : {
2144 "default" : 1,
2145 "description" : "Maximal number of backup files per guest system.",
2146 "minimum" : 1,
2147 "optional" : 1,
4bd7df8b
DM
2148 "type" : "integer",
2149 "typetext" : "integer (1- N)"
44660702
DM
2150 },
2151 "mode" : {
2152 "default" : "snapshot",
2153 "description" : "Backup mode.",
2154 "enum" : [
2155 "snapshot",
2156 "suspend",
2157 "stop"
2158 ],
2159 "optional" : 1,
2160 "type" : "string"
2161 },
2162 "node" : {
2163 "description" : "Only run if executed on this node.",
2164 "format" : "pve-node",
2165 "optional" : 1,
2166 "type" : "string"
2167 },
2168 "pigz" : {
2169 "default" : 0,
2170 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
2171 "optional" : 1,
2172 "type" : "integer"
2173 },
2174 "quiet" : {
2175 "default" : 0,
2176 "description" : "Be quiet.",
2177 "optional" : 1,
2178 "type" : "boolean"
2179 },
2180 "remove" : {
2181 "default" : 1,
2182 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
2183 "optional" : 1,
2184 "type" : "boolean"
2185 },
2186 "script" : {
2187 "description" : "Use specified hook script.",
2188 "optional" : 1,
2189 "type" : "string"
2190 },
2191 "size" : {
2192 "default" : 1024,
2193 "description" : "Unused, will be removed in a future release.",
2194 "minimum" : 500,
2195 "optional" : 1,
4bd7df8b
DM
2196 "type" : "integer",
2197 "typetext" : "integer (500- N)"
44660702
DM
2198 },
2199 "starttime" : {
2200 "description" : "Job Start time.",
2201 "pattern" : "\\d{1,2}:\\d{1,2}",
2202 "type" : "string",
2203 "typetext" : "HH:MM"
2204 },
2205 "stdexcludes" : {
2206 "default" : 1,
2207 "description" : "Exclude temporary files and logs.",
2208 "optional" : 1,
2209 "type" : "boolean"
2210 },
2211 "stop" : {
2212 "default" : 0,
2213 "description" : "Stop runnig backup jobs on this host.",
2214 "optional" : 1,
2215 "type" : "boolean"
2216 },
2217 "stopwait" : {
2218 "default" : 10,
2219 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
2220 "minimum" : 0,
2221 "optional" : 1,
4bd7df8b
DM
2222 "type" : "integer",
2223 "typetext" : "integer (0- N)"
44660702
DM
2224 },
2225 "storage" : {
2226 "description" : "Store resulting file to this storage.",
2227 "format" : "pve-storage-id",
2228 "optional" : 1,
2229 "type" : "string"
2230 },
2231 "tmpdir" : {
2232 "description" : "Store temporary files to specified directory.",
2233 "optional" : 1,
2234 "type" : "string"
2235 },
2236 "vmid" : {
2237 "description" : "The ID of the guest system you want to backup.",
2238 "format" : "pve-vmid-list",
2239 "optional" : 1,
2240 "type" : "string"
2241 }
2242 }
2243 },
2244 "permissions" : {
2245 "check" : [
2246 "perm",
2247 "/",
2248 [
2249 "Sys.Modify"
2250 ]
2251 ]
2252 },
2253 "protected" : 1,
2254 "returns" : {
2255 "type" : "null"
2256 }
2257 }
2258 },
2259 "leaf" : 0,
2260 "path" : "/cluster/backup",
2261 "text" : "backup"
2262 },
2263 {
2264 "children" : [
2265 {
2266 "children" : [
2267 {
2268 "children" : [
56122987 2269 {
56122987
DM
2270 "info" : {
2271 "POST" : {
44660702
DM
2272 "description" : "Request resource migration (online) to another node.",
2273 "method" : "POST",
2274 "name" : "migrate",
56122987 2275 "parameters" : {
7aacca6f 2276 "additionalProperties" : 0,
56122987
DM
2277 "properties" : {
2278 "node" : {
7aacca6f 2279 "description" : "The cluster node name.",
44660702 2280 "format" : "pve-node",
7aacca6f 2281 "type" : "string"
56122987
DM
2282 },
2283 "sid" : {
44660702 2284 "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 2285 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2286 "type" : "string",
44660702 2287 "typetext" : "<type>:<name>"
56122987 2288 }
7aacca6f 2289 }
56122987 2290 },
56122987
DM
2291 "permissions" : {
2292 "check" : [
2293 "perm",
2294 "/",
2295 [
2296 "Sys.Console"
2297 ]
2298 ]
2299 },
7aacca6f 2300 "protected" : 1,
7aacca6f
DM
2301 "returns" : {
2302 "type" : "null"
44660702 2303 }
56122987 2304 }
44660702
DM
2305 },
2306 "leaf" : 1,
2307 "path" : "/cluster/ha/resources/{sid}/migrate",
2308 "text" : "migrate"
2309 },
2310 {
2311 "info" : {
2312 "POST" : {
2313 "description" : "Request resource relocatzion to another node. This stops the service on the old node, and restarts it on the target node.",
2314 "method" : "POST",
2315 "name" : "relocate",
2316 "parameters" : {
2317 "additionalProperties" : 0,
2318 "properties" : {
2319 "node" : {
2320 "description" : "The cluster node name.",
2321 "format" : "pve-node",
2322 "type" : "string"
2323 },
2324 "sid" : {
2325 "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).",
2326 "format" : "pve-ha-resource-or-vm-id",
2327 "type" : "string",
2328 "typetext" : "<type>:<name>"
2329 }
2330 }
2331 },
2332 "permissions" : {
2333 "check" : [
2334 "perm",
2335 "/",
2336 [
2337 "Sys.Console"
2338 ]
2339 ]
2340 },
2341 "protected" : 1,
2342 "returns" : {
2343 "type" : "null"
2344 }
2345 }
2346 },
2347 "leaf" : 1,
2348 "path" : "/cluster/ha/resources/{sid}/relocate",
2349 "text" : "relocate"
2350 }
2351 ],
2352 "info" : {
2353 "DELETE" : {
2354 "description" : "Delete resource configuration.",
2355 "method" : "DELETE",
2356 "name" : "delete",
7aacca6f 2357 "parameters" : {
44660702 2358 "additionalProperties" : 0,
7aacca6f
DM
2359 "properties" : {
2360 "sid" : {
2361 "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 2362 "format" : "pve-ha-resource-or-vm-id",
7aacca6f 2363 "type" : "string",
44660702
DM
2364 "typetext" : "<type>:<name>"
2365 }
2366 }
2367 },
2368 "permissions" : {
2369 "check" : [
2370 "perm",
2371 "/",
2372 [
2373 "Sys.Console"
2374 ]
2375 ]
2376 },
2377 "protected" : 1,
2378 "returns" : {
2379 "type" : "null"
2380 }
2381 },
2382 "GET" : {
2383 "description" : "Read resource configuration.",
2384 "method" : "GET",
2385 "name" : "read",
2386 "parameters" : {
2387 "additionalProperties" : 0,
2388 "properties" : {
2389 "sid" : {
2390 "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 2391 "format" : "pve-ha-resource-or-vm-id",
44660702 2392 "type" : "string",
7aacca6f
DM
2393 "typetext" : "<type>:<name>"
2394 }
44660702 2395 }
7aacca6f
DM
2396 },
2397 "permissions" : {
2398 "check" : [
2399 "perm",
2400 "/",
2401 [
2402 "Sys.Audit"
2403 ]
2404 ]
2405 },
44660702 2406 "returns" : {}
7aacca6f 2407 },
56122987 2408 "PUT" : {
44660702 2409 "description" : "Update resource configuration.",
7aacca6f 2410 "method" : "PUT",
44660702 2411 "name" : "update",
56122987
DM
2412 "parameters" : {
2413 "additionalProperties" : 0,
2414 "properties" : {
44660702
DM
2415 "comment" : {
2416 "description" : "Description.",
2417 "maxLength" : 4096,
56122987 2418 "optional" : 1,
44660702 2419 "type" : "string"
56122987 2420 },
7aacca6f
DM
2421 "delete" : {
2422 "description" : "A list of settings you want to delete.",
7aacca6f 2423 "format" : "pve-configid-list",
44660702
DM
2424 "maxLength" : 4096,
2425 "optional" : 1,
2426 "type" : "string"
56122987 2427 },
44660702
DM
2428 "digest" : {
2429 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2430 "maxLength" : 40,
2431 "optional" : 1,
2432 "type" : "string"
56122987 2433 },
44660702
DM
2434 "group" : {
2435 "description" : "The HA group identifier.",
2436 "format" : "pve-configid",
7aacca6f 2437 "optional" : 1,
44660702 2438 "type" : "string"
56122987
DM
2439 },
2440 "max_relocate" : {
7aacca6f 2441 "default" : 1,
56122987 2442 "description" : "Maximal number of service relocate tries when a service failes to start.",
44660702
DM
2443 "minimum" : 0,
2444 "optional" : 1,
4bd7df8b
DM
2445 "type" : "integer",
2446 "typetext" : "integer (0- N)"
7aacca6f 2447 },
44660702
DM
2448 "max_restart" : {
2449 "default" : 1,
2450 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2451 "minimum" : 0,
7aacca6f 2452 "optional" : 1,
4bd7df8b
DM
2453 "type" : "integer",
2454 "typetext" : "integer (0- N)"
44660702
DM
2455 },
2456 "sid" : {
2457 "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).",
2458 "format" : "pve-ha-resource-or-vm-id",
2459 "type" : "string",
2460 "typetext" : "<type>:<name>"
7aacca6f
DM
2461 },
2462 "state" : {
44660702
DM
2463 "default" : "enabled",
2464 "description" : "Resource state.",
7aacca6f
DM
2465 "enum" : [
2466 "enabled",
2467 "disabled"
2468 ],
7aacca6f 2469 "optional" : 1,
44660702 2470 "type" : "string"
56122987 2471 }
44660702
DM
2472 },
2473 "type" : "object"
56122987 2474 },
56122987
DM
2475 "permissions" : {
2476 "check" : [
2477 "perm",
2478 "/",
2479 [
2480 "Sys.Console"
2481 ]
2482 ]
2483 },
7aacca6f 2484 "protected" : 1,
56122987
DM
2485 "returns" : {
2486 "type" : "null"
2487 }
2488 }
2489 },
44660702 2490 "leaf" : 0,
7aacca6f 2491 "path" : "/cluster/ha/resources/{sid}",
44660702 2492 "text" : "{sid}"
56122987
DM
2493 }
2494 ],
7aacca6f
DM
2495 "info" : {
2496 "GET" : {
44660702
DM
2497 "description" : "List HA resources.",
2498 "method" : "GET",
2499 "name" : "index",
7aacca6f 2500 "parameters" : {
44660702
DM
2501 "additionalProperties" : 0,
2502 "properties" : {
2503 "type" : {
2504 "description" : "Only list resources of specific type",
2505 "enum" : [
2506 "ct",
2507 "vm"
2508 ],
2509 "optional" : 1,
2510 "type" : "string"
2511 }
2512 }
7aacca6f 2513 },
7aacca6f
DM
2514 "permissions" : {
2515 "check" : [
2516 "perm",
2517 "/",
2518 [
2519 "Sys.Audit"
2520 ]
2521 ]
2522 },
7aacca6f 2523 "returns" : {
7aacca6f 2524 "items" : {
7aacca6f 2525 "properties" : {
44660702 2526 "sid" : {
7aacca6f
DM
2527 "type" : "string"
2528 }
44660702
DM
2529 },
2530 "type" : "object"
7aacca6f
DM
2531 },
2532 "links" : [
2533 {
44660702 2534 "href" : "{sid}",
7aacca6f
DM
2535 "rel" : "child"
2536 }
44660702
DM
2537 ],
2538 "type" : "array"
7aacca6f
DM
2539 }
2540 },
2541 "POST" : {
44660702 2542 "description" : "Create a new HA resource.",
7aacca6f 2543 "method" : "POST",
44660702 2544 "name" : "create",
7aacca6f 2545 "parameters" : {
44660702 2546 "additionalProperties" : 0,
7aacca6f
DM
2547 "properties" : {
2548 "comment" : {
7aacca6f 2549 "description" : "Description.",
44660702 2550 "maxLength" : 4096,
7aacca6f
DM
2551 "optional" : 1,
2552 "type" : "string"
2553 },
44660702
DM
2554 "group" : {
2555 "description" : "The HA group identifier.",
2556 "format" : "pve-configid",
7aacca6f 2557 "optional" : 1,
44660702 2558 "type" : "string"
7aacca6f 2559 },
44660702
DM
2560 "max_relocate" : {
2561 "default" : 1,
2562 "description" : "Maximal number of service relocate tries when a service failes to start.",
2563 "minimum" : 0,
7aacca6f 2564 "optional" : 1,
4bd7df8b
DM
2565 "type" : "integer",
2566 "typetext" : "integer (0- N)"
7aacca6f 2567 },
44660702
DM
2568 "max_restart" : {
2569 "default" : 1,
2570 "description" : "Maximal number of tries to restart the service on a node after its start failed.",
2571 "minimum" : 0,
2572 "optional" : 1,
4bd7df8b
DM
2573 "type" : "integer",
2574 "typetext" : "integer (0- N)"
44660702
DM
2575 },
2576 "sid" : {
2577 "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).",
2578 "format" : "pve-ha-resource-or-vm-id",
2579 "type" : "string",
2580 "typetext" : "<type>:<name>"
2581 },
2582 "state" : {
2583 "default" : "enabled",
2584 "description" : "Resource state.",
7aacca6f 2585 "enum" : [
44660702
DM
2586 "enabled",
2587 "disabled"
7aacca6f 2588 ],
7aacca6f
DM
2589 "optional" : 1,
2590 "type" : "string"
2591 },
44660702
DM
2592 "type" : {
2593 "description" : "Resource type.",
2594 "enum" : [
2595 "ct",
2596 "vm"
2597 ],
2598 "optional" : 1,
2599 "type" : "string"
2600 }
7aacca6f 2601 },
44660702 2602 "type" : "object"
7aacca6f
DM
2603 },
2604 "permissions" : {
2605 "check" : [
2606 "perm",
2607 "/",
2608 [
2609 "Sys.Console"
2610 ]
2611 ]
2612 },
44660702
DM
2613 "protected" : 1,
2614 "returns" : {
2615 "type" : "null"
2616 }
7aacca6f
DM
2617 }
2618 },
44660702
DM
2619 "leaf" : 0,
2620 "path" : "/cluster/ha/resources",
2621 "text" : "resources"
2622 },
2623 {
56122987
DM
2624 "children" : [
2625 {
56122987 2626 "info" : {
44660702
DM
2627 "DELETE" : {
2628 "description" : "Delete ha group configuration.",
2629 "method" : "DELETE",
2630 "name" : "delete",
56122987 2631 "parameters" : {
7aacca6f 2632 "additionalProperties" : 0,
56122987 2633 "properties" : {
7aacca6f
DM
2634 "group" : {
2635 "description" : "The HA group identifier.",
44660702
DM
2636 "format" : "pve-configid",
2637 "type" : "string"
56122987 2638 }
7aacca6f 2639 }
56122987 2640 },
56122987
DM
2641 "permissions" : {
2642 "check" : [
2643 "perm",
2644 "/",
2645 [
7aacca6f 2646 "Sys.Console"
56122987
DM
2647 ]
2648 ]
2649 },
44660702 2650 "protected" : 1,
7aacca6f
DM
2651 "returns" : {
2652 "type" : "null"
56122987
DM
2653 }
2654 },
44660702
DM
2655 "GET" : {
2656 "description" : "Read ha group configuration.",
2657 "method" : "GET",
2658 "name" : "read",
56122987 2659 "parameters" : {
44660702 2660 "additionalProperties" : 0,
56122987
DM
2661 "properties" : {
2662 "group" : {
2663 "description" : "The HA group identifier.",
44660702
DM
2664 "format" : "pve-configid",
2665 "type" : "string"
56122987 2666 }
44660702 2667 }
56122987 2668 },
56122987
DM
2669 "permissions" : {
2670 "check" : [
2671 "perm",
2672 "/",
2673 [
44660702 2674 "Sys.Audit"
56122987
DM
2675 ]
2676 ]
2677 },
44660702 2678 "returns" : {}
7aacca6f 2679 },
44660702
DM
2680 "PUT" : {
2681 "description" : "Update ha group configuration.",
2682 "method" : "PUT",
2683 "name" : "update",
7aacca6f 2684 "parameters" : {
44660702 2685 "additionalProperties" : 0,
7aacca6f 2686 "properties" : {
44660702
DM
2687 "comment" : {
2688 "description" : "Description.",
2689 "maxLength" : 4096,
2690 "optional" : 1,
2691 "type" : "string"
2692 },
2693 "delete" : {
2694 "description" : "A list of settings you want to delete.",
2695 "format" : "pve-configid-list",
2696 "maxLength" : 4096,
2697 "optional" : 1,
2698 "type" : "string"
2699 },
2700 "digest" : {
2701 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
2702 "maxLength" : 40,
2703 "optional" : 1,
2704 "type" : "string"
2705 },
7aacca6f
DM
2706 "group" : {
2707 "description" : "The HA group identifier.",
44660702
DM
2708 "format" : "pve-configid",
2709 "type" : "string"
2710 },
2711 "nodes" : {
2712 "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').",
2713 "format" : "pve-ha-group-node-list",
2714 "optional" : 1,
7aacca6f 2715 "type" : "string",
44660702
DM
2716 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2717 },
2718 "nofailback" : {
2719 "default" : 0,
2720 "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.",
2721 "optional" : 1,
2722 "type" : "boolean"
2723 },
2724 "restricted" : {
2725 "default" : 0,
2726 "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.",
2727 "optional" : 1,
2728 "type" : "boolean"
7aacca6f
DM
2729 }
2730 },
44660702 2731 "type" : "object"
7aacca6f 2732 },
7aacca6f
DM
2733 "permissions" : {
2734 "check" : [
2735 "perm",
2736 "/",
2737 [
44660702 2738 "Sys.Console"
7aacca6f
DM
2739 ]
2740 ]
2741 },
44660702
DM
2742 "protected" : 1,
2743 "returns" : {
2744 "type" : "null"
2745 }
56122987
DM
2746 }
2747 },
2748 "leaf" : 1,
44660702
DM
2749 "path" : "/cluster/ha/groups/{group}",
2750 "text" : "{group}"
56122987 2751 }
44660702
DM
2752 ],
2753 "info" : {
2754 "GET" : {
2755 "description" : "Get HA groups.",
2756 "method" : "GET",
2757 "name" : "index",
2758 "parameters" : {
2759 "additionalProperties" : 0
2760 },
2761 "permissions" : {
2762 "check" : [
2763 "perm",
2764 "/",
2765 [
2766 "Sys.Audit"
2767 ]
2768 ]
2769 },
2770 "returns" : {
2771 "items" : {
2772 "properties" : {
2773 "group" : {
2774 "type" : "string"
2775 }
2776 },
2777 "type" : "object"
2778 },
2779 "links" : [
2780 {
2781 "href" : "{group}",
2782 "rel" : "child"
2783 }
2784 ],
2785 "type" : "array"
2786 }
2787 },
2788 "POST" : {
2789 "description" : "Create a new HA group.",
2790 "method" : "POST",
2791 "name" : "create",
2792 "parameters" : {
2793 "additionalProperties" : 0,
2794 "properties" : {
2795 "comment" : {
2796 "description" : "Description.",
2797 "maxLength" : 4096,
2798 "optional" : 1,
2799 "type" : "string"
2800 },
2801 "group" : {
2802 "description" : "The HA group identifier.",
2803 "format" : "pve-configid",
2804 "type" : "string"
2805 },
2806 "nodes" : {
2807 "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').",
2808 "format" : "pve-ha-group-node-list",
2809 "optional" : 0,
2810 "type" : "string",
2811 "typetext" : "<node>[:<pri>]{,<node>[:<pri>]}*"
2812 },
2813 "nofailback" : {
2814 "default" : 0,
2815 "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.",
2816 "optional" : 1,
2817 "type" : "boolean"
2818 },
2819 "restricted" : {
2820 "default" : 0,
2821 "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.",
2822 "optional" : 1,
2823 "type" : "boolean"
2824 },
2825 "type" : {
2826 "description" : "Group type.",
2827 "enum" : [
2828 "group"
2829 ],
2830 "optional" : 1,
2831 "type" : "string"
2832 }
2833 },
2834 "type" : "object"
2835 },
2836 "permissions" : {
2837 "check" : [
2838 "perm",
2839 "/",
2840 [
2841 "Sys.Console"
2842 ]
2843 ]
2844 },
2845 "protected" : 1,
2846 "returns" : {
2847 "type" : "null"
2848 }
2849 }
2850 },
2851 "leaf" : 0,
2852 "path" : "/cluster/ha/groups",
2853 "text" : "groups"
7aacca6f
DM
2854 },
2855 {
7aacca6f
DM
2856 "children" : [
2857 {
2858 "info" : {
2859 "GET" : {
56122987 2860 "description" : "Get HA manger status.",
44660702 2861 "method" : "GET",
7aacca6f 2862 "name" : "status",
44660702
DM
2863 "parameters" : {
2864 "additionalProperties" : 0
2865 },
56122987
DM
2866 "permissions" : {
2867 "check" : [
2868 "perm",
2869 "/",
2870 [
2871 "Sys.Audit"
2872 ]
2873 ]
7aacca6f 2874 },
44660702
DM
2875 "returns" : {
2876 "type" : "array"
56122987
DM
2877 }
2878 }
7aacca6f 2879 },
7aacca6f 2880 "leaf" : 1,
44660702
DM
2881 "path" : "/cluster/ha/status/current",
2882 "text" : "current"
56122987
DM
2883 },
2884 {
2885 "info" : {
2886 "GET" : {
7aacca6f 2887 "description" : "Get full HA manger status, including LRM status.",
44660702
DM
2888 "method" : "GET",
2889 "name" : "manager_status",
7aacca6f
DM
2890 "parameters" : {
2891 "additionalProperties" : 0
2892 },
56122987
DM
2893 "permissions" : {
2894 "check" : [
2895 "perm",
2896 "/",
2897 [
2898 "Sys.Audit"
2899 ]
2900 ]
44660702
DM
2901 },
2902 "returns" : {
2903 "type" : "object"
7aacca6f 2904 }
56122987
DM
2905 }
2906 },
56122987 2907 "leaf" : 1,
44660702
DM
2908 "path" : "/cluster/ha/status/manager_status",
2909 "text" : "manager_status"
56122987
DM
2910 }
2911 ],
56122987
DM
2912 "info" : {
2913 "GET" : {
44660702 2914 "description" : "Directory index.",
7aacca6f 2915 "method" : "GET",
44660702
DM
2916 "name" : "index",
2917 "parameters" : {
2918 "additionalProperties" : 0
2919 },
2920 "permissions" : {
2921 "user" : "all"
2922 },
56122987 2923 "returns" : {
56122987
DM
2924 "items" : {
2925 "properties" : {},
2926 "type" : "object"
2927 },
2928 "links" : [
2929 {
44660702
DM
2930 "href" : "{name}",
2931 "rel" : "child"
56122987 2932 }
7aacca6f
DM
2933 ],
2934 "type" : "array"
44660702 2935 }
56122987 2936 }
7aacca6f 2937 },
44660702 2938 "leaf" : 0,
7aacca6f 2939 "path" : "/cluster/ha/status",
44660702 2940 "text" : "status"
56122987
DM
2941 }
2942 ],
56122987
DM
2943 "info" : {
2944 "GET" : {
7aacca6f 2945 "description" : "Directory index.",
44660702
DM
2946 "method" : "GET",
2947 "name" : "index",
2948 "parameters" : {
2949 "additionalProperties" : 0
2950 },
7aacca6f
DM
2951 "permissions" : {
2952 "check" : [
2953 "perm",
2954 "/",
2955 [
2956 "Sys.Audit"
2957 ]
2958 ]
2959 },
56122987 2960 "returns" : {
56122987 2961 "items" : {
7aacca6f
DM
2962 "properties" : {
2963 "id" : {
2964 "type" : "string"
2965 }
44660702
DM
2966 },
2967 "type" : "object"
7aacca6f
DM
2968 },
2969 "links" : [
2970 {
2971 "href" : "{id}",
2972 "rel" : "child"
2973 }
44660702
DM
2974 ],
2975 "type" : "array"
7aacca6f
DM
2976 }
2977 }
44660702
DM
2978 },
2979 "leaf" : 0,
2980 "path" : "/cluster/ha",
2981 "text" : "ha"
7aacca6f
DM
2982 },
2983 {
7aacca6f
DM
2984 "info" : {
2985 "GET" : {
2986 "description" : "Read cluster log",
44660702
DM
2987 "method" : "GET",
2988 "name" : "log",
56122987 2989 "parameters" : {
7aacca6f 2990 "additionalProperties" : 0,
56122987
DM
2991 "properties" : {
2992 "max" : {
7aacca6f 2993 "description" : "Maximum number of entries.",
44660702
DM
2994 "minimum" : 1,
2995 "optional" : 1,
4bd7df8b
DM
2996 "type" : "integer",
2997 "typetext" : "integer (1- N)"
56122987 2998 }
7aacca6f 2999 }
56122987 3000 },
44660702
DM
3001 "permissions" : {
3002 "user" : "all"
3003 },
7aacca6f 3004 "returns" : {
7aacca6f 3005 "items" : {
44660702
DM
3006 "properties" : {},
3007 "type" : "object"
3008 },
3009 "type" : "array"
7aacca6f 3010 }
56122987 3011 }
44660702
DM
3012 },
3013 "leaf" : 1,
3014 "path" : "/cluster/log",
3015 "text" : "log"
56122987
DM
3016 },
3017 {
56122987
DM
3018 "info" : {
3019 "GET" : {
44660702 3020 "description" : "Resources index (cluster wide).",
7aacca6f 3021 "method" : "GET",
7aacca6f 3022 "name" : "resources",
56122987
DM
3023 "parameters" : {
3024 "additionalProperties" : 0,
3025 "properties" : {
3026 "type" : {
3027 "enum" : [
3028 "vm",
3029 "storage",
3030 "node"
44660702
DM
3031 ],
3032 "optional" : 1,
3033 "type" : "string"
56122987
DM
3034 }
3035 }
3036 },
44660702
DM
3037 "permissions" : {
3038 "user" : "all"
3039 },
3040 "returns" : {
3041 "items" : {
3042 "properties" : {},
3043 "type" : "object"
3044 },
3045 "type" : "array"
3046 }
56122987
DM
3047 }
3048 },
7aacca6f 3049 "leaf" : 1,
44660702
DM
3050 "path" : "/cluster/resources",
3051 "text" : "resources"
56122987
DM
3052 },
3053 {
56122987
DM
3054 "info" : {
3055 "GET" : {
7aacca6f 3056 "description" : "List recent tasks (cluster wide).",
44660702 3057 "method" : "GET",
7aacca6f 3058 "name" : "tasks",
56122987
DM
3059 "parameters" : {
3060 "additionalProperties" : 0
3061 },
44660702
DM
3062 "permissions" : {
3063 "user" : "all"
3064 },
56122987
DM
3065 "returns" : {
3066 "items" : {
3067 "properties" : {
3068 "upid" : {
3069 "type" : "string"
3070 }
44660702
DM
3071 },
3072 "type" : "object"
3073 },
3074 "type" : "array"
7aacca6f 3075 }
56122987
DM
3076 }
3077 },
7aacca6f 3078 "leaf" : 1,
44660702
DM
3079 "path" : "/cluster/tasks",
3080 "text" : "tasks"
56122987
DM
3081 },
3082 {
56122987 3083 "info" : {
7aacca6f 3084 "GET" : {
44660702
DM
3085 "description" : "Get datacenter options.",
3086 "method" : "GET",
3087 "name" : "get_options",
56122987 3088 "parameters" : {
7aacca6f
DM
3089 "additionalProperties" : 0
3090 },
3091 "permissions" : {
3092 "check" : [
3093 "perm",
3094 "/",
3095 [
3096 "Sys.Audit"
3097 ]
3098 ]
3099 },
7aacca6f 3100 "returns" : {
44660702
DM
3101 "properties" : {},
3102 "type" : "object"
7aacca6f
DM
3103 }
3104 },
3105 "PUT" : {
44660702
DM
3106 "description" : "Set datacenter options.",
3107 "method" : "PUT",
7aacca6f
DM
3108 "name" : "set_options",
3109 "parameters" : {
3110 "additionalProperties" : 0,
3111 "properties" : {
56122987 3112 "console" : {
56122987 3113 "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
3114 "enum" : [
3115 "applet",
3116 "vv",
3117 "html5"
44660702
DM
3118 ],
3119 "optional" : 1,
3120 "type" : "string"
56122987 3121 },
7aacca6f 3122 "delete" : {
7aacca6f 3123 "description" : "A list of settings you want to delete.",
44660702 3124 "format" : "pve-configid-list",
7aacca6f
DM
3125 "optional" : 1,
3126 "type" : "string"
3127 },
44660702
DM
3128 "email_from" : {
3129 "description" : "Specify email address to send notification from (default is root@$hostname)",
3130 "format" : "email-opt",
7aacca6f 3131 "optional" : 1,
44660702
DM
3132 "type" : "string"
3133 },
3134 "fencing" : {
3135 "default" : "watchdog",
3136 "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 3137 "enum" : [
44660702
DM
3138 "watchdog",
3139 "hardware",
3140 "both"
7aacca6f 3141 ],
44660702
DM
3142 "optional" : 1,
3143 "type" : "string"
3144 },
3145 "http_proxy" : {
3146 "description" : "Specify external http proxy which is used for downloads (example: 'http://username:password@host:port/')",
3147 "optional" : 1,
3148 "pattern" : "http://.*",
3149 "type" : "string"
7aacca6f 3150 },
56122987 3151 "keyboard" : {
44660702 3152 "description" : "Default keybord layout for vnc server.",
56122987 3153 "enum" : [
44660702
DM
3154 "de",
3155 "de-ch",
7aacca6f 3156 "da",
56122987 3157 "en-gb",
44660702
DM
3158 "en-us",
3159 "es",
3160 "fi",
3161 "fr",
3162 "fr-be",
3163 "fr-ca",
3164 "fr-ch",
3165 "hu",
7aacca6f 3166 "is",
44660702
DM
3167 "it",
3168 "ja",
3169 "lt",
56122987 3170 "mk",
7aacca6f 3171 "nl",
56122987 3172 "no",
44660702 3173 "pl",
7aacca6f 3174 "pt",
44660702
DM
3175 "pt-br",
3176 "sv",
3177 "sl",
3178 "tr"
56122987 3179 ],
56122987
DM
3180 "optional" : 1,
3181 "type" : "string"
3182 },
44660702
DM
3183 "language" : {
3184 "description" : "Default GUI language.",
3185 "enum" : [
3186 "en",
3187 "de"
3188 ],
56122987 3189 "optional" : 1,
44660702 3190 "type" : "string"
56122987 3191 },
4bd7df8b
DM
3192 "mac_prefix" : {
3193 "description" : "Prefix for autogenerated MAC addresses.",
3194 "optional" : 1,
3195 "pattern" : "(?^i:[a-f0-9]{2}(?::[a-f0-9]{2}){0,2}:?)",
3196 "type" : "string"
3197 },
44660702
DM
3198 "max_workers" : {
3199 "description" : "Defines how many workers (per node) are maximal started on actions like 'stopall VMs' or task from the ha-manager.",
3200 "minimum" : 1,
56122987 3201 "optional" : 1,
4bd7df8b
DM
3202 "type" : "integer",
3203 "typetext" : "integer (1- N)"
56122987 3204 },
7aacca6f 3205 "migration_unsecure" : {
44660702 3206 "description" : "Migration is secure using SSH tunnel by default. For secure private networks you can disable it to speed up migration.",
56122987 3207 "optional" : 1,
44660702 3208 "type" : "boolean"
56122987
DM
3209 }
3210 }
3211 },
44660702
DM
3212 "permissions" : {
3213 "check" : [
3214 "perm",
3215 "/",
3216 [
3217 "Sys.Modify"
3218 ]
3219 ]
3220 },
56122987 3221 "protected" : 1,
7aacca6f
DM
3222 "returns" : {
3223 "type" : "null"
44660702 3224 }
7aacca6f
DM
3225 }
3226 },
44660702
DM
3227 "leaf" : 1,
3228 "path" : "/cluster/options",
7aacca6f
DM
3229 "text" : "options"
3230 },
3231 {
7aacca6f 3232 "info" : {
56122987 3233 "GET" : {
44660702
DM
3234 "description" : "Get cluster status informations.",
3235 "method" : "GET",
3236 "name" : "get_status",
56122987
DM
3237 "parameters" : {
3238 "additionalProperties" : 0
3239 },
56122987
DM
3240 "permissions" : {
3241 "check" : [
3242 "perm",
3243 "/",
3244 [
3245 "Sys.Audit"
3246 ]
3247 ]
3248 },
7aacca6f 3249 "protected" : 1,
56122987 3250 "returns" : {
56122987 3251 "items" : {
56122987
DM
3252 "properties" : {
3253 "type" : {
3254 "type" : "string"
3255 }
44660702
DM
3256 },
3257 "type" : "object"
7aacca6f
DM
3258 },
3259 "type" : "array"
56122987
DM
3260 }
3261 }
3262 },
44660702 3263 "leaf" : 1,
7aacca6f 3264 "path" : "/cluster/status",
44660702 3265 "text" : "status"
56122987
DM
3266 },
3267 {
56122987
DM
3268 "info" : {
3269 "GET" : {
56122987 3270 "description" : "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
44660702
DM
3271 "method" : "GET",
3272 "name" : "nextid",
56122987 3273 "parameters" : {
44660702 3274 "additionalProperties" : 0,
56122987
DM
3275 "properties" : {
3276 "vmid" : {
44660702 3277 "description" : "The (unique) ID of the VM.",
56122987 3278 "format" : "pve-vmid",
7aacca6f 3279 "minimum" : 1,
7aacca6f 3280 "optional" : 1,
4bd7df8b
DM
3281 "type" : "integer",
3282 "typetext" : "integer (1- N)"
56122987 3283 }
44660702 3284 }
56122987 3285 },
7aacca6f
DM
3286 "permissions" : {
3287 "user" : "all"
44660702
DM
3288 },
3289 "returns" : {
3290 "description" : "The next free VMID.",
3291 "type" : "integer"
7aacca6f 3292 }
56122987
DM
3293 }
3294 },
7aacca6f 3295 "leaf" : 1,
44660702
DM
3296 "path" : "/cluster/nextid",
3297 "text" : "nextid"
56122987
DM
3298 }
3299 ],
44660702
DM
3300 "info" : {
3301 "GET" : {
3302 "description" : "Cluster index.",
3303 "method" : "GET",
3304 "name" : "index",
3305 "parameters" : {
3306 "additionalProperties" : 0
3307 },
3308 "permissions" : {
3309 "user" : "all"
3310 },
3311 "returns" : {
3312 "items" : {
3313 "properties" : {},
3314 "type" : "object"
3315 },
3316 "links" : [
3317 {
3318 "href" : "{name}",
3319 "rel" : "child"
3320 }
3321 ],
3322 "type" : "array"
3323 }
3324 }
3325 },
3326 "leaf" : 0,
3327 "path" : "/cluster",
7aacca6f 3328 "text" : "cluster"
56122987
DM
3329 },
3330 {
56122987
DM
3331 "children" : [
3332 {
7aacca6f
DM
3333 "children" : [
3334 {
3335 "children" : [
3336 {
56122987
DM
3337 "children" : [
3338 {
56122987
DM
3339 "children" : [
3340 {
3341 "children" : [
3342 {
56122987
DM
3343 "info" : {
3344 "DELETE" : {
44660702 3345 "description" : "Delete rule.",
7aacca6f 3346 "method" : "DELETE",
44660702 3347 "name" : "delete_rule",
56122987 3348 "parameters" : {
44660702 3349 "additionalProperties" : 0,
56122987 3350 "properties" : {
44660702
DM
3351 "digest" : {
3352 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3353 "maxLength" : 40,
3354 "optional" : 1,
3355 "type" : "string"
3356 },
56122987 3357 "node" : {
7aacca6f 3358 "description" : "The cluster node name.",
44660702
DM
3359 "format" : "pve-node",
3360 "type" : "string"
7aacca6f 3361 },
56122987 3362 "pos" : {
7aacca6f 3363 "description" : "Update rule at position <pos>.",
44660702 3364 "minimum" : 0,
56122987 3365 "optional" : 1,
4bd7df8b
DM
3366 "type" : "integer",
3367 "typetext" : "integer (0- N)"
44660702
DM
3368 },
3369 "vmid" : {
3370 "description" : "The (unique) ID of the VM.",
3371 "format" : "pve-vmid",
3372 "minimum" : 1,
4bd7df8b
DM
3373 "type" : "integer",
3374 "typetext" : "integer (1- N)"
56122987 3375 }
44660702 3376 }
7aacca6f 3377 },
56122987
DM
3378 "permissions" : {
3379 "check" : [
3380 "perm",
3381 "/vms/{vmid}",
3382 [
3383 "VM.Config.Network"
3384 ]
3385 ]
3386 },
44660702
DM
3387 "protected" : 1,
3388 "proxyto" : null,
56122987
DM
3389 "returns" : {
3390 "type" : "null"
44660702
DM
3391 }
3392 },
3393 "GET" : {
3394 "description" : "Get single rule data.",
3395 "method" : "GET",
3396 "name" : "get_rule",
3397 "parameters" : {
3398 "additionalProperties" : 0,
3399 "properties" : {
3400 "node" : {
3401 "description" : "The cluster node name.",
3402 "format" : "pve-node",
3403 "type" : "string"
3404 },
3405 "pos" : {
3406 "description" : "Update rule at position <pos>.",
3407 "minimum" : 0,
3408 "optional" : 1,
4bd7df8b
DM
3409 "type" : "integer",
3410 "typetext" : "integer (0- N)"
44660702
DM
3411 },
3412 "vmid" : {
3413 "description" : "The (unique) ID of the VM.",
3414 "format" : "pve-vmid",
3415 "minimum" : 1,
4bd7df8b
DM
3416 "type" : "integer",
3417 "typetext" : "integer (1- N)"
44660702
DM
3418 }
3419 }
56122987 3420 },
56122987
DM
3421 "permissions" : {
3422 "check" : [
3423 "perm",
3424 "/vms/{vmid}",
3425 [
44660702 3426 "VM.Audit"
56122987
DM
3427 ]
3428 ]
3429 },
56122987 3430 "proxyto" : null,
44660702
DM
3431 "returns" : {
3432 "properties" : {
3433 "pos" : {
3434 "type" : "integer"
3435 }
3436 },
3437 "type" : "object"
3438 }
3439 },
3440 "PUT" : {
7aacca6f
DM
3441 "description" : "Modify rule data.",
3442 "method" : "PUT",
44660702 3443 "name" : "update_rule",
56122987 3444 "parameters" : {
44660702 3445 "additionalProperties" : 0,
56122987 3446 "properties" : {
44660702
DM
3447 "action" : {
3448 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3449 "maxLength" : 20,
3450 "minLength" : 2,
56122987 3451 "optional" : 1,
44660702 3452 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f
DM
3453 "type" : "string"
3454 },
7aacca6f 3455 "comment" : {
e94f0d56 3456 "description" : "Descriptive comment.",
7aacca6f
DM
3457 "optional" : 1,
3458 "type" : "string"
3459 },
3460 "delete" : {
7aacca6f 3461 "description" : "A list of settings you want to delete.",
44660702
DM
3462 "format" : "pve-configid-list",
3463 "optional" : 1,
3464 "type" : "string"
7aacca6f
DM
3465 },
3466 "dest" : {
44660702 3467 "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 3468 "format" : "pve-fw-addr-spec",
56122987 3469 "optional" : 1,
44660702 3470 "type" : "string"
56122987 3471 },
7aacca6f 3472 "digest" : {
44660702 3473 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 3474 "maxLength" : 40,
56122987 3475 "optional" : 1,
44660702
DM
3476 "type" : "string"
3477 },
3478 "dport" : {
3479 "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.",
3480 "format" : "pve-fw-dport-spec",
3481 "optional" : 1,
3482 "type" : "string"
56122987 3483 },
7aacca6f 3484 "enable" : {
e94f0d56 3485 "description" : "Flag to enable/disable a rule.",
44660702 3486 "minimum" : 0,
56122987 3487 "optional" : 1,
4bd7df8b
DM
3488 "type" : "integer",
3489 "typetext" : "integer (0- N)"
7aacca6f 3490 },
44660702
DM
3491 "iface" : {
3492 "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.",
3493 "format" : "pve-iface",
3494 "maxLength" : 20,
7aacca6f 3495 "minLength" : 2,
56122987 3496 "optional" : 1,
44660702 3497 "type" : "string"
56122987 3498 },
44660702 3499 "macro" : {
e94f0d56 3500 "description" : "Use predefined standard macro.",
44660702 3501 "maxLength" : 128,
56122987 3502 "optional" : 1,
44660702 3503 "type" : "string"
56122987 3504 },
44660702
DM
3505 "moveto" : {
3506 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
3507 "minimum" : 0,
56122987 3508 "optional" : 1,
4bd7df8b
DM
3509 "type" : "integer",
3510 "typetext" : "integer (0- N)"
56122987 3511 },
44660702
DM
3512 "node" : {
3513 "description" : "The cluster node name.",
3514 "format" : "pve-node",
3515 "type" : "string"
3516 },
3517 "pos" : {
3518 "description" : "Update rule at position <pos>.",
3519 "minimum" : 0,
3520 "optional" : 1,
4bd7df8b
DM
3521 "type" : "integer",
3522 "typetext" : "integer (0- N)"
56122987 3523 },
44660702
DM
3524 "proto" : {
3525 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3526 "format" : "pve-fw-protocol-spec",
3527 "optional" : 1,
3528 "type" : "string"
7aacca6f 3529 },
44660702
DM
3530 "source" : {
3531 "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.",
3532 "format" : "pve-fw-addr-spec",
56122987 3533 "optional" : 1,
7aacca6f 3534 "type" : "string"
56122987
DM
3535 },
3536 "sport" : {
3537 "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
3538 "format" : "pve-fw-sport-spec",
3539 "optional" : 1,
3540 "type" : "string"
3541 },
3542 "type" : {
e94f0d56 3543 "description" : "Rule type.",
44660702
DM
3544 "enum" : [
3545 "in",
3546 "out",
3547 "group"
3548 ],
56122987 3549 "optional" : 1,
56122987 3550 "type" : "string"
44660702
DM
3551 },
3552 "vmid" : {
3553 "description" : "The (unique) ID of the VM.",
3554 "format" : "pve-vmid",
3555 "minimum" : 1,
4bd7df8b
DM
3556 "type" : "integer",
3557 "typetext" : "integer (1- N)"
56122987 3558 }
44660702 3559 }
56122987 3560 },
56122987
DM
3561 "permissions" : {
3562 "check" : [
3563 "perm",
3564 "/vms/{vmid}",
3565 [
44660702 3566 "VM.Config.Network"
56122987
DM
3567 ]
3568 ]
7aacca6f 3569 },
44660702 3570 "protected" : 1,
7aacca6f 3571 "proxyto" : null,
7aacca6f 3572 "returns" : {
44660702
DM
3573 "type" : "null"
3574 }
56122987 3575 }
7aacca6f 3576 },
44660702 3577 "leaf" : 1,
7aacca6f 3578 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules/{pos}",
44660702 3579 "text" : "{pos}"
56122987
DM
3580 }
3581 ],
56122987 3582 "info" : {
44660702
DM
3583 "GET" : {
3584 "description" : "List rules.",
3585 "method" : "GET",
3586 "name" : "get_rules",
3587 "parameters" : {
3588 "additionalProperties" : 0,
3589 "properties" : {
3590 "node" : {
3591 "description" : "The cluster node name.",
3592 "format" : "pve-node",
3593 "type" : "string"
3594 },
3595 "vmid" : {
3596 "description" : "The (unique) ID of the VM.",
3597 "format" : "pve-vmid",
3598 "minimum" : 1,
4bd7df8b
DM
3599 "type" : "integer",
3600 "typetext" : "integer (1- N)"
44660702
DM
3601 }
3602 }
56122987 3603 },
56122987
DM
3604 "permissions" : {
3605 "check" : [
3606 "perm",
3607 "/vms/{vmid}",
3608 [
44660702 3609 "VM.Audit"
56122987
DM
3610 ]
3611 ]
7aacca6f 3612 },
44660702
DM
3613 "proxyto" : null,
3614 "returns" : {
3615 "items" : {
3616 "properties" : {
3617 "pos" : {
3618 "type" : "integer"
3619 }
3620 },
3621 "type" : "object"
3622 },
3623 "links" : [
3624 {
3625 "href" : "{pos}",
3626 "rel" : "child"
3627 }
3628 ],
3629 "type" : "array"
3630 }
3631 },
3632 "POST" : {
3633 "description" : "Create new rule.",
7aacca6f 3634 "method" : "POST",
44660702 3635 "name" : "create_rule",
56122987 3636 "parameters" : {
44660702 3637 "additionalProperties" : 0,
56122987 3638 "properties" : {
44660702
DM
3639 "action" : {
3640 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
3641 "maxLength" : 20,
3642 "minLength" : 2,
3643 "optional" : 0,
3644 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3645 "type" : "string"
56122987 3646 },
44660702 3647 "comment" : {
e94f0d56 3648 "description" : "Descriptive comment.",
56122987 3649 "optional" : 1,
56122987
DM
3650 "type" : "string"
3651 },
44660702
DM
3652 "dest" : {
3653 "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.",
3654 "format" : "pve-fw-addr-spec",
3655 "optional" : 1,
3656 "type" : "string"
56122987 3657 },
44660702
DM
3658 "digest" : {
3659 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3660 "maxLength" : 40,
56122987 3661 "optional" : 1,
44660702 3662 "type" : "string"
56122987 3663 },
7aacca6f
DM
3664 "dport" : {
3665 "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 3666 "format" : "pve-fw-dport-spec",
7aacca6f 3667 "optional" : 1,
44660702 3668 "type" : "string"
56122987
DM
3669 },
3670 "enable" : {
e94f0d56 3671 "description" : "Flag to enable/disable a rule.",
56122987 3672 "minimum" : 0,
44660702 3673 "optional" : 1,
4bd7df8b
DM
3674 "type" : "integer",
3675 "typetext" : "integer (0- N)"
56122987 3676 },
44660702
DM
3677 "iface" : {
3678 "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.",
3679 "format" : "pve-iface",
3680 "maxLength" : 20,
7aacca6f 3681 "minLength" : 2,
44660702
DM
3682 "optional" : 1,
3683 "type" : "string"
56122987 3684 },
44660702 3685 "macro" : {
e94f0d56 3686 "description" : "Use predefined standard macro.",
44660702 3687 "maxLength" : 128,
56122987 3688 "optional" : 1,
44660702 3689 "type" : "string"
7aacca6f 3690 },
44660702
DM
3691 "node" : {
3692 "description" : "The cluster node name.",
3693 "format" : "pve-node",
3694 "type" : "string"
3695 },
3696 "pos" : {
3697 "description" : "Update rule at position <pos>.",
3698 "minimum" : 0,
3699 "optional" : 1,
4bd7df8b
DM
3700 "type" : "integer",
3701 "typetext" : "integer (0- N)"
44660702
DM
3702 },
3703 "proto" : {
3704 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
3705 "format" : "pve-fw-protocol-spec",
7aacca6f 3706 "optional" : 1,
56122987 3707 "type" : "string"
7aacca6f
DM
3708 },
3709 "source" : {
3710 "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 3711 "format" : "pve-fw-addr-spec",
7aacca6f 3712 "optional" : 1,
44660702 3713 "type" : "string"
7aacca6f 3714 },
44660702
DM
3715 "sport" : {
3716 "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.",
3717 "format" : "pve-fw-sport-spec",
7aacca6f 3718 "optional" : 1,
44660702 3719 "type" : "string"
7aacca6f 3720 },
44660702 3721 "type" : {
e94f0d56 3722 "description" : "Rule type.",
44660702
DM
3723 "enum" : [
3724 "in",
3725 "out",
3726 "group"
3727 ],
3728 "optional" : 0,
3729 "type" : "string"
7aacca6f 3730 },
7aacca6f 3731 "vmid" : {
44660702 3732 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
3733 "format" : "pve-vmid",
3734 "minimum" : 1,
4bd7df8b
DM
3735 "type" : "integer",
3736 "typetext" : "integer (1- N)"
7aacca6f
DM
3737 }
3738 }
3739 },
56122987
DM
3740 "permissions" : {
3741 "check" : [
3742 "perm",
3743 "/vms/{vmid}",
3744 [
44660702 3745 "VM.Config.Network"
56122987
DM
3746 ]
3747 ]
3748 },
44660702
DM
3749 "protected" : 1,
3750 "proxyto" : null,
56122987 3751 "returns" : {
44660702
DM
3752 "type" : "null"
3753 }
56122987
DM
3754 }
3755 },
44660702 3756 "leaf" : 0,
7aacca6f 3757 "path" : "/nodes/{node}/qemu/{vmid}/firewall/rules",
44660702 3758 "text" : "rules"
56122987
DM
3759 },
3760 {
3761 "children" : [
3762 {
56122987 3763 "info" : {
44660702
DM
3764 "DELETE" : {
3765 "description" : "Remove IP or Network alias.",
3766 "method" : "DELETE",
3767 "name" : "remove_alias",
56122987 3768 "parameters" : {
44660702 3769 "additionalProperties" : 0,
56122987 3770 "properties" : {
44660702
DM
3771 "digest" : {
3772 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
3773 "maxLength" : 40,
3774 "optional" : 1,
3775 "type" : "string"
56122987
DM
3776 },
3777 "name" : {
56122987 3778 "description" : "Alias name.",
44660702 3779 "maxLength" : 64,
7aacca6f 3780 "minLength" : 2,
44660702 3781 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
3782 "type" : "string"
3783 },
7aacca6f 3784 "node" : {
44660702 3785 "description" : "The cluster node name.",
7aacca6f 3786 "format" : "pve-node",
44660702
DM
3787 "type" : "string"
3788 },
3789 "vmid" : {
3790 "description" : "The (unique) ID of the VM.",
3791 "format" : "pve-vmid",
3792 "minimum" : 1,
4bd7df8b
DM
3793 "type" : "integer",
3794 "typetext" : "integer (1- N)"
56122987 3795 }
44660702 3796 }
56122987 3797 },
7aacca6f
DM
3798 "permissions" : {
3799 "check" : [
3800 "perm",
3801 "/vms/{vmid}",
3802 [
3803 "VM.Config.Network"
3804 ]
3805 ]
56122987 3806 },
44660702
DM
3807 "protected" : 1,
3808 "returns" : {
3809 "type" : "null"
3810 }
3811 },
3812 "GET" : {
3813 "description" : "Read alias.",
3814 "method" : "GET",
3815 "name" : "read_alias",
56122987 3816 "parameters" : {
44660702 3817 "additionalProperties" : 0,
56122987 3818 "properties" : {
56122987 3819 "name" : {
7aacca6f 3820 "description" : "Alias name.",
44660702 3821 "maxLength" : 64,
56122987 3822 "minLength" : 2,
44660702 3823 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 3824 "type" : "string"
7aacca6f
DM
3825 },
3826 "node" : {
3827 "description" : "The cluster node name.",
44660702
DM
3828 "format" : "pve-node",
3829 "type" : "string"
3830 },
3831 "vmid" : {
3832 "description" : "The (unique) ID of the VM.",
3833 "format" : "pve-vmid",
3834 "minimum" : 1,
4bd7df8b
DM
3835 "type" : "integer",
3836 "typetext" : "integer (1- N)"
56122987 3837 }
44660702 3838 }
56122987 3839 },
44660702
DM
3840 "permissions" : {
3841 "check" : [
3842 "perm",
3843 "/vms/{vmid}",
3844 [
3845 "VM.Audit"
3846 ]
3847 ]
56122987 3848 },
44660702
DM
3849 "returns" : {
3850 "type" : "object"
3851 }
7aacca6f 3852 },
44660702
DM
3853 "PUT" : {
3854 "description" : "Update IP or Network alias.",
3855 "method" : "PUT",
3856 "name" : "update_alias",
56122987
DM
3857 "parameters" : {
3858 "additionalProperties" : 0,
3859 "properties" : {
44660702
DM
3860 "cidr" : {
3861 "description" : "Network/IP specification in CIDR format.",
3862 "format" : "IPorCIDR",
3863 "type" : "string"
3864 },
3865 "comment" : {
3866 "optional" : 1,
3867 "type" : "string"
56122987
DM
3868 },
3869 "digest" : {
44660702 3870 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987
DM
3871 "maxLength" : 40,
3872 "optional" : 1,
44660702 3873 "type" : "string"
56122987 3874 },
7aacca6f 3875 "name" : {
44660702 3876 "description" : "Alias name.",
56122987
DM
3877 "maxLength" : 64,
3878 "minLength" : 2,
3879 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 3880 "type" : "string"
7aacca6f
DM
3881 },
3882 "node" : {
7aacca6f 3883 "description" : "The cluster node name.",
44660702
DM
3884 "format" : "pve-node",
3885 "type" : "string"
3886 },
3887 "rename" : {
3888 "description" : "Rename an existing alias.",
3889 "maxLength" : 64,
3890 "minLength" : 2,
3891 "optional" : 1,
3892 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
3893 "type" : "string"
3894 },
3895 "vmid" : {
3896 "description" : "The (unique) ID of the VM.",
3897 "format" : "pve-vmid",
3898 "minimum" : 1,
4bd7df8b
DM
3899 "type" : "integer",
3900 "typetext" : "integer (1- N)"
56122987
DM
3901 }
3902 }
3903 },
7aacca6f
DM
3904 "permissions" : {
3905 "check" : [
3906 "perm",
3907 "/vms/{vmid}",
3908 [
3909 "VM.Config.Network"
3910 ]
3911 ]
3912 },
3913 "protected" : 1,
7aacca6f
DM
3914 "returns" : {
3915 "type" : "null"
44660702 3916 }
56122987
DM
3917 }
3918 },
44660702 3919 "leaf" : 1,
7aacca6f 3920 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases/{name}",
44660702 3921 "text" : "{name}"
56122987
DM
3922 }
3923 ],
3924 "info" : {
44660702
DM
3925 "GET" : {
3926 "description" : "List aliases",
3927 "method" : "GET",
3928 "name" : "get_aliases",
56122987 3929 "parameters" : {
44660702 3930 "additionalProperties" : 0,
56122987 3931 "properties" : {
7aacca6f 3932 "node" : {
7aacca6f 3933 "description" : "The cluster node name.",
44660702 3934 "format" : "pve-node",
7aacca6f 3935 "type" : "string"
56122987 3936 },
44660702
DM
3937 "vmid" : {
3938 "description" : "The (unique) ID of the VM.",
3939 "format" : "pve-vmid",
3940 "minimum" : 1,
4bd7df8b
DM
3941 "type" : "integer",
3942 "typetext" : "integer (1- N)"
56122987 3943 }
44660702 3944 }
56122987 3945 },
56122987
DM
3946 "permissions" : {
3947 "check" : [
3948 "perm",
3949 "/vms/{vmid}",
3950 [
44660702 3951 "VM.Audit"
56122987
DM
3952 ]
3953 ]
3954 },
56122987
DM
3955 "returns" : {
3956 "items" : {
3957 "properties" : {
44660702 3958 "cidr" : {
56122987
DM
3959 "type" : "string"
3960 },
44660702
DM
3961 "comment" : {
3962 "optional" : 1,
7aacca6f 3963 "type" : "string"
56122987
DM
3964 },
3965 "digest" : {
56122987 3966 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 3967 "maxLength" : 40,
56122987
DM
3968 "optional" : 0,
3969 "type" : "string"
3970 },
44660702 3971 "name" : {
56122987
DM
3972 "type" : "string"
3973 }
44660702
DM
3974 },
3975 "type" : "object"
56122987 3976 },
56122987
DM
3977 "links" : [
3978 {
3979 "href" : "{name}",
3980 "rel" : "child"
3981 }
44660702
DM
3982 ],
3983 "type" : "array"
3984 }
3985 },
3986 "POST" : {
3987 "description" : "Create IP or Network Alias.",
3988 "method" : "POST",
3989 "name" : "create_alias",
56122987 3990 "parameters" : {
7aacca6f 3991 "additionalProperties" : 0,
56122987 3992 "properties" : {
44660702
DM
3993 "cidr" : {
3994 "description" : "Network/IP specification in CIDR format.",
3995 "format" : "IPorCIDR",
3996 "type" : "string"
3997 },
3998 "comment" : {
3999 "optional" : 1,
4000 "type" : "string"
4001 },
4002 "name" : {
4003 "description" : "Alias name.",
4004 "maxLength" : 64,
4005 "minLength" : 2,
4006 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4007 "type" : "string"
56122987
DM
4008 },
4009 "node" : {
7aacca6f 4010 "description" : "The cluster node name.",
44660702 4011 "format" : "pve-node",
56122987 4012 "type" : "string"
44660702
DM
4013 },
4014 "vmid" : {
4015 "description" : "The (unique) ID of the VM.",
4016 "format" : "pve-vmid",
4017 "minimum" : 1,
4bd7df8b
DM
4018 "type" : "integer",
4019 "typetext" : "integer (1- N)"
56122987 4020 }
7aacca6f 4021 }
56122987 4022 },
44660702
DM
4023 "permissions" : {
4024 "check" : [
4025 "perm",
4026 "/vms/{vmid}",
4027 [
4028 "VM.Config.Network"
4029 ]
4030 ]
4031 },
4032 "protected" : 1,
4033 "returns" : {
4034 "type" : "null"
4035 }
56122987 4036 }
44660702
DM
4037 },
4038 "leaf" : 0,
4039 "path" : "/nodes/{node}/qemu/{vmid}/firewall/aliases",
4040 "text" : "aliases"
56122987
DM
4041 },
4042 {
56122987
DM
4043 "children" : [
4044 {
7aacca6f
DM
4045 "children" : [
4046 {
4047 "info" : {
4048 "DELETE" : {
44660702 4049 "description" : "Remove IP or Network from IPSet.",
7aacca6f 4050 "method" : "DELETE",
44660702 4051 "name" : "remove_ip",
7aacca6f 4052 "parameters" : {
44660702 4053 "additionalProperties" : 0,
7aacca6f 4054 "properties" : {
44660702
DM
4055 "cidr" : {
4056 "description" : "Network/IP specification in CIDR format.",
4057 "format" : "IPorCIDRorAlias",
4058 "type" : "string"
4059 },
4060 "digest" : {
4061 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4062 "maxLength" : 40,
4063 "optional" : 1,
4064 "type" : "string"
4065 },
7aacca6f 4066 "name" : {
7aacca6f 4067 "description" : "IP set name.",
44660702
DM
4068 "maxLength" : 64,
4069 "minLength" : 2,
7aacca6f 4070 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 4071 "type" : "string"
7aacca6f
DM
4072 },
4073 "node" : {
4074 "description" : "The cluster node name.",
44660702
DM
4075 "format" : "pve-node",
4076 "type" : "string"
7aacca6f
DM
4077 },
4078 "vmid" : {
44660702 4079 "description" : "The (unique) ID of the VM.",
7aacca6f 4080 "format" : "pve-vmid",
44660702 4081 "minimum" : 1,
4bd7df8b
DM
4082 "type" : "integer",
4083 "typetext" : "integer (1- N)"
7aacca6f 4084 }
44660702 4085 }
7aacca6f 4086 },
7aacca6f
DM
4087 "permissions" : {
4088 "check" : [
4089 "perm",
4090 "/vms/{vmid}",
4091 [
4092 "VM.Config.Network"
4093 ]
4094 ]
4095 },
4096 "protected" : 1,
44660702
DM
4097 "returns" : {
4098 "type" : "null"
4099 }
56122987 4100 },
44660702
DM
4101 "GET" : {
4102 "description" : "Read IP or Network settings from IPSet.",
4103 "method" : "GET",
4104 "name" : "read_ip",
7aacca6f 4105 "parameters" : {
44660702 4106 "additionalProperties" : 0,
7aacca6f 4107 "properties" : {
7aacca6f 4108 "cidr" : {
44660702 4109 "description" : "Network/IP specification in CIDR format.",
7aacca6f 4110 "format" : "IPorCIDRorAlias",
44660702 4111 "type" : "string"
7aacca6f
DM
4112 },
4113 "name" : {
7aacca6f 4114 "description" : "IP set name.",
44660702 4115 "maxLength" : 64,
7aacca6f 4116 "minLength" : 2,
44660702
DM
4117 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4118 "type" : "string"
7aacca6f 4119 },
44660702
DM
4120 "node" : {
4121 "description" : "The cluster node name.",
4122 "format" : "pve-node",
7aacca6f
DM
4123 "type" : "string"
4124 },
44660702
DM
4125 "vmid" : {
4126 "description" : "The (unique) ID of the VM.",
4127 "format" : "pve-vmid",
4128 "minimum" : 1,
4bd7df8b
DM
4129 "type" : "integer",
4130 "typetext" : "integer (1- N)"
7aacca6f 4131 }
44660702 4132 }
7aacca6f 4133 },
44660702
DM
4134 "permissions" : {
4135 "check" : [
4136 "perm",
4137 "/vms/{vmid}",
4138 [
4139 "VM.Audit"
4140 ]
4141 ]
4142 },
4143 "protected" : 1,
7aacca6f 4144 "returns" : {
44660702 4145 "type" : "object"
7aacca6f 4146 }
56122987 4147 },
44660702
DM
4148 "PUT" : {
4149 "description" : "Update IP or Network settings",
4150 "method" : "PUT",
4151 "name" : "update_ip",
7aacca6f
DM
4152 "parameters" : {
4153 "additionalProperties" : 0,
4154 "properties" : {
44660702
DM
4155 "cidr" : {
4156 "description" : "Network/IP specification in CIDR format.",
4157 "format" : "IPorCIDRorAlias",
4158 "type" : "string"
4159 },
4160 "comment" : {
4161 "optional" : 1,
4162 "type" : "string"
4163 },
4164 "digest" : {
4165 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4166 "maxLength" : 40,
4167 "optional" : 1,
4168 "type" : "string"
4169 },
7aacca6f 4170 "name" : {
7aacca6f 4171 "description" : "IP set name.",
44660702 4172 "maxLength" : 64,
7aacca6f 4173 "minLength" : 2,
44660702
DM
4174 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4175 "type" : "string"
7aacca6f
DM
4176 },
4177 "node" : {
7aacca6f 4178 "description" : "The cluster node name.",
44660702 4179 "format" : "pve-node",
7aacca6f
DM
4180 "type" : "string"
4181 },
44660702
DM
4182 "nomatch" : {
4183 "optional" : 1,
4184 "type" : "boolean"
7aacca6f
DM
4185 },
4186 "vmid" : {
4187 "description" : "The (unique) ID of the VM.",
44660702 4188 "format" : "pve-vmid",
7aacca6f 4189 "minimum" : 1,
4bd7df8b
DM
4190 "type" : "integer",
4191 "typetext" : "integer (1- N)"
7aacca6f
DM
4192 }
4193 }
4194 },
4195 "permissions" : {
4196 "check" : [
4197 "perm",
4198 "/vms/{vmid}",
4199 [
44660702 4200 "VM.Config.Network"
7aacca6f
DM
4201 ]
4202 ]
4203 },
7aacca6f 4204 "protected" : 1,
7aacca6f 4205 "returns" : {
44660702 4206 "type" : "null"
7aacca6f 4207 }
56122987 4208 }
7aacca6f 4209 },
7aacca6f 4210 "leaf" : 1,
44660702
DM
4211 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}/{cidr}",
4212 "text" : "{cidr}"
7aacca6f 4213 }
44660702
DM
4214 ],
4215 "info" : {
4216 "DELETE" : {
4217 "description" : "Delete IPSet",
4218 "method" : "DELETE",
4219 "name" : "delete_ipset",
4220 "parameters" : {
4221 "additionalProperties" : 0,
4222 "properties" : {
4223 "name" : {
4224 "description" : "IP set name.",
4225 "maxLength" : 64,
4226 "minLength" : 2,
4227 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4228 "type" : "string"
4229 },
4230 "node" : {
4231 "description" : "The cluster node name.",
4232 "format" : "pve-node",
4233 "type" : "string"
4234 },
4235 "vmid" : {
4236 "description" : "The (unique) ID of the VM.",
4237 "format" : "pve-vmid",
4238 "minimum" : 1,
4bd7df8b
DM
4239 "type" : "integer",
4240 "typetext" : "integer (1- N)"
44660702
DM
4241 }
4242 }
7aacca6f 4243 },
44660702
DM
4244 "permissions" : {
4245 "check" : [
4246 "perm",
4247 "/vms/{vmid}",
4248 [
4249 "VM.Config.Network"
4250 ]
4251 ]
7aacca6f 4252 },
44660702
DM
4253 "protected" : 1,
4254 "returns" : {
4255 "type" : "null"
4256 }
4257 },
4258 "GET" : {
4259 "description" : "List IPSet content",
4260 "method" : "GET",
4261 "name" : "get_ipset",
4262 "parameters" : {
4263 "additionalProperties" : 0,
4264 "properties" : {
4265 "name" : {
4266 "description" : "IP set name.",
4267 "maxLength" : 64,
4268 "minLength" : 2,
4269 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4270 "type" : "string"
4271 },
4272 "node" : {
4273 "description" : "The cluster node name.",
4274 "format" : "pve-node",
4275 "type" : "string"
4276 },
4277 "vmid" : {
4278 "description" : "The (unique) ID of the VM.",
4279 "format" : "pve-vmid",
4280 "minimum" : 1,
4bd7df8b
DM
4281 "type" : "integer",
4282 "typetext" : "integer (1- N)"
44660702
DM
4283 }
4284 }
7aacca6f 4285 },
44660702
DM
4286 "permissions" : {
4287 "check" : [
4288 "perm",
4289 "/vms/{vmid}",
4290 [
4291 "VM.Audit"
4292 ]
4293 ]
7aacca6f 4294 },
44660702
DM
4295 "returns" : {
4296 "items" : {
4297 "properties" : {
4298 "cidr" : {
4299 "type" : "string"
4300 },
4301 "comment" : {
4302 "optional" : 1,
4303 "type" : "string"
4304 },
4305 "digest" : {
4306 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4307 "maxLength" : 40,
4308 "optional" : 0,
4309 "type" : "string"
4310 },
4311 "nomatch" : {
4312 "optional" : 1,
4313 "type" : "boolean"
4314 }
4315 },
4316 "type" : "object"
4317 },
4318 "links" : [
4319 {
4320 "href" : "{cidr}",
4321 "rel" : "child"
4322 }
4323 ],
4324 "type" : "array"
56122987
DM
4325 }
4326 },
44660702
DM
4327 "POST" : {
4328 "description" : "Add IP or Network to IPSet.",
4329 "method" : "POST",
4330 "name" : "create_ip",
4331 "parameters" : {
4332 "additionalProperties" : 0,
4333 "properties" : {
4334 "cidr" : {
4335 "description" : "Network/IP specification in CIDR format.",
4336 "format" : "IPorCIDRorAlias",
4337 "type" : "string"
4338 },
4339 "comment" : {
4340 "optional" : 1,
4341 "type" : "string"
4342 },
4343 "name" : {
4344 "description" : "IP set name.",
4345 "maxLength" : 64,
4346 "minLength" : 2,
4347 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4348 "type" : "string"
4349 },
4350 "node" : {
4351 "description" : "The cluster node name.",
4352 "format" : "pve-node",
4353 "type" : "string"
4354 },
4355 "nomatch" : {
4356 "optional" : 1,
4357 "type" : "boolean"
4358 },
4359 "vmid" : {
4360 "description" : "The (unique) ID of the VM.",
4361 "format" : "pve-vmid",
4362 "minimum" : 1,
4bd7df8b
DM
4363 "type" : "integer",
4364 "typetext" : "integer (1- N)"
44660702
DM
4365 }
4366 }
4367 },
4368 "permissions" : {
4369 "check" : [
4370 "perm",
4371 "/vms/{vmid}",
4372 [
4373 "VM.Config.Network"
4374 ]
4375 ]
4376 },
4377 "protected" : 1,
4378 "returns" : {
4379 "type" : "null"
4380 }
4381 }
4382 },
4383 "leaf" : 0,
4384 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset/{name}",
4385 "text" : "{name}"
4386 }
4387 ],
4388 "info" : {
4389 "GET" : {
4390 "description" : "List IPSets",
4391 "method" : "GET",
4392 "name" : "ipset_index",
4393 "parameters" : {
4394 "additionalProperties" : 0,
4395 "properties" : {
4396 "node" : {
4397 "description" : "The cluster node name.",
4398 "format" : "pve-node",
4399 "type" : "string"
4400 },
4401 "vmid" : {
4402 "description" : "The (unique) ID of the VM.",
4403 "format" : "pve-vmid",
4404 "minimum" : 1,
4bd7df8b
DM
4405 "type" : "integer",
4406 "typetext" : "integer (1- N)"
44660702
DM
4407 }
4408 }
56122987
DM
4409 },
4410 "permissions" : {
4411 "check" : [
4412 "perm",
4413 "/vms/{vmid}",
4414 [
44660702 4415 "VM.Audit"
56122987
DM
4416 ]
4417 ]
4418 },
7aacca6f 4419 "returns" : {
7aacca6f
DM
4420 "items" : {
4421 "properties" : {
7aacca6f
DM
4422 "comment" : {
4423 "optional" : 1,
4424 "type" : "string"
4425 },
4426 "digest" : {
7aacca6f 4427 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
4428 "maxLength" : 40,
4429 "optional" : 0,
4430 "type" : "string"
4431 },
4432 "name" : {
4433 "description" : "IP set name.",
4434 "maxLength" : 64,
4435 "minLength" : 2,
4436 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4437 "type" : "string"
7aacca6f
DM
4438 }
4439 },
4440 "type" : "object"
4441 },
4442 "links" : [
4443 {
44660702
DM
4444 "href" : "{name}",
4445 "rel" : "child"
7aacca6f 4446 }
44660702
DM
4447 ],
4448 "type" : "array"
4449 }
4450 },
4451 "POST" : {
4452 "description" : "Create new IPSet",
4453 "method" : "POST",
4454 "name" : "create_ipset",
56122987
DM
4455 "parameters" : {
4456 "additionalProperties" : 0,
4457 "properties" : {
44660702
DM
4458 "comment" : {
4459 "optional" : 1,
4460 "type" : "string"
56122987 4461 },
44660702
DM
4462 "digest" : {
4463 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
4464 "maxLength" : 40,
4465 "optional" : 1,
4466 "type" : "string"
4467 },
4468 "name" : {
4469 "description" : "IP set name.",
4470 "maxLength" : 64,
4471 "minLength" : 2,
4472 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4473 "type" : "string"
4474 },
4475 "node" : {
4476 "description" : "The cluster node name.",
4477 "format" : "pve-node",
4478 "type" : "string"
4479 },
4480 "rename" : {
4481 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
4482 "maxLength" : 64,
4483 "minLength" : 2,
4484 "optional" : 1,
4485 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
4486 "type" : "string"
4487 },
4488 "vmid" : {
4489 "description" : "The (unique) ID of the VM.",
4490 "format" : "pve-vmid",
4491 "minimum" : 1,
4bd7df8b
DM
4492 "type" : "integer",
4493 "typetext" : "integer (1- N)"
44660702
DM
4494 }
4495 }
4496 },
7aacca6f
DM
4497 "permissions" : {
4498 "check" : [
4499 "perm",
4500 "/vms/{vmid}",
4501 [
4502 "VM.Config.Network"
4503 ]
4504 ]
4505 },
44660702 4506 "protected" : 1,
56122987 4507 "returns" : {
7aacca6f 4508 "type" : "null"
44660702
DM
4509 }
4510 }
4511 },
4512 "leaf" : 0,
4513 "path" : "/nodes/{node}/qemu/{vmid}/firewall/ipset",
4514 "text" : "ipset"
4515 },
4516 {
4517 "info" : {
4518 "GET" : {
4519 "description" : "Get VM firewall options.",
4520 "method" : "GET",
4521 "name" : "get_options",
7aacca6f
DM
4522 "parameters" : {
4523 "additionalProperties" : 0,
56122987 4524 "properties" : {
7aacca6f
DM
4525 "node" : {
4526 "description" : "The cluster node name.",
44660702
DM
4527 "format" : "pve-node",
4528 "type" : "string"
7aacca6f 4529 },
44660702
DM
4530 "vmid" : {
4531 "description" : "The (unique) ID of the VM.",
4532 "format" : "pve-vmid",
4533 "minimum" : 1,
4bd7df8b
DM
4534 "type" : "integer",
4535 "typetext" : "integer (1- N)"
44660702
DM
4536 }
4537 }
4538 },
4539 "permissions" : {
4540 "check" : [
4541 "perm",
4542 "/vms/{vmid}",
4543 [
4544 "VM.Audit"
4545 ]
4546 ]
4547 },
4548 "proxyto" : "node",
4549 "returns" : {
4550 "properties" : {
4551 "dhcp" : {
4552 "description" : "Enable DHCP.",
56122987 4553 "optional" : 1,
44660702 4554 "type" : "boolean"
56122987 4555 },
44660702
DM
4556 "enable" : {
4557 "description" : "Enable/disable firewall rules.",
7aacca6f 4558 "optional" : 1,
44660702 4559 "type" : "boolean"
56122987 4560 },
44660702
DM
4561 "ipfilter" : {
4562 "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 4563 "optional" : 1,
44660702 4564 "type" : "boolean"
7aacca6f 4565 },
56122987 4566 "log_level_in" : {
7aacca6f 4567 "description" : "Log level for incoming traffic.",
56122987
DM
4568 "enum" : [
4569 "emerg",
4570 "alert",
4571 "crit",
4572 "err",
4573 "warning",
4574 "notice",
4575 "info",
4576 "debug",
4577 "nolog"
4578 ],
56122987
DM
4579 "optional" : 1,
4580 "type" : "string"
4581 },
44660702
DM
4582 "log_level_out" : {
4583 "description" : "Log level for outgoing traffic.",
4584 "enum" : [
4585 "emerg",
4586 "alert",
4587 "crit",
4588 "err",
4589 "warning",
4590 "notice",
4591 "info",
4592 "debug",
4593 "nolog"
4594 ],
4595 "optional" : 1,
4596 "type" : "string"
4597 },
4598 "macfilter" : {
4599 "description" : "Enable/disable MAC address filter.",
56122987 4600 "optional" : 1,
7aacca6f 4601 "type" : "boolean"
56122987
DM
4602 },
4603 "ndp" : {
44660702 4604 "description" : "Enable NDP.",
56122987 4605 "optional" : 1,
44660702 4606 "type" : "boolean"
56122987
DM
4607 },
4608 "policy_in" : {
56122987
DM
4609 "description" : "Input policy.",
4610 "enum" : [
4611 "ACCEPT",
4612 "REJECT",
4613 "DROP"
44660702
DM
4614 ],
4615 "optional" : 1,
4616 "type" : "string"
56122987 4617 },
44660702
DM
4618 "policy_out" : {
4619 "description" : "Output policy.",
4620 "enum" : [
4621 "ACCEPT",
4622 "REJECT",
4623 "DROP"
4624 ],
4625 "optional" : 1,
4626 "type" : "string"
4627 },
4628 "radv" : {
4629 "description" : "Allow sending Router Advertisement.",
4630 "optional" : 1,
4631 "type" : "boolean"
4632 }
4633 },
4634 "type" : "object"
4635 }
4636 },
4637 "PUT" : {
4638 "description" : "Set Firewall options.",
4639 "method" : "PUT",
4640 "name" : "set_options",
4641 "parameters" : {
4642 "additionalProperties" : 0,
4643 "properties" : {
4644 "delete" : {
4645 "description" : "A list of settings you want to delete.",
4646 "format" : "pve-configid-list",
4647 "optional" : 1,
4648 "type" : "string"
4649 },
4650 "dhcp" : {
4651 "description" : "Enable DHCP.",
7aacca6f 4652 "optional" : 1,
44660702 4653 "type" : "boolean"
7aacca6f
DM
4654 },
4655 "digest" : {
4656 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 4657 "maxLength" : 40,
7aacca6f 4658 "optional" : 1,
44660702 4659 "type" : "string"
7aacca6f
DM
4660 },
4661 "enable" : {
4662 "description" : "Enable/disable firewall rules.",
56122987 4663 "optional" : 1,
7aacca6f
DM
4664 "type" : "boolean"
4665 },
44660702
DM
4666 "ipfilter" : {
4667 "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.",
4668 "optional" : 1,
4669 "type" : "boolean"
4670 },
4671 "log_level_in" : {
4672 "description" : "Log level for incoming traffic.",
56122987
DM
4673 "enum" : [
4674 "emerg",
4675 "alert",
4676 "crit",
4677 "err",
4678 "warning",
4679 "notice",
4680 "info",
4681 "debug",
4682 "nolog"
7aacca6f 4683 ],
7aacca6f 4684 "optional" : 1,
44660702 4685 "type" : "string"
7aacca6f 4686 },
44660702
DM
4687 "log_level_out" : {
4688 "description" : "Log level for outgoing traffic.",
56122987
DM
4689 "enum" : [
4690 "emerg",
4691 "alert",
4692 "crit",
4693 "err",
4694 "warning",
4695 "notice",
4696 "info",
4697 "debug",
4698 "nolog"
4699 ],
56122987 4700 "optional" : 1,
44660702 4701 "type" : "string"
56122987
DM
4702 },
4703 "macfilter" : {
56122987 4704 "description" : "Enable/disable MAC address filter.",
7aacca6f
DM
4705 "optional" : 1,
4706 "type" : "boolean"
56122987 4707 },
44660702
DM
4708 "ndp" : {
4709 "description" : "Enable NDP.",
4710 "optional" : 1,
4711 "type" : "boolean"
4712 },
4713 "node" : {
4714 "description" : "The cluster node name.",
4715 "format" : "pve-node",
4716 "type" : "string"
4717 },
56122987 4718 "policy_in" : {
44660702 4719 "description" : "Input policy.",
56122987
DM
4720 "enum" : [
4721 "ACCEPT",
4722 "REJECT",
4723 "DROP"
7aacca6f 4724 ],
56122987 4725 "optional" : 1,
7aacca6f 4726 "type" : "string"
56122987 4727 },
44660702
DM
4728 "policy_out" : {
4729 "description" : "Output policy.",
4730 "enum" : [
4731 "ACCEPT",
4732 "REJECT",
4733 "DROP"
4734 ],
56122987 4735 "optional" : 1,
44660702 4736 "type" : "string"
56122987 4737 },
44660702
DM
4738 "radv" : {
4739 "description" : "Allow sending Router Advertisement.",
56122987 4740 "optional" : 1,
44660702 4741 "type" : "boolean"
7aacca6f
DM
4742 },
4743 "vmid" : {
4744 "description" : "The (unique) ID of the VM.",
44660702 4745 "format" : "pve-vmid",
7aacca6f 4746 "minimum" : 1,
4bd7df8b
DM
4747 "type" : "integer",
4748 "typetext" : "integer (1- N)"
56122987
DM
4749 }
4750 }
4751 },
56122987
DM
4752 "permissions" : {
4753 "check" : [
4754 "perm",
4755 "/vms/{vmid}",
4756 [
44660702 4757 "VM.Config.Network"
56122987
DM
4758 ]
4759 ]
7aacca6f 4760 },
44660702 4761 "protected" : 1,
7aacca6f 4762 "proxyto" : "node",
44660702
DM
4763 "returns" : {
4764 "type" : "null"
4765 }
56122987
DM
4766 }
4767 },
44660702 4768 "leaf" : 1,
7aacca6f 4769 "path" : "/nodes/{node}/qemu/{vmid}/firewall/options",
44660702 4770 "text" : "options"
56122987
DM
4771 },
4772 {
56122987
DM
4773 "info" : {
4774 "GET" : {
44660702
DM
4775 "description" : "Read firewall log",
4776 "method" : "GET",
4777 "name" : "log",
4778 "parameters" : {
4779 "additionalProperties" : 0,
4780 "properties" : {
4781 "limit" : {
4782 "minimum" : 0,
4783 "optional" : 1,
4bd7df8b
DM
4784 "type" : "integer",
4785 "typetext" : "integer (0- N)"
56122987 4786 },
44660702
DM
4787 "node" : {
4788 "description" : "The cluster node name.",
4789 "format" : "pve-node",
4790 "type" : "string"
4791 },
4792 "start" : {
4793 "minimum" : 0,
4794 "optional" : 1,
4bd7df8b
DM
4795 "type" : "integer",
4796 "typetext" : "integer (0- N)"
44660702
DM
4797 },
4798 "vmid" : {
4799 "description" : "The (unique) ID of the VM.",
4800 "format" : "pve-vmid",
4801 "minimum" : 1,
4bd7df8b
DM
4802 "type" : "integer",
4803 "typetext" : "integer (1- N)"
44660702
DM
4804 }
4805 }
7aacca6f 4806 },
7aacca6f
DM
4807 "permissions" : {
4808 "check" : [
4809 "perm",
4810 "/vms/{vmid}",
4811 [
4812 "VM.Console"
4813 ]
4814 ]
56122987 4815 },
7aacca6f 4816 "protected" : 1,
44660702
DM
4817 "proxyto" : "node",
4818 "returns" : {
4819 "items" : {
4820 "properties" : {
4821 "n" : {
4822 "description" : "Line number",
4823 "type" : "integer"
4824 },
4825 "t" : {
4826 "description" : "Line text",
4827 "type" : "string"
4828 }
56122987 4829 },
44660702 4830 "type" : "object"
7aacca6f 4831 },
44660702 4832 "type" : "array"
7aacca6f
DM
4833 }
4834 }
4835 },
44660702 4836 "leaf" : 1,
7aacca6f 4837 "path" : "/nodes/{node}/qemu/{vmid}/firewall/log",
44660702 4838 "text" : "log"
7aacca6f
DM
4839 },
4840 {
7aacca6f
DM
4841 "info" : {
4842 "GET" : {
4843 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
4844 "method" : "GET",
4845 "name" : "refs",
56122987 4846 "parameters" : {
44660702 4847 "additionalProperties" : 0,
56122987
DM
4848 "properties" : {
4849 "node" : {
7aacca6f 4850 "description" : "The cluster node name.",
44660702 4851 "format" : "pve-node",
7aacca6f 4852 "type" : "string"
56122987
DM
4853 },
4854 "type" : {
56122987
DM
4855 "description" : "Only list references of specified type.",
4856 "enum" : [
4857 "alias",
4858 "ipset"
7aacca6f 4859 ],
44660702
DM
4860 "optional" : 1,
4861 "type" : "string"
4862 },
4863 "vmid" : {
4864 "description" : "The (unique) ID of the VM.",
4865 "format" : "pve-vmid",
4866 "minimum" : 1,
4bd7df8b
DM
4867 "type" : "integer",
4868 "typetext" : "integer (1- N)"
56122987 4869 }
44660702
DM
4870 }
4871 },
4872 "permissions" : {
4873 "check" : [
4874 "perm",
4875 "/vms/{vmid}",
4876 [
4877 "VM.Audit"
4878 ]
4879 ]
56122987
DM
4880 },
4881 "returns" : {
56122987
DM
4882 "items" : {
4883 "properties" : {
44660702
DM
4884 "comment" : {
4885 "optional" : 1,
56122987
DM
4886 "type" : "string"
4887 },
4888 "name" : {
4889 "type" : "string"
4890 },
44660702
DM
4891 "type" : {
4892 "enum" : [
4893 "alias",
4894 "ipset"
4895 ],
7aacca6f 4896 "type" : "string"
56122987
DM
4897 }
4898 },
4899 "type" : "object"
7aacca6f
DM
4900 },
4901 "type" : "array"
4902 }
56122987 4903 }
44660702
DM
4904 },
4905 "leaf" : 1,
4906 "path" : "/nodes/{node}/qemu/{vmid}/firewall/refs",
4907 "text" : "refs"
56122987
DM
4908 }
4909 ],
56122987
DM
4910 "info" : {
4911 "GET" : {
44660702 4912 "description" : "Directory index.",
56122987 4913 "method" : "GET",
44660702 4914 "name" : "index",
56122987 4915 "parameters" : {
44660702 4916 "additionalProperties" : 0,
56122987
DM
4917 "properties" : {
4918 "node" : {
4919 "description" : "The cluster node name.",
44660702
DM
4920 "format" : "pve-node",
4921 "type" : "string"
56122987
DM
4922 },
4923 "vmid" : {
44660702 4924 "description" : "The (unique) ID of the VM.",
56122987
DM
4925 "format" : "pve-vmid",
4926 "minimum" : 1,
4bd7df8b
DM
4927 "type" : "integer",
4928 "typetext" : "integer (1- N)"
56122987 4929 }
44660702 4930 }
56122987 4931 },
56122987
DM
4932 "permissions" : {
4933 "user" : "all"
7aacca6f 4934 },
44660702
DM
4935 "returns" : {
4936 "items" : {
4937 "properties" : {},
4938 "type" : "object"
4939 },
4940 "links" : [
4941 {
4942 "href" : "{name}",
4943 "rel" : "child"
4944 }
4945 ],
4946 "type" : "array"
4947 }
56122987 4948 }
44660702
DM
4949 },
4950 "leaf" : 0,
4951 "path" : "/nodes/{node}/qemu/{vmid}/firewall",
4952 "text" : "firewall"
56122987
DM
4953 },
4954 {
56122987
DM
4955 "info" : {
4956 "GET" : {
44660702
DM
4957 "description" : "Read VM RRD statistics (returns PNG)",
4958 "method" : "GET",
7aacca6f 4959 "name" : "rrd",
56122987
DM
4960 "parameters" : {
4961 "additionalProperties" : 0,
4962 "properties" : {
7aacca6f 4963 "cf" : {
44660702 4964 "description" : "The RRD consolidation function",
7aacca6f
DM
4965 "enum" : [
4966 "AVERAGE",
4967 "MAX"
4968 ],
7aacca6f
DM
4969 "optional" : 1,
4970 "type" : "string"
4971 },
44660702
DM
4972 "ds" : {
4973 "description" : "The list of datasources you want to display.",
4974 "format" : "pve-configid-list",
4975 "type" : "string"
56122987
DM
4976 },
4977 "node" : {
44660702 4978 "description" : "The cluster node name.",
56122987 4979 "format" : "pve-node",
44660702 4980 "type" : "string"
56122987
DM
4981 },
4982 "timeframe" : {
44660702 4983 "description" : "Specify the time frame you are interested in.",
56122987
DM
4984 "enum" : [
4985 "hour",
4986 "day",
4987 "week",
4988 "month",
4989 "year"
4990 ],
56122987
DM
4991 "type" : "string"
4992 },
44660702
DM
4993 "vmid" : {
4994 "description" : "The (unique) ID of the VM.",
4995 "format" : "pve-vmid",
4996 "minimum" : 1,
4bd7df8b
DM
4997 "type" : "integer",
4998 "typetext" : "integer (1- N)"
56122987
DM
4999 }
5000 }
5001 },
56122987
DM
5002 "permissions" : {
5003 "check" : [
5004 "perm",
5005 "/vms/{vmid}",
5006 [
5007 "VM.Audit"
5008 ]
5009 ]
5010 },
7aacca6f
DM
5011 "protected" : 1,
5012 "returns" : {
5013 "properties" : {
5014 "filename" : {
5015 "type" : "string"
5016 }
5017 },
5018 "type" : "object"
44660702 5019 }
56122987 5020 }
44660702
DM
5021 },
5022 "leaf" : 1,
5023 "path" : "/nodes/{node}/qemu/{vmid}/rrd",
5024 "text" : "rrd"
56122987
DM
5025 },
5026 {
7aacca6f 5027 "info" : {
56122987 5028 "GET" : {
7aacca6f 5029 "description" : "Read VM RRD statistics",
44660702 5030 "method" : "GET",
56122987 5031 "name" : "rrddata",
56122987 5032 "parameters" : {
44660702 5033 "additionalProperties" : 0,
56122987 5034 "properties" : {
44660702
DM
5035 "cf" : {
5036 "description" : "The RRD consolidation function",
5037 "enum" : [
5038 "AVERAGE",
5039 "MAX"
5040 ],
5041 "optional" : 1,
5042 "type" : "string"
5043 },
56122987 5044 "node" : {
44660702 5045 "description" : "The cluster node name.",
56122987 5046 "format" : "pve-node",
44660702 5047 "type" : "string"
56122987
DM
5048 },
5049 "timeframe" : {
44660702 5050 "description" : "Specify the time frame you are interested in.",
56122987
DM
5051 "enum" : [
5052 "hour",
5053 "day",
5054 "week",
5055 "month",
5056 "year"
7aacca6f 5057 ],
44660702 5058 "type" : "string"
7aacca6f
DM
5059 },
5060 "vmid" : {
7aacca6f
DM
5061 "description" : "The (unique) ID of the VM.",
5062 "format" : "pve-vmid",
44660702 5063 "minimum" : 1,
4bd7df8b
DM
5064 "type" : "integer",
5065 "typetext" : "integer (1- N)"
56122987 5066 }
44660702 5067 }
56122987 5068 },
56122987
DM
5069 "permissions" : {
5070 "check" : [
5071 "perm",
5072 "/vms/{vmid}",
5073 [
5074 "VM.Audit"
5075 ]
5076 ]
5077 },
44660702 5078 "protected" : 1,
7aacca6f 5079 "returns" : {
7aacca6f 5080 "items" : {
44660702
DM
5081 "properties" : {},
5082 "type" : "object"
5083 },
5084 "type" : "array"
7aacca6f 5085 }
56122987
DM
5086 }
5087 },
44660702
DM
5088 "leaf" : 1,
5089 "path" : "/nodes/{node}/qemu/{vmid}/rrddata",
56122987
DM
5090 "text" : "rrddata"
5091 },
5092 {
56122987 5093 "info" : {
44660702
DM
5094 "GET" : {
5095 "description" : "Get current virtual machine configuration. This does not include pending configuration changes (see 'pending' API).",
5096 "method" : "GET",
5097 "name" : "vm_config",
5098 "parameters" : {
5099 "additionalProperties" : 0,
5100 "properties" : {
5101 "current" : {
5102 "default" : 0,
5103 "description" : "Get current values (instead of pending values).",
5104 "optional" : 1,
5105 "type" : "boolean"
5106 },
5107 "node" : {
5108 "description" : "The cluster node name.",
5109 "format" : "pve-node",
5110 "type" : "string"
5111 },
5112 "vmid" : {
5113 "description" : "The (unique) ID of the VM.",
5114 "format" : "pve-vmid",
5115 "minimum" : 1,
4bd7df8b
DM
5116 "type" : "integer",
5117 "typetext" : "integer (1- N)"
44660702
DM
5118 }
5119 }
7aacca6f 5120 },
56122987
DM
5121 "permissions" : {
5122 "check" : [
5123 "perm",
5124 "/vms/{vmid}",
5125 [
44660702
DM
5126 "VM.Audit"
5127 ]
56122987
DM
5128 ]
5129 },
56122987 5130 "proxyto" : "node",
44660702
DM
5131 "returns" : {
5132 "properties" : {
5133 "digest" : {
5134 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
5135 "type" : "string"
5136 }
5137 },
5138 "type" : "object"
5139 }
5140 },
5141 "POST" : {
7aacca6f
DM
5142 "description" : "Set virtual machine options (asynchrounous API).",
5143 "method" : "POST",
44660702 5144 "name" : "update_vm_async",
56122987 5145 "parameters" : {
44660702 5146 "additionalProperties" : 0,
56122987 5147 "properties" : {
44660702
DM
5148 "acpi" : {
5149 "default" : 1,
5150 "description" : "Enable/disable ACPI.",
5151 "optional" : 1,
5152 "type" : "boolean"
5153 },
5154 "agent" : {
7aacca6f 5155 "default" : 0,
44660702 5156 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 5157 "optional" : 1,
44660702 5158 "type" : "boolean"
7aacca6f 5159 },
44660702 5160 "args" : {
c2993fe5 5161 "description" : "Arbitrary arguments passed to kvm.",
44660702 5162 "optional" : 1,
c2993fe5
DM
5163 "type" : "string",
5164 "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 5165 },
44660702
DM
5166 "autostart" : {
5167 "default" : 0,
5168 "description" : "Automatic restart after crash (currently ignored).",
56122987 5169 "optional" : 1,
44660702 5170 "type" : "boolean"
56122987 5171 },
44660702
DM
5172 "background_delay" : {
5173 "description" : "Time to wait for the task to finish. We return 'null' if the task finish within that time.",
5174 "maximum" : 30,
5175 "minimum" : 1,
7aacca6f 5176 "optional" : 1,
4bd7df8b
DM
5177 "type" : "integer",
5178 "typetext" : "integer (1-30)"
56122987 5179 },
44660702
DM
5180 "balloon" : {
5181 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
5182 "minimum" : 0,
7aacca6f 5183 "optional" : 1,
4bd7df8b
DM
5184 "type" : "integer",
5185 "typetext" : "integer (0- N)"
7aacca6f 5186 },
44660702
DM
5187 "bios" : {
5188 "default" : "seabios",
5189 "description" : "Select BIOS implementation.",
5190 "enum" : [
5191 "seabios",
5192 "ovmf"
5193 ],
56122987 5194 "optional" : 1,
44660702 5195 "type" : "string"
7aacca6f 5196 },
44660702
DM
5197 "boot" : {
5198 "default" : "cdn",
5199 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
5200 "optional" : 1,
5201 "pattern" : "[acdn]{1,4}",
5202 "type" : "string"
5203 },
5204 "bootdisk" : {
5205 "description" : "Enable booting from specified disk.",
5206 "format" : "pve-qm-bootdisk",
5207 "optional" : 1,
5208 "pattern" : "(ide|sata|scsi|virtio)\\d+",
5209 "type" : "string"
5210 },
5211 "cdrom" : {
5212 "description" : "This is an alias for option -ide2",
5213 "format" : "pve-qm-drive",
5214 "optional" : 1,
7aacca6f 5215 "type" : "string",
44660702
DM
5216 "typetext" : "volume"
5217 },
5218 "cores" : {
5219 "default" : 1,
5220 "description" : "The number of cores per socket.",
5221 "minimum" : 1,
7aacca6f 5222 "optional" : 1,
4bd7df8b
DM
5223 "type" : "integer",
5224 "typetext" : "integer (1- N)"
7aacca6f 5225 },
44660702
DM
5226 "cpu" : {
5227 "description" : "Emulated CPU type.",
56122987 5228 "format" : {
44660702
DM
5229 "cputype" : {
5230 "default" : "kvm64",
7aacca6f 5231 "default_key" : 1,
44660702 5232 "description" : "Emulated CPU type.",
56122987 5233 "enum" : [
44660702
DM
5234 "486",
5235 "athlon",
f004f5b9
DM
5236 "Broadwell",
5237 "Broadwell-noTSX",
5238 "Conroe",
44660702 5239 "core2duo",
f004f5b9
DM
5240 "coreduo",
5241 "Haswell",
5242 "Haswell-noTSX",
5243 "host",
5244 "IvyBridge",
44660702
DM
5245 "kvm32",
5246 "kvm64",
44660702 5247 "Nehalem",
44660702
DM
5248 "Opteron_G1",
5249 "Opteron_G2",
5250 "Opteron_G3",
5251 "Opteron_G4",
5252 "Opteron_G5",
f004f5b9
DM
5253 "Penryn",
5254 "pentium",
5255 "pentium2",
5256 "pentium3",
5257 "phenom",
5258 "qemu32",
5259 "qemu64",
5260 "SandyBridge",
5261 "Westmere"
56122987 5262 ],
44660702 5263 "format_description" : "cputype",
56122987
DM
5264 "type" : "string"
5265 },
44660702
DM
5266 "hidden" : {
5267 "default" : 0,
5268 "description" : "Do not identify as a KVM virtual machine.",
56122987 5269 "optional" : 1,
44660702
DM
5270 "type" : "boolean"
5271 }
5272 },
5273 "optional" : 1,
4bd7df8b
DM
5274 "type" : "string",
5275 "typetext" : "[cputype=]<cputype> [,hidden=<1|0>]"
44660702
DM
5276 },
5277 "cpulimit" : {
5278 "default" : 0,
c2993fe5 5279 "description" : "Limit of CPU usage.",
44660702
DM
5280 "maximum" : 128,
5281 "minimum" : 0,
5282 "optional" : 1,
c2993fe5 5283 "type" : "number",
4bd7df8b 5284 "typetext" : "number (0-128)",
c2993fe5 5285 "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
5286 },
5287 "cpuunits" : {
5288 "default" : 1000,
c2993fe5 5289 "description" : "CPU weight for a VM.",
44660702
DM
5290 "maximum" : 500000,
5291 "minimum" : 0,
5292 "optional" : 1,
c2993fe5 5293 "type" : "integer",
4bd7df8b 5294 "typetext" : "integer (0-500000)",
c2993fe5 5295 "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
5296 },
5297 "delete" : {
5298 "description" : "A list of settings you want to delete.",
5299 "format" : "pve-configid-list",
5300 "optional" : 1,
5301 "type" : "string"
5302 },
5303 "description" : {
5304 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
5305 "optional" : 1,
5306 "type" : "string"
5307 },
5308 "digest" : {
5309 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
5310 "maxLength" : 40,
5311 "optional" : 1,
5312 "type" : "string"
5313 },
5314 "force" : {
5315 "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.",
5316 "optional" : 1,
5317 "requires" : "delete",
5318 "type" : "boolean"
5319 },
5320 "freeze" : {
5321 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
5322 "optional" : 1,
5323 "type" : "boolean"
5324 },
5325 "hostpci[n]" : {
c2993fe5 5326 "description" : "Map host PCI devices into guest.",
44660702
DM
5327 "format" : "pve-qm-hostpci",
5328 "optional" : 1,
57b78691 5329 "type" : "string",
4bd7df8b 5330 "typetext" : "[host=]<HOSTPCIID[;HOSTPCIID2...]> [,pcie=<1|0>] [,rombar=<1|0>] [,x-vga=<1|0>]",
57b78691 5331 "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
5332 },
5333 "hotplug" : {
5334 "default" : "network,disk,usb",
5335 "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'.",
5336 "format" : "pve-hotplug-features",
5337 "optional" : 1,
5338 "type" : "string"
5339 },
4bd7df8b
DM
5340 "hugepages" : {
5341 "description" : "Enable/disable hugepages memory.",
5342 "enum" : [
5343 "any",
5344 "2",
5345 "1024"
5346 ],
5347 "optional" : 1,
5348 "type" : "string"
5349 },
44660702
DM
5350 "ide[n]" : {
5351 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
5352 "format" : {
5353 "aio" : {
5354 "description" : "AIO type to use.",
5355 "enum" : [
5356 "native",
5357 "threads"
56122987 5358 ],
56122987 5359 "optional" : 1,
44660702 5360 "type" : "string"
56122987 5361 },
44660702
DM
5362 "backup" : {
5363 "description" : "Whether the drive should be included when making backups.",
56122987 5364 "optional" : 1,
44660702 5365 "type" : "boolean"
56122987 5366 },
7aacca6f
DM
5367 "bps" : {
5368 "description" : "Maximum r/w speed speed in bytes per second.",
44660702
DM
5369 "format_description" : "bps",
5370 "optional" : 1,
5371 "type" : "integer"
5372 },
5373 "bps_rd" : {
5374 "description" : "Maximum read speed speed in bytes per second.",
5375 "format_description" : "bps",
56122987 5376 "optional" : 1,
44660702 5377 "type" : "integer"
56122987 5378 },
44660702
DM
5379 "bps_wr" : {
5380 "description" : "Maximum write speed speed in bytes per second.",
5381 "format_description" : "bps",
5382 "optional" : 1,
5383 "type" : "integer"
5384 },
5385 "cache" : {
5386 "description" : "The drive's cache mode",
5387 "enum" : [
5388 "none",
5389 "writethrough",
5390 "writeback",
5391 "unsafe",
5392 "directsync"
5393 ],
44660702
DM
5394 "optional" : 1,
5395 "type" : "string"
5396 },
5397 "cyls" : {
5398 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
5399 "optional" : 1,
5400 "type" : "integer"
5401 },
5402 "detect_zeroes" : {
5403 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
5404 "optional" : 1,
5405 "type" : "boolean"
5406 },
5407 "discard" : {
5408 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5409 "enum" : [
5410 "ignore",
5411 "on"
5412 ],
56122987 5413 "optional" : 1,
44660702
DM
5414 "type" : "string"
5415 },
5416 "file" : {
5417 "default_key" : 1,
5418 "description" : "The drive's backing volume.",
5419 "format" : "pve-volume-id-or-qm-path",
5420 "format_description" : "volume",
5421 "type" : "string"
56122987 5422 },
7aacca6f 5423 "format" : {
7aacca6f 5424 "description" : "The drive's backing file's data format.",
56122987 5425 "enum" : [
7aacca6f
DM
5426 "raw",
5427 "cow",
5428 "qcow",
5429 "qed",
5430 "qcow2",
5431 "vmdk",
5432 "cloop"
56122987 5433 ],
f004f5b9 5434 "format_description" : "image format",
56122987 5435 "optional" : 1,
56122987
DM
5436 "type" : "string"
5437 },
44660702
DM
5438 "heads" : {
5439 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
5440 "optional" : 1,
5441 "type" : "integer"
7aacca6f 5442 },
44660702
DM
5443 "iops" : {
5444 "description" : "Maximum r/w I/O speed in operations per second.",
5445 "format_description" : "iops",
56122987 5446 "optional" : 1,
44660702 5447 "type" : "integer"
56122987 5448 },
44660702
DM
5449 "iops_max" : {
5450 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
5451 "format_description" : "iops",
56122987 5452 "optional" : 1,
44660702 5453 "type" : "integer"
56122987 5454 },
44660702
DM
5455 "iops_rd" : {
5456 "description" : "Maximum read I/O speed in operations per second.",
5457 "format_description" : "iops",
5458 "optional" : 1,
5459 "type" : "integer"
5460 },
5461 "iops_rd_max" : {
5462 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 5463 "format_description" : "iops",
44660702
DM
5464 "optional" : 1,
5465 "type" : "integer"
5466 },
5467 "iops_wr" : {
7aacca6f 5468 "description" : "Maximum write I/O speed in operations per second.",
44660702 5469 "format_description" : "iops",
56122987 5470 "optional" : 1,
7aacca6f 5471 "type" : "integer"
56122987 5472 },
44660702
DM
5473 "iops_wr_max" : {
5474 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
5475 "format_description" : "iops",
7aacca6f 5476 "optional" : 1,
44660702 5477 "type" : "integer"
56122987 5478 },
44660702
DM
5479 "mbps" : {
5480 "description" : "Maximum r/w speed speed in megabytes per second.",
5481 "format_description" : "mbps",
5482 "optional" : 1,
5483 "type" : "number"
5484 },
5485 "mbps_max" : {
5486 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
5487 "format_description" : "mbps",
5488 "optional" : 1,
5489 "type" : "number"
5490 },
5491 "mbps_rd" : {
5492 "description" : "Maximum read speed speed in megabytes per second.",
5493 "format_description" : "mbps",
5494 "optional" : 1,
5495 "type" : "number"
5496 },
5497 "mbps_rd_max" : {
5498 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
5499 "format_description" : "mbps",
5500 "optional" : 1,
5501 "type" : "number"
5502 },
5503 "mbps_wr" : {
5504 "description" : "Maximum write speed speed in megabytes per second.",
5505 "format_description" : "mbps",
5506 "optional" : 1,
5507 "type" : "number"
5508 },
5509 "mbps_wr_max" : {
5510 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
5511 "format_description" : "mbps",
56122987 5512 "optional" : 1,
44660702 5513 "type" : "number"
56122987 5514 },
7aacca6f 5515 "media" : {
7aacca6f 5516 "default" : "disk",
7aacca6f
DM
5517 "description" : "The drive's media type.",
5518 "enum" : [
5519 "cdrom",
5520 "disk"
44660702 5521 ],
44660702
DM
5522 "optional" : 1,
5523 "type" : "string"
56122987 5524 },
44660702
DM
5525 "model" : {
5526 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
5527 "format" : "urlencoded",
5528 "format_description" : "model",
5529 "maxLength" : 120,
56122987 5530 "optional" : 1,
44660702 5531 "type" : "string"
56122987 5532 },
44660702
DM
5533 "rerror" : {
5534 "description" : "Read error action.",
5535 "enum" : [
5536 "ignore",
5537 "report",
5538 "stop"
5539 ],
56122987 5540 "optional" : 1,
44660702
DM
5541 "type" : "string"
5542 },
5543 "secs" : {
5544 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
5545 "optional" : 1,
5546 "type" : "integer"
5547 },
5548 "serial" : {
5549 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
5550 "format" : "urlencoded",
5551 "format_description" : "serial",
5552 "maxLength" : 60,
5553 "optional" : 1,
5554 "type" : "string"
5555 },
5556 "size" : {
5557 "description" : "Disk size. This is purely informational and has no effect.",
5558 "format" : "disk-size",
f004f5b9 5559 "format_description" : "DiskSize",
44660702
DM
5560 "optional" : 1,
5561 "type" : "string"
5562 },
5563 "snapshot" : {
5564 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
5565 "optional" : 1,
5566 "type" : "boolean"
5567 },
5568 "trans" : {
5569 "description" : "Force disk geometry bios translation mode.",
5570 "enum" : [
5571 "none",
5572 "lba",
5573 "auto"
5574 ],
44660702
DM
5575 "optional" : 1,
5576 "type" : "string"
5577 },
5578 "volume" : {
5579 "alias" : "file"
5580 },
5581 "werror" : {
5582 "description" : "Write error action.",
5583 "enum" : [
5584 "enospc",
5585 "ignore",
5586 "report",
5587 "stop"
5588 ],
44660702
DM
5589 "optional" : 1,
5590 "type" : "string"
56122987
DM
5591 }
5592 },
44660702 5593 "optional" : 1,
4bd7df8b
DM
5594 "type" : "string",
5595 "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 5596 },
44660702
DM
5597 "keyboard" : {
5598 "default" : "en-us",
c2993fe5 5599 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
5600 "enum" : [
5601 "de",
5602 "de-ch",
5603 "da",
5604 "en-gb",
5605 "en-us",
5606 "es",
5607 "fi",
5608 "fr",
5609 "fr-be",
5610 "fr-ca",
5611 "fr-ch",
5612 "hu",
5613 "is",
5614 "it",
5615 "ja",
5616 "lt",
5617 "mk",
5618 "nl",
5619 "no",
5620 "pl",
5621 "pt",
5622 "pt-br",
5623 "sv",
5624 "sl",
5625 "tr"
5626 ],
56122987 5627 "optional" : 1,
44660702
DM
5628 "type" : "string"
5629 },
5630 "kvm" : {
7aacca6f 5631 "default" : 1,
44660702
DM
5632 "description" : "Enable/disable KVM hardware virtualization.",
5633 "optional" : 1,
5634 "type" : "boolean"
56122987 5635 },
44660702
DM
5636 "localtime" : {
5637 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 5638 "optional" : 1,
44660702 5639 "type" : "boolean"
56122987 5640 },
44660702
DM
5641 "lock" : {
5642 "description" : "Lock/unlock the VM.",
5643 "enum" : [
5644 "migrate",
5645 "backup",
5646 "snapshot",
5647 "rollback"
5648 ],
7aacca6f 5649 "optional" : 1,
44660702
DM
5650 "type" : "string"
5651 },
5652 "machine" : {
5653 "description" : "Specific the Qemu machine type.",
5654 "maxLength" : 40,
5655 "optional" : 1,
5656 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
5657 "type" : "string"
5658 },
5659 "memory" : {
5660 "default" : 512,
5661 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
5662 "minimum" : 16,
5663 "optional" : 1,
4bd7df8b
DM
5664 "type" : "integer",
5665 "typetext" : "integer (16- N)"
44660702
DM
5666 },
5667 "migrate_downtime" : {
5668 "default" : 0.1,
5669 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
5670 "minimum" : 0,
5671 "optional" : 1,
4bd7df8b
DM
5672 "type" : "number",
5673 "typetext" : "number (0- N)"
44660702
DM
5674 },
5675 "migrate_speed" : {
5676 "default" : 0,
5677 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
5678 "minimum" : 0,
5679 "optional" : 1,
4bd7df8b
DM
5680 "type" : "integer",
5681 "typetext" : "integer (0- N)"
44660702
DM
5682 },
5683 "name" : {
5684 "description" : "Set a name for the VM. Only used on the configuration web interface.",
5685 "format" : "dns-name",
5686 "optional" : 1,
5687 "type" : "string"
5688 },
5689 "net[n]" : {
c2993fe5 5690 "description" : "Specify network devices.",
f004f5b9
DM
5691 "format" : {
5692 "bridge" : {
c2993fe5 5693 "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
5694 "format_description" : "bridge",
5695 "optional" : 1,
5696 "type" : "string"
5697 },
5698 "e1000" : {
5699 "alias" : "macaddr",
5700 "keyAlias" : "model"
5701 },
5702 "e1000-82540em" : {
5703 "alias" : "macaddr",
5704 "keyAlias" : "model"
5705 },
5706 "e1000-82544gc" : {
5707 "alias" : "macaddr",
5708 "keyAlias" : "model"
5709 },
5710 "e1000-82545em" : {
5711 "alias" : "macaddr",
5712 "keyAlias" : "model"
5713 },
5714 "firewall" : {
5715 "description" : "Whether this interface should be protected by the firewall.",
5716 "optional" : 1,
5717 "type" : "boolean"
5718 },
5719 "i82551" : {
5720 "alias" : "macaddr",
5721 "keyAlias" : "model"
5722 },
5723 "i82557b" : {
5724 "alias" : "macaddr",
5725 "keyAlias" : "model"
5726 },
5727 "i82559er" : {
5728 "alias" : "macaddr",
5729 "keyAlias" : "model"
5730 },
5731 "link_down" : {
c2993fe5 5732 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
5733 "optional" : 1,
5734 "type" : "boolean"
5735 },
5736 "macaddr" : {
c2993fe5 5737 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 5738 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
5739 "optional" : 1,
5740 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
5741 "type" : "string"
5742 },
5743 "model" : {
5744 "default_key" : 1,
c2993fe5 5745 "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
5746 "enum" : [
5747 "rtl8139",
5748 "ne2k_pci",
5749 "e1000",
5750 "pcnet",
5751 "virtio",
5752 "ne2k_isa",
5753 "i82551",
5754 "i82557b",
5755 "i82559er",
5756 "vmxnet3",
5757 "e1000-82540em",
5758 "e1000-82544gc",
5759 "e1000-82545em"
5760 ],
5761 "format_description" : "model",
5762 "type" : "string"
5763 },
5764 "ne2k_isa" : {
5765 "alias" : "macaddr",
5766 "keyAlias" : "model"
5767 },
5768 "ne2k_pci" : {
5769 "alias" : "macaddr",
5770 "keyAlias" : "model"
5771 },
5772 "pcnet" : {
5773 "alias" : "macaddr",
5774 "keyAlias" : "model"
5775 },
5776 "queues" : {
5777 "description" : "Number of packet queues to be used on the device.",
5778 "maximum" : 16,
5779 "minimum" : 0,
5780 "optional" : 1,
5781 "type" : "integer"
5782 },
5783 "rate" : {
c2993fe5 5784 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
5785 "minimum" : 0,
5786 "optional" : 1,
5787 "type" : "number"
5788 },
5789 "rtl8139" : {
5790 "alias" : "macaddr",
5791 "keyAlias" : "model"
5792 },
5793 "tag" : {
5794 "description" : "VLAN tag to apply to packets on this interface.",
5795 "maximum" : 4094,
c2993fe5 5796 "minimum" : 1,
f004f5b9
DM
5797 "optional" : 1,
5798 "type" : "integer"
5799 },
5800 "trunks" : {
5801 "description" : "VLAN trunks to pass through this interface.",
5802 "format_description" : "vlanid[;vlanid...]",
5803 "optional" : 1,
5804 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5805 "type" : "string"
5806 },
5807 "virtio" : {
5808 "alias" : "macaddr",
5809 "keyAlias" : "model"
5810 },
5811 "vmxnet3" : {
5812 "alias" : "macaddr",
5813 "keyAlias" : "model"
5814 }
5815 },
44660702 5816 "optional" : 1,
4bd7df8b
DM
5817 "type" : "string",
5818 "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
5819 },
5820 "node" : {
5821 "description" : "The cluster node name.",
5822 "format" : "pve-node",
5823 "type" : "string"
5824 },
5825 "numa" : {
5826 "default" : 0,
5827 "description" : "Enable/disable NUMA.",
5828 "optional" : 1,
5829 "type" : "boolean"
5830 },
5831 "numa[n]" : {
c2993fe5 5832 "description" : "NUMA topology.",
56122987 5833 "format" : {
7aacca6f 5834 "cpus" : {
c2993fe5 5835 "description" : "CPUs accessing this NUMA node.",
44660702
DM
5836 "format_description" : "id[-id];...",
5837 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
5838 "type" : "string"
7aacca6f
DM
5839 },
5840 "hostnodes" : {
c2993fe5 5841 "description" : "Host NUMA nodes to use.",
44660702 5842 "format_description" : "id[-id];...",
7aacca6f 5843 "optional" : 1,
7aacca6f 5844 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
44660702 5845 "type" : "string"
7aacca6f 5846 },
44660702 5847 "memory" : {
c2993fe5 5848 "description" : "Amount of memory this NUMA node provides.",
7aacca6f 5849 "optional" : 1,
44660702
DM
5850 "type" : "number"
5851 },
5852 "policy" : {
c2993fe5 5853 "description" : "NUMA allocation policy.",
7aacca6f
DM
5854 "enum" : [
5855 "preferred",
5856 "bind",
5857 "interleave"
5858 ],
44660702
DM
5859 "optional" : 1,
5860 "type" : "string"
56122987 5861 }
44660702 5862 },
56122987 5863 "optional" : 1,
4bd7df8b
DM
5864 "type" : "string",
5865 "typetext" : "cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]"
56122987 5866 },
44660702 5867 "onboot" : {
7aacca6f 5868 "default" : 0,
44660702
DM
5869 "description" : "Specifies whether a VM will be started during system bootup.",
5870 "optional" : 1,
5871 "type" : "boolean"
7aacca6f
DM
5872 },
5873 "ostype" : {
c2993fe5 5874 "description" : "Specify guest operating system.",
7aacca6f
DM
5875 "enum" : [
5876 "other",
5877 "wxp",
5878 "w2k",
5879 "w2k3",
5880 "w2k8",
5881 "wvista",
5882 "win7",
5883 "win8",
5884 "l24",
5885 "l26",
5886 "solaris"
5887 ],
7aacca6f 5888 "optional" : 1,
c2993fe5
DM
5889 "type" : "string",
5890 "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 5891 },
44660702 5892 "parallel[n]" : {
c2993fe5 5893 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 5894 "optional" : 1,
44660702 5895 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
5896 "type" : "string",
5897 "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
5898 },
5899 "protection" : {
5900 "default" : 0,
c2993fe5 5901 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 5902 "optional" : 1,
44660702 5903 "type" : "boolean"
7aacca6f 5904 },
44660702
DM
5905 "reboot" : {
5906 "default" : 1,
5907 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 5908 "optional" : 1,
44660702 5909 "type" : "boolean"
7aacca6f 5910 },
44660702
DM
5911 "revert" : {
5912 "description" : "Revert a pending change.",
5913 "format" : "pve-configid-list",
7aacca6f 5914 "optional" : 1,
44660702
DM
5915 "type" : "string"
5916 },
5917 "sata[n]" : {
5918 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 5919 "format" : {
44660702
DM
5920 "aio" : {
5921 "description" : "AIO type to use.",
7aacca6f 5922 "enum" : [
44660702
DM
5923 "native",
5924 "threads"
7aacca6f 5925 ],
44660702
DM
5926 "optional" : 1,
5927 "type" : "string"
7aacca6f 5928 },
44660702
DM
5929 "backup" : {
5930 "description" : "Whether the drive should be included when making backups.",
56122987 5931 "optional" : 1,
7aacca6f 5932 "type" : "boolean"
44660702
DM
5933 },
5934 "bps" : {
5935 "description" : "Maximum r/w speed speed in bytes per second.",
5936 "format_description" : "bps",
7aacca6f 5937 "optional" : 1,
44660702 5938 "type" : "integer"
56122987 5939 },
44660702
DM
5940 "bps_rd" : {
5941 "description" : "Maximum read speed speed in bytes per second.",
5942 "format_description" : "bps",
56122987 5943 "optional" : 1,
44660702 5944 "type" : "integer"
56122987 5945 },
44660702
DM
5946 "bps_wr" : {
5947 "description" : "Maximum write speed speed in bytes per second.",
5948 "format_description" : "bps",
56122987 5949 "optional" : 1,
44660702 5950 "type" : "integer"
56122987
DM
5951 },
5952 "cache" : {
44660702 5953 "description" : "The drive's cache mode",
56122987
DM
5954 "enum" : [
5955 "none",
5956 "writethrough",
5957 "writeback",
5958 "unsafe",
5959 "directsync"
5960 ],
56122987 5961 "optional" : 1,
44660702 5962 "type" : "string"
56122987 5963 },
44660702
DM
5964 "cyls" : {
5965 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 5966 "optional" : 1,
44660702 5967 "type" : "integer"
7aacca6f
DM
5968 },
5969 "detect_zeroes" : {
5970 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 5971 "optional" : 1,
44660702 5972 "type" : "boolean"
56122987 5973 },
44660702
DM
5974 "discard" : {
5975 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
5976 "enum" : [
5977 "ignore",
5978 "on"
5979 ],
56122987 5980 "optional" : 1,
44660702 5981 "type" : "string"
7aacca6f 5982 },
44660702
DM
5983 "file" : {
5984 "default_key" : 1,
5985 "description" : "The drive's backing volume.",
5986 "format" : "pve-volume-id-or-qm-path",
5987 "format_description" : "volume",
5988 "type" : "string"
56122987 5989 },
7aacca6f 5990 "format" : {
44660702 5991 "description" : "The drive's backing file's data format.",
7aacca6f
DM
5992 "enum" : [
5993 "raw",
5994 "cow",
5995 "qcow",
5996 "qed",
5997 "qcow2",
5998 "vmdk",
5999 "cloop"
6000 ],
f004f5b9 6001 "format_description" : "image format",
7aacca6f 6002 "optional" : 1,
44660702 6003 "type" : "string"
56122987 6004 },
7aacca6f 6005 "heads" : {
7aacca6f 6006 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6007 "optional" : 1,
7aacca6f 6008 "type" : "integer"
56122987 6009 },
44660702
DM
6010 "iops" : {
6011 "description" : "Maximum r/w I/O speed in operations per second.",
6012 "format_description" : "iops",
56122987 6013 "optional" : 1,
44660702 6014 "type" : "integer"
56122987 6015 },
44660702
DM
6016 "iops_max" : {
6017 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6018 "format_description" : "iops",
56122987 6019 "optional" : 1,
44660702 6020 "type" : "integer"
56122987 6021 },
44660702
DM
6022 "iops_rd" : {
6023 "description" : "Maximum read I/O speed in operations per second.",
6024 "format_description" : "iops",
7aacca6f 6025 "optional" : 1,
44660702 6026 "type" : "integer"
56122987 6027 },
44660702
DM
6028 "iops_rd_max" : {
6029 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6030 "format_description" : "iops",
56122987 6031 "optional" : 1,
44660702 6032 "type" : "integer"
7aacca6f 6033 },
44660702
DM
6034 "iops_wr" : {
6035 "description" : "Maximum write I/O speed in operations per second.",
6036 "format_description" : "iops",
56122987 6037 "optional" : 1,
44660702 6038 "type" : "integer"
56122987
DM
6039 },
6040 "iops_wr_max" : {
6041 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
44660702 6042 "format_description" : "iops",
56122987 6043 "optional" : 1,
44660702 6044 "type" : "integer"
56122987 6045 },
44660702
DM
6046 "mbps" : {
6047 "description" : "Maximum r/w speed speed in megabytes per second.",
6048 "format_description" : "mbps",
56122987 6049 "optional" : 1,
44660702 6050 "type" : "number"
56122987 6051 },
44660702
DM
6052 "mbps_max" : {
6053 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6054 "format_description" : "mbps",
6055 "optional" : 1,
6056 "type" : "number"
56122987 6057 },
44660702
DM
6058 "mbps_rd" : {
6059 "description" : "Maximum read speed speed in megabytes per second.",
6060 "format_description" : "mbps",
56122987 6061 "optional" : 1,
44660702 6062 "type" : "number"
56122987 6063 },
44660702
DM
6064 "mbps_rd_max" : {
6065 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6066 "format_description" : "mbps",
56122987 6067 "optional" : 1,
44660702 6068 "type" : "number"
56122987 6069 },
44660702
DM
6070 "mbps_wr" : {
6071 "description" : "Maximum write speed speed in megabytes per second.",
56122987 6072 "format_description" : "mbps",
44660702
DM
6073 "optional" : 1,
6074 "type" : "number"
56122987 6075 },
44660702
DM
6076 "mbps_wr_max" : {
6077 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6078 "format_description" : "mbps",
6079 "optional" : 1,
6080 "type" : "number"
7aacca6f 6081 },
44660702
DM
6082 "media" : {
6083 "default" : "disk",
6084 "description" : "The drive's media type.",
6085 "enum" : [
6086 "cdrom",
6087 "disk"
6088 ],
56122987 6089 "optional" : 1,
44660702
DM
6090 "type" : "string"
6091 },
6092 "rerror" : {
6093 "description" : "Read error action.",
7aacca6f 6094 "enum" : [
44660702
DM
6095 "ignore",
6096 "report",
6097 "stop"
6098 ],
7aacca6f 6099 "optional" : 1,
44660702 6100 "type" : "string"
56122987 6101 },
44660702
DM
6102 "secs" : {
6103 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 6104 "optional" : 1,
44660702 6105 "type" : "integer"
56122987 6106 },
44660702
DM
6107 "serial" : {
6108 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6109 "format" : "urlencoded",
6110 "format_description" : "serial",
6111 "maxLength" : 60,
56122987 6112 "optional" : 1,
44660702 6113 "type" : "string"
56122987 6114 },
44660702
DM
6115 "size" : {
6116 "description" : "Disk size. This is purely informational and has no effect.",
6117 "format" : "disk-size",
f004f5b9 6118 "format_description" : "DiskSize",
44660702
DM
6119 "optional" : 1,
6120 "type" : "string"
6121 },
6122 "snapshot" : {
6123 "description" : "Whether the drive should be included when making snapshots.",
56122987 6124 "optional" : 1,
44660702
DM
6125 "type" : "boolean"
6126 },
6127 "trans" : {
6128 "description" : "Force disk geometry bios translation mode.",
56122987 6129 "enum" : [
7aacca6f
DM
6130 "none",
6131 "lba",
6132 "auto"
56122987 6133 ],
44660702
DM
6134 "optional" : 1,
6135 "type" : "string"
56122987 6136 },
7aacca6f
DM
6137 "volume" : {
6138 "alias" : "file"
56122987 6139 },
44660702
DM
6140 "werror" : {
6141 "description" : "Write error action.",
6142 "enum" : [
6143 "enospc",
6144 "ignore",
6145 "report",
6146 "stop"
6147 ],
7aacca6f 6148 "optional" : 1,
44660702
DM
6149 "type" : "string"
6150 }
6151 },
6152 "optional" : 1,
4bd7df8b
DM
6153 "type" : "string",
6154 "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
6155 },
6156 "scsi[n]" : {
6157 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
6158 "format" : {
56122987 6159 "aio" : {
56122987
DM
6160 "description" : "AIO type to use.",
6161 "enum" : [
6162 "native",
6163 "threads"
6164 ],
7aacca6f 6165 "optional" : 1,
44660702 6166 "type" : "string"
56122987 6167 },
44660702
DM
6168 "backup" : {
6169 "description" : "Whether the drive should be included when making backups.",
56122987 6170 "optional" : 1,
44660702 6171 "type" : "boolean"
56122987 6172 },
44660702
DM
6173 "bps" : {
6174 "description" : "Maximum r/w speed speed in bytes per second.",
6175 "format_description" : "bps",
56122987 6176 "optional" : 1,
44660702 6177 "type" : "integer"
56122987 6178 },
44660702
DM
6179 "bps_rd" : {
6180 "description" : "Maximum read speed speed in bytes per second.",
6181 "format_description" : "bps",
56122987 6182 "optional" : 1,
44660702 6183 "type" : "integer"
56122987 6184 },
7aacca6f 6185 "bps_wr" : {
44660702 6186 "description" : "Maximum write speed speed in bytes per second.",
7aacca6f 6187 "format_description" : "bps",
56122987 6188 "optional" : 1,
44660702 6189 "type" : "integer"
56122987 6190 },
44660702
DM
6191 "cache" : {
6192 "description" : "The drive's cache mode",
7aacca6f 6193 "enum" : [
44660702
DM
6194 "none",
6195 "writethrough",
6196 "writeback",
6197 "unsafe",
6198 "directsync"
7aacca6f 6199 ],
56122987 6200 "optional" : 1,
44660702 6201 "type" : "string"
56122987 6202 },
44660702
DM
6203 "cyls" : {
6204 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 6205 "optional" : 1,
44660702 6206 "type" : "integer"
56122987 6207 },
44660702
DM
6208 "detect_zeroes" : {
6209 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 6210 "optional" : 1,
44660702 6211 "type" : "boolean"
56122987 6212 },
44660702
DM
6213 "discard" : {
6214 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6215 "enum" : [
6216 "ignore",
6217 "on"
6218 ],
7aacca6f 6219 "optional" : 1,
44660702 6220 "type" : "string"
56122987 6221 },
44660702
DM
6222 "file" : {
6223 "default_key" : 1,
6224 "description" : "The drive's backing volume.",
6225 "format" : "pve-volume-id-or-qm-path",
6226 "format_description" : "volume",
6227 "type" : "string"
56122987 6228 },
7aacca6f 6229 "format" : {
44660702 6230 "description" : "The drive's backing file's data format.",
56122987 6231 "enum" : [
7aacca6f
DM
6232 "raw",
6233 "cow",
6234 "qcow",
6235 "qed",
6236 "qcow2",
6237 "vmdk",
6238 "cloop"
6239 ],
f004f5b9 6240 "format_description" : "image format",
44660702
DM
6241 "optional" : 1,
6242 "type" : "string"
56122987 6243 },
44660702
DM
6244 "heads" : {
6245 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6246 "optional" : 1,
7aacca6f 6247 "type" : "integer"
56122987 6248 },
44660702
DM
6249 "iops" : {
6250 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6251 "format_description" : "iops",
44660702
DM
6252 "optional" : 1,
6253 "type" : "integer"
7aacca6f 6254 },
44660702
DM
6255 "iops_max" : {
6256 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6257 "format_description" : "iops",
56122987 6258 "optional" : 1,
44660702 6259 "type" : "integer"
7aacca6f 6260 },
44660702
DM
6261 "iops_rd" : {
6262 "description" : "Maximum read I/O speed in operations per second.",
6263 "format_description" : "iops",
7aacca6f 6264 "optional" : 1,
44660702 6265 "type" : "integer"
56122987 6266 },
44660702
DM
6267 "iops_rd_max" : {
6268 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6269 "format_description" : "iops",
6270 "optional" : 1,
6271 "type" : "integer"
6272 },
6273 "iops_wr" : {
6274 "description" : "Maximum write I/O speed in operations per second.",
6275 "format_description" : "iops",
56122987 6276 "optional" : 1,
44660702
DM
6277 "type" : "integer"
6278 },
6279 "iops_wr_max" : {
6280 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6281 "format_description" : "iops",
6282 "optional" : 1,
6283 "type" : "integer"
56122987 6284 },
7aacca6f 6285 "iothread" : {
7aacca6f 6286 "description" : "Whether to use iothreads for this drive",
56122987 6287 "optional" : 1,
56122987
DM
6288 "type" : "boolean"
6289 },
44660702
DM
6290 "mbps" : {
6291 "description" : "Maximum r/w speed speed in megabytes per second.",
6292 "format_description" : "mbps",
6293 "optional" : 1,
6294 "type" : "number"
6295 },
6296 "mbps_max" : {
6297 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
6298 "format_description" : "mbps",
6299 "optional" : 1,
6300 "type" : "number"
6301 },
6302 "mbps_rd" : {
6303 "description" : "Maximum read speed speed in megabytes per second.",
6304 "format_description" : "mbps",
6305 "optional" : 1,
6306 "type" : "number"
6307 },
6308 "mbps_rd_max" : {
6309 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6310 "format_description" : "mbps",
6311 "optional" : 1,
6312 "type" : "number"
6313 },
6314 "mbps_wr" : {
6315 "description" : "Maximum write speed speed in megabytes per second.",
6316 "format_description" : "mbps",
6317 "optional" : 1,
6318 "type" : "number"
6319 },
6320 "mbps_wr_max" : {
6321 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6322 "format_description" : "mbps",
6323 "optional" : 1,
6324 "type" : "number"
6325 },
7aacca6f 6326 "media" : {
44660702
DM
6327 "default" : "disk",
6328 "description" : "The drive's media type.",
7aacca6f
DM
6329 "enum" : [
6330 "cdrom",
6331 "disk"
6332 ],
56122987 6333 "optional" : 1,
44660702
DM
6334 "type" : "string"
6335 },
6336 "queues" : {
6337 "description" : "Number of queues.",
44660702
DM
6338 "minimum" : 2,
6339 "optional" : 1,
6340 "type" : "integer"
6341 },
6342 "secs" : {
6343 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6344 "optional" : 1,
6345 "type" : "integer"
6346 },
6347 "serial" : {
6348 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6349 "format" : "urlencoded",
6350 "format_description" : "serial",
6351 "maxLength" : 60,
6352 "optional" : 1,
6353 "type" : "string"
6354 },
6355 "size" : {
6356 "description" : "Disk size. This is purely informational and has no effect.",
6357 "format" : "disk-size",
f004f5b9 6358 "format_description" : "DiskSize",
44660702
DM
6359 "optional" : 1,
6360 "type" : "string"
56122987 6361 },
7aacca6f
DM
6362 "snapshot" : {
6363 "description" : "Whether the drive should be included when making snapshots.",
6364 "optional" : 1,
44660702 6365 "type" : "boolean"
7aacca6f 6366 },
44660702
DM
6367 "trans" : {
6368 "description" : "Force disk geometry bios translation mode.",
6369 "enum" : [
6370 "none",
6371 "lba",
6372 "auto"
6373 ],
44660702
DM
6374 "optional" : 1,
6375 "type" : "string"
6376 },
6377 "volume" : {
6378 "alias" : "file"
6379 },
6380 "werror" : {
6381 "description" : "Write error action.",
6382 "enum" : [
6383 "enospc",
6384 "ignore",
6385 "report",
6386 "stop"
6387 ],
56122987 6388 "optional" : 1,
44660702 6389 "type" : "string"
56122987 6390 }
44660702 6391 },
7aacca6f 6392 "optional" : 1,
4bd7df8b
DM
6393 "type" : "string",
6394 "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
6395 },
6396 "scsihw" : {
6397 "default" : "lsi",
c2993fe5 6398 "description" : "SCSI controller model",
7aacca6f 6399 "enum" : [
44660702
DM
6400 "lsi",
6401 "lsi53c810",
6402 "virtio-scsi-pci",
6403 "virtio-scsi-single",
6404 "megasas",
6405 "pvscsi"
7aacca6f 6406 ],
44660702
DM
6407 "optional" : 1,
6408 "type" : "string"
56122987 6409 },
44660702 6410 "serial[n]" : {
c2993fe5 6411 "description" : "Create a serial device inside the VM (n is 0 to 3)",
7aacca6f 6412 "optional" : 1,
44660702 6413 "pattern" : "(/dev/.+|socket)",
c2993fe5 6414 "type" : "string",
57b78691 6415 "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 6416 },
44660702
DM
6417 "shares" : {
6418 "default" : 1000,
6419 "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",
6420 "maximum" : 50000,
6421 "minimum" : 0,
56122987 6422 "optional" : 1,
4bd7df8b
DM
6423 "type" : "integer",
6424 "typetext" : "integer (0-50000)"
56122987 6425 },
44660702
DM
6426 "skiplock" : {
6427 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 6428 "optional" : 1,
44660702 6429 "type" : "boolean"
56122987 6430 },
44660702
DM
6431 "smbios1" : {
6432 "description" : "Specify SMBIOS type 1 fields.",
6433 "format" : "pve-qm-smbios1",
6434 "maxLength" : 256,
56122987 6435 "optional" : 1,
4bd7df8b
DM
6436 "type" : "string",
6437 "typetext" : "[family=<string>] [,manufacturer=<string>] [,product=<string>] [,serial=<string>] [,sku=<string>] [,uuid=<UUID>] [,version=<string>]"
56122987 6438 },
44660702
DM
6439 "smp" : {
6440 "default" : 1,
6441 "description" : "The number of CPUs. Please use option -sockets instead.",
7aacca6f 6442 "minimum" : 1,
7aacca6f 6443 "optional" : 1,
4bd7df8b
DM
6444 "type" : "integer",
6445 "typetext" : "integer (1- N)"
7aacca6f 6446 },
44660702
DM
6447 "sockets" : {
6448 "default" : 1,
6449 "description" : "The number of CPU sockets.",
6450 "minimum" : 1,
7aacca6f 6451 "optional" : 1,
4bd7df8b
DM
6452 "type" : "integer",
6453 "typetext" : "integer (1- N)"
56122987 6454 },
44660702
DM
6455 "startdate" : {
6456 "default" : "now",
6457 "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 6458 "optional" : 1,
44660702 6459 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 6460 "type" : "string",
44660702 6461 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
56122987 6462 },
7aacca6f 6463 "startup" : {
7aacca6f 6464 "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 6465 "format" : "pve-startup-order",
56122987 6466 "optional" : 1,
44660702
DM
6467 "type" : "string",
6468 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
56122987 6469 },
44660702 6470 "tablet" : {
7aacca6f 6471 "default" : 1,
c2993fe5 6472 "description" : "Enable/disable the USB tablet device.",
7aacca6f 6473 "optional" : 1,
c2993fe5
DM
6474 "type" : "boolean",
6475 "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 6476 },
44660702
DM
6477 "tdf" : {
6478 "default" : 0,
6479 "description" : "Enable/disable time drift fix.",
7aacca6f 6480 "optional" : 1,
44660702 6481 "type" : "boolean"
7aacca6f 6482 },
44660702
DM
6483 "template" : {
6484 "default" : 0,
6485 "description" : "Enable/disable Template.",
7aacca6f 6486 "optional" : 1,
44660702 6487 "type" : "boolean"
7aacca6f 6488 },
44660702 6489 "unused[n]" : {
c2993fe5 6490 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 6491 "format" : "pve-volume-id",
7aacca6f 6492 "optional" : 1,
44660702 6493 "type" : "string"
7aacca6f 6494 },
44660702 6495 "usb[n]" : {
c2993fe5 6496 "description" : "Configure an USB device (n is 0 to 4).",
44660702
DM
6497 "format" : {
6498 "host" : {
6499 "default_key" : 1,
c2993fe5 6500 "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
6501 "format" : "pve-qm-usb-device",
6502 "format_description" : "HOSTUSBDEVICE|spice",
6503 "type" : "string"
6504 },
6505 "usb3" : {
c2993fe5
DM
6506 "default" : 0,
6507 "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
6508 "optional" : 1,
6509 "type" : "boolean"
6510 }
6511 },
7aacca6f 6512 "optional" : 1,
4bd7df8b
DM
6513 "type" : "string",
6514 "typetext" : "[host=]<HOSTUSBDEVICE|spice> [,usb3=<1|0>]"
56122987 6515 },
44660702
DM
6516 "vcpus" : {
6517 "default" : 0,
6518 "description" : "Number of hotplugged vcpus.",
6519 "minimum" : 1,
56122987 6520 "optional" : 1,
4bd7df8b
DM
6521 "type" : "integer",
6522 "typetext" : "integer (1- N)"
56122987 6523 },
44660702 6524 "vga" : {
c2993fe5 6525 "description" : "Select the VGA type.",
44660702
DM
6526 "enum" : [
6527 "std",
6528 "cirrus",
6529 "vmware",
6530 "qxl",
6531 "serial0",
6532 "serial1",
6533 "serial2",
6534 "serial3",
6535 "qxl2",
6536 "qxl3",
6537 "qxl4"
6538 ],
56122987 6539 "optional" : 1,
c2993fe5
DM
6540 "type" : "string",
6541 "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 6542 },
44660702
DM
6543 "virtio[n]" : {
6544 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
56122987 6545 "format" : {
44660702
DM
6546 "aio" : {
6547 "description" : "AIO type to use.",
56122987 6548 "enum" : [
44660702
DM
6549 "native",
6550 "threads"
56122987 6551 ],
56122987
DM
6552 "optional" : 1,
6553 "type" : "string"
6554 },
44660702
DM
6555 "backup" : {
6556 "description" : "Whether the drive should be included when making backups.",
44660702
DM
6557 "optional" : 1,
6558 "type" : "boolean"
7aacca6f 6559 },
44660702
DM
6560 "bps" : {
6561 "description" : "Maximum r/w speed speed in bytes per second.",
6562 "format_description" : "bps",
6563 "optional" : 1,
6564 "type" : "integer"
56122987 6565 },
44660702
DM
6566 "bps_rd" : {
6567 "description" : "Maximum read speed speed in bytes per second.",
6568 "format_description" : "bps",
56122987 6569 "optional" : 1,
44660702 6570 "type" : "integer"
56122987 6571 },
44660702
DM
6572 "bps_wr" : {
6573 "description" : "Maximum write speed speed in bytes per second.",
6574 "format_description" : "bps",
56122987 6575 "optional" : 1,
44660702
DM
6576 "type" : "integer"
6577 },
6578 "cache" : {
6579 "description" : "The drive's cache mode",
56122987 6580 "enum" : [
44660702
DM
6581 "none",
6582 "writethrough",
6583 "writeback",
6584 "unsafe",
6585 "directsync"
56122987 6586 ],
56122987 6587 "optional" : 1,
44660702 6588 "type" : "string"
56122987 6589 },
44660702
DM
6590 "cyls" : {
6591 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 6592 "optional" : 1,
44660702 6593 "type" : "integer"
7aacca6f 6594 },
44660702
DM
6595 "detect_zeroes" : {
6596 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
6597 "optional" : 1,
6598 "type" : "boolean"
7aacca6f 6599 },
44660702
DM
6600 "discard" : {
6601 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
6602 "enum" : [
6603 "ignore",
6604 "on"
6605 ],
56122987 6606 "optional" : 1,
44660702 6607 "type" : "string"
56122987
DM
6608 },
6609 "file" : {
7aacca6f 6610 "default_key" : 1,
44660702 6611 "description" : "The drive's backing volume.",
7aacca6f 6612 "format" : "pve-volume-id-or-qm-path",
44660702
DM
6613 "format_description" : "volume",
6614 "type" : "string"
7aacca6f
DM
6615 },
6616 "format" : {
7aacca6f
DM
6617 "description" : "The drive's backing file's data format.",
6618 "enum" : [
6619 "raw",
6620 "cow",
6621 "qcow",
6622 "qed",
6623 "qcow2",
6624 "vmdk",
6625 "cloop"
56122987 6626 ],
f004f5b9 6627 "format_description" : "image format",
56122987 6628 "optional" : 1,
56122987
DM
6629 "type" : "string"
6630 },
44660702
DM
6631 "heads" : {
6632 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 6633 "optional" : 1,
44660702 6634 "type" : "integer"
56122987 6635 },
44660702
DM
6636 "iops" : {
6637 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 6638 "format_description" : "iops",
56122987 6639 "optional" : 1,
44660702 6640 "type" : "integer"
56122987 6641 },
44660702
DM
6642 "iops_max" : {
6643 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
6644 "format_description" : "iops",
56122987 6645 "optional" : 1,
56122987
DM
6646 "type" : "integer"
6647 },
44660702
DM
6648 "iops_rd" : {
6649 "description" : "Maximum read I/O speed in operations per second.",
6650 "format_description" : "iops",
56122987 6651 "optional" : 1,
44660702 6652 "type" : "integer"
56122987 6653 },
44660702
DM
6654 "iops_rd_max" : {
6655 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
6656 "format_description" : "iops",
7aacca6f 6657 "optional" : 1,
44660702 6658 "type" : "integer"
56122987 6659 },
44660702
DM
6660 "iops_wr" : {
6661 "description" : "Maximum write I/O speed in operations per second.",
6662 "format_description" : "iops",
7aacca6f 6663 "optional" : 1,
44660702 6664 "type" : "integer"
56122987 6665 },
44660702
DM
6666 "iops_wr_max" : {
6667 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
6668 "format_description" : "iops",
56122987
DM
6669 "optional" : 1,
6670 "type" : "integer"
6671 },
44660702
DM
6672 "iothread" : {
6673 "description" : "Whether to use iothreads for this drive",
44660702
DM
6674 "optional" : 1,
6675 "type" : "boolean"
6676 },
6677 "mbps" : {
6678 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 6679 "format_description" : "mbps",
44660702
DM
6680 "optional" : 1,
6681 "type" : "number"
6682 },
6683 "mbps_max" : {
7aacca6f 6684 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702
DM
6685 "format_description" : "mbps",
6686 "optional" : 1,
6687 "type" : "number"
7aacca6f 6688 },
44660702
DM
6689 "mbps_rd" : {
6690 "description" : "Maximum read speed speed in megabytes per second.",
6691 "format_description" : "mbps",
56122987 6692 "optional" : 1,
44660702 6693 "type" : "number"
56122987 6694 },
44660702
DM
6695 "mbps_rd_max" : {
6696 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
6697 "format_description" : "mbps",
7aacca6f 6698 "optional" : 1,
44660702 6699 "type" : "number"
56122987 6700 },
44660702
DM
6701 "mbps_wr" : {
6702 "description" : "Maximum write speed speed in megabytes per second.",
6703 "format_description" : "mbps",
56122987 6704 "optional" : 1,
44660702 6705 "type" : "number"
56122987 6706 },
44660702
DM
6707 "mbps_wr_max" : {
6708 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
6709 "format_description" : "mbps",
56122987 6710 "optional" : 1,
44660702 6711 "type" : "number"
56122987
DM
6712 },
6713 "media" : {
7aacca6f 6714 "default" : "disk",
44660702 6715 "description" : "The drive's media type.",
56122987
DM
6716 "enum" : [
6717 "cdrom",
6718 "disk"
6719 ],
44660702
DM
6720 "optional" : 1,
6721 "type" : "string"
56122987 6722 },
7aacca6f 6723 "rerror" : {
44660702 6724 "description" : "Read error action.",
56122987 6725 "enum" : [
7aacca6f
DM
6726 "ignore",
6727 "report",
6728 "stop"
56122987 6729 ],
56122987 6730 "optional" : 1,
44660702 6731 "type" : "string"
56122987 6732 },
44660702
DM
6733 "secs" : {
6734 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
6735 "optional" : 1,
6736 "type" : "integer"
6737 },
6738 "serial" : {
6739 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
6740 "format" : "urlencoded",
6741 "format_description" : "serial",
6742 "maxLength" : 60,
56122987 6743 "optional" : 1,
7aacca6f 6744 "type" : "string"
56122987 6745 },
44660702
DM
6746 "size" : {
6747 "description" : "Disk size. This is purely informational and has no effect.",
6748 "format" : "disk-size",
f004f5b9 6749 "format_description" : "DiskSize",
56122987 6750 "optional" : 1,
44660702 6751 "type" : "string"
56122987 6752 },
44660702
DM
6753 "snapshot" : {
6754 "description" : "Whether the drive should be included when making snapshots.",
56122987 6755 "optional" : 1,
44660702 6756 "type" : "boolean"
56122987 6757 },
44660702
DM
6758 "trans" : {
6759 "description" : "Force disk geometry bios translation mode.",
6760 "enum" : [
6761 "none",
6762 "lba",
6763 "auto"
6764 ],
44660702
DM
6765 "optional" : 1,
6766 "type" : "string"
6767 },
6768 "volume" : {
6769 "alias" : "file"
6770 },
6771 "werror" : {
6772 "description" : "Write error action.",
6773 "enum" : [
6774 "enospc",
6775 "ignore",
6776 "report",
6777 "stop"
6778 ],
56122987 6779 "optional" : 1,
44660702 6780 "type" : "string"
56122987 6781 }
44660702 6782 },
56122987 6783 "optional" : 1,
4bd7df8b
DM
6784 "type" : "string",
6785 "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 6786 },
7aacca6f
DM
6787 "vmid" : {
6788 "description" : "The (unique) ID of the VM.",
7aacca6f 6789 "format" : "pve-vmid",
44660702 6790 "minimum" : 1,
4bd7df8b
DM
6791 "type" : "integer",
6792 "typetext" : "integer (1- N)"
56122987 6793 },
44660702 6794 "watchdog" : {
c2993fe5 6795 "description" : "Create a virtual hardware watchdog device.",
44660702 6796 "format" : "pve-qm-watchdog",
56122987 6797 "optional" : 1,
c2993fe5 6798 "type" : "string",
4bd7df8b 6799 "typetext" : "[[model=]<i6300esb|ib700>] [,action=<reset|shutdown|poweroff|pause|debug|none>]",
c2993fe5 6800 "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 6801 }
44660702 6802 }
56122987 6803 },
7aacca6f
DM
6804 "permissions" : {
6805 "check" : [
6806 "perm",
6807 "/vms/{vmid}",
6808 [
44660702
DM
6809 "VM.Config.Disk",
6810 "VM.Config.CDROM",
6811 "VM.Config.CPU",
6812 "VM.Config.Memory",
6813 "VM.Config.Network",
6814 "VM.Config.HWType",
6815 "VM.Config.Options"
6816 ],
6817 "any",
6818 1
7aacca6f 6819 ]
56122987 6820 },
44660702 6821 "protected" : 1,
7aacca6f 6822 "proxyto" : "node",
44660702
DM
6823 "returns" : {
6824 "optional" : 1,
6825 "type" : "string"
6826 }
56122987 6827 },
7aacca6f 6828 "PUT" : {
44660702
DM
6829 "description" : "Set virtual machine options (synchrounous API) - You should consider using the POST method instead for any actions involving hotplug or storage allocation.",
6830 "method" : "PUT",
6831 "name" : "update_vm",
56122987 6832 "parameters" : {
7aacca6f 6833 "additionalProperties" : 0,
56122987 6834 "properties" : {
44660702
DM
6835 "acpi" : {
6836 "default" : 1,
6837 "description" : "Enable/disable ACPI.",
7aacca6f 6838 "optional" : 1,
44660702 6839 "type" : "boolean"
7aacca6f 6840 },
44660702
DM
6841 "agent" : {
6842 "default" : 0,
6843 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 6844 "optional" : 1,
44660702 6845 "type" : "boolean"
56122987 6846 },
44660702 6847 "args" : {
c2993fe5 6848 "description" : "Arbitrary arguments passed to kvm.",
7aacca6f 6849 "optional" : 1,
c2993fe5
DM
6850 "type" : "string",
6851 "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 6852 },
44660702
DM
6853 "autostart" : {
6854 "default" : 0,
6855 "description" : "Automatic restart after crash (currently ignored).",
7aacca6f
DM
6856 "optional" : 1,
6857 "type" : "boolean"
6858 },
44660702
DM
6859 "balloon" : {
6860 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
6861 "minimum" : 0,
6862 "optional" : 1,
4bd7df8b
DM
6863 "type" : "integer",
6864 "typetext" : "integer (0- N)"
44660702
DM
6865 },
6866 "bios" : {
6867 "default" : "seabios",
6868 "description" : "Select BIOS implementation.",
7aacca6f 6869 "enum" : [
44660702
DM
6870 "seabios",
6871 "ovmf"
7aacca6f 6872 ],
56122987 6873 "optional" : 1,
7aacca6f
DM
6874 "type" : "string"
6875 },
44660702
DM
6876 "boot" : {
6877 "default" : "cdn",
6878 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
7aacca6f 6879 "optional" : 1,
44660702
DM
6880 "pattern" : "[acdn]{1,4}",
6881 "type" : "string"
56122987 6882 },
44660702
DM
6883 "bootdisk" : {
6884 "description" : "Enable booting from specified disk.",
6885 "format" : "pve-qm-bootdisk",
6886 "optional" : 1,
6887 "pattern" : "(ide|sata|scsi|virtio)\\d+",
6888 "type" : "string"
6889 },
6890 "cdrom" : {
6891 "description" : "This is an alias for option -ide2",
6892 "format" : "pve-qm-drive",
56122987 6893 "optional" : 1,
7aacca6f 6894 "type" : "string",
44660702
DM
6895 "typetext" : "volume"
6896 },
6897 "cores" : {
6898 "default" : 1,
6899 "description" : "The number of cores per socket.",
6900 "minimum" : 1,
6901 "optional" : 1,
4bd7df8b
DM
6902 "type" : "integer",
6903 "typetext" : "integer (1- N)"
44660702
DM
6904 },
6905 "cpu" : {
6906 "description" : "Emulated CPU type.",
6907 "format" : {
6908 "cputype" : {
6909 "default" : "kvm64",
6910 "default_key" : 1,
6911 "description" : "Emulated CPU type.",
6912 "enum" : [
6913 "486",
6914 "athlon",
f004f5b9
DM
6915 "Broadwell",
6916 "Broadwell-noTSX",
6917 "Conroe",
44660702 6918 "core2duo",
f004f5b9
DM
6919 "coreduo",
6920 "Haswell",
6921 "Haswell-noTSX",
6922 "host",
6923 "IvyBridge",
44660702
DM
6924 "kvm32",
6925 "kvm64",
44660702 6926 "Nehalem",
44660702
DM
6927 "Opteron_G1",
6928 "Opteron_G2",
6929 "Opteron_G3",
6930 "Opteron_G4",
6931 "Opteron_G5",
f004f5b9
DM
6932 "Penryn",
6933 "pentium",
6934 "pentium2",
6935 "pentium3",
6936 "phenom",
6937 "qemu32",
6938 "qemu64",
6939 "SandyBridge",
6940 "Westmere"
44660702
DM
6941 ],
6942 "format_description" : "cputype",
6943 "type" : "string"
6944 },
6945 "hidden" : {
6946 "default" : 0,
6947 "description" : "Do not identify as a KVM virtual machine.",
6948 "optional" : 1,
6949 "type" : "boolean"
6950 }
6951 },
6952 "optional" : 1,
4bd7df8b
DM
6953 "type" : "string",
6954 "typetext" : "[cputype=]<cputype> [,hidden=<1|0>]"
44660702
DM
6955 },
6956 "cpulimit" : {
6957 "default" : 0,
c2993fe5 6958 "description" : "Limit of CPU usage.",
44660702
DM
6959 "maximum" : 128,
6960 "minimum" : 0,
6961 "optional" : 1,
c2993fe5 6962 "type" : "number",
4bd7df8b 6963 "typetext" : "number (0-128)",
c2993fe5 6964 "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
6965 },
6966 "cpuunits" : {
6967 "default" : 1000,
c2993fe5 6968 "description" : "CPU weight for a VM.",
44660702
DM
6969 "maximum" : 500000,
6970 "minimum" : 0,
6971 "optional" : 1,
c2993fe5 6972 "type" : "integer",
4bd7df8b 6973 "typetext" : "integer (0-500000)",
c2993fe5 6974 "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
6975 },
6976 "delete" : {
6977 "description" : "A list of settings you want to delete.",
6978 "format" : "pve-configid-list",
6979 "optional" : 1,
6980 "type" : "string"
6981 },
6982 "description" : {
6983 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
6984 "optional" : 1,
6985 "type" : "string"
6986 },
6987 "digest" : {
6988 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
6989 "maxLength" : 40,
6990 "optional" : 1,
6991 "type" : "string"
6992 },
6993 "force" : {
6994 "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.",
6995 "optional" : 1,
6996 "requires" : "delete",
6997 "type" : "boolean"
6998 },
6999 "freeze" : {
7000 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
7001 "optional" : 1,
7002 "type" : "boolean"
7003 },
7004 "hostpci[n]" : {
c2993fe5 7005 "description" : "Map host PCI devices into guest.",
44660702
DM
7006 "format" : "pve-qm-hostpci",
7007 "optional" : 1,
57b78691 7008 "type" : "string",
4bd7df8b 7009 "typetext" : "[host=]<HOSTPCIID[;HOSTPCIID2...]> [,pcie=<1|0>] [,rombar=<1|0>] [,x-vga=<1|0>]",
57b78691 7010 "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 7011 },
7aacca6f 7012 "hotplug" : {
7aacca6f 7013 "default" : "network,disk,usb",
44660702
DM
7014 "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'.",
7015 "format" : "pve-hotplug-features",
56122987 7016 "optional" : 1,
56122987
DM
7017 "type" : "string"
7018 },
4bd7df8b
DM
7019 "hugepages" : {
7020 "description" : "Enable/disable hugepages memory.",
7021 "enum" : [
7022 "any",
7023 "2",
7024 "1024"
7025 ],
7026 "optional" : 1,
7027 "type" : "string"
7028 },
56122987 7029 "ide[n]" : {
7aacca6f 7030 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 7031 "format" : {
44660702
DM
7032 "aio" : {
7033 "description" : "AIO type to use.",
7034 "enum" : [
7035 "native",
7036 "threads"
7037 ],
56122987 7038 "optional" : 1,
44660702 7039 "type" : "string"
56122987 7040 },
44660702
DM
7041 "backup" : {
7042 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7043 "optional" : 1,
7044 "type" : "boolean"
7045 },
7046 "bps" : {
7047 "description" : "Maximum r/w speed speed in bytes per second.",
7048 "format_description" : "bps",
56122987 7049 "optional" : 1,
44660702 7050 "type" : "integer"
56122987 7051 },
44660702
DM
7052 "bps_rd" : {
7053 "description" : "Maximum read speed speed in bytes per second.",
7054 "format_description" : "bps",
56122987 7055 "optional" : 1,
44660702 7056 "type" : "integer"
56122987 7057 },
7aacca6f 7058 "bps_wr" : {
7aacca6f 7059 "description" : "Maximum write speed speed in bytes per second.",
44660702
DM
7060 "format_description" : "bps",
7061 "optional" : 1,
7062 "type" : "integer"
7aacca6f 7063 },
44660702
DM
7064 "cache" : {
7065 "description" : "The drive's cache mode",
7066 "enum" : [
7067 "none",
7068 "writethrough",
7069 "writeback",
7070 "unsafe",
7071 "directsync"
7072 ],
56122987 7073 "optional" : 1,
44660702
DM
7074 "type" : "string"
7075 },
7076 "cyls" : {
7077 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7078 "optional" : 1,
7079 "type" : "integer"
7080 },
7081 "detect_zeroes" : {
7082 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7083 "optional" : 1,
7084 "type" : "boolean"
56122987 7085 },
7aacca6f 7086 "discard" : {
7aacca6f 7087 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 7088 "enum" : [
7aacca6f
DM
7089 "ignore",
7090 "on"
56122987
DM
7091 ],
7092 "optional" : 1,
44660702 7093 "type" : "string"
7aacca6f 7094 },
44660702
DM
7095 "file" : {
7096 "default_key" : 1,
7097 "description" : "The drive's backing volume.",
7098 "format" : "pve-volume-id-or-qm-path",
7099 "format_description" : "volume",
7100 "type" : "string"
7aacca6f
DM
7101 },
7102 "format" : {
44660702 7103 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7104 "enum" : [
7105 "raw",
7106 "cow",
7107 "qcow",
7108 "qed",
7109 "qcow2",
7110 "vmdk",
7111 "cloop"
7112 ],
f004f5b9 7113 "format_description" : "image format",
7aacca6f 7114 "optional" : 1,
44660702 7115 "type" : "string"
56122987 7116 },
7aacca6f 7117 "heads" : {
44660702 7118 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7119 "optional" : 1,
44660702 7120 "type" : "integer"
7aacca6f 7121 },
44660702
DM
7122 "iops" : {
7123 "description" : "Maximum r/w 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_max" : {
7129 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7130 "format_description" : "iops",
56122987 7131 "optional" : 1,
44660702 7132 "type" : "integer"
56122987 7133 },
44660702
DM
7134 "iops_rd" : {
7135 "description" : "Maximum read I/O speed in operations per second.",
7136 "format_description" : "iops",
56122987 7137 "optional" : 1,
44660702 7138 "type" : "integer"
7aacca6f 7139 },
44660702
DM
7140 "iops_rd_max" : {
7141 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7142 "format_description" : "iops",
7aacca6f 7143 "optional" : 1,
44660702 7144 "type" : "integer"
7aacca6f 7145 },
44660702
DM
7146 "iops_wr" : {
7147 "description" : "Maximum write I/O speed in operations per second.",
7148 "format_description" : "iops",
7aacca6f 7149 "optional" : 1,
44660702 7150 "type" : "integer"
56122987 7151 },
44660702
DM
7152 "iops_wr_max" : {
7153 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7154 "format_description" : "iops",
7aacca6f 7155 "optional" : 1,
44660702 7156 "type" : "integer"
7aacca6f
DM
7157 },
7158 "mbps" : {
44660702 7159 "description" : "Maximum r/w speed speed in megabytes per second.",
7aacca6f 7160 "format_description" : "mbps",
7aacca6f 7161 "optional" : 1,
44660702 7162 "type" : "number"
7aacca6f 7163 },
44660702
DM
7164 "mbps_max" : {
7165 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7166 "format_description" : "mbps",
7aacca6f 7167 "optional" : 1,
44660702 7168 "type" : "number"
7aacca6f 7169 },
44660702
DM
7170 "mbps_rd" : {
7171 "description" : "Maximum read speed speed in megabytes per second.",
7172 "format_description" : "mbps",
7aacca6f 7173 "optional" : 1,
44660702 7174 "type" : "number"
7aacca6f 7175 },
44660702
DM
7176 "mbps_rd_max" : {
7177 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7178 "format_description" : "mbps",
7179 "optional" : 1,
7180 "type" : "number"
7aacca6f 7181 },
44660702
DM
7182 "mbps_wr" : {
7183 "description" : "Maximum write speed speed in megabytes per second.",
7184 "format_description" : "mbps",
7aacca6f 7185 "optional" : 1,
44660702
DM
7186 "type" : "number"
7187 },
7188 "mbps_wr_max" : {
7189 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7190 "format_description" : "mbps",
7191 "optional" : 1,
7192 "type" : "number"
7193 },
7194 "media" : {
7195 "default" : "disk",
7196 "description" : "The drive's media type.",
56122987 7197 "enum" : [
44660702
DM
7198 "cdrom",
7199 "disk"
56122987 7200 ],
44660702
DM
7201 "optional" : 1,
7202 "type" : "string"
56122987 7203 },
7aacca6f 7204 "model" : {
44660702 7205 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
56122987 7206 "format" : "urlencoded",
7aacca6f 7207 "format_description" : "model",
44660702 7208 "maxLength" : 120,
56122987 7209 "optional" : 1,
44660702 7210 "type" : "string"
56122987 7211 },
44660702
DM
7212 "rerror" : {
7213 "description" : "Read error action.",
7214 "enum" : [
7215 "ignore",
7216 "report",
7217 "stop"
7218 ],
56122987 7219 "optional" : 1,
44660702 7220 "type" : "string"
56122987 7221 },
44660702
DM
7222 "secs" : {
7223 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
7224 "optional" : 1,
7225 "type" : "integer"
56122987 7226 },
44660702
DM
7227 "serial" : {
7228 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7229 "format" : "urlencoded",
7230 "format_description" : "serial",
7231 "maxLength" : 60,
56122987 7232 "optional" : 1,
44660702 7233 "type" : "string"
56122987 7234 },
44660702
DM
7235 "size" : {
7236 "description" : "Disk size. This is purely informational and has no effect.",
7237 "format" : "disk-size",
f004f5b9 7238 "format_description" : "DiskSize",
56122987 7239 "optional" : 1,
44660702 7240 "type" : "string"
56122987 7241 },
44660702
DM
7242 "snapshot" : {
7243 "description" : "Whether the drive should be included when making snapshots.",
56122987 7244 "optional" : 1,
44660702 7245 "type" : "boolean"
56122987 7246 },
44660702
DM
7247 "trans" : {
7248 "description" : "Force disk geometry bios translation mode.",
7249 "enum" : [
7250 "none",
7251 "lba",
7252 "auto"
7253 ],
56122987 7254 "optional" : 1,
44660702
DM
7255 "type" : "string"
7256 },
7257 "volume" : {
7258 "alias" : "file"
56122987 7259 },
7aacca6f 7260 "werror" : {
44660702 7261 "description" : "Write error action.",
7aacca6f
DM
7262 "enum" : [
7263 "enospc",
7264 "ignore",
7265 "report",
7266 "stop"
7267 ],
56122987 7268 "optional" : 1,
44660702 7269 "type" : "string"
7aacca6f 7270 }
44660702
DM
7271 },
7272 "optional" : 1,
4bd7df8b
DM
7273 "type" : "string",
7274 "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 7275 },
44660702
DM
7276 "keyboard" : {
7277 "default" : "en-us",
c2993fe5 7278 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
44660702
DM
7279 "enum" : [
7280 "de",
7281 "de-ch",
7282 "da",
7283 "en-gb",
7284 "en-us",
7285 "es",
7286 "fi",
7287 "fr",
7288 "fr-be",
7289 "fr-ca",
7290 "fr-ch",
7291 "hu",
7292 "is",
7293 "it",
7294 "ja",
7295 "lt",
7296 "mk",
7297 "nl",
7298 "no",
7299 "pl",
7300 "pt",
7301 "pt-br",
7302 "sv",
7303 "sl",
7304 "tr"
7305 ],
7aacca6f 7306 "optional" : 1,
44660702 7307 "type" : "string"
7aacca6f 7308 },
44660702 7309 "kvm" : {
7aacca6f 7310 "default" : 1,
44660702 7311 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 7312 "optional" : 1,
44660702 7313 "type" : "boolean"
7aacca6f 7314 },
44660702
DM
7315 "localtime" : {
7316 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
7aacca6f 7317 "optional" : 1,
44660702 7318 "type" : "boolean"
7aacca6f 7319 },
44660702
DM
7320 "lock" : {
7321 "description" : "Lock/unlock the VM.",
7322 "enum" : [
7323 "migrate",
7324 "backup",
7325 "snapshot",
7326 "rollback"
7327 ],
7aacca6f 7328 "optional" : 1,
44660702 7329 "type" : "string"
7aacca6f 7330 },
44660702
DM
7331 "machine" : {
7332 "description" : "Specific the Qemu machine type.",
7333 "maxLength" : 40,
7aacca6f 7334 "optional" : 1,
44660702
DM
7335 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
7336 "type" : "string"
7aacca6f 7337 },
44660702
DM
7338 "memory" : {
7339 "default" : 512,
7340 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
7341 "minimum" : 16,
7aacca6f 7342 "optional" : 1,
4bd7df8b
DM
7343 "type" : "integer",
7344 "typetext" : "integer (16- N)"
7aacca6f 7345 },
44660702
DM
7346 "migrate_downtime" : {
7347 "default" : 0.1,
7348 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
7349 "minimum" : 0,
7aacca6f 7350 "optional" : 1,
4bd7df8b
DM
7351 "type" : "number",
7352 "typetext" : "number (0- N)"
7aacca6f 7353 },
44660702 7354 "migrate_speed" : {
7aacca6f 7355 "default" : 0,
44660702
DM
7356 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
7357 "minimum" : 0,
7358 "optional" : 1,
4bd7df8b
DM
7359 "type" : "integer",
7360 "typetext" : "integer (0- N)"
7aacca6f 7361 },
44660702
DM
7362 "name" : {
7363 "description" : "Set a name for the VM. Only used on the configuration web interface.",
7364 "format" : "dns-name",
7aacca6f 7365 "optional" : 1,
44660702 7366 "type" : "string"
7aacca6f 7367 },
44660702 7368 "net[n]" : {
c2993fe5 7369 "description" : "Specify network devices.",
f004f5b9
DM
7370 "format" : {
7371 "bridge" : {
c2993fe5 7372 "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
7373 "format_description" : "bridge",
7374 "optional" : 1,
7375 "type" : "string"
7376 },
7377 "e1000" : {
7378 "alias" : "macaddr",
7379 "keyAlias" : "model"
7380 },
7381 "e1000-82540em" : {
7382 "alias" : "macaddr",
7383 "keyAlias" : "model"
7384 },
7385 "e1000-82544gc" : {
7386 "alias" : "macaddr",
7387 "keyAlias" : "model"
7388 },
7389 "e1000-82545em" : {
7390 "alias" : "macaddr",
7391 "keyAlias" : "model"
7392 },
7393 "firewall" : {
7394 "description" : "Whether this interface should be protected by the firewall.",
7395 "optional" : 1,
7396 "type" : "boolean"
7397 },
7398 "i82551" : {
7399 "alias" : "macaddr",
7400 "keyAlias" : "model"
7401 },
7402 "i82557b" : {
7403 "alias" : "macaddr",
7404 "keyAlias" : "model"
7405 },
7406 "i82559er" : {
7407 "alias" : "macaddr",
7408 "keyAlias" : "model"
7409 },
7410 "link_down" : {
c2993fe5 7411 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
7412 "optional" : 1,
7413 "type" : "boolean"
7414 },
7415 "macaddr" : {
c2993fe5 7416 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 7417 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
7418 "optional" : 1,
7419 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
7420 "type" : "string"
7421 },
7422 "model" : {
7423 "default_key" : 1,
c2993fe5 7424 "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
7425 "enum" : [
7426 "rtl8139",
7427 "ne2k_pci",
7428 "e1000",
7429 "pcnet",
7430 "virtio",
7431 "ne2k_isa",
7432 "i82551",
7433 "i82557b",
7434 "i82559er",
7435 "vmxnet3",
7436 "e1000-82540em",
7437 "e1000-82544gc",
7438 "e1000-82545em"
7439 ],
7440 "format_description" : "model",
7441 "type" : "string"
7442 },
7443 "ne2k_isa" : {
7444 "alias" : "macaddr",
7445 "keyAlias" : "model"
7446 },
7447 "ne2k_pci" : {
7448 "alias" : "macaddr",
7449 "keyAlias" : "model"
7450 },
7451 "pcnet" : {
7452 "alias" : "macaddr",
7453 "keyAlias" : "model"
7454 },
7455 "queues" : {
7456 "description" : "Number of packet queues to be used on the device.",
7457 "maximum" : 16,
7458 "minimum" : 0,
7459 "optional" : 1,
7460 "type" : "integer"
7461 },
7462 "rate" : {
c2993fe5 7463 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
7464 "minimum" : 0,
7465 "optional" : 1,
7466 "type" : "number"
7467 },
7468 "rtl8139" : {
7469 "alias" : "macaddr",
7470 "keyAlias" : "model"
7471 },
7472 "tag" : {
7473 "description" : "VLAN tag to apply to packets on this interface.",
7474 "maximum" : 4094,
c2993fe5 7475 "minimum" : 1,
f004f5b9
DM
7476 "optional" : 1,
7477 "type" : "integer"
7478 },
7479 "trunks" : {
7480 "description" : "VLAN trunks to pass through this interface.",
7481 "format_description" : "vlanid[;vlanid...]",
7482 "optional" : 1,
7483 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7484 "type" : "string"
7485 },
7486 "virtio" : {
7487 "alias" : "macaddr",
7488 "keyAlias" : "model"
7489 },
7490 "vmxnet3" : {
7491 "alias" : "macaddr",
7492 "keyAlias" : "model"
7493 }
7494 },
7aacca6f 7495 "optional" : 1,
4bd7df8b
DM
7496 "type" : "string",
7497 "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 7498 },
44660702
DM
7499 "node" : {
7500 "description" : "The cluster node name.",
7501 "format" : "pve-node",
7502 "type" : "string"
7503 },
7504 "numa" : {
7505 "default" : 0,
7506 "description" : "Enable/disable NUMA.",
7aacca6f
DM
7507 "optional" : 1,
7508 "type" : "boolean"
7509 },
44660702 7510 "numa[n]" : {
c2993fe5 7511 "description" : "NUMA topology.",
44660702
DM
7512 "format" : {
7513 "cpus" : {
c2993fe5 7514 "description" : "CPUs accessing this NUMA node.",
44660702
DM
7515 "format_description" : "id[-id];...",
7516 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7517 "type" : "string"
7518 },
7519 "hostnodes" : {
c2993fe5 7520 "description" : "Host NUMA nodes to use.",
44660702
DM
7521 "format_description" : "id[-id];...",
7522 "optional" : 1,
7523 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
7524 "type" : "string"
7525 },
7526 "memory" : {
c2993fe5 7527 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
7528 "optional" : 1,
7529 "type" : "number"
7530 },
7531 "policy" : {
c2993fe5 7532 "description" : "NUMA allocation policy.",
44660702
DM
7533 "enum" : [
7534 "preferred",
7535 "bind",
7536 "interleave"
7537 ],
44660702
DM
7538 "optional" : 1,
7539 "type" : "string"
7540 }
7541 },
7aacca6f 7542 "optional" : 1,
4bd7df8b
DM
7543 "type" : "string",
7544 "typetext" : "cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]"
7aacca6f 7545 },
44660702
DM
7546 "onboot" : {
7547 "default" : 0,
7548 "description" : "Specifies whether a VM will be started during system bootup.",
7aacca6f 7549 "optional" : 1,
44660702 7550 "type" : "boolean"
7aacca6f 7551 },
44660702 7552 "ostype" : {
c2993fe5 7553 "description" : "Specify guest operating system.",
44660702
DM
7554 "enum" : [
7555 "other",
7556 "wxp",
7557 "w2k",
7558 "w2k3",
7559 "w2k8",
7560 "wvista",
7561 "win7",
7562 "win8",
7563 "l24",
7564 "l26",
7565 "solaris"
7566 ],
7aacca6f 7567 "optional" : 1,
c2993fe5
DM
7568 "type" : "string",
7569 "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 7570 },
44660702 7571 "parallel[n]" : {
c2993fe5 7572 "description" : "Map host parallel devices (n is 0 to 2).",
7aacca6f 7573 "optional" : 1,
44660702 7574 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
7575 "type" : "string",
7576 "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 7577 },
44660702
DM
7578 "protection" : {
7579 "default" : 0,
c2993fe5 7580 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
7aacca6f 7581 "optional" : 1,
44660702 7582 "type" : "boolean"
7aacca6f 7583 },
44660702
DM
7584 "reboot" : {
7585 "default" : 1,
7586 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
7aacca6f 7587 "optional" : 1,
44660702 7588 "type" : "boolean"
7aacca6f 7589 },
44660702
DM
7590 "revert" : {
7591 "description" : "Revert a pending change.",
7592 "format" : "pve-configid-list",
7aacca6f 7593 "optional" : 1,
44660702 7594 "type" : "string"
7aacca6f 7595 },
44660702
DM
7596 "sata[n]" : {
7597 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
7aacca6f 7598 "format" : {
44660702
DM
7599 "aio" : {
7600 "description" : "AIO type to use.",
7601 "enum" : [
7602 "native",
7603 "threads"
7604 ],
44660702
DM
7605 "optional" : 1,
7606 "type" : "string"
7607 },
7608 "backup" : {
7609 "description" : "Whether the drive should be included when making backups.",
44660702
DM
7610 "optional" : 1,
7611 "type" : "boolean"
7612 },
7613 "bps" : {
7614 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 7615 "format_description" : "bps",
7aacca6f
DM
7616 "optional" : 1,
7617 "type" : "integer"
56122987 7618 },
44660702
DM
7619 "bps_rd" : {
7620 "description" : "Maximum read speed speed in bytes per second.",
7621 "format_description" : "bps",
7aacca6f 7622 "optional" : 1,
44660702 7623 "type" : "integer"
7aacca6f 7624 },
44660702
DM
7625 "bps_wr" : {
7626 "description" : "Maximum write speed speed in bytes per second.",
7627 "format_description" : "bps",
7aacca6f 7628 "optional" : 1,
44660702 7629 "type" : "integer"
7aacca6f 7630 },
44660702
DM
7631 "cache" : {
7632 "description" : "The drive's cache mode",
7633 "enum" : [
7634 "none",
7635 "writethrough",
7636 "writeback",
7637 "unsafe",
7638 "directsync"
7639 ],
7aacca6f 7640 "optional" : 1,
44660702 7641 "type" : "string"
7aacca6f 7642 },
44660702
DM
7643 "cyls" : {
7644 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
7aacca6f 7645 "optional" : 1,
44660702 7646 "type" : "integer"
7aacca6f 7647 },
44660702
DM
7648 "detect_zeroes" : {
7649 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7aacca6f 7650 "optional" : 1,
44660702 7651 "type" : "boolean"
7aacca6f 7652 },
44660702
DM
7653 "discard" : {
7654 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7655 "enum" : [
7656 "ignore",
7657 "on"
7658 ],
7aacca6f 7659 "optional" : 1,
44660702
DM
7660 "type" : "string"
7661 },
7662 "file" : {
7663 "default_key" : 1,
7664 "description" : "The drive's backing volume.",
7665 "format" : "pve-volume-id-or-qm-path",
7666 "format_description" : "volume",
7667 "type" : "string"
7aacca6f
DM
7668 },
7669 "format" : {
7aacca6f 7670 "description" : "The drive's backing file's data format.",
56122987
DM
7671 "enum" : [
7672 "raw",
7673 "cow",
7674 "qcow",
7675 "qed",
7676 "qcow2",
7677 "vmdk",
7678 "cloop"
7679 ],
f004f5b9 7680 "format_description" : "image format",
56122987 7681 "optional" : 1,
7aacca6f 7682 "type" : "string"
56122987 7683 },
7aacca6f 7684 "heads" : {
7aacca6f 7685 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
7686 "optional" : 1,
7687 "type" : "integer"
56122987 7688 },
44660702
DM
7689 "iops" : {
7690 "description" : "Maximum r/w I/O speed in operations per second.",
7691 "format_description" : "iops",
56122987 7692 "optional" : 1,
44660702 7693 "type" : "integer"
7aacca6f 7694 },
44660702
DM
7695 "iops_max" : {
7696 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7697 "format_description" : "iops",
7aacca6f 7698 "optional" : 1,
44660702 7699 "type" : "integer"
56122987 7700 },
44660702
DM
7701 "iops_rd" : {
7702 "description" : "Maximum read I/O speed in operations per second.",
7703 "format_description" : "iops",
56122987 7704 "optional" : 1,
44660702 7705 "type" : "integer"
7aacca6f 7706 },
44660702
DM
7707 "iops_rd_max" : {
7708 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7709 "format_description" : "iops",
56122987 7710 "optional" : 1,
44660702 7711 "type" : "integer"
56122987 7712 },
44660702
DM
7713 "iops_wr" : {
7714 "description" : "Maximum write I/O speed in operations per second.",
7715 "format_description" : "iops",
7716 "optional" : 1,
7717 "type" : "integer"
56122987 7718 },
44660702
DM
7719 "iops_wr_max" : {
7720 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7721 "format_description" : "iops",
7722 "optional" : 1,
7723 "type" : "integer"
7724 },
7725 "mbps" : {
7726 "description" : "Maximum r/w speed speed in megabytes per second.",
7727 "format_description" : "mbps",
7728 "optional" : 1,
7729 "type" : "number"
7730 },
7731 "mbps_max" : {
7732 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7733 "format_description" : "mbps",
7734 "optional" : 1,
7735 "type" : "number"
7736 },
7737 "mbps_rd" : {
7738 "description" : "Maximum read speed speed in megabytes per second.",
7739 "format_description" : "mbps",
7740 "optional" : 1,
7741 "type" : "number"
7742 },
7743 "mbps_rd_max" : {
7744 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7745 "format_description" : "mbps",
7746 "optional" : 1,
7747 "type" : "number"
7748 },
7749 "mbps_wr" : {
7750 "description" : "Maximum write speed speed in megabytes per second.",
7751 "format_description" : "mbps",
7752 "optional" : 1,
7753 "type" : "number"
7754 },
7755 "mbps_wr_max" : {
7756 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
7757 "format_description" : "mbps",
7758 "optional" : 1,
7759 "type" : "number"
7760 },
7761 "media" : {
7762 "default" : "disk",
7763 "description" : "The drive's media type.",
7764 "enum" : [
7765 "cdrom",
7766 "disk"
7767 ],
56122987 7768 "optional" : 1,
44660702
DM
7769 "type" : "string"
7770 },
7771 "rerror" : {
7aacca6f
DM
7772 "description" : "Read error action.",
7773 "enum" : [
7774 "ignore",
7775 "report",
7776 "stop"
44660702 7777 ],
56122987 7778 "optional" : 1,
44660702 7779 "type" : "string"
56122987 7780 },
7aacca6f 7781 "secs" : {
44660702 7782 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 7783 "optional" : 1,
44660702 7784 "type" : "integer"
56122987 7785 },
44660702
DM
7786 "serial" : {
7787 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7788 "format" : "urlencoded",
7789 "format_description" : "serial",
7790 "maxLength" : 60,
56122987 7791 "optional" : 1,
44660702 7792 "type" : "string"
56122987 7793 },
44660702
DM
7794 "size" : {
7795 "description" : "Disk size. This is purely informational and has no effect.",
7796 "format" : "disk-size",
f004f5b9 7797 "format_description" : "DiskSize",
56122987 7798 "optional" : 1,
44660702 7799 "type" : "string"
56122987
DM
7800 },
7801 "snapshot" : {
7aacca6f 7802 "description" : "Whether the drive should be included when making snapshots.",
56122987 7803 "optional" : 1,
44660702 7804 "type" : "boolean"
56122987 7805 },
56122987 7806 "trans" : {
7aacca6f 7807 "description" : "Force disk geometry bios translation mode.",
56122987
DM
7808 "enum" : [
7809 "none",
7810 "lba",
7811 "auto"
7812 ],
7813 "optional" : 1,
44660702 7814 "type" : "string"
56122987 7815 },
44660702
DM
7816 "volume" : {
7817 "alias" : "file"
56122987 7818 },
7aacca6f 7819 "werror" : {
44660702 7820 "description" : "Write error action.",
56122987 7821 "enum" : [
7aacca6f 7822 "enospc",
56122987 7823 "ignore",
7aacca6f
DM
7824 "report",
7825 "stop"
7826 ],
7aacca6f 7827 "optional" : 1,
44660702
DM
7828 "type" : "string"
7829 }
7830 },
7831 "optional" : 1,
4bd7df8b
DM
7832 "type" : "string",
7833 "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
7834 },
7835 "scsi[n]" : {
7836 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
7837 "format" : {
7838 "aio" : {
7aacca6f 7839 "description" : "AIO type to use.",
56122987
DM
7840 "enum" : [
7841 "native",
7842 "threads"
44660702 7843 ],
56122987 7844 "optional" : 1,
44660702 7845 "type" : "string"
56122987 7846 },
7aacca6f 7847 "backup" : {
7aacca6f 7848 "description" : "Whether the drive should be included when making backups.",
7aacca6f 7849 "optional" : 1,
44660702 7850 "type" : "boolean"
56122987 7851 },
44660702
DM
7852 "bps" : {
7853 "description" : "Maximum r/w speed speed in bytes per second.",
7854 "format_description" : "bps",
7aacca6f 7855 "optional" : 1,
44660702 7856 "type" : "integer"
7aacca6f 7857 },
44660702
DM
7858 "bps_rd" : {
7859 "description" : "Maximum read speed speed in bytes per second.",
7860 "format_description" : "bps",
56122987 7861 "optional" : 1,
44660702 7862 "type" : "integer"
56122987 7863 },
44660702
DM
7864 "bps_wr" : {
7865 "description" : "Maximum write speed speed in bytes per second.",
7866 "format_description" : "bps",
56122987 7867 "optional" : 1,
44660702 7868 "type" : "integer"
56122987 7869 },
44660702
DM
7870 "cache" : {
7871 "description" : "The drive's cache mode",
7872 "enum" : [
7873 "none",
7874 "writethrough",
7875 "writeback",
7876 "unsafe",
7877 "directsync"
7878 ],
56122987 7879 "optional" : 1,
44660702
DM
7880 "type" : "string"
7881 },
7882 "cyls" : {
7883 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
7884 "optional" : 1,
7885 "type" : "integer"
7886 },
7887 "detect_zeroes" : {
7888 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
7889 "optional" : 1,
7890 "type" : "boolean"
7891 },
7892 "discard" : {
7893 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7894 "enum" : [
7895 "ignore",
7896 "on"
7897 ],
44660702
DM
7898 "optional" : 1,
7899 "type" : "string"
7900 },
7901 "file" : {
7902 "default_key" : 1,
7903 "description" : "The drive's backing volume.",
7904 "format" : "pve-volume-id-or-qm-path",
7905 "format_description" : "volume",
7906 "type" : "string"
56122987 7907 },
7aacca6f 7908 "format" : {
44660702 7909 "description" : "The drive's backing file's data format.",
7aacca6f
DM
7910 "enum" : [
7911 "raw",
7912 "cow",
7913 "qcow",
7914 "qed",
7915 "qcow2",
7916 "vmdk",
7917 "cloop"
7918 ],
f004f5b9 7919 "format_description" : "image format",
56122987 7920 "optional" : 1,
44660702 7921 "type" : "string"
56122987 7922 },
44660702
DM
7923 "heads" : {
7924 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 7925 "optional" : 1,
44660702 7926 "type" : "integer"
56122987 7927 },
44660702
DM
7928 "iops" : {
7929 "description" : "Maximum r/w I/O speed in operations per second.",
7930 "format_description" : "iops",
7aacca6f 7931 "optional" : 1,
44660702 7932 "type" : "integer"
56122987 7933 },
44660702
DM
7934 "iops_max" : {
7935 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
7aacca6f 7936 "format_description" : "iops",
7aacca6f 7937 "optional" : 1,
44660702 7938 "type" : "integer"
56122987 7939 },
44660702
DM
7940 "iops_rd" : {
7941 "description" : "Maximum read I/O speed in operations per second.",
7942 "format_description" : "iops",
56122987 7943 "optional" : 1,
44660702 7944 "type" : "integer"
56122987 7945 },
44660702
DM
7946 "iops_rd_max" : {
7947 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7948 "format_description" : "iops",
56122987 7949 "optional" : 1,
44660702 7950 "type" : "integer"
56122987 7951 },
44660702
DM
7952 "iops_wr" : {
7953 "description" : "Maximum write I/O speed in operations per second.",
7954 "format_description" : "iops",
56122987 7955 "optional" : 1,
44660702 7956 "type" : "integer"
56122987 7957 },
44660702
DM
7958 "iops_wr_max" : {
7959 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
7aacca6f 7960 "format_description" : "iops",
44660702
DM
7961 "optional" : 1,
7962 "type" : "integer"
7aacca6f
DM
7963 },
7964 "iothread" : {
44660702 7965 "description" : "Whether to use iothreads for this drive",
56122987 7966 "optional" : 1,
44660702 7967 "type" : "boolean"
56122987 7968 },
44660702
DM
7969 "mbps" : {
7970 "description" : "Maximum r/w speed speed in megabytes per second.",
7971 "format_description" : "mbps",
56122987 7972 "optional" : 1,
44660702 7973 "type" : "number"
56122987 7974 },
44660702
DM
7975 "mbps_max" : {
7976 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7977 "format_description" : "mbps",
56122987 7978 "optional" : 1,
44660702 7979 "type" : "number"
56122987 7980 },
44660702
DM
7981 "mbps_rd" : {
7982 "description" : "Maximum read speed speed in megabytes per second.",
7983 "format_description" : "mbps",
7aacca6f 7984 "optional" : 1,
44660702 7985 "type" : "number"
56122987 7986 },
44660702
DM
7987 "mbps_rd_max" : {
7988 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
7989 "format_description" : "mbps",
7aacca6f 7990 "optional" : 1,
44660702 7991 "type" : "number"
7aacca6f 7992 },
44660702
DM
7993 "mbps_wr" : {
7994 "description" : "Maximum write speed speed in megabytes per second.",
7995 "format_description" : "mbps",
56122987 7996 "optional" : 1,
44660702 7997 "type" : "number"
56122987 7998 },
44660702
DM
7999 "mbps_wr_max" : {
8000 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8001 "format_description" : "mbps",
56122987 8002 "optional" : 1,
44660702
DM
8003 "type" : "number"
8004 },
8005 "media" : {
8006 "default" : "disk",
8007 "description" : "The drive's media type.",
7aacca6f 8008 "enum" : [
44660702
DM
8009 "cdrom",
8010 "disk"
7aacca6f 8011 ],
56122987 8012 "optional" : 1,
44660702 8013 "type" : "string"
56122987 8014 },
7aacca6f 8015 "queues" : {
44660702 8016 "description" : "Number of queues.",
7aacca6f 8017 "minimum" : 2,
7aacca6f
DM
8018 "optional" : 1,
8019 "type" : "integer"
56122987 8020 },
44660702
DM
8021 "secs" : {
8022 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 8023 "optional" : 1,
44660702 8024 "type" : "integer"
56122987 8025 },
44660702
DM
8026 "serial" : {
8027 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
8028 "format" : "urlencoded",
8029 "format_description" : "serial",
8030 "maxLength" : 60,
56122987 8031 "optional" : 1,
44660702 8032 "type" : "string"
56122987 8033 },
44660702
DM
8034 "size" : {
8035 "description" : "Disk size. This is purely informational and has no effect.",
8036 "format" : "disk-size",
f004f5b9 8037 "format_description" : "DiskSize",
44660702
DM
8038 "optional" : 1,
8039 "type" : "string"
8040 },
8041 "snapshot" : {
8042 "description" : "Whether the drive should be included when making snapshots.",
56122987 8043 "optional" : 1,
44660702
DM
8044 "type" : "boolean"
8045 },
8046 "trans" : {
8047 "description" : "Force disk geometry bios translation mode.",
56122987 8048 "enum" : [
44660702
DM
8049 "none",
8050 "lba",
8051 "auto"
56122987 8052 ],
44660702
DM
8053 "optional" : 1,
8054 "type" : "string"
8055 },
8056 "volume" : {
8057 "alias" : "file"
56122987 8058 },
7aacca6f 8059 "werror" : {
7aacca6f
DM
8060 "description" : "Write error action.",
8061 "enum" : [
8062 "enospc",
8063 "ignore",
8064 "report",
8065 "stop"
44660702 8066 ],
56122987 8067 "optional" : 1,
7aacca6f 8068 "type" : "string"
56122987 8069 }
44660702 8070 },
56122987 8071 "optional" : 1,
4bd7df8b
DM
8072 "type" : "string",
8073 "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
8074 },
8075 "scsihw" : {
44660702 8076 "default" : "lsi",
c2993fe5 8077 "description" : "SCSI controller model",
56122987
DM
8078 "enum" : [
8079 "lsi",
8080 "lsi53c810",
8081 "virtio-scsi-pci",
8082 "virtio-scsi-single",
8083 "megasas",
8084 "pvscsi"
8085 ],
8086 "optional" : 1,
56122987
DM
8087 "type" : "string"
8088 },
44660702 8089 "serial[n]" : {
c2993fe5 8090 "description" : "Create a serial device inside the VM (n is 0 to 3)",
56122987 8091 "optional" : 1,
44660702 8092 "pattern" : "(/dev/.+|socket)",
c2993fe5 8093 "type" : "string",
57b78691 8094 "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 8095 },
44660702
DM
8096 "shares" : {
8097 "default" : 1000,
8098 "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",
8099 "maximum" : 50000,
8100 "minimum" : 0,
7aacca6f 8101 "optional" : 1,
4bd7df8b
DM
8102 "type" : "integer",
8103 "typetext" : "integer (0-50000)"
56122987 8104 },
7aacca6f
DM
8105 "skiplock" : {
8106 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
8107 "optional" : 1,
8108 "type" : "boolean"
56122987 8109 },
44660702
DM
8110 "smbios1" : {
8111 "description" : "Specify SMBIOS type 1 fields.",
8112 "format" : "pve-qm-smbios1",
8113 "maxLength" : 256,
56122987 8114 "optional" : 1,
4bd7df8b
DM
8115 "type" : "string",
8116 "typetext" : "[family=<string>] [,manufacturer=<string>] [,product=<string>] [,serial=<string>] [,sku=<string>] [,uuid=<UUID>] [,version=<string>]"
56122987 8117 },
44660702
DM
8118 "smp" : {
8119 "default" : 1,
8120 "description" : "The number of CPUs. Please use option -sockets instead.",
8121 "minimum" : 1,
56122987 8122 "optional" : 1,
4bd7df8b
DM
8123 "type" : "integer",
8124 "typetext" : "integer (1- N)"
56122987 8125 },
44660702
DM
8126 "sockets" : {
8127 "default" : 1,
8128 "description" : "The number of CPU sockets.",
8129 "minimum" : 1,
56122987 8130 "optional" : 1,
4bd7df8b
DM
8131 "type" : "integer",
8132 "typetext" : "integer (1- N)"
56122987 8133 },
44660702
DM
8134 "startdate" : {
8135 "default" : "now",
8136 "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'.",
8137 "optional" : 1,
8138 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
7aacca6f 8139 "type" : "string",
44660702
DM
8140 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
8141 },
8142 "startup" : {
8143 "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.",
8144 "format" : "pve-startup-order",
7aacca6f 8145 "optional" : 1,
44660702
DM
8146 "type" : "string",
8147 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 8148 },
44660702
DM
8149 "tablet" : {
8150 "default" : 1,
c2993fe5 8151 "description" : "Enable/disable the USB tablet device.",
7aacca6f 8152 "optional" : 1,
c2993fe5
DM
8153 "type" : "boolean",
8154 "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 8155 },
44660702
DM
8156 "tdf" : {
8157 "default" : 0,
8158 "description" : "Enable/disable time drift fix.",
7aacca6f 8159 "optional" : 1,
44660702 8160 "type" : "boolean"
7aacca6f 8161 },
44660702
DM
8162 "template" : {
8163 "default" : 0,
8164 "description" : "Enable/disable Template.",
7aacca6f 8165 "optional" : 1,
44660702 8166 "type" : "boolean"
7aacca6f 8167 },
44660702 8168 "unused[n]" : {
c2993fe5 8169 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 8170 "format" : "pve-volume-id",
7aacca6f
DM
8171 "optional" : 1,
8172 "type" : "string"
8173 },
44660702 8174 "usb[n]" : {
c2993fe5 8175 "description" : "Configure an USB device (n is 0 to 4).",
56122987 8176 "format" : {
44660702
DM
8177 "host" : {
8178 "default_key" : 1,
c2993fe5 8179 "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
8180 "format" : "pve-qm-usb-device",
8181 "format_description" : "HOSTUSBDEVICE|spice",
8182 "type" : "string"
7aacca6f 8183 },
44660702 8184 "usb3" : {
c2993fe5
DM
8185 "default" : 0,
8186 "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 8187 "optional" : 1,
44660702 8188 "type" : "boolean"
7aacca6f 8189 }
44660702 8190 },
7aacca6f 8191 "optional" : 1,
4bd7df8b
DM
8192 "type" : "string",
8193 "typetext" : "[host=]<HOSTUSBDEVICE|spice> [,usb3=<1|0>]"
7aacca6f 8194 },
44660702 8195 "vcpus" : {
7aacca6f 8196 "default" : 0,
44660702
DM
8197 "description" : "Number of hotplugged vcpus.",
8198 "minimum" : 1,
7aacca6f 8199 "optional" : 1,
4bd7df8b
DM
8200 "type" : "integer",
8201 "typetext" : "integer (1- N)"
7aacca6f 8202 },
44660702 8203 "vga" : {
c2993fe5 8204 "description" : "Select the VGA type.",
44660702
DM
8205 "enum" : [
8206 "std",
8207 "cirrus",
8208 "vmware",
8209 "qxl",
8210 "serial0",
8211 "serial1",
8212 "serial2",
8213 "serial3",
8214 "qxl2",
8215 "qxl3",
8216 "qxl4"
8217 ],
7aacca6f 8218 "optional" : 1,
c2993fe5
DM
8219 "type" : "string",
8220 "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 8221 },
44660702
DM
8222 "virtio[n]" : {
8223 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
7aacca6f 8224 "format" : {
7aacca6f 8225 "aio" : {
7aacca6f 8226 "description" : "AIO type to use.",
56122987 8227 "enum" : [
7aacca6f
DM
8228 "native",
8229 "threads"
7aacca6f 8230 ],
44660702
DM
8231 "optional" : 1,
8232 "type" : "string"
56122987 8233 },
44660702
DM
8234 "backup" : {
8235 "description" : "Whether the drive should be included when making backups.",
56122987 8236 "optional" : 1,
44660702 8237 "type" : "boolean"
7aacca6f 8238 },
44660702
DM
8239 "bps" : {
8240 "description" : "Maximum r/w speed speed in bytes per second.",
8241 "format_description" : "bps",
7aacca6f 8242 "optional" : 1,
44660702 8243 "type" : "integer"
56122987
DM
8244 },
8245 "bps_rd" : {
7aacca6f 8246 "description" : "Maximum read speed speed in bytes per second.",
44660702 8247 "format_description" : "bps",
56122987 8248 "optional" : 1,
7aacca6f 8249 "type" : "integer"
56122987 8250 },
44660702
DM
8251 "bps_wr" : {
8252 "description" : "Maximum write speed speed in bytes per second.",
8253 "format_description" : "bps",
56122987 8254 "optional" : 1,
7aacca6f 8255 "type" : "integer"
56122987 8256 },
7aacca6f 8257 "cache" : {
44660702 8258 "description" : "The drive's cache mode",
7aacca6f
DM
8259 "enum" : [
8260 "none",
8261 "writethrough",
8262 "writeback",
8263 "unsafe",
8264 "directsync"
8265 ],
56122987 8266 "optional" : 1,
44660702 8267 "type" : "string"
7aacca6f 8268 },
44660702
DM
8269 "cyls" : {
8270 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
8271 "optional" : 1,
8272 "type" : "integer"
8273 },
8274 "detect_zeroes" : {
8275 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
8276 "optional" : 1,
8277 "type" : "boolean"
8278 },
8279 "discard" : {
8280 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
56122987 8281 "enum" : [
44660702
DM
8282 "ignore",
8283 "on"
56122987
DM
8284 ],
8285 "optional" : 1,
44660702 8286 "type" : "string"
56122987 8287 },
44660702
DM
8288 "file" : {
8289 "default_key" : 1,
8290 "description" : "The drive's backing volume.",
8291 "format" : "pve-volume-id-or-qm-path",
8292 "format_description" : "volume",
8293 "type" : "string"
8294 },
8295 "format" : {
8296 "description" : "The drive's backing file's data format.",
8297 "enum" : [
8298 "raw",
8299 "cow",
8300 "qcow",
8301 "qed",
8302 "qcow2",
8303 "vmdk",
8304 "cloop"
8305 ],
f004f5b9 8306 "format_description" : "image format",
56122987 8307 "optional" : 1,
44660702 8308 "type" : "string"
56122987 8309 },
44660702
DM
8310 "heads" : {
8311 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
8312 "optional" : 1,
8313 "type" : "integer"
8314 },
8315 "iops" : {
8316 "description" : "Maximum r/w I/O speed in operations per second.",
8317 "format_description" : "iops",
56122987 8318 "optional" : 1,
44660702
DM
8319 "type" : "integer"
8320 },
8321 "iops_max" : {
7aacca6f 8322 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
44660702
DM
8323 "format_description" : "iops",
8324 "optional" : 1,
8325 "type" : "integer"
56122987 8326 },
7aacca6f 8327 "iops_rd" : {
44660702 8328 "description" : "Maximum read I/O speed in operations per second.",
7aacca6f 8329 "format_description" : "iops",
7aacca6f 8330 "optional" : 1,
44660702 8331 "type" : "integer"
56122987 8332 },
44660702
DM
8333 "iops_rd_max" : {
8334 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
8335 "format_description" : "iops",
8336 "optional" : 1,
8337 "type" : "integer"
8338 },
8339 "iops_wr" : {
8340 "description" : "Maximum write I/O speed in operations per second.",
8341 "format_description" : "iops",
8342 "optional" : 1,
8343 "type" : "integer"
8344 },
8345 "iops_wr_max" : {
8346 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
8347 "format_description" : "iops",
8348 "optional" : 1,
8349 "type" : "integer"
8350 },
8351 "iothread" : {
8352 "description" : "Whether to use iothreads for this drive",
44660702
DM
8353 "optional" : 1,
8354 "type" : "boolean"
8355 },
8356 "mbps" : {
8357 "description" : "Maximum r/w speed speed in megabytes per second.",
8358 "format_description" : "mbps",
7aacca6f 8359 "optional" : 1,
44660702 8360 "type" : "number"
7aacca6f
DM
8361 },
8362 "mbps_max" : {
8363 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 8364 "format_description" : "mbps",
56122987 8365 "optional" : 1,
44660702 8366 "type" : "number"
56122987 8367 },
44660702
DM
8368 "mbps_rd" : {
8369 "description" : "Maximum read speed speed in megabytes per second.",
8370 "format_description" : "mbps",
56122987 8371 "optional" : 1,
44660702 8372 "type" : "number"
56122987 8373 },
44660702
DM
8374 "mbps_rd_max" : {
8375 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
8376 "format_description" : "mbps",
8377 "optional" : 1,
8378 "type" : "number"
8379 },
8380 "mbps_wr" : {
8381 "description" : "Maximum write speed speed in megabytes per second.",
8382 "format_description" : "mbps",
8383 "optional" : 1,
8384 "type" : "number"
8385 },
8386 "mbps_wr_max" : {
8387 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
8388 "format_description" : "mbps",
8389 "optional" : 1,
8390 "type" : "number"
8391 },
8392 "media" : {
8393 "default" : "disk",
8394 "description" : "The drive's media type.",
56122987 8395 "enum" : [
44660702
DM
8396 "cdrom",
8397 "disk"
56122987
DM
8398 ],
8399 "optional" : 1,
44660702 8400 "type" : "string"
56122987 8401 },
44660702
DM
8402 "rerror" : {
8403 "description" : "Read error action.",
8404 "enum" : [
8405 "ignore",
8406 "report",
8407 "stop"
8408 ],
56122987 8409 "optional" : 1,
44660702 8410 "type" : "string"
56122987 8411 },
44660702
DM
8412 "secs" : {
8413 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 8414 "optional" : 1,
44660702 8415 "type" : "integer"
56122987 8416 },
7aacca6f
DM
8417 "serial" : {
8418 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
7aacca6f 8419 "format" : "urlencoded",
44660702 8420 "format_description" : "serial",
7aacca6f 8421 "maxLength" : 60,
44660702
DM
8422 "optional" : 1,
8423 "type" : "string"
56122987 8424 },
44660702
DM
8425 "size" : {
8426 "description" : "Disk size. This is purely informational and has no effect.",
8427 "format" : "disk-size",
f004f5b9 8428 "format_description" : "DiskSize",
44660702
DM
8429 "optional" : 1,
8430 "type" : "string"
56122987 8431 },
44660702
DM
8432 "snapshot" : {
8433 "description" : "Whether the drive should be included when making snapshots.",
56122987 8434 "optional" : 1,
44660702 8435 "type" : "boolean"
56122987 8436 },
44660702
DM
8437 "trans" : {
8438 "description" : "Force disk geometry bios translation mode.",
8439 "enum" : [
8440 "none",
8441 "lba",
8442 "auto"
8443 ],
7aacca6f 8444 "optional" : 1,
44660702 8445 "type" : "string"
7aacca6f 8446 },
44660702
DM
8447 "volume" : {
8448 "alias" : "file"
8449 },
8450 "werror" : {
8451 "description" : "Write error action.",
8452 "enum" : [
8453 "enospc",
8454 "ignore",
8455 "report",
8456 "stop"
8457 ],
7aacca6f 8458 "optional" : 1,
44660702 8459 "type" : "string"
56122987
DM
8460 }
8461 },
7aacca6f 8462 "optional" : 1,
4bd7df8b
DM
8463 "type" : "string",
8464 "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 8465 },
44660702
DM
8466 "vmid" : {
8467 "description" : "The (unique) ID of the VM.",
8468 "format" : "pve-vmid",
8469 "minimum" : 1,
4bd7df8b
DM
8470 "type" : "integer",
8471 "typetext" : "integer (1- N)"
56122987 8472 },
44660702 8473 "watchdog" : {
c2993fe5 8474 "description" : "Create a virtual hardware watchdog device.",
44660702 8475 "format" : "pve-qm-watchdog",
56122987 8476 "optional" : 1,
c2993fe5 8477 "type" : "string",
4bd7df8b 8478 "typetext" : "[[model=]<i6300esb|ib700>] [,action=<reset|shutdown|poweroff|pause|debug|none>]",
c2993fe5 8479 "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 8480 }
7aacca6f 8481 }
56122987 8482 },
56122987
DM
8483 "permissions" : {
8484 "check" : [
8485 "perm",
8486 "/vms/{vmid}",
8487 [
8488 "VM.Config.Disk",
8489 "VM.Config.CDROM",
8490 "VM.Config.CPU",
8491 "VM.Config.Memory",
8492 "VM.Config.Network",
8493 "VM.Config.HWType",
8494 "VM.Config.Options"
8495 ],
8496 "any",
8497 1
8498 ]
8499 },
44660702 8500 "protected" : 1,
7aacca6f 8501 "proxyto" : "node",
56122987 8502 "returns" : {
7aacca6f
DM
8503 "type" : "null"
8504 }
8505 }
8506 },
44660702
DM
8507 "leaf" : 1,
8508 "path" : "/nodes/{node}/qemu/{vmid}/config",
7aacca6f
DM
8509 "text" : "config"
8510 },
8511 {
8512 "info" : {
56122987 8513 "GET" : {
44660702 8514 "description" : "Get virtual machine configuration, including pending changes.",
56122987 8515 "method" : "GET",
44660702 8516 "name" : "vm_pending",
7aacca6f 8517 "parameters" : {
44660702 8518 "additionalProperties" : 0,
7aacca6f
DM
8519 "properties" : {
8520 "node" : {
7aacca6f 8521 "description" : "The cluster node name.",
44660702 8522 "format" : "pve-node",
7aacca6f
DM
8523 "type" : "string"
8524 },
8525 "vmid" : {
44660702 8526 "description" : "The (unique) ID of the VM.",
7aacca6f 8527 "format" : "pve-vmid",
44660702 8528 "minimum" : 1,
4bd7df8b
DM
8529 "type" : "integer",
8530 "typetext" : "integer (1- N)"
7aacca6f 8531 }
44660702 8532 }
7aacca6f 8533 },
56122987
DM
8534 "permissions" : {
8535 "check" : [
8536 "perm",
8537 "/vms/{vmid}",
8538 [
8539 "VM.Audit"
8540 ]
8541 ]
8542 },
7aacca6f 8543 "proxyto" : "node",
44660702
DM
8544 "returns" : {
8545 "items" : {
8546 "properties" : {
8547 "delete" : {
8548 "description" : "Indicates a pending delete request if present and not 0. The value 2 indicates a force-delete request.",
8549 "maximum" : 2,
8550 "minimum" : 0,
8551 "optional" : 1,
8552 "type" : "integer"
8553 },
8554 "key" : {
8555 "description" : "Configuration option name.",
8556 "type" : "string"
8557 },
8558 "pending" : {
8559 "description" : "Pending value.",
8560 "optional" : 1,
8561 "type" : "string"
8562 },
8563 "value" : {
8564 "description" : "Current value.",
8565 "optional" : 1,
8566 "type" : "string"
8567 }
8568 },
8569 "type" : "object"
8570 },
8571 "type" : "array"
8572 }
56122987
DM
8573 }
8574 },
7aacca6f 8575 "leaf" : 1,
44660702
DM
8576 "path" : "/nodes/{node}/qemu/{vmid}/pending",
8577 "text" : "pending"
56122987
DM
8578 },
8579 {
56122987
DM
8580 "info" : {
8581 "PUT" : {
7aacca6f 8582 "description" : "Unlink/delete disk images.",
7aacca6f 8583 "method" : "PUT",
7aacca6f 8584 "name" : "unlink",
56122987 8585 "parameters" : {
44660702 8586 "additionalProperties" : 0,
56122987 8587 "properties" : {
7aacca6f 8588 "force" : {
44660702 8589 "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 8590 "optional" : 1,
44660702 8591 "type" : "boolean"
7aacca6f 8592 },
56122987
DM
8593 "idlist" : {
8594 "description" : "A list of disk IDs you want to delete.",
44660702
DM
8595 "format" : "pve-configid-list",
8596 "type" : "string"
8597 },
8598 "node" : {
8599 "description" : "The cluster node name.",
8600 "format" : "pve-node",
8601 "type" : "string"
56122987
DM
8602 },
8603 "vmid" : {
7aacca6f 8604 "description" : "The (unique) ID of the VM.",
44660702 8605 "format" : "pve-vmid",
7aacca6f 8606 "minimum" : 1,
4bd7df8b
DM
8607 "type" : "integer",
8608 "typetext" : "integer (1- N)"
56122987 8609 }
44660702
DM
8610 }
8611 },
8612 "permissions" : {
8613 "check" : [
8614 "perm",
8615 "/vms/{vmid}",
8616 [
8617 "VM.Config.Disk"
8618 ]
8619 ]
8620 },
8621 "protected" : 1,
8622 "proxyto" : "node",
8623 "returns" : {
8624 "type" : "null"
7aacca6f 8625 }
56122987 8626 }
7aacca6f 8627 },
44660702 8628 "leaf" : 1,
7aacca6f 8629 "path" : "/nodes/{node}/qemu/{vmid}/unlink",
44660702 8630 "text" : "unlink"
56122987
DM
8631 },
8632 {
56122987
DM
8633 "info" : {
8634 "POST" : {
7aacca6f 8635 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
8636 "method" : "POST",
8637 "name" : "vncproxy",
56122987 8638 "parameters" : {
44660702 8639 "additionalProperties" : 0,
56122987 8640 "properties" : {
44660702
DM
8641 "node" : {
8642 "description" : "The cluster node name.",
8643 "format" : "pve-node",
8644 "type" : "string"
8645 },
56122987 8646 "vmid" : {
7aacca6f 8647 "description" : "The (unique) ID of the VM.",
44660702 8648 "format" : "pve-vmid",
56122987 8649 "minimum" : 1,
4bd7df8b
DM
8650 "type" : "integer",
8651 "typetext" : "integer (1- N)"
7aacca6f
DM
8652 },
8653 "websocket" : {
8654 "description" : "starts websockify instead of vncproxy",
44660702
DM
8655 "optional" : 1,
8656 "type" : "boolean"
56122987 8657 }
44660702 8658 }
56122987 8659 },
44660702
DM
8660 "permissions" : {
8661 "check" : [
8662 "perm",
8663 "/vms/{vmid}",
8664 [
8665 "VM.Console"
8666 ]
8667 ]
8668 },
8669 "protected" : 1,
56122987 8670 "returns" : {
7aacca6f 8671 "additionalProperties" : 0,
56122987 8672 "properties" : {
7aacca6f 8673 "cert" : {
56122987
DM
8674 "type" : "string"
8675 },
56122987
DM
8676 "port" : {
8677 "type" : "integer"
8678 },
7aacca6f
DM
8679 "ticket" : {
8680 "type" : "string"
8681 },
44660702
DM
8682 "upid" : {
8683 "type" : "string"
8684 },
7aacca6f 8685 "user" : {
56122987
DM
8686 "type" : "string"
8687 }
7aacca6f 8688 }
56122987
DM
8689 }
8690 }
8691 },
44660702
DM
8692 "leaf" : 1,
8693 "path" : "/nodes/{node}/qemu/{vmid}/vncproxy",
7aacca6f 8694 "text" : "vncproxy"
56122987
DM
8695 },
8696 {
56122987
DM
8697 "info" : {
8698 "GET" : {
44660702
DM
8699 "description" : "Opens a weksocket for VNC traffic.",
8700 "method" : "GET",
8701 "name" : "vncwebsocket",
56122987 8702 "parameters" : {
44660702 8703 "additionalProperties" : 0,
56122987 8704 "properties" : {
7aacca6f 8705 "node" : {
7aacca6f 8706 "description" : "The cluster node name.",
44660702 8707 "format" : "pve-node",
7aacca6f
DM
8708 "type" : "string"
8709 },
44660702
DM
8710 "port" : {
8711 "description" : "Port number returned by previous vncproxy call.",
8712 "maximum" : 5999,
8713 "minimum" : 5900,
4bd7df8b
DM
8714 "type" : "integer",
8715 "typetext" : "integer (5900-5999)"
56122987 8716 },
7aacca6f 8717 "vmid" : {
44660702 8718 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8719 "format" : "pve-vmid",
8720 "minimum" : 1,
4bd7df8b
DM
8721 "type" : "integer",
8722 "typetext" : "integer (1- N)"
44660702
DM
8723 },
8724 "vncticket" : {
8725 "description" : "Ticket from previous call to vncproxy.",
8726 "maxLength" : 512,
8727 "type" : "string"
56122987 8728 }
44660702
DM
8729 }
8730 },
8731 "permissions" : {
8732 "check" : [
8733 "perm",
8734 "/vms/{vmid}",
8735 [
8736 "VM.Console"
8737 ]
8738 ],
8739 "description" : "You also need to pass a valid ticket (vncticket)."
56122987 8740 },
7aacca6f
DM
8741 "returns" : {
8742 "properties" : {
8743 "port" : {
8744 "type" : "string"
8745 }
8746 },
8747 "type" : "object"
8748 }
56122987
DM
8749 }
8750 },
7aacca6f 8751 "leaf" : 1,
44660702
DM
8752 "path" : "/nodes/{node}/qemu/{vmid}/vncwebsocket",
8753 "text" : "vncwebsocket"
56122987
DM
8754 },
8755 {
8756 "info" : {
8757 "POST" : {
44660702
DM
8758 "description" : "Returns a SPICE configuration to connect to the VM.",
8759 "method" : "POST",
7aacca6f
DM
8760 "name" : "spiceproxy",
8761 "parameters" : {
44660702 8762 "additionalProperties" : 0,
56122987 8763 "properties" : {
44660702
DM
8764 "node" : {
8765 "description" : "The cluster node name.",
8766 "format" : "pve-node",
8767 "type" : "string"
8768 },
7aacca6f 8769 "proxy" : {
44660702 8770 "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 8771 "format" : "address",
7aacca6f 8772 "optional" : 1,
44660702 8773 "type" : "string"
56122987 8774 },
7aacca6f 8775 "vmid" : {
44660702 8776 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
8777 "format" : "pve-vmid",
8778 "minimum" : 1,
4bd7df8b
DM
8779 "type" : "integer",
8780 "typetext" : "integer (1- N)"
56122987 8781 }
44660702 8782 }
56122987 8783 },
56122987
DM
8784 "permissions" : {
8785 "check" : [
8786 "perm",
8787 "/vms/{vmid}",
8788 [
8789 "VM.Console"
8790 ]
8791 ]
8792 },
44660702
DM
8793 "protected" : 1,
8794 "proxyto" : "node",
7aacca6f 8795 "returns" : {
44660702
DM
8796 "additionalProperties" : 1,
8797 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 8798 "properties" : {
44660702 8799 "host" : {
7aacca6f
DM
8800 "type" : "string"
8801 },
7aacca6f
DM
8802 "password" : {
8803 "type" : "string"
8804 },
44660702 8805 "proxy" : {
7aacca6f
DM
8806 "type" : "string"
8807 },
44660702
DM
8808 "tls-port" : {
8809 "type" : "integer"
8810 },
8811 "type" : {
7aacca6f
DM
8812 "type" : "string"
8813 }
44660702 8814 }
7aacca6f
DM
8815 }
8816 }
8817 },
44660702
DM
8818 "leaf" : 1,
8819 "path" : "/nodes/{node}/qemu/{vmid}/spiceproxy",
7aacca6f
DM
8820 "text" : "spiceproxy"
8821 },
8822 {
56122987
DM
8823 "children" : [
8824 {
56122987
DM
8825 "info" : {
8826 "GET" : {
44660702
DM
8827 "description" : "Get virtual machine status.",
8828 "method" : "GET",
8829 "name" : "vm_status",
56122987 8830 "parameters" : {
44660702 8831 "additionalProperties" : 0,
56122987 8832 "properties" : {
44660702
DM
8833 "node" : {
8834 "description" : "The cluster node name.",
8835 "format" : "pve-node",
8836 "type" : "string"
8837 },
56122987 8838 "vmid" : {
44660702 8839 "description" : "The (unique) ID of the VM.",
7aacca6f 8840 "format" : "pve-vmid",
56122987 8841 "minimum" : 1,
4bd7df8b
DM
8842 "type" : "integer",
8843 "typetext" : "integer (1- N)"
56122987 8844 }
44660702 8845 }
56122987
DM
8846 },
8847 "permissions" : {
8848 "check" : [
8849 "perm",
8850 "/vms/{vmid}",
8851 [
8852 "VM.Audit"
8853 ]
8854 ]
8855 },
44660702 8856 "protected" : 1,
7aacca6f 8857 "proxyto" : "node",
56122987
DM
8858 "returns" : {
8859 "type" : "object"
7aacca6f 8860 }
56122987 8861 }
7aacca6f 8862 },
7aacca6f 8863 "leaf" : 1,
44660702
DM
8864 "path" : "/nodes/{node}/qemu/{vmid}/status/current",
8865 "text" : "current"
56122987
DM
8866 },
8867 {
56122987
DM
8868 "info" : {
8869 "POST" : {
44660702 8870 "description" : "Start virtual machine.",
56122987 8871 "method" : "POST",
44660702 8872 "name" : "vm_start",
56122987 8873 "parameters" : {
44660702 8874 "additionalProperties" : 0,
56122987 8875 "properties" : {
44660702
DM
8876 "machine" : {
8877 "description" : "Specific the Qemu machine type.",
8878 "maxLength" : 40,
8879 "optional" : 1,
8880 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
8881 "type" : "string"
8882 },
8883 "migratedfrom" : {
8884 "description" : "The cluster node name.",
8885 "format" : "pve-node",
56122987 8886 "optional" : 1,
44660702 8887 "type" : "string"
56122987 8888 },
7aacca6f 8889 "node" : {
7aacca6f 8890 "description" : "The cluster node name.",
44660702
DM
8891 "format" : "pve-node",
8892 "type" : "string"
7aacca6f 8893 },
44660702
DM
8894 "skiplock" : {
8895 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 8896 "optional" : 1,
44660702 8897 "type" : "boolean"
56122987 8898 },
44660702
DM
8899 "stateuri" : {
8900 "description" : "Some command save/restore state from this location.",
8901 "maxLength" : 128,
56122987 8902 "optional" : 1,
44660702 8903 "type" : "string"
56122987
DM
8904 },
8905 "vmid" : {
7aacca6f 8906 "description" : "The (unique) ID of the VM.",
44660702
DM
8907 "format" : "pve-vmid",
8908 "minimum" : 1,
4bd7df8b
DM
8909 "type" : "integer",
8910 "typetext" : "integer (1- N)"
56122987 8911 }
44660702 8912 }
7aacca6f 8913 },
56122987
DM
8914 "permissions" : {
8915 "check" : [
8916 "perm",
8917 "/vms/{vmid}",
8918 [
8919 "VM.PowerMgmt"
8920 ]
8921 ]
44660702
DM
8922 },
8923 "protected" : 1,
8924 "proxyto" : "node",
8925 "returns" : {
8926 "type" : "string"
56122987
DM
8927 }
8928 }
44660702
DM
8929 },
8930 "leaf" : 1,
8931 "path" : "/nodes/{node}/qemu/{vmid}/status/start",
8932 "text" : "start"
56122987
DM
8933 },
8934 {
56122987
DM
8935 "info" : {
8936 "POST" : {
7aacca6f 8937 "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
8938 "method" : "POST",
8939 "name" : "vm_stop",
56122987 8940 "parameters" : {
44660702 8941 "additionalProperties" : 0,
56122987 8942 "properties" : {
44660702
DM
8943 "keepActive" : {
8944 "default" : 0,
8945 "description" : "Do not decativate storage volumes.",
56122987 8946 "optional" : 1,
44660702 8947 "type" : "boolean"
56122987
DM
8948 },
8949 "migratedfrom" : {
56122987 8950 "description" : "The cluster node name.",
44660702 8951 "format" : "pve-node",
7aacca6f 8952 "optional" : 1,
44660702 8953 "type" : "string"
7aacca6f 8954 },
44660702
DM
8955 "node" : {
8956 "description" : "The cluster node name.",
8957 "format" : "pve-node",
8958 "type" : "string"
56122987
DM
8959 },
8960 "skiplock" : {
8961 "description" : "Ignore locks - only root is allowed to use this option.",
8962 "optional" : 1,
8963 "type" : "boolean"
8964 },
44660702
DM
8965 "timeout" : {
8966 "description" : "Wait maximal timeout seconds.",
8967 "minimum" : 0,
56122987 8968 "optional" : 1,
4bd7df8b
DM
8969 "type" : "integer",
8970 "typetext" : "integer (0- N)"
7aacca6f 8971 },
44660702
DM
8972 "vmid" : {
8973 "description" : "The (unique) ID of the VM.",
8974 "format" : "pve-vmid",
8975 "minimum" : 1,
4bd7df8b
DM
8976 "type" : "integer",
8977 "typetext" : "integer (1- N)"
56122987 8978 }
44660702 8979 }
56122987 8980 },
56122987
DM
8981 "permissions" : {
8982 "check" : [
8983 "perm",
8984 "/vms/{vmid}",
8985 [
8986 "VM.PowerMgmt"
8987 ]
8988 ]
8989 },
44660702
DM
8990 "protected" : 1,
8991 "proxyto" : "node",
7aacca6f
DM
8992 "returns" : {
8993 "type" : "string"
44660702
DM
8994 }
8995 }
8996 },
8997 "leaf" : 1,
8998 "path" : "/nodes/{node}/qemu/{vmid}/status/stop",
8999 "text" : "stop"
9000 },
9001 {
9002 "info" : {
9003 "POST" : {
9004 "description" : "Reset virtual machine.",
9005 "method" : "POST",
9006 "name" : "vm_reset",
56122987 9007 "parameters" : {
7aacca6f 9008 "additionalProperties" : 0,
56122987 9009 "properties" : {
56122987
DM
9010 "node" : {
9011 "description" : "The cluster node name.",
44660702
DM
9012 "format" : "pve-node",
9013 "type" : "string"
56122987
DM
9014 },
9015 "skiplock" : {
44660702 9016 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 9017 "optional" : 1,
44660702 9018 "type" : "boolean"
7aacca6f
DM
9019 },
9020 "vmid" : {
44660702 9021 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9022 "format" : "pve-vmid",
9023 "minimum" : 1,
4bd7df8b
DM
9024 "type" : "integer",
9025 "typetext" : "integer (1- N)"
56122987 9026 }
7aacca6f 9027 }
56122987 9028 },
7aacca6f
DM
9029 "permissions" : {
9030 "check" : [
9031 "perm",
9032 "/vms/{vmid}",
9033 [
9034 "VM.PowerMgmt"
9035 ]
9036 ]
9037 },
44660702 9038 "protected" : 1,
7aacca6f 9039 "proxyto" : "node",
56122987
DM
9040 "returns" : {
9041 "type" : "string"
44660702
DM
9042 }
9043 }
9044 },
9045 "leaf" : 1,
9046 "path" : "/nodes/{node}/qemu/{vmid}/status/reset",
9047 "text" : "reset"
9048 },
9049 {
9050 "info" : {
9051 "POST" : {
9052 "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.",
9053 "method" : "POST",
56122987 9054 "name" : "vm_shutdown",
56122987 9055 "parameters" : {
7aacca6f 9056 "additionalProperties" : 0,
56122987 9057 "properties" : {
56122987 9058 "forceStop" : {
56122987 9059 "default" : 0,
44660702 9060 "description" : "Make sure the VM stops.",
7aacca6f 9061 "optional" : 1,
44660702 9062 "type" : "boolean"
56122987
DM
9063 },
9064 "keepActive" : {
7aacca6f 9065 "default" : 0,
44660702
DM
9066 "description" : "Do not decativate storage volumes.",
9067 "optional" : 1,
9068 "type" : "boolean"
9069 },
9070 "node" : {
9071 "description" : "The cluster node name.",
9072 "format" : "pve-node",
9073 "type" : "string"
9074 },
9075 "skiplock" : {
9076 "description" : "Ignore locks - only root is allowed to use this option.",
9077 "optional" : 1,
9078 "type" : "boolean"
56122987 9079 },
7aacca6f 9080 "timeout" : {
7aacca6f 9081 "description" : "Wait maximal timeout seconds.",
44660702 9082 "minimum" : 0,
7aacca6f 9083 "optional" : 1,
4bd7df8b
DM
9084 "type" : "integer",
9085 "typetext" : "integer (0- N)"
7aacca6f 9086 },
56122987 9087 "vmid" : {
7aacca6f 9088 "description" : "The (unique) ID of the VM.",
44660702
DM
9089 "format" : "pve-vmid",
9090 "minimum" : 1,
4bd7df8b
DM
9091 "type" : "integer",
9092 "typetext" : "integer (1- N)"
56122987 9093 }
7aacca6f 9094 }
56122987 9095 },
44660702
DM
9096 "permissions" : {
9097 "check" : [
9098 "perm",
9099 "/vms/{vmid}",
9100 [
9101 "VM.PowerMgmt"
9102 ]
9103 ]
9104 },
7aacca6f 9105 "protected" : 1,
44660702
DM
9106 "proxyto" : "node",
9107 "returns" : {
9108 "type" : "string"
9109 }
56122987
DM
9110 }
9111 },
44660702 9112 "leaf" : 1,
7aacca6f 9113 "path" : "/nodes/{node}/qemu/{vmid}/status/shutdown",
44660702 9114 "text" : "shutdown"
56122987
DM
9115 },
9116 {
56122987
DM
9117 "info" : {
9118 "POST" : {
44660702 9119 "description" : "Suspend virtual machine.",
56122987 9120 "method" : "POST",
44660702 9121 "name" : "vm_suspend",
7aacca6f 9122 "parameters" : {
44660702 9123 "additionalProperties" : 0,
7aacca6f
DM
9124 "properties" : {
9125 "node" : {
7aacca6f 9126 "description" : "The cluster node name.",
44660702
DM
9127 "format" : "pve-node",
9128 "type" : "string"
7aacca6f
DM
9129 },
9130 "skiplock" : {
9131 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
9132 "optional" : 1,
9133 "type" : "boolean"
9134 },
9135 "vmid" : {
9136 "description" : "The (unique) ID of the VM.",
9137 "format" : "pve-vmid",
9138 "minimum" : 1,
4bd7df8b
DM
9139 "type" : "integer",
9140 "typetext" : "integer (1- N)"
44660702
DM
9141 }
9142 }
56122987
DM
9143 },
9144 "permissions" : {
9145 "check" : [
9146 "perm",
9147 "/vms/{vmid}",
9148 [
9149 "VM.PowerMgmt"
9150 ]
9151 ]
9152 },
44660702
DM
9153 "protected" : 1,
9154 "proxyto" : "node",
9155 "returns" : {
9156 "type" : "string"
9157 }
56122987
DM
9158 }
9159 },
44660702 9160 "leaf" : 1,
7aacca6f 9161 "path" : "/nodes/{node}/qemu/{vmid}/status/suspend",
44660702 9162 "text" : "suspend"
56122987
DM
9163 },
9164 {
56122987
DM
9165 "info" : {
9166 "POST" : {
44660702
DM
9167 "description" : "Resume virtual machine.",
9168 "method" : "POST",
7aacca6f 9169 "name" : "vm_resume",
56122987
DM
9170 "parameters" : {
9171 "additionalProperties" : 0,
9172 "properties" : {
44660702
DM
9173 "nocheck" : {
9174 "optional" : 1,
9175 "type" : "boolean"
9176 },
7aacca6f 9177 "node" : {
44660702 9178 "description" : "The cluster node name.",
7aacca6f 9179 "format" : "pve-node",
44660702 9180 "type" : "string"
56122987
DM
9181 },
9182 "skiplock" : {
56122987 9183 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
9184 "optional" : 1,
9185 "type" : "boolean"
56122987 9186 },
7aacca6f 9187 "vmid" : {
7aacca6f
DM
9188 "description" : "The (unique) ID of the VM.",
9189 "format" : "pve-vmid",
44660702 9190 "minimum" : 1,
4bd7df8b
DM
9191 "type" : "integer",
9192 "typetext" : "integer (1- N)"
56122987
DM
9193 }
9194 }
9195 },
9196 "permissions" : {
9197 "check" : [
9198 "perm",
9199 "/vms/{vmid}",
9200 [
9201 "VM.PowerMgmt"
9202 ]
9203 ]
9204 },
44660702
DM
9205 "protected" : 1,
9206 "proxyto" : "node",
56122987
DM
9207 "returns" : {
9208 "type" : "string"
7aacca6f 9209 }
56122987
DM
9210 }
9211 },
44660702
DM
9212 "leaf" : 1,
9213 "path" : "/nodes/{node}/qemu/{vmid}/status/resume",
7aacca6f 9214 "text" : "resume"
56122987
DM
9215 }
9216 ],
9217 "info" : {
44660702
DM
9218 "GET" : {
9219 "description" : "Directory index",
9220 "method" : "GET",
9221 "name" : "vmcmdidx",
56122987 9222 "parameters" : {
44660702 9223 "additionalProperties" : 0,
56122987 9224 "properties" : {
44660702
DM
9225 "node" : {
9226 "description" : "The cluster node name.",
9227 "format" : "pve-node",
7aacca6f
DM
9228 "type" : "string"
9229 },
56122987 9230 "vmid" : {
7aacca6f 9231 "description" : "The (unique) ID of the VM.",
44660702
DM
9232 "format" : "pve-vmid",
9233 "minimum" : 1,
4bd7df8b
DM
9234 "type" : "integer",
9235 "typetext" : "integer (1- N)"
56122987 9236 }
44660702 9237 }
56122987 9238 },
44660702
DM
9239 "permissions" : {
9240 "user" : "all"
9241 },
9242 "proxyto" : "node",
9243 "returns" : {
9244 "items" : {
9245 "properties" : {
9246 "subdir" : {
9247 "type" : "string"
9248 }
9249 },
9250 "type" : "object"
9251 },
9252 "links" : [
9253 {
9254 "href" : "{subdir}",
9255 "rel" : "child"
9256 }
9257 ],
9258 "type" : "array"
9259 }
56122987 9260 }
7aacca6f 9261 },
44660702
DM
9262 "leaf" : 0,
9263 "path" : "/nodes/{node}/qemu/{vmid}/status",
9264 "text" : "status"
56122987
DM
9265 },
9266 {
56122987 9267 "info" : {
44660702
DM
9268 "PUT" : {
9269 "description" : "Send key event to virtual machine.",
9270 "method" : "PUT",
9271 "name" : "vm_sendkey",
9272 "parameters" : {
9273 "additionalProperties" : 0,
56122987 9274 "properties" : {
44660702
DM
9275 "key" : {
9276 "description" : "The key (qemu monitor encoding).",
9277 "type" : "string"
9278 },
9279 "node" : {
9280 "description" : "The cluster node name.",
9281 "format" : "pve-node",
9282 "type" : "string"
9283 },
9284 "skiplock" : {
9285 "description" : "Ignore locks - only root is allowed to use this option.",
9286 "optional" : 1,
56122987 9287 "type" : "boolean"
7aacca6f 9288 },
44660702
DM
9289 "vmid" : {
9290 "description" : "The (unique) ID of the VM.",
9291 "format" : "pve-vmid",
9292 "minimum" : 1,
4bd7df8b
DM
9293 "type" : "integer",
9294 "typetext" : "integer (1- N)"
56122987 9295 }
7aacca6f 9296 }
56122987 9297 },
56122987
DM
9298 "permissions" : {
9299 "check" : [
9300 "perm",
9301 "/vms/{vmid}",
9302 [
44660702 9303 "VM.Console"
56122987
DM
9304 ]
9305 ]
9306 },
7aacca6f 9307 "protected" : 1,
44660702
DM
9308 "proxyto" : "node",
9309 "returns" : {
9310 "type" : "null"
9311 }
9312 }
9313 },
9314 "leaf" : 1,
9315 "path" : "/nodes/{node}/qemu/{vmid}/sendkey",
9316 "text" : "sendkey"
9317 },
9318 {
9319 "info" : {
9320 "GET" : {
9321 "description" : "Check if feature for virtual machine is available.",
9322 "method" : "GET",
7aacca6f 9323 "name" : "vm_feature",
56122987 9324 "parameters" : {
44660702 9325 "additionalProperties" : 0,
56122987 9326 "properties" : {
56122987 9327 "feature" : {
44660702 9328 "description" : "Feature to check.",
56122987
DM
9329 "enum" : [
9330 "snapshot",
9331 "clone",
9332 "copy"
9333 ],
44660702
DM
9334 "type" : "string"
9335 },
9336 "node" : {
9337 "description" : "The cluster node name.",
9338 "format" : "pve-node",
7aacca6f 9339 "type" : "string"
56122987
DM
9340 },
9341 "snapname" : {
56122987 9342 "description" : "The name of the snapshot.",
44660702
DM
9343 "format" : "pve-configid",
9344 "maxLength" : 40,
7aacca6f
DM
9345 "optional" : 1,
9346 "type" : "string"
9347 },
44660702
DM
9348 "vmid" : {
9349 "description" : "The (unique) ID of the VM.",
9350 "format" : "pve-vmid",
9351 "minimum" : 1,
4bd7df8b
DM
9352 "type" : "integer",
9353 "typetext" : "integer (1- N)"
44660702
DM
9354 }
9355 }
9356 },
9357 "permissions" : {
9358 "check" : [
9359 "perm",
9360 "/vms/{vmid}",
9361 [
9362 "VM.Audit"
9363 ]
9364 ]
9365 },
9366 "protected" : 1,
9367 "proxyto" : "node",
9368 "returns" : {
9369 "properties" : {
9370 "hasFeature" : {
9371 "type" : "boolean"
9372 },
9373 "nodes" : {
9374 "items" : {
9375 "type" : "string"
9376 },
9377 "type" : "array"
56122987
DM
9378 }
9379 },
44660702 9380 "type" : "object"
56122987
DM
9381 }
9382 }
9383 },
7aacca6f 9384 "leaf" : 1,
44660702
DM
9385 "path" : "/nodes/{node}/qemu/{vmid}/feature",
9386 "text" : "feature"
56122987
DM
9387 },
9388 {
56122987
DM
9389 "info" : {
9390 "POST" : {
44660702 9391 "description" : "Create a copy of virtual machine/template.",
56122987 9392 "method" : "POST",
7aacca6f 9393 "name" : "clone_vm",
56122987
DM
9394 "parameters" : {
9395 "additionalProperties" : 0,
9396 "properties" : {
44660702
DM
9397 "description" : {
9398 "description" : "Description for the new VM.",
56122987 9399 "optional" : 1,
7aacca6f 9400 "type" : "string"
56122987 9401 },
44660702
DM
9402 "format" : {
9403 "description" : "Target format for file storage.",
9404 "enum" : [
9405 "raw",
9406 "qcow2",
9407 "vmdk"
9408 ],
9409 "optional" : 1,
9410 "requires" : "full",
56122987
DM
9411 "type" : "string"
9412 },
44660702
DM
9413 "full" : {
9414 "default" : 0,
9415 "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 9416 "optional" : 1,
44660702
DM
9417 "type" : "boolean"
9418 },
9419 "name" : {
56122987 9420 "description" : "Set a name for the new VM.",
44660702
DM
9421 "format" : "dns-name",
9422 "optional" : 1,
9423 "type" : "string"
9424 },
9425 "newid" : {
9426 "description" : "VMID for the clone.",
9427 "format" : "pve-vmid",
9428 "minimum" : 1,
4bd7df8b
DM
9429 "type" : "integer",
9430 "typetext" : "integer (1- N)"
44660702
DM
9431 },
9432 "node" : {
9433 "description" : "The cluster node name.",
9434 "format" : "pve-node",
9435 "type" : "string"
7aacca6f
DM
9436 },
9437 "pool" : {
9438 "description" : "Add the new VM to the specified pool.",
44660702 9439 "format" : "pve-poolid",
56122987 9440 "optional" : 1,
44660702 9441 "type" : "string"
56122987 9442 },
44660702
DM
9443 "snapname" : {
9444 "description" : "The name of the snapshot.",
9445 "format" : "pve-configid",
9446 "maxLength" : 40,
7aacca6f
DM
9447 "optional" : 1,
9448 "type" : "string"
56122987 9449 },
44660702
DM
9450 "storage" : {
9451 "description" : "Target storage for full clone.",
9452 "format" : "pve-storage-id",
7aacca6f 9453 "optional" : 1,
44660702
DM
9454 "requires" : "full",
9455 "type" : "string"
56122987 9456 },
44660702
DM
9457 "target" : {
9458 "description" : "Target node. Only allowed if the original VM is on shared storage.",
9459 "format" : "pve-node",
56122987 9460 "optional" : 1,
56122987 9461 "type" : "string"
44660702
DM
9462 },
9463 "vmid" : {
9464 "description" : "The (unique) ID of the VM.",
9465 "format" : "pve-vmid",
9466 "minimum" : 1,
4bd7df8b
DM
9467 "type" : "integer",
9468 "typetext" : "integer (1- N)"
56122987
DM
9469 }
9470 }
9471 },
56122987
DM
9472 "permissions" : {
9473 "check" : [
9474 "and",
9475 [
9476 "perm",
9477 "/vms/{vmid}",
9478 [
9479 "VM.Clone"
9480 ]
9481 ],
9482 [
9483 "or",
9484 [
9485 "perm",
9486 "/vms/{newid}",
9487 [
9488 "VM.Allocate"
9489 ]
9490 ],
9491 [
9492 "perm",
9493 "/pool/{pool}",
9494 [
9495 "VM.Allocate"
9496 ],
9497 "require_param",
9498 "pool"
9499 ]
9500 ]
44660702
DM
9501 ],
9502 "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."
9503 },
9504 "protected" : 1,
9505 "proxyto" : "node",
9506 "returns" : {
9507 "type" : "string"
56122987
DM
9508 }
9509 }
9510 },
44660702
DM
9511 "leaf" : 1,
9512 "path" : "/nodes/{node}/qemu/{vmid}/clone",
56122987
DM
9513 "text" : "clone"
9514 },
9515 {
56122987
DM
9516 "info" : {
9517 "POST" : {
7aacca6f 9518 "description" : "Move volume to different storage.",
44660702
DM
9519 "method" : "POST",
9520 "name" : "move_vm_disk",
56122987
DM
9521 "parameters" : {
9522 "additionalProperties" : 0,
9523 "properties" : {
9524 "delete" : {
44660702 9525 "default" : 0,
56122987 9526 "description" : "Delete the original disk after successful copy. By default the original disk is kept as unused disk.",
7aacca6f 9527 "optional" : 1,
44660702 9528 "type" : "boolean"
56122987 9529 },
44660702
DM
9530 "digest" : {
9531 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9532 "maxLength" : 40,
9533 "optional" : 1,
9534 "type" : "string"
56122987 9535 },
56122987 9536 "disk" : {
56122987
DM
9537 "description" : "The disk you want to move.",
9538 "enum" : [
9539 "ide0",
9540 "ide1",
9541 "ide2",
9542 "ide3",
9543 "scsi0",
9544 "scsi1",
9545 "scsi2",
9546 "scsi3",
9547 "scsi4",
9548 "scsi5",
9549 "scsi6",
9550 "scsi7",
9551 "scsi8",
9552 "scsi9",
9553 "scsi10",
9554 "scsi11",
9555 "scsi12",
9556 "scsi13",
9557 "virtio0",
9558 "virtio1",
9559 "virtio2",
9560 "virtio3",
9561 "virtio4",
9562 "virtio5",
9563 "virtio6",
9564 "virtio7",
9565 "virtio8",
9566 "virtio9",
9567 "virtio10",
9568 "virtio11",
9569 "virtio12",
9570 "virtio13",
9571 "virtio14",
9572 "virtio15",
9573 "sata0",
9574 "sata1",
9575 "sata2",
9576 "sata3",
9577 "sata4",
9578 "sata5"
44660702
DM
9579 ],
9580 "type" : "string"
7aacca6f
DM
9581 },
9582 "format" : {
9583 "description" : "Target Format.",
9584 "enum" : [
9585 "raw",
9586 "qcow2",
9587 "vmdk"
9588 ],
9589 "optional" : 1,
9590 "type" : "string"
44660702
DM
9591 },
9592 "node" : {
9593 "description" : "The cluster node name.",
9594 "format" : "pve-node",
9595 "type" : "string"
9596 },
9597 "storage" : {
9598 "description" : "Target storage.",
9599 "format" : "pve-storage-id",
9600 "type" : "string"
9601 },
9602 "vmid" : {
9603 "description" : "The (unique) ID of the VM.",
9604 "format" : "pve-vmid",
9605 "minimum" : 1,
4bd7df8b
DM
9606 "type" : "integer",
9607 "typetext" : "integer (1- N)"
56122987
DM
9608 }
9609 }
9610 },
44660702
DM
9611 "permissions" : {
9612 "check" : [
9613 "and",
9614 [
9615 "perm",
9616 "/vms/{vmid}",
9617 [
9618 "VM.Config.Disk"
9619 ]
9620 ],
9621 [
9622 "perm",
9623 "/storage/{storage}",
9624 [
9625 "Datastore.AllocateSpace"
9626 ]
9627 ]
9628 ],
9629 "description" : "You need 'VM.Config.Disk' permissions on /vms/{vmid}, and 'Datastore.AllocateSpace' permissions on the storage."
9630 },
9631 "protected" : 1,
9632 "proxyto" : "node",
9633 "returns" : {
9634 "description" : "the task ID.",
9635 "type" : "string"
9636 }
56122987 9637 }
7aacca6f 9638 },
44660702 9639 "leaf" : 1,
7aacca6f 9640 "path" : "/nodes/{node}/qemu/{vmid}/move_disk",
44660702 9641 "text" : "move_disk"
56122987
DM
9642 },
9643 {
56122987
DM
9644 "info" : {
9645 "POST" : {
7aacca6f 9646 "description" : "Migrate virtual machine. Creates a new migration task.",
44660702 9647 "method" : "POST",
7aacca6f 9648 "name" : "migrate_vm",
56122987 9649 "parameters" : {
44660702 9650 "additionalProperties" : 0,
56122987 9651 "properties" : {
44660702
DM
9652 "force" : {
9653 "description" : "Allow to migrate VMs which use local devices. Only root may use this option.",
9654 "optional" : 1,
9655 "type" : "boolean"
9656 },
7aacca6f 9657 "node" : {
44660702 9658 "description" : "The cluster node name.",
7aacca6f 9659 "format" : "pve-node",
44660702 9660 "type" : "string"
56122987
DM
9661 },
9662 "online" : {
44660702 9663 "description" : "Use online/live migration.",
56122987 9664 "optional" : 1,
44660702 9665 "type" : "boolean"
56122987 9666 },
44660702
DM
9667 "target" : {
9668 "description" : "Target node.",
9669 "format" : "pve-node",
9670 "type" : "string"
56122987 9671 },
7aacca6f 9672 "vmid" : {
7aacca6f 9673 "description" : "The (unique) ID of the VM.",
44660702 9674 "format" : "pve-vmid",
7aacca6f 9675 "minimum" : 1,
4bd7df8b
DM
9676 "type" : "integer",
9677 "typetext" : "integer (1- N)"
56122987 9678 }
44660702
DM
9679 }
9680 },
9681 "permissions" : {
9682 "check" : [
9683 "perm",
9684 "/vms/{vmid}",
9685 [
9686 "VM.Migrate"
9687 ]
9688 ]
56122987
DM
9689 },
9690 "protected" : 1,
44660702
DM
9691 "proxyto" : "node",
9692 "returns" : {
9693 "description" : "the task ID.",
9694 "type" : "string"
9695 }
56122987 9696 }
7aacca6f 9697 },
44660702
DM
9698 "leaf" : 1,
9699 "path" : "/nodes/{node}/qemu/{vmid}/migrate",
7aacca6f 9700 "text" : "migrate"
56122987
DM
9701 },
9702 {
9703 "info" : {
9704 "POST" : {
44660702 9705 "description" : "Execute Qemu monitor commands.",
56122987 9706 "method" : "POST",
44660702 9707 "name" : "monitor",
56122987 9708 "parameters" : {
7aacca6f 9709 "additionalProperties" : 0,
56122987 9710 "properties" : {
44660702
DM
9711 "command" : {
9712 "description" : "The monitor command.",
9713 "type" : "string"
9714 },
56122987 9715 "node" : {
44660702 9716 "description" : "The cluster node name.",
7aacca6f 9717 "format" : "pve-node",
44660702 9718 "type" : "string"
56122987
DM
9719 },
9720 "vmid" : {
44660702 9721 "description" : "The (unique) ID of the VM.",
56122987 9722 "format" : "pve-vmid",
7aacca6f 9723 "minimum" : 1,
4bd7df8b
DM
9724 "type" : "integer",
9725 "typetext" : "integer (1- N)"
56122987 9726 }
7aacca6f 9727 }
56122987 9728 },
56122987
DM
9729 "permissions" : {
9730 "check" : [
9731 "perm",
9732 "/vms/{vmid}",
9733 [
9734 "VM.Monitor"
9735 ]
9736 ]
7aacca6f 9737 },
44660702
DM
9738 "protected" : 1,
9739 "proxyto" : "node",
9740 "returns" : {
9741 "type" : "string"
9742 }
56122987 9743 }
44660702
DM
9744 },
9745 "leaf" : 1,
9746 "path" : "/nodes/{node}/qemu/{vmid}/monitor",
9747 "text" : "monitor"
56122987
DM
9748 },
9749 {
56122987
DM
9750 "info" : {
9751 "PUT" : {
44660702
DM
9752 "description" : "Extend volume size.",
9753 "method" : "PUT",
9754 "name" : "resize_vm",
56122987 9755 "parameters" : {
44660702 9756 "additionalProperties" : 0,
56122987 9757 "properties" : {
44660702
DM
9758 "digest" : {
9759 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
9760 "maxLength" : 40,
9761 "optional" : 1,
56122987
DM
9762 "type" : "string"
9763 },
56122987
DM
9764 "disk" : {
9765 "description" : "The disk you want to resize.",
9766 "enum" : [
9767 "ide0",
9768 "ide1",
9769 "ide2",
9770 "ide3",
9771 "scsi0",
9772 "scsi1",
9773 "scsi2",
9774 "scsi3",
9775 "scsi4",
9776 "scsi5",
9777 "scsi6",
9778 "scsi7",
9779 "scsi8",
9780 "scsi9",
9781 "scsi10",
9782 "scsi11",
9783 "scsi12",
9784 "scsi13",
9785 "virtio0",
9786 "virtio1",
9787 "virtio2",
9788 "virtio3",
9789 "virtio4",
9790 "virtio5",
9791 "virtio6",
9792 "virtio7",
9793 "virtio8",
9794 "virtio9",
9795 "virtio10",
9796 "virtio11",
9797 "virtio12",
9798 "virtio13",
9799 "virtio14",
9800 "virtio15",
9801 "sata0",
9802 "sata1",
9803 "sata2",
9804 "sata3",
9805 "sata4",
9806 "sata5"
44660702
DM
9807 ],
9808 "type" : "string"
56122987 9809 },
44660702
DM
9810 "node" : {
9811 "description" : "The cluster node name.",
9812 "format" : "pve-node",
9813 "type" : "string"
7aacca6f 9814 },
44660702
DM
9815 "size" : {
9816 "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.",
9817 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
9818 "type" : "string"
56122987
DM
9819 },
9820 "skiplock" : {
9821 "description" : "Ignore locks - only root is allowed to use this option.",
9822 "optional" : 1,
9823 "type" : "boolean"
56122987
DM
9824 },
9825 "vmid" : {
7aacca6f 9826 "description" : "The (unique) ID of the VM.",
56122987 9827 "format" : "pve-vmid",
44660702 9828 "minimum" : 1,
4bd7df8b
DM
9829 "type" : "integer",
9830 "typetext" : "integer (1- N)"
56122987
DM
9831 }
9832 }
9833 },
9834 "permissions" : {
9835 "check" : [
9836 "perm",
9837 "/vms/{vmid}",
9838 [
44660702 9839 "VM.Config.Disk"
56122987
DM
9840 ]
9841 ]
9842 },
7aacca6f 9843 "protected" : 1,
7aacca6f 9844 "proxyto" : "node",
44660702
DM
9845 "returns" : {
9846 "type" : "null"
9847 }
7aacca6f
DM
9848 }
9849 },
44660702
DM
9850 "leaf" : 1,
9851 "path" : "/nodes/{node}/qemu/{vmid}/resize",
9852 "text" : "resize"
9853 },
9854 {
56122987
DM
9855 "children" : [
9856 {
9857 "children" : [
9858 {
56122987 9859 "info" : {
44660702
DM
9860 "GET" : {
9861 "description" : "Get snapshot configuration",
9862 "method" : "GET",
9863 "name" : "get_snapshot_config",
56122987 9864 "parameters" : {
44660702 9865 "additionalProperties" : 0,
56122987 9866 "properties" : {
56122987 9867 "node" : {
44660702 9868 "description" : "The cluster node name.",
56122987 9869 "format" : "pve-node",
44660702 9870 "type" : "string"
7aacca6f
DM
9871 },
9872 "snapname" : {
44660702 9873 "description" : "The name of the snapshot.",
7aacca6f 9874 "format" : "pve-configid",
44660702
DM
9875 "maxLength" : 40,
9876 "type" : "string"
7aacca6f
DM
9877 },
9878 "vmid" : {
44660702 9879 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
9880 "format" : "pve-vmid",
9881 "minimum" : 1,
4bd7df8b
DM
9882 "type" : "integer",
9883 "typetext" : "integer (1- N)"
56122987 9884 }
44660702 9885 }
56122987
DM
9886 },
9887 "permissions" : {
9888 "check" : [
9889 "perm",
9890 "/vms/{vmid}",
9891 [
9892 "VM.Snapshot"
9893 ]
9894 ]
9895 },
44660702 9896 "proxyto" : "node",
56122987 9897 "returns" : {
44660702 9898 "type" : "object"
7aacca6f
DM
9899 }
9900 },
44660702
DM
9901 "PUT" : {
9902 "description" : "Update snapshot metadata.",
9903 "method" : "PUT",
9904 "name" : "update_snapshot_config",
56122987 9905 "parameters" : {
44660702 9906 "additionalProperties" : 0,
56122987 9907 "properties" : {
44660702
DM
9908 "description" : {
9909 "description" : "A textual description or comment.",
9910 "optional" : 1,
9911 "type" : "string"
9912 },
56122987 9913 "node" : {
7aacca6f 9914 "description" : "The cluster node name.",
44660702
DM
9915 "format" : "pve-node",
9916 "type" : "string"
56122987 9917 },
56122987
DM
9918 "snapname" : {
9919 "description" : "The name of the snapshot.",
44660702 9920 "format" : "pve-configid",
7aacca6f 9921 "maxLength" : 40,
44660702 9922 "type" : "string"
7aacca6f
DM
9923 },
9924 "vmid" : {
9925 "description" : "The (unique) ID of the VM.",
44660702 9926 "format" : "pve-vmid",
7aacca6f 9927 "minimum" : 1,
4bd7df8b
DM
9928 "type" : "integer",
9929 "typetext" : "integer (1- N)"
56122987 9930 }
44660702 9931 }
56122987 9932 },
7aacca6f
DM
9933 "permissions" : {
9934 "check" : [
9935 "perm",
9936 "/vms/{vmid}",
9937 [
9938 "VM.Snapshot"
9939 ]
9940 ]
44660702
DM
9941 },
9942 "protected" : 1,
9943 "proxyto" : "node",
9944 "returns" : {
9945 "type" : "null"
7aacca6f 9946 }
56122987
DM
9947 }
9948 },
44660702 9949 "leaf" : 1,
7aacca6f 9950 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/config",
44660702 9951 "text" : "config"
56122987
DM
9952 },
9953 {
56122987
DM
9954 "info" : {
9955 "POST" : {
44660702 9956 "description" : "Rollback VM state to specified snapshot.",
7aacca6f 9957 "method" : "POST",
44660702 9958 "name" : "rollback",
56122987
DM
9959 "parameters" : {
9960 "additionalProperties" : 0,
9961 "properties" : {
44660702
DM
9962 "node" : {
9963 "description" : "The cluster node name.",
9964 "format" : "pve-node",
9965 "type" : "string"
9966 },
56122987 9967 "snapname" : {
44660702 9968 "description" : "The name of the snapshot.",
56122987
DM
9969 "format" : "pve-configid",
9970 "maxLength" : 40,
7aacca6f
DM
9971 "type" : "string"
9972 },
56122987 9973 "vmid" : {
7aacca6f 9974 "description" : "The (unique) ID of the VM.",
44660702 9975 "format" : "pve-vmid",
56122987 9976 "minimum" : 1,
4bd7df8b
DM
9977 "type" : "integer",
9978 "typetext" : "integer (1- N)"
56122987
DM
9979 }
9980 }
9981 },
7aacca6f 9982 "permissions" : {
56122987
DM
9983 "check" : [
9984 "perm",
9985 "/vms/{vmid}",
9986 [
9987 "VM.Snapshot"
9988 ]
9989 ]
9990 },
44660702 9991 "protected" : 1,
7aacca6f 9992 "proxyto" : "node",
44660702
DM
9993 "returns" : {
9994 "description" : "the task ID.",
9995 "type" : "string"
9996 }
56122987
DM
9997 }
9998 },
44660702
DM
9999 "leaf" : 1,
10000 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}/rollback",
7aacca6f 10001 "text" : "rollback"
56122987 10002 }
44660702
DM
10003 ],
10004 "info" : {
10005 "DELETE" : {
10006 "description" : "Delete a VM snapshot.",
10007 "method" : "DELETE",
10008 "name" : "delsnapshot",
10009 "parameters" : {
10010 "additionalProperties" : 0,
10011 "properties" : {
10012 "force" : {
10013 "description" : "For removal from config file, even if removing disk snapshots fails.",
10014 "optional" : 1,
10015 "type" : "boolean"
10016 },
10017 "node" : {
10018 "description" : "The cluster node name.",
10019 "format" : "pve-node",
10020 "type" : "string"
10021 },
10022 "snapname" : {
10023 "description" : "The name of the snapshot.",
10024 "format" : "pve-configid",
10025 "maxLength" : 40,
10026 "type" : "string"
10027 },
10028 "vmid" : {
10029 "description" : "The (unique) ID of the VM.",
10030 "format" : "pve-vmid",
10031 "minimum" : 1,
4bd7df8b
DM
10032 "type" : "integer",
10033 "typetext" : "integer (1- N)"
44660702
DM
10034 }
10035 }
10036 },
10037 "permissions" : {
10038 "check" : [
10039 "perm",
10040 "/vms/{vmid}",
10041 [
10042 "VM.Snapshot"
10043 ]
10044 ]
10045 },
10046 "protected" : 1,
10047 "proxyto" : "node",
10048 "returns" : {
10049 "description" : "the task ID.",
10050 "type" : "string"
10051 }
10052 },
10053 "GET" : {
10054 "description" : "",
10055 "method" : "GET",
10056 "name" : "snapshot_cmd_idx",
10057 "parameters" : {
10058 "additionalProperties" : 0,
10059 "properties" : {
10060 "node" : {
10061 "description" : "The cluster node name.",
10062 "format" : "pve-node",
10063 "type" : "string"
10064 },
10065 "snapname" : {
10066 "description" : "The name of the snapshot.",
10067 "format" : "pve-configid",
10068 "maxLength" : 40,
10069 "type" : "string"
10070 },
10071 "vmid" : {
10072 "description" : "The (unique) ID of the VM.",
10073 "format" : "pve-vmid",
10074 "minimum" : 1,
4bd7df8b
DM
10075 "type" : "integer",
10076 "typetext" : "integer (1- N)"
44660702
DM
10077 }
10078 }
10079 },
10080 "permissions" : {
10081 "user" : "all"
10082 },
10083 "returns" : {
10084 "items" : {
10085 "properties" : {},
10086 "type" : "object"
10087 },
10088 "links" : [
10089 {
10090 "href" : "{cmd}",
10091 "rel" : "child"
10092 }
10093 ],
10094 "type" : "array"
10095 }
10096 }
10097 },
10098 "leaf" : 0,
10099 "path" : "/nodes/{node}/qemu/{vmid}/snapshot/{snapname}",
10100 "text" : "{snapname}"
56122987
DM
10101 }
10102 ],
44660702
DM
10103 "info" : {
10104 "GET" : {
10105 "description" : "List all snapshots.",
10106 "method" : "GET",
10107 "name" : "snapshot_list",
10108 "parameters" : {
10109 "additionalProperties" : 0,
10110 "properties" : {
10111 "node" : {
10112 "description" : "The cluster node name.",
10113 "format" : "pve-node",
10114 "type" : "string"
10115 },
10116 "vmid" : {
10117 "description" : "The (unique) ID of the VM.",
10118 "format" : "pve-vmid",
10119 "minimum" : 1,
4bd7df8b
DM
10120 "type" : "integer",
10121 "typetext" : "integer (1- N)"
44660702
DM
10122 }
10123 }
10124 },
10125 "permissions" : {
10126 "check" : [
10127 "perm",
10128 "/vms/{vmid}",
10129 [
10130 "VM.Audit"
10131 ]
10132 ]
10133 },
10134 "protected" : 1,
10135 "proxyto" : "node",
10136 "returns" : {
10137 "items" : {
10138 "properties" : {},
10139 "type" : "object"
10140 },
10141 "links" : [
10142 {
10143 "href" : "{name}",
10144 "rel" : "child"
10145 }
10146 ],
10147 "type" : "array"
10148 }
10149 },
10150 "POST" : {
10151 "description" : "Snapshot a VM.",
10152 "method" : "POST",
10153 "name" : "snapshot",
10154 "parameters" : {
10155 "additionalProperties" : 0,
10156 "properties" : {
10157 "description" : {
10158 "description" : "A textual description or comment.",
10159 "optional" : 1,
10160 "type" : "string"
10161 },
10162 "node" : {
10163 "description" : "The cluster node name.",
10164 "format" : "pve-node",
10165 "type" : "string"
10166 },
10167 "snapname" : {
10168 "description" : "The name of the snapshot.",
10169 "format" : "pve-configid",
10170 "maxLength" : 40,
10171 "type" : "string"
10172 },
10173 "vmid" : {
10174 "description" : "The (unique) ID of the VM.",
10175 "format" : "pve-vmid",
10176 "minimum" : 1,
4bd7df8b
DM
10177 "type" : "integer",
10178 "typetext" : "integer (1- N)"
44660702
DM
10179 },
10180 "vmstate" : {
10181 "description" : "Save the vmstate",
10182 "optional" : 1,
10183 "type" : "boolean"
10184 }
10185 }
10186 },
10187 "permissions" : {
10188 "check" : [
10189 "perm",
10190 "/vms/{vmid}",
10191 [
10192 "VM.Snapshot"
10193 ]
10194 ]
10195 },
10196 "protected" : 1,
10197 "proxyto" : "node",
10198 "returns" : {
10199 "description" : "the task ID.",
10200 "type" : "string"
10201 }
10202 }
10203 },
10204 "leaf" : 0,
10205 "path" : "/nodes/{node}/qemu/{vmid}/snapshot",
7aacca6f 10206 "text" : "snapshot"
56122987
DM
10207 },
10208 {
56122987
DM
10209 "info" : {
10210 "POST" : {
44660702
DM
10211 "description" : "Create a Template.",
10212 "method" : "POST",
56122987 10213 "name" : "template",
56122987 10214 "parameters" : {
7aacca6f 10215 "additionalProperties" : 0,
56122987 10216 "properties" : {
56122987 10217 "disk" : {
56122987
DM
10218 "description" : "If you want to convert only 1 disk to base image.",
10219 "enum" : [
10220 "ide0",
10221 "ide1",
10222 "ide2",
10223 "ide3",
10224 "scsi0",
10225 "scsi1",
10226 "scsi2",
10227 "scsi3",
10228 "scsi4",
10229 "scsi5",
10230 "scsi6",
10231 "scsi7",
10232 "scsi8",
10233 "scsi9",
10234 "scsi10",
10235 "scsi11",
10236 "scsi12",
10237 "scsi13",
10238 "virtio0",
10239 "virtio1",
10240 "virtio2",
10241 "virtio3",
10242 "virtio4",
10243 "virtio5",
10244 "virtio6",
10245 "virtio7",
10246 "virtio8",
10247 "virtio9",
10248 "virtio10",
10249 "virtio11",
10250 "virtio12",
10251 "virtio13",
10252 "virtio14",
10253 "virtio15",
10254 "sata0",
10255 "sata1",
10256 "sata2",
10257 "sata3",
10258 "sata4",
10259 "sata5"
10260 ],
7aacca6f 10261 "optional" : 1,
56122987
DM
10262 "type" : "string"
10263 },
44660702
DM
10264 "node" : {
10265 "description" : "The cluster node name.",
10266 "format" : "pve-node",
10267 "type" : "string"
10268 },
10269 "vmid" : {
10270 "description" : "The (unique) ID of the VM.",
7aacca6f 10271 "format" : "pve-vmid",
44660702 10272 "minimum" : 1,
4bd7df8b
DM
10273 "type" : "integer",
10274 "typetext" : "integer (1- N)"
56122987 10275 }
7aacca6f 10276 }
56122987 10277 },
7aacca6f
DM
10278 "permissions" : {
10279 "check" : [
10280 "perm",
10281 "/vms/{vmid}",
10282 [
10283 "VM.Allocate"
10284 ]
10285 ],
10286 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
10287 },
44660702 10288 "protected" : 1,
7aacca6f 10289 "proxyto" : "node",
7aacca6f
DM
10290 "returns" : {
10291 "type" : "null"
10292 }
56122987
DM
10293 }
10294 },
44660702 10295 "leaf" : 1,
7aacca6f 10296 "path" : "/nodes/{node}/qemu/{vmid}/template",
44660702 10297 "text" : "template"
56122987
DM
10298 }
10299 ],
7aacca6f 10300 "info" : {
44660702
DM
10301 "DELETE" : {
10302 "description" : "Destroy the vm (also delete all used/owned volumes).",
10303 "method" : "DELETE",
10304 "name" : "destroy_vm",
7aacca6f 10305 "parameters" : {
44660702 10306 "additionalProperties" : 0,
7aacca6f
DM
10307 "properties" : {
10308 "node" : {
44660702 10309 "description" : "The cluster node name.",
7aacca6f 10310 "format" : "pve-node",
44660702
DM
10311 "type" : "string"
10312 },
10313 "skiplock" : {
10314 "description" : "Ignore locks - only root is allowed to use this option.",
10315 "optional" : 1,
10316 "type" : "boolean"
7aacca6f
DM
10317 },
10318 "vmid" : {
44660702 10319 "description" : "The (unique) ID of the VM.",
7aacca6f 10320 "format" : "pve-vmid",
44660702 10321 "minimum" : 1,
4bd7df8b
DM
10322 "type" : "integer",
10323 "typetext" : "integer (1- N)"
7aacca6f 10324 }
44660702 10325 }
7aacca6f 10326 },
7aacca6f
DM
10327 "permissions" : {
10328 "check" : [
10329 "perm",
10330 "/vms/{vmid}",
10331 [
10332 "VM.Allocate"
10333 ]
10334 ]
10335 },
44660702
DM
10336 "protected" : 1,
10337 "proxyto" : "node",
7aacca6f
DM
10338 "returns" : {
10339 "type" : "string"
44660702
DM
10340 }
10341 },
10342 "GET" : {
10343 "description" : "Directory index",
10344 "method" : "GET",
10345 "name" : "vmdiridx",
7aacca6f 10346 "parameters" : {
44660702 10347 "additionalProperties" : 0,
7aacca6f 10348 "properties" : {
7aacca6f 10349 "node" : {
7aacca6f 10350 "description" : "The cluster node name.",
44660702
DM
10351 "format" : "pve-node",
10352 "type" : "string"
10353 },
10354 "vmid" : {
10355 "description" : "The (unique) ID of the VM.",
10356 "format" : "pve-vmid",
10357 "minimum" : 1,
4bd7df8b
DM
10358 "type" : "integer",
10359 "typetext" : "integer (1- N)"
7aacca6f 10360 }
44660702 10361 }
7aacca6f 10362 },
44660702
DM
10363 "permissions" : {
10364 "user" : "all"
10365 },
10366 "proxyto" : "node",
10367 "returns" : {
10368 "items" : {
10369 "properties" : {
10370 "subdir" : {
10371 "type" : "string"
10372 }
10373 },
10374 "type" : "object"
10375 },
10376 "links" : [
10377 {
10378 "href" : "{subdir}",
10379 "rel" : "child"
10380 }
10381 ],
10382 "type" : "array"
10383 }
7aacca6f 10384 }
44660702
DM
10385 },
10386 "leaf" : 0,
10387 "path" : "/nodes/{node}/qemu/{vmid}",
10388 "text" : "{vmid}"
56122987
DM
10389 }
10390 ],
10391 "info" : {
44660702
DM
10392 "GET" : {
10393 "description" : "Virtual machine index (per node).",
10394 "method" : "GET",
10395 "name" : "vmlist",
56122987 10396 "parameters" : {
44660702 10397 "additionalProperties" : 0,
56122987 10398 "properties" : {
44660702
DM
10399 "full" : {
10400 "description" : "Determine the full status of active VMs.",
56122987 10401 "optional" : 1,
44660702 10402 "type" : "boolean"
56122987 10403 },
44660702
DM
10404 "node" : {
10405 "description" : "The cluster node name.",
10406 "format" : "pve-node",
7aacca6f 10407 "type" : "string"
44660702
DM
10408 }
10409 }
10410 },
10411 "permissions" : {
10412 "description" : "Only list VMs where you have VM.Audit permissons on /vms/<vmid>.",
10413 "user" : "all"
10414 },
10415 "protected" : 1,
10416 "proxyto" : "node",
10417 "returns" : {
10418 "items" : {
10419 "properties" : {},
10420 "type" : "object"
10421 },
10422 "links" : [
10423 {
10424 "href" : "{vmid}",
10425 "rel" : "child"
10426 }
10427 ],
10428 "type" : "array"
10429 }
10430 },
10431 "POST" : {
10432 "description" : "Create or restore a virtual machine.",
10433 "method" : "POST",
10434 "name" : "create_vm",
10435 "parameters" : {
10436 "additionalProperties" : 0,
10437 "properties" : {
7aacca6f 10438 "acpi" : {
7aacca6f 10439 "default" : 1,
44660702 10440 "description" : "Enable/disable ACPI.",
56122987 10441 "optional" : 1,
7aacca6f 10442 "type" : "boolean"
56122987 10443 },
44660702
DM
10444 "agent" : {
10445 "default" : 0,
10446 "description" : "Enable/disable Qemu GuestAgent.",
7aacca6f 10447 "optional" : 1,
44660702 10448 "type" : "boolean"
56122987 10449 },
44660702
DM
10450 "archive" : {
10451 "description" : "The backup file.",
10452 "maxLength" : 255,
56122987 10453 "optional" : 1,
44660702 10454 "type" : "string"
56122987 10455 },
44660702 10456 "args" : {
c2993fe5 10457 "description" : "Arbitrary arguments passed to kvm.",
56122987 10458 "optional" : 1,
c2993fe5
DM
10459 "type" : "string",
10460 "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 10461 },
44660702 10462 "autostart" : {
7aacca6f 10463 "default" : 0,
44660702
DM
10464 "description" : "Automatic restart after crash (currently ignored).",
10465 "optional" : 1,
10466 "type" : "boolean"
7aacca6f 10467 },
44660702
DM
10468 "balloon" : {
10469 "description" : "Amount of target RAM for the VM in MB. Using zero disables the ballon driver.",
10470 "minimum" : 0,
56122987 10471 "optional" : 1,
4bd7df8b
DM
10472 "type" : "integer",
10473 "typetext" : "integer (0- N)"
56122987 10474 },
44660702
DM
10475 "bios" : {
10476 "default" : "seabios",
10477 "description" : "Select BIOS implementation.",
10478 "enum" : [
10479 "seabios",
10480 "ovmf"
10481 ],
56122987 10482 "optional" : 1,
44660702 10483 "type" : "string"
56122987 10484 },
44660702
DM
10485 "boot" : {
10486 "default" : "cdn",
10487 "description" : "Boot on floppy (a), hard disk (c), CD-ROM (d), or network (n).",
56122987 10488 "optional" : 1,
44660702
DM
10489 "pattern" : "[acdn]{1,4}",
10490 "type" : "string"
56122987 10491 },
7aacca6f
DM
10492 "bootdisk" : {
10493 "description" : "Enable booting from specified disk.",
44660702
DM
10494 "format" : "pve-qm-bootdisk",
10495 "optional" : 1,
7aacca6f 10496 "pattern" : "(ide|sata|scsi|virtio)\\d+",
44660702
DM
10497 "type" : "string"
10498 },
10499 "cdrom" : {
10500 "description" : "This is an alias for option -ide2",
10501 "format" : "pve-qm-drive",
56122987 10502 "optional" : 1,
44660702
DM
10503 "type" : "string",
10504 "typetext" : "volume"
56122987 10505 },
44660702
DM
10506 "cores" : {
10507 "default" : 1,
10508 "description" : "The number of cores per socket.",
7aacca6f 10509 "minimum" : 1,
44660702 10510 "optional" : 1,
4bd7df8b
DM
10511 "type" : "integer",
10512 "typetext" : "integer (1- N)"
7aacca6f 10513 },
44660702
DM
10514 "cpu" : {
10515 "description" : "Emulated CPU type.",
10516 "format" : {
10517 "cputype" : {
10518 "default" : "kvm64",
10519 "default_key" : 1,
10520 "description" : "Emulated CPU type.",
10521 "enum" : [
10522 "486",
10523 "athlon",
f004f5b9
DM
10524 "Broadwell",
10525 "Broadwell-noTSX",
10526 "Conroe",
44660702 10527 "core2duo",
f004f5b9
DM
10528 "coreduo",
10529 "Haswell",
10530 "Haswell-noTSX",
10531 "host",
10532 "IvyBridge",
44660702
DM
10533 "kvm32",
10534 "kvm64",
44660702 10535 "Nehalem",
44660702
DM
10536 "Opteron_G1",
10537 "Opteron_G2",
10538 "Opteron_G3",
10539 "Opteron_G4",
10540 "Opteron_G5",
f004f5b9
DM
10541 "Penryn",
10542 "pentium",
10543 "pentium2",
10544 "pentium3",
10545 "phenom",
10546 "qemu32",
10547 "qemu64",
10548 "SandyBridge",
10549 "Westmere"
44660702
DM
10550 ],
10551 "format_description" : "cputype",
10552 "type" : "string"
10553 },
10554 "hidden" : {
10555 "default" : 0,
10556 "description" : "Do not identify as a KVM virtual machine.",
10557 "optional" : 1,
10558 "type" : "boolean"
10559 }
10560 },
56122987 10561 "optional" : 1,
4bd7df8b
DM
10562 "type" : "string",
10563 "typetext" : "[cputype=]<cputype> [,hidden=<1|0>]"
56122987 10564 },
44660702 10565 "cpulimit" : {
7aacca6f 10566 "default" : 0,
c2993fe5 10567 "description" : "Limit of CPU usage.",
44660702
DM
10568 "maximum" : 128,
10569 "minimum" : 0,
7aacca6f 10570 "optional" : 1,
c2993fe5 10571 "type" : "number",
4bd7df8b 10572 "typetext" : "number (0-128)",
c2993fe5 10573 "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
10574 },
10575 "cpuunits" : {
7aacca6f 10576 "default" : 1000,
c2993fe5 10577 "description" : "CPU weight for a VM.",
7aacca6f 10578 "maximum" : 500000,
44660702
DM
10579 "minimum" : 0,
10580 "optional" : 1,
c2993fe5 10581 "type" : "integer",
4bd7df8b 10582 "typetext" : "integer (0-500000)",
c2993fe5 10583 "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
10584 },
10585 "description" : {
10586 "description" : "Description for the VM. Only used on the configuration web interface. This is saved as comment inside the configuration file.",
56122987 10587 "optional" : 1,
44660702
DM
10588 "type" : "string"
10589 },
10590 "force" : {
10591 "description" : "Allow to overwrite existing VM.",
10592 "optional" : 1,
10593 "requires" : "archive",
10594 "type" : "boolean"
10595 },
10596 "freeze" : {
10597 "description" : "Freeze CPU at startup (use 'c' monitor command to start execution).",
10598 "optional" : 1,
10599 "type" : "boolean"
10600 },
10601 "hostpci[n]" : {
c2993fe5 10602 "description" : "Map host PCI devices into guest.",
44660702
DM
10603 "format" : "pve-qm-hostpci",
10604 "optional" : 1,
57b78691 10605 "type" : "string",
4bd7df8b 10606 "typetext" : "[host=]<HOSTPCIID[;HOSTPCIID2...]> [,pcie=<1|0>] [,rombar=<1|0>] [,x-vga=<1|0>]",
57b78691 10607 "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
10608 },
10609 "hotplug" : {
10610 "default" : "network,disk,usb",
10611 "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'.",
10612 "format" : "pve-hotplug-features",
10613 "optional" : 1,
10614 "type" : "string"
7aacca6f 10615 },
4bd7df8b
DM
10616 "hugepages" : {
10617 "description" : "Enable/disable hugepages memory.",
10618 "enum" : [
10619 "any",
10620 "2",
10621 "1024"
10622 ],
10623 "optional" : 1,
10624 "type" : "string"
10625 },
7aacca6f 10626 "ide[n]" : {
44660702 10627 "description" : "Use volume as IDE hard disk or CD-ROM (n is 0 to 3).",
56122987 10628 "format" : {
44660702
DM
10629 "aio" : {
10630 "description" : "AIO type to use.",
10631 "enum" : [
10632 "native",
10633 "threads"
10634 ],
44660702
DM
10635 "optional" : 1,
10636 "type" : "string"
10637 },
10638 "backup" : {
10639 "description" : "Whether the drive should be included when making backups.",
44660702
DM
10640 "optional" : 1,
10641 "type" : "boolean"
10642 },
10643 "bps" : {
10644 "description" : "Maximum r/w speed speed in bytes per second.",
7aacca6f 10645 "format_description" : "bps",
56122987 10646 "optional" : 1,
44660702 10647 "type" : "integer"
56122987 10648 },
44660702
DM
10649 "bps_rd" : {
10650 "description" : "Maximum read speed speed in bytes per second.",
10651 "format_description" : "bps",
56122987 10652 "optional" : 1,
44660702 10653 "type" : "integer"
56122987 10654 },
44660702
DM
10655 "bps_wr" : {
10656 "description" : "Maximum write speed speed in bytes per second.",
10657 "format_description" : "bps",
56122987 10658 "optional" : 1,
44660702 10659 "type" : "integer"
56122987 10660 },
44660702
DM
10661 "cache" : {
10662 "description" : "The drive's cache mode",
56122987 10663 "enum" : [
7aacca6f 10664 "none",
44660702
DM
10665 "writethrough",
10666 "writeback",
10667 "unsafe",
10668 "directsync"
56122987 10669 ],
56122987 10670 "optional" : 1,
44660702 10671 "type" : "string"
56122987 10672 },
44660702
DM
10673 "cyls" : {
10674 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
10675 "optional" : 1,
10676 "type" : "integer"
7aacca6f 10677 },
44660702
DM
10678 "detect_zeroes" : {
10679 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 10680 "optional" : 1,
44660702 10681 "type" : "boolean"
56122987 10682 },
44660702
DM
10683 "discard" : {
10684 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
10685 "enum" : [
10686 "ignore",
10687 "on"
10688 ],
56122987 10689 "optional" : 1,
44660702 10690 "type" : "string"
56122987 10691 },
7aacca6f 10692 "file" : {
44660702 10693 "default_key" : 1,
7aacca6f 10694 "description" : "The drive's backing volume.",
7aacca6f
DM
10695 "format" : "pve-volume-id-or-qm-path",
10696 "format_description" : "volume",
7aacca6f 10697 "type" : "string"
56122987 10698 },
44660702
DM
10699 "format" : {
10700 "description" : "The drive's backing file's data format.",
56122987 10701 "enum" : [
44660702
DM
10702 "raw",
10703 "cow",
10704 "qcow",
10705 "qed",
10706 "qcow2",
10707 "vmdk",
10708 "cloop"
7aacca6f 10709 ],
f004f5b9 10710 "format_description" : "image format",
7aacca6f
DM
10711 "optional" : 1,
10712 "type" : "string"
56122987 10713 },
44660702
DM
10714 "heads" : {
10715 "description" : "Force the drive's physical geometry to have a specific head count.",
56122987 10716 "optional" : 1,
44660702 10717 "type" : "integer"
56122987 10718 },
44660702
DM
10719 "iops" : {
10720 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 10721 "format_description" : "iops",
56122987 10722 "optional" : 1,
44660702 10723 "type" : "integer"
56122987 10724 },
44660702
DM
10725 "iops_max" : {
10726 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
10727 "format_description" : "iops",
56122987 10728 "optional" : 1,
44660702 10729 "type" : "integer"
56122987 10730 },
7aacca6f 10731 "iops_rd" : {
7aacca6f 10732 "description" : "Maximum read I/O speed in operations per second.",
44660702
DM
10733 "format_description" : "iops",
10734 "optional" : 1,
10735 "type" : "integer"
7aacca6f 10736 },
44660702
DM
10737 "iops_rd_max" : {
10738 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
10739 "format_description" : "iops",
56122987 10740 "optional" : 1,
44660702 10741 "type" : "integer"
56122987 10742 },
44660702
DM
10743 "iops_wr" : {
10744 "description" : "Maximum write I/O speed in operations per second.",
10745 "format_description" : "iops",
56122987 10746 "optional" : 1,
44660702 10747 "type" : "integer"
7aacca6f 10748 },
44660702
DM
10749 "iops_wr_max" : {
10750 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
10751 "format_description" : "iops",
7aacca6f 10752 "optional" : 1,
44660702 10753 "type" : "integer"
56122987 10754 },
44660702
DM
10755 "mbps" : {
10756 "description" : "Maximum r/w speed speed in megabytes per second.",
10757 "format_description" : "mbps",
7aacca6f 10758 "optional" : 1,
44660702 10759 "type" : "number"
56122987 10760 },
44660702
DM
10761 "mbps_max" : {
10762 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
7aacca6f 10763 "format_description" : "mbps",
56122987 10764 "optional" : 1,
44660702 10765 "type" : "number"
56122987 10766 },
44660702
DM
10767 "mbps_rd" : {
10768 "description" : "Maximum read speed speed in megabytes per second.",
10769 "format_description" : "mbps",
7aacca6f 10770 "optional" : 1,
44660702 10771 "type" : "number"
7aacca6f 10772 },
44660702
DM
10773 "mbps_rd_max" : {
10774 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
10775 "format_description" : "mbps",
56122987 10776 "optional" : 1,
44660702 10777 "type" : "number"
56122987 10778 },
44660702
DM
10779 "mbps_wr" : {
10780 "description" : "Maximum write speed speed in megabytes per second.",
10781 "format_description" : "mbps",
7aacca6f 10782 "optional" : 1,
44660702 10783 "type" : "number"
56122987 10784 },
44660702
DM
10785 "mbps_wr_max" : {
10786 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
10787 "format_description" : "mbps",
56122987 10788 "optional" : 1,
44660702 10789 "type" : "number"
7aacca6f
DM
10790 },
10791 "media" : {
44660702
DM
10792 "default" : "disk",
10793 "description" : "The drive's media type.",
56122987 10794 "enum" : [
7aacca6f
DM
10795 "cdrom",
10796 "disk"
56122987 10797 ],
56122987 10798 "optional" : 1,
44660702 10799 "type" : "string"
56122987 10800 },
44660702
DM
10801 "model" : {
10802 "description" : "The drive's reported model name, url-encoded, up to 40 bytes long.",
10803 "format" : "urlencoded",
10804 "format_description" : "model",
10805 "maxLength" : 120,
56122987 10806 "optional" : 1,
44660702 10807 "type" : "string"
56122987 10808 },
7aacca6f 10809 "rerror" : {
7aacca6f
DM
10810 "description" : "Read error action.",
10811 "enum" : [
10812 "ignore",
10813 "report",
10814 "stop"
44660702 10815 ],
44660702
DM
10816 "optional" : 1,
10817 "type" : "string"
56122987 10818 },
44660702
DM
10819 "secs" : {
10820 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 10821 "optional" : 1,
44660702
DM
10822 "type" : "integer"
10823 },
10824 "serial" : {
10825 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
10826 "format" : "urlencoded",
10827 "format_description" : "serial",
10828 "maxLength" : 60,
10829 "optional" : 1,
10830 "type" : "string"
10831 },
10832 "size" : {
10833 "description" : "Disk size. This is purely informational and has no effect.",
10834 "format" : "disk-size",
f004f5b9 10835 "format_description" : "DiskSize",
44660702
DM
10836 "optional" : 1,
10837 "type" : "string"
7aacca6f
DM
10838 },
10839 "snapshot" : {
44660702 10840 "description" : "Whether the drive should be included when making snapshots.",
7aacca6f 10841 "optional" : 1,
44660702 10842 "type" : "boolean"
7aacca6f 10843 },
44660702
DM
10844 "trans" : {
10845 "description" : "Force disk geometry bios translation mode.",
10846 "enum" : [
10847 "none",
10848 "lba",
10849 "auto"
10850 ],
7aacca6f 10851 "optional" : 1,
44660702
DM
10852 "type" : "string"
10853 },
10854 "volume" : {
10855 "alias" : "file"
10856 },
10857 "werror" : {
10858 "description" : "Write error action.",
10859 "enum" : [
10860 "enospc",
10861 "ignore",
10862 "report",
10863 "stop"
10864 ],
44660702
DM
10865 "optional" : 1,
10866 "type" : "string"
56122987
DM
10867 }
10868 },
56122987 10869 "optional" : 1,
4bd7df8b
DM
10870 "type" : "string",
10871 "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 10872 },
56122987 10873 "keyboard" : {
44660702 10874 "default" : "en-us",
c2993fe5 10875 "description" : "Keybord layout for vnc server. Default is read from the '/etc/pve/datacenter.conf' configuration file.",
56122987 10876 "enum" : [
44660702
DM
10877 "de",
10878 "de-ch",
7aacca6f 10879 "da",
56122987 10880 "en-gb",
44660702
DM
10881 "en-us",
10882 "es",
10883 "fi",
10884 "fr",
10885 "fr-be",
10886 "fr-ca",
10887 "fr-ch",
10888 "hu",
7aacca6f 10889 "is",
44660702
DM
10890 "it",
10891 "ja",
10892 "lt",
56122987 10893 "mk",
7aacca6f 10894 "nl",
56122987 10895 "no",
44660702 10896 "pl",
7aacca6f 10897 "pt",
44660702
DM
10898 "pt-br",
10899 "sv",
10900 "sl",
10901 "tr"
56122987 10902 ],
44660702
DM
10903 "optional" : 1,
10904 "type" : "string"
56122987 10905 },
44660702
DM
10906 "kvm" : {
10907 "default" : 1,
10908 "description" : "Enable/disable KVM hardware virtualization.",
7aacca6f 10909 "optional" : 1,
44660702 10910 "type" : "boolean"
7aacca6f 10911 },
44660702
DM
10912 "localtime" : {
10913 "description" : "Set the real time clock to local time. This is enabled by default if ostype indicates a Microsoft OS.",
56122987 10914 "optional" : 1,
44660702
DM
10915 "type" : "boolean"
10916 },
10917 "lock" : {
10918 "description" : "Lock/unlock the VM.",
7aacca6f
DM
10919 "enum" : [
10920 "migrate",
10921 "backup",
10922 "snapshot",
10923 "rollback"
10924 ],
44660702
DM
10925 "optional" : 1,
10926 "type" : "string"
56122987 10927 },
44660702
DM
10928 "machine" : {
10929 "description" : "Specific the Qemu machine type.",
10930 "maxLength" : 40,
10931 "optional" : 1,
10932 "pattern" : "(pc|pc(-i440fx)?-\\d+\\.\\d+(\\.pxe)?|q35|pc-q35-\\d+\\.\\d+(\\.pxe)?)",
10933 "type" : "string"
10934 },
10935 "memory" : {
10936 "default" : 512,
10937 "description" : "Amount of RAM for the VM in MB. This is the maximum available memory when you use the balloon device.",
10938 "minimum" : 16,
10939 "optional" : 1,
4bd7df8b
DM
10940 "type" : "integer",
10941 "typetext" : "integer (16- N)"
44660702
DM
10942 },
10943 "migrate_downtime" : {
10944 "default" : 0.1,
10945 "description" : "Set maximum tolerated downtime (in seconds) for migrations.",
10946 "minimum" : 0,
10947 "optional" : 1,
4bd7df8b
DM
10948 "type" : "number",
10949 "typetext" : "number (0- N)"
44660702
DM
10950 },
10951 "migrate_speed" : {
56122987 10952 "default" : 0,
44660702
DM
10953 "description" : "Set maximum speed (in MB/s) for migrations. Value 0 is no limit.",
10954 "minimum" : 0,
56122987 10955 "optional" : 1,
4bd7df8b
DM
10956 "type" : "integer",
10957 "typetext" : "integer (0- N)"
56122987 10958 },
44660702
DM
10959 "name" : {
10960 "description" : "Set a name for the VM. Only used on the configuration web interface.",
10961 "format" : "dns-name",
10962 "optional" : 1,
10963 "type" : "string"
10964 },
10965 "net[n]" : {
c2993fe5 10966 "description" : "Specify network devices.",
f004f5b9
DM
10967 "format" : {
10968 "bridge" : {
c2993fe5 10969 "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
10970 "format_description" : "bridge",
10971 "optional" : 1,
10972 "type" : "string"
10973 },
10974 "e1000" : {
10975 "alias" : "macaddr",
10976 "keyAlias" : "model"
10977 },
10978 "e1000-82540em" : {
10979 "alias" : "macaddr",
10980 "keyAlias" : "model"
10981 },
10982 "e1000-82544gc" : {
10983 "alias" : "macaddr",
10984 "keyAlias" : "model"
10985 },
10986 "e1000-82545em" : {
10987 "alias" : "macaddr",
10988 "keyAlias" : "model"
10989 },
10990 "firewall" : {
10991 "description" : "Whether this interface should be protected by the firewall.",
10992 "optional" : 1,
10993 "type" : "boolean"
10994 },
10995 "i82551" : {
10996 "alias" : "macaddr",
10997 "keyAlias" : "model"
10998 },
10999 "i82557b" : {
11000 "alias" : "macaddr",
11001 "keyAlias" : "model"
11002 },
11003 "i82559er" : {
11004 "alias" : "macaddr",
11005 "keyAlias" : "model"
11006 },
11007 "link_down" : {
c2993fe5 11008 "description" : "Whether this interface should be disconnected (like pulling the plug).",
f004f5b9
DM
11009 "optional" : 1,
11010 "type" : "boolean"
11011 },
11012 "macaddr" : {
c2993fe5 11013 "description" : "MAC address. That address must be unique withing your network. This is automatically generated if not specified.",
f004f5b9 11014 "format_description" : "XX:XX:XX:XX:XX:XX",
f004f5b9
DM
11015 "optional" : 1,
11016 "pattern" : "(?^i:[0-9a-f]{2}(?::[0-9a-f]{2}){5})",
11017 "type" : "string"
11018 },
11019 "model" : {
11020 "default_key" : 1,
c2993fe5 11021 "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
11022 "enum" : [
11023 "rtl8139",
11024 "ne2k_pci",
11025 "e1000",
11026 "pcnet",
11027 "virtio",
11028 "ne2k_isa",
11029 "i82551",
11030 "i82557b",
11031 "i82559er",
11032 "vmxnet3",
11033 "e1000-82540em",
11034 "e1000-82544gc",
11035 "e1000-82545em"
11036 ],
11037 "format_description" : "model",
11038 "type" : "string"
11039 },
11040 "ne2k_isa" : {
11041 "alias" : "macaddr",
11042 "keyAlias" : "model"
11043 },
11044 "ne2k_pci" : {
11045 "alias" : "macaddr",
11046 "keyAlias" : "model"
11047 },
11048 "pcnet" : {
11049 "alias" : "macaddr",
11050 "keyAlias" : "model"
11051 },
11052 "queues" : {
11053 "description" : "Number of packet queues to be used on the device.",
11054 "maximum" : 16,
11055 "minimum" : 0,
11056 "optional" : 1,
11057 "type" : "integer"
11058 },
11059 "rate" : {
c2993fe5 11060 "description" : "Rate limit in mbps (megabytes per second) as floating point number.",
f004f5b9
DM
11061 "minimum" : 0,
11062 "optional" : 1,
11063 "type" : "number"
11064 },
11065 "rtl8139" : {
11066 "alias" : "macaddr",
11067 "keyAlias" : "model"
11068 },
11069 "tag" : {
11070 "description" : "VLAN tag to apply to packets on this interface.",
11071 "maximum" : 4094,
c2993fe5 11072 "minimum" : 1,
f004f5b9
DM
11073 "optional" : 1,
11074 "type" : "integer"
11075 },
11076 "trunks" : {
11077 "description" : "VLAN trunks to pass through this interface.",
11078 "format_description" : "vlanid[;vlanid...]",
11079 "optional" : 1,
11080 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
11081 "type" : "string"
11082 },
11083 "virtio" : {
11084 "alias" : "macaddr",
11085 "keyAlias" : "model"
11086 },
11087 "vmxnet3" : {
11088 "alias" : "macaddr",
11089 "keyAlias" : "model"
11090 }
11091 },
44660702 11092 "optional" : 1,
4bd7df8b
DM
11093 "type" : "string",
11094 "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
11095 },
11096 "node" : {
11097 "description" : "The cluster node name.",
11098 "format" : "pve-node",
11099 "type" : "string"
11100 },
11101 "numa" : {
7aacca6f 11102 "default" : 0,
44660702
DM
11103 "description" : "Enable/disable NUMA.",
11104 "optional" : 1,
11105 "type" : "boolean"
56122987 11106 },
7aacca6f 11107 "numa[n]" : {
c2993fe5 11108 "description" : "NUMA topology.",
7aacca6f 11109 "format" : {
44660702 11110 "cpus" : {
c2993fe5 11111 "description" : "CPUs accessing this NUMA node.",
44660702
DM
11112 "format_description" : "id[-id];...",
11113 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
11114 "type" : "string"
11115 },
7aacca6f 11116 "hostnodes" : {
c2993fe5 11117 "description" : "Host NUMA nodes to use.",
44660702 11118 "format_description" : "id[-id];...",
7aacca6f 11119 "optional" : 1,
44660702
DM
11120 "pattern" : "(?^:\\d+(?:-\\d+)?(?:;\\d+(?:-\\d+)?)*)",
11121 "type" : "string"
7aacca6f 11122 },
44660702 11123 "memory" : {
c2993fe5 11124 "description" : "Amount of memory this NUMA node provides.",
44660702
DM
11125 "optional" : 1,
11126 "type" : "number"
7aacca6f
DM
11127 },
11128 "policy" : {
c2993fe5 11129 "description" : "NUMA allocation policy.",
7aacca6f
DM
11130 "enum" : [
11131 "preferred",
11132 "bind",
11133 "interleave"
11134 ],
7aacca6f 11135 "optional" : 1,
44660702 11136 "type" : "string"
7aacca6f
DM
11137 }
11138 },
56122987 11139 "optional" : 1,
4bd7df8b
DM
11140 "type" : "string",
11141 "typetext" : "cpus=<id[-id];...> [,hostnodes=<id[-id];...>] [,memory=<number>] [,policy=<preferred|bind|interleave>]"
56122987 11142 },
44660702
DM
11143 "onboot" : {
11144 "default" : 0,
11145 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 11146 "optional" : 1,
44660702 11147 "type" : "boolean"
56122987
DM
11148 },
11149 "ostype" : {
c2993fe5 11150 "description" : "Specify guest operating system.",
56122987
DM
11151 "enum" : [
11152 "other",
11153 "wxp",
11154 "w2k",
11155 "w2k3",
11156 "w2k8",
11157 "wvista",
11158 "win7",
11159 "win8",
11160 "l24",
11161 "l26",
11162 "solaris"
44660702 11163 ],
56122987 11164 "optional" : 1,
c2993fe5
DM
11165 "type" : "string",
11166 "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 11167 },
44660702 11168 "parallel[n]" : {
c2993fe5 11169 "description" : "Map host parallel devices (n is 0 to 2).",
56122987 11170 "optional" : 1,
44660702 11171 "pattern" : "/dev/parport\\d+|/dev/usb/lp\\d+",
c2993fe5
DM
11172 "type" : "string",
11173 "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 11174 },
44660702
DM
11175 "pool" : {
11176 "description" : "Add the VM to the specified pool.",
11177 "format" : "pve-poolid",
56122987 11178 "optional" : 1,
44660702 11179 "type" : "string"
56122987 11180 },
44660702
DM
11181 "protection" : {
11182 "default" : 0,
c2993fe5 11183 "description" : "Sets the protection flag of the VM. This will disable the remove VM and remove disk operations.",
56122987 11184 "optional" : 1,
44660702 11185 "type" : "boolean"
56122987 11186 },
44660702 11187 "reboot" : {
7aacca6f 11188 "default" : 1,
44660702
DM
11189 "description" : "Allow reboot. If set to '0' the VM exit on reboot.",
11190 "optional" : 1,
11191 "type" : "boolean"
56122987 11192 },
56122987 11193 "sata[n]" : {
44660702 11194 "description" : "Use volume as SATA hard disk or CD-ROM (n is 0 to 5).",
56122987 11195 "format" : {
7aacca6f 11196 "aio" : {
44660702 11197 "description" : "AIO type to use.",
56122987 11198 "enum" : [
7aacca6f
DM
11199 "native",
11200 "threads"
56122987 11201 ],
7aacca6f 11202 "optional" : 1,
44660702 11203 "type" : "string"
7aacca6f
DM
11204 },
11205 "backup" : {
7aacca6f 11206 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11207 "optional" : 1,
44660702 11208 "type" : "boolean"
56122987 11209 },
44660702
DM
11210 "bps" : {
11211 "description" : "Maximum r/w speed speed in bytes per second.",
11212 "format_description" : "bps",
7aacca6f 11213 "optional" : 1,
44660702 11214 "type" : "integer"
56122987 11215 },
44660702
DM
11216 "bps_rd" : {
11217 "description" : "Maximum read speed speed in bytes per second.",
11218 "format_description" : "bps",
56122987 11219 "optional" : 1,
44660702 11220 "type" : "integer"
7aacca6f 11221 },
44660702
DM
11222 "bps_wr" : {
11223 "description" : "Maximum write speed speed in bytes per second.",
11224 "format_description" : "bps",
56122987 11225 "optional" : 1,
44660702 11226 "type" : "integer"
56122987 11227 },
7aacca6f 11228 "cache" : {
7aacca6f
DM
11229 "description" : "The drive's cache mode",
11230 "enum" : [
11231 "none",
11232 "writethrough",
11233 "writeback",
11234 "unsafe",
11235 "directsync"
11236 ],
44660702
DM
11237 "optional" : 1,
11238 "type" : "string"
56122987 11239 },
44660702
DM
11240 "cyls" : {
11241 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
56122987 11242 "optional" : 1,
7aacca6f 11243 "type" : "integer"
56122987 11244 },
7aacca6f
DM
11245 "detect_zeroes" : {
11246 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11247 "optional" : 1,
7aacca6f 11248 "type" : "boolean"
56122987 11249 },
44660702
DM
11250 "discard" : {
11251 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11252 "enum" : [
11253 "ignore",
11254 "on"
11255 ],
56122987 11256 "optional" : 1,
44660702 11257 "type" : "string"
56122987 11258 },
44660702
DM
11259 "file" : {
11260 "default_key" : 1,
11261 "description" : "The drive's backing volume.",
11262 "format" : "pve-volume-id-or-qm-path",
11263 "format_description" : "volume",
11264 "type" : "string"
56122987
DM
11265 },
11266 "format" : {
44660702 11267 "description" : "The drive's backing file's data format.",
56122987
DM
11268 "enum" : [
11269 "raw",
11270 "cow",
11271 "qcow",
11272 "qed",
11273 "qcow2",
11274 "vmdk",
11275 "cloop"
11276 ],
f004f5b9 11277 "format_description" : "image format",
56122987 11278 "optional" : 1,
44660702 11279 "type" : "string"
56122987 11280 },
7aacca6f 11281 "heads" : {
7aacca6f 11282 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11283 "optional" : 1,
11284 "type" : "integer"
56122987 11285 },
44660702
DM
11286 "iops" : {
11287 "description" : "Maximum r/w I/O speed in operations per second.",
11288 "format_description" : "iops",
11289 "optional" : 1,
11290 "type" : "integer"
56122987 11291 },
44660702
DM
11292 "iops_max" : {
11293 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11294 "format_description" : "iops",
56122987 11295 "optional" : 1,
44660702 11296 "type" : "integer"
56122987 11297 },
44660702
DM
11298 "iops_rd" : {
11299 "description" : "Maximum read I/O speed in operations per second.",
11300 "format_description" : "iops",
56122987 11301 "optional" : 1,
44660702 11302 "type" : "integer"
56122987 11303 },
44660702
DM
11304 "iops_rd_max" : {
11305 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
7aacca6f 11306 "format_description" : "iops",
56122987 11307 "optional" : 1,
44660702 11308 "type" : "integer"
56122987 11309 },
44660702
DM
11310 "iops_wr" : {
11311 "description" : "Maximum write I/O speed in operations per second.",
11312 "format_description" : "iops",
7aacca6f 11313 "optional" : 1,
44660702 11314 "type" : "integer"
7aacca6f 11315 },
44660702
DM
11316 "iops_wr_max" : {
11317 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11318 "format_description" : "iops",
56122987 11319 "optional" : 1,
7aacca6f 11320 "type" : "integer"
56122987 11321 },
44660702
DM
11322 "mbps" : {
11323 "description" : "Maximum r/w speed speed in megabytes per second.",
11324 "format_description" : "mbps",
56122987 11325 "optional" : 1,
44660702 11326 "type" : "number"
56122987 11327 },
44660702
DM
11328 "mbps_max" : {
11329 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11330 "format_description" : "mbps",
7aacca6f 11331 "optional" : 1,
44660702 11332 "type" : "number"
7aacca6f 11333 },
44660702
DM
11334 "mbps_rd" : {
11335 "description" : "Maximum read speed speed in megabytes per second.",
11336 "format_description" : "mbps",
7aacca6f 11337 "optional" : 1,
44660702 11338 "type" : "number"
7aacca6f 11339 },
44660702
DM
11340 "mbps_rd_max" : {
11341 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11342 "format_description" : "mbps",
7aacca6f 11343 "optional" : 1,
44660702 11344 "type" : "number"
7aacca6f 11345 },
44660702
DM
11346 "mbps_wr" : {
11347 "description" : "Maximum write speed speed in megabytes per second.",
11348 "format_description" : "mbps",
7aacca6f 11349 "optional" : 1,
44660702 11350 "type" : "number"
7aacca6f
DM
11351 },
11352 "mbps_wr_max" : {
7aacca6f 11353 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
44660702 11354 "format_description" : "mbps",
7aacca6f 11355 "optional" : 1,
44660702 11356 "type" : "number"
7aacca6f 11357 },
44660702
DM
11358 "media" : {
11359 "default" : "disk",
11360 "description" : "The drive's media type.",
56122987 11361 "enum" : [
44660702
DM
11362 "cdrom",
11363 "disk"
56122987 11364 ],
56122987 11365 "optional" : 1,
44660702 11366 "type" : "string"
56122987 11367 },
44660702
DM
11368 "rerror" : {
11369 "description" : "Read error action.",
7aacca6f
DM
11370 "enum" : [
11371 "ignore",
44660702
DM
11372 "report",
11373 "stop"
7aacca6f 11374 ],
56122987 11375 "optional" : 1,
44660702 11376 "type" : "string"
56122987 11377 },
44660702
DM
11378 "secs" : {
11379 "description" : "Force the drive's physical geometry to have a specific sector count.",
56122987 11380 "optional" : 1,
44660702 11381 "type" : "integer"
56122987 11382 },
44660702
DM
11383 "serial" : {
11384 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11385 "format" : "urlencoded",
11386 "format_description" : "serial",
11387 "maxLength" : 60,
11388 "optional" : 1,
11389 "type" : "string"
7aacca6f
DM
11390 },
11391 "size" : {
11392 "description" : "Disk size. This is purely informational and has no effect.",
44660702 11393 "format" : "disk-size",
f004f5b9 11394 "format_description" : "DiskSize",
56122987 11395 "optional" : 1,
44660702 11396 "type" : "string"
56122987 11397 },
44660702
DM
11398 "snapshot" : {
11399 "description" : "Whether the drive should be included when making snapshots.",
56122987 11400 "optional" : 1,
44660702 11401 "type" : "boolean"
56122987 11402 },
44660702
DM
11403 "trans" : {
11404 "description" : "Force disk geometry bios translation mode.",
56122987 11405 "enum" : [
44660702
DM
11406 "none",
11407 "lba",
11408 "auto"
7aacca6f 11409 ],
44660702
DM
11410 "optional" : 1,
11411 "type" : "string"
11412 },
11413 "volume" : {
11414 "alias" : "file"
56122987
DM
11415 },
11416 "werror" : {
56122987
DM
11417 "description" : "Write error action.",
11418 "enum" : [
11419 "enospc",
11420 "ignore",
11421 "report",
11422 "stop"
11423 ],
56122987 11424 "optional" : 1,
44660702
DM
11425 "type" : "string"
11426 }
11427 },
11428 "optional" : 1,
4bd7df8b
DM
11429 "type" : "string",
11430 "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
11431 },
11432 "scsi[n]" : {
11433 "description" : "Use volume as SCSI hard disk or CD-ROM (n is 0 to 13).",
11434 "format" : {
11435 "aio" : {
11436 "description" : "AIO type to use.",
11437 "enum" : [
11438 "native",
11439 "threads"
11440 ],
44660702
DM
11441 "optional" : 1,
11442 "type" : "string"
56122987 11443 },
7aacca6f 11444 "backup" : {
44660702 11445 "description" : "Whether the drive should be included when making backups.",
7aacca6f 11446 "optional" : 1,
44660702 11447 "type" : "boolean"
7aacca6f 11448 },
44660702
DM
11449 "bps" : {
11450 "description" : "Maximum r/w speed speed in bytes per second.",
11451 "format_description" : "bps",
7aacca6f 11452 "optional" : 1,
44660702 11453 "type" : "integer"
7aacca6f 11454 },
44660702
DM
11455 "bps_rd" : {
11456 "description" : "Maximum read speed speed in bytes per second.",
11457 "format_description" : "bps",
56122987 11458 "optional" : 1,
44660702 11459 "type" : "integer"
56122987 11460 },
44660702
DM
11461 "bps_wr" : {
11462 "description" : "Maximum write speed speed in bytes per second.",
11463 "format_description" : "bps",
7aacca6f 11464 "optional" : 1,
44660702 11465 "type" : "integer"
56122987 11466 },
44660702
DM
11467 "cache" : {
11468 "description" : "The drive's cache mode",
7aacca6f
DM
11469 "enum" : [
11470 "none",
44660702
DM
11471 "writethrough",
11472 "writeback",
11473 "unsafe",
11474 "directsync"
7aacca6f 11475 ],
56122987 11476 "optional" : 1,
44660702 11477 "type" : "string"
56122987 11478 },
7aacca6f
DM
11479 "cyls" : {
11480 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
11481 "optional" : 1,
44660702 11482 "type" : "integer"
7aacca6f 11483 },
44660702
DM
11484 "detect_zeroes" : {
11485 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
56122987 11486 "optional" : 1,
44660702 11487 "type" : "boolean"
56122987 11488 },
44660702
DM
11489 "discard" : {
11490 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
7aacca6f 11491 "enum" : [
44660702
DM
11492 "ignore",
11493 "on"
7aacca6f 11494 ],
7aacca6f 11495 "optional" : 1,
44660702 11496 "type" : "string"
56122987
DM
11497 },
11498 "file" : {
7aacca6f
DM
11499 "default_key" : 1,
11500 "description" : "The drive's backing volume.",
44660702
DM
11501 "format" : "pve-volume-id-or-qm-path",
11502 "format_description" : "volume",
7aacca6f 11503 "type" : "string"
56122987 11504 },
7aacca6f 11505 "format" : {
44660702 11506 "description" : "The drive's backing file's data format.",
56122987 11507 "enum" : [
7aacca6f
DM
11508 "raw",
11509 "cow",
11510 "qcow",
11511 "qed",
11512 "qcow2",
11513 "vmdk",
11514 "cloop"
56122987 11515 ],
f004f5b9 11516 "format_description" : "image format",
44660702
DM
11517 "optional" : 1,
11518 "type" : "string"
56122987 11519 },
44660702
DM
11520 "heads" : {
11521 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11522 "optional" : 1,
11523 "type" : "integer"
11524 },
11525 "iops" : {
11526 "description" : "Maximum r/w I/O speed in operations per second.",
7aacca6f 11527 "format_description" : "iops",
56122987 11528 "optional" : 1,
44660702 11529 "type" : "integer"
56122987 11530 },
44660702
DM
11531 "iops_max" : {
11532 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11533 "format_description" : "iops",
7aacca6f 11534 "optional" : 1,
44660702 11535 "type" : "integer"
56122987 11536 },
44660702
DM
11537 "iops_rd" : {
11538 "description" : "Maximum read I/O speed in operations per second.",
11539 "format_description" : "iops",
56122987 11540 "optional" : 1,
44660702 11541 "type" : "integer"
56122987 11542 },
44660702
DM
11543 "iops_rd_max" : {
11544 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11545 "format_description" : "iops",
11546 "optional" : 1,
11547 "type" : "integer"
56122987 11548 },
44660702
DM
11549 "iops_wr" : {
11550 "description" : "Maximum write I/O speed in operations per second.",
11551 "format_description" : "iops",
56122987 11552 "optional" : 1,
44660702 11553 "type" : "integer"
56122987 11554 },
44660702
DM
11555 "iops_wr_max" : {
11556 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11557 "format_description" : "iops",
56122987 11558 "optional" : 1,
56122987
DM
11559 "type" : "integer"
11560 },
44660702
DM
11561 "iothread" : {
11562 "description" : "Whether to use iothreads for this drive",
44660702
DM
11563 "optional" : 1,
11564 "type" : "boolean"
11565 },
11566 "mbps" : {
11567 "description" : "Maximum r/w speed speed in megabytes per second.",
11568 "format_description" : "mbps",
11569 "optional" : 1,
11570 "type" : "number"
11571 },
7aacca6f
DM
11572 "mbps_max" : {
11573 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
44660702 11574 "format_description" : "mbps",
56122987 11575 "optional" : 1,
44660702 11576 "type" : "number"
56122987 11577 },
44660702
DM
11578 "mbps_rd" : {
11579 "description" : "Maximum read speed speed in megabytes per second.",
11580 "format_description" : "mbps",
11581 "optional" : 1,
11582 "type" : "number"
56122987 11583 },
44660702
DM
11584 "mbps_rd_max" : {
11585 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11586 "format_description" : "mbps",
56122987 11587 "optional" : 1,
44660702 11588 "type" : "number"
56122987 11589 },
44660702
DM
11590 "mbps_wr" : {
11591 "description" : "Maximum write speed speed in megabytes per second.",
11592 "format_description" : "mbps",
56122987 11593 "optional" : 1,
44660702 11594 "type" : "number"
56122987 11595 },
44660702
DM
11596 "mbps_wr_max" : {
11597 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11598 "format_description" : "mbps",
7aacca6f 11599 "optional" : 1,
44660702 11600 "type" : "number"
56122987 11601 },
7aacca6f 11602 "media" : {
44660702 11603 "default" : "disk",
7aacca6f
DM
11604 "description" : "The drive's media type.",
11605 "enum" : [
11606 "cdrom",
11607 "disk"
11608 ],
56122987 11609 "optional" : 1,
44660702 11610 "type" : "string"
56122987 11611 },
44660702
DM
11612 "queues" : {
11613 "description" : "Number of queues.",
44660702
DM
11614 "minimum" : 2,
11615 "optional" : 1,
11616 "type" : "integer"
56122987 11617 },
7aacca6f 11618 "secs" : {
7aacca6f 11619 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
11620 "optional" : 1,
11621 "type" : "integer"
11622 },
11623 "serial" : {
11624 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
11625 "format" : "urlencoded",
11626 "format_description" : "serial",
11627 "maxLength" : 60,
11628 "optional" : 1,
11629 "type" : "string"
11630 },
11631 "size" : {
11632 "description" : "Disk size. This is purely informational and has no effect.",
11633 "format" : "disk-size",
f004f5b9 11634 "format_description" : "DiskSize",
44660702
DM
11635 "optional" : 1,
11636 "type" : "string"
11637 },
11638 "snapshot" : {
11639 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
11640 "optional" : 1,
11641 "type" : "boolean"
11642 },
11643 "trans" : {
11644 "description" : "Force disk geometry bios translation mode.",
11645 "enum" : [
11646 "none",
11647 "lba",
11648 "auto"
11649 ],
44660702
DM
11650 "optional" : 1,
11651 "type" : "string"
11652 },
11653 "volume" : {
11654 "alias" : "file"
11655 },
11656 "werror" : {
11657 "description" : "Write error action.",
11658 "enum" : [
11659 "enospc",
11660 "ignore",
11661 "report",
11662 "stop"
11663 ],
44660702
DM
11664 "optional" : 1,
11665 "type" : "string"
56122987
DM
11666 }
11667 },
7aacca6f 11668 "optional" : 1,
4bd7df8b
DM
11669 "type" : "string",
11670 "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 11671 },
44660702
DM
11672 "scsihw" : {
11673 "default" : "lsi",
c2993fe5 11674 "description" : "SCSI controller model",
44660702
DM
11675 "enum" : [
11676 "lsi",
11677 "lsi53c810",
11678 "virtio-scsi-pci",
11679 "virtio-scsi-single",
11680 "megasas",
11681 "pvscsi"
11682 ],
7aacca6f 11683 "optional" : 1,
44660702 11684 "type" : "string"
7aacca6f 11685 },
44660702 11686 "serial[n]" : {
c2993fe5 11687 "description" : "Create a serial device inside the VM (n is 0 to 3)",
44660702
DM
11688 "optional" : 1,
11689 "pattern" : "(/dev/.+|socket)",
c2993fe5 11690 "type" : "string",
57b78691 11691 "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
11692 },
11693 "shares" : {
11694 "default" : 1000,
11695 "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",
11696 "maximum" : 50000,
11697 "minimum" : 0,
11698 "optional" : 1,
4bd7df8b
DM
11699 "type" : "integer",
11700 "typetext" : "integer (0-50000)"
44660702
DM
11701 },
11702 "smbios1" : {
11703 "description" : "Specify SMBIOS type 1 fields.",
11704 "format" : "pve-qm-smbios1",
11705 "maxLength" : 256,
7aacca6f 11706 "optional" : 1,
4bd7df8b
DM
11707 "type" : "string",
11708 "typetext" : "[family=<string>] [,manufacturer=<string>] [,product=<string>] [,serial=<string>] [,sku=<string>] [,uuid=<UUID>] [,version=<string>]"
7aacca6f
DM
11709 },
11710 "smp" : {
44660702 11711 "default" : 1,
7aacca6f 11712 "description" : "The number of CPUs. Please use option -sockets instead.",
44660702 11713 "minimum" : 1,
56122987 11714 "optional" : 1,
4bd7df8b
DM
11715 "type" : "integer",
11716 "typetext" : "integer (1- N)"
44660702
DM
11717 },
11718 "sockets" : {
7aacca6f 11719 "default" : 1,
44660702
DM
11720 "description" : "The number of CPU sockets.",
11721 "minimum" : 1,
11722 "optional" : 1,
4bd7df8b
DM
11723 "type" : "integer",
11724 "typetext" : "integer (1- N)"
7aacca6f 11725 },
44660702
DM
11726 "startdate" : {
11727 "default" : "now",
11728 "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'.",
11729 "optional" : 1,
11730 "pattern" : "(now|\\d{4}-\\d{1,2}-\\d{1,2}(T\\d{1,2}:\\d{1,2}:\\d{1,2})?)",
11731 "type" : "string",
11732 "typetext" : "(now | YYYY-MM-DD | YYYY-MM-DDTHH:MM:SS)"
11733 },
11734 "startup" : {
11735 "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.",
11736 "format" : "pve-startup-order",
11737 "optional" : 1,
11738 "type" : "string",
11739 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
11740 },
11741 "storage" : {
11742 "description" : "Default storage.",
11743 "format" : "pve-storage-id",
7aacca6f 11744 "optional" : 1,
56122987
DM
11745 "type" : "string"
11746 },
44660702
DM
11747 "tablet" : {
11748 "default" : 1,
c2993fe5 11749 "description" : "Enable/disable the USB tablet device.",
56122987 11750 "optional" : 1,
c2993fe5
DM
11751 "type" : "boolean",
11752 "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
11753 },
11754 "tdf" : {
11755 "default" : 0,
11756 "description" : "Enable/disable time drift fix.",
11757 "optional" : 1,
11758 "type" : "boolean"
7aacca6f
DM
11759 },
11760 "template" : {
7aacca6f 11761 "default" : 0,
44660702 11762 "description" : "Enable/disable Template.",
7aacca6f
DM
11763 "optional" : 1,
11764 "type" : "boolean"
11765 },
44660702
DM
11766 "unique" : {
11767 "description" : "Assign a unique random ethernet address.",
7aacca6f 11768 "optional" : 1,
44660702
DM
11769 "requires" : "archive",
11770 "type" : "boolean"
56122987 11771 },
44660702 11772 "unused[n]" : {
c2993fe5 11773 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 11774 "format" : "pve-volume-id",
7aacca6f 11775 "optional" : 1,
44660702
DM
11776 "type" : "string"
11777 },
11778 "usb[n]" : {
c2993fe5 11779 "description" : "Configure an USB device (n is 0 to 4).",
56122987 11780 "format" : {
7aacca6f
DM
11781 "host" : {
11782 "default_key" : 1,
c2993fe5 11783 "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 11784 "format" : "pve-qm-usb-device",
44660702
DM
11785 "format_description" : "HOSTUSBDEVICE|spice",
11786 "type" : "string"
7aacca6f 11787 },
56122987 11788 "usb3" : {
c2993fe5
DM
11789 "default" : 0,
11790 "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 11791 "optional" : 1,
56122987 11792 "type" : "boolean"
7aacca6f 11793 }
56122987 11794 },
56122987 11795 "optional" : 1,
4bd7df8b
DM
11796 "type" : "string",
11797 "typetext" : "[host=]<HOSTUSBDEVICE|spice> [,usb3=<1|0>]"
56122987 11798 },
44660702
DM
11799 "vcpus" : {
11800 "default" : 0,
11801 "description" : "Number of hotplugged vcpus.",
11802 "minimum" : 1,
56122987 11803 "optional" : 1,
4bd7df8b
DM
11804 "type" : "integer",
11805 "typetext" : "integer (1- N)"
7aacca6f 11806 },
44660702 11807 "vga" : {
c2993fe5 11808 "description" : "Select the VGA type.",
44660702
DM
11809 "enum" : [
11810 "std",
11811 "cirrus",
11812 "vmware",
11813 "qxl",
11814 "serial0",
11815 "serial1",
11816 "serial2",
11817 "serial3",
11818 "qxl2",
11819 "qxl3",
11820 "qxl4"
11821 ],
11822 "optional" : 1,
c2993fe5
DM
11823 "type" : "string",
11824 "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 11825 },
44660702
DM
11826 "virtio[n]" : {
11827 "description" : "Use volume as VIRTIO hard disk (n is 0 to 15).",
11828 "format" : {
11829 "aio" : {
11830 "description" : "AIO type to use.",
11831 "enum" : [
11832 "native",
11833 "threads"
11834 ],
44660702
DM
11835 "optional" : 1,
11836 "type" : "string"
11837 },
11838 "backup" : {
11839 "description" : "Whether the drive should be included when making backups.",
44660702
DM
11840 "optional" : 1,
11841 "type" : "boolean"
11842 },
11843 "bps" : {
11844 "description" : "Maximum r/w speed speed in bytes per second.",
11845 "format_description" : "bps",
11846 "optional" : 1,
11847 "type" : "integer"
11848 },
11849 "bps_rd" : {
11850 "description" : "Maximum read speed speed in bytes per second.",
11851 "format_description" : "bps",
11852 "optional" : 1,
11853 "type" : "integer"
11854 },
11855 "bps_wr" : {
11856 "description" : "Maximum write speed speed in bytes per second.",
11857 "format_description" : "bps",
11858 "optional" : 1,
11859 "type" : "integer"
11860 },
11861 "cache" : {
11862 "description" : "The drive's cache mode",
11863 "enum" : [
11864 "none",
11865 "writethrough",
11866 "writeback",
11867 "unsafe",
11868 "directsync"
11869 ],
44660702
DM
11870 "optional" : 1,
11871 "type" : "string"
11872 },
11873 "cyls" : {
11874 "description" : "Force the drive's physical geometry to have a specific cylinder count.",
44660702
DM
11875 "optional" : 1,
11876 "type" : "integer"
11877 },
11878 "detect_zeroes" : {
11879 "description" : "Controls whether to detect and try to optimize writes of zeroes.",
11880 "optional" : 1,
11881 "type" : "boolean"
11882 },
11883 "discard" : {
11884 "description" : "Controls whether to pass discard/trim requests to the underlying storage.",
11885 "enum" : [
11886 "ignore",
11887 "on"
11888 ],
44660702
DM
11889 "optional" : 1,
11890 "type" : "string"
11891 },
11892 "file" : {
11893 "default_key" : 1,
11894 "description" : "The drive's backing volume.",
11895 "format" : "pve-volume-id-or-qm-path",
11896 "format_description" : "volume",
11897 "type" : "string"
11898 },
11899 "format" : {
11900 "description" : "The drive's backing file's data format.",
11901 "enum" : [
11902 "raw",
11903 "cow",
11904 "qcow",
11905 "qed",
11906 "qcow2",
11907 "vmdk",
11908 "cloop"
11909 ],
f004f5b9 11910 "format_description" : "image format",
44660702
DM
11911 "optional" : 1,
11912 "type" : "string"
11913 },
11914 "heads" : {
11915 "description" : "Force the drive's physical geometry to have a specific head count.",
44660702
DM
11916 "optional" : 1,
11917 "type" : "integer"
11918 },
11919 "iops" : {
11920 "description" : "Maximum r/w I/O speed in operations per second.",
11921 "format_description" : "iops",
11922 "optional" : 1,
11923 "type" : "integer"
11924 },
11925 "iops_max" : {
11926 "description" : "Maximum unthrottled r/w I/O pool speed in operations per second.",
11927 "format_description" : "iops",
11928 "optional" : 1,
11929 "type" : "integer"
11930 },
11931 "iops_rd" : {
11932 "description" : "Maximum read I/O speed in operations per second.",
11933 "format_description" : "iops",
11934 "optional" : 1,
11935 "type" : "integer"
11936 },
11937 "iops_rd_max" : {
11938 "description" : "Maximum unthrottled read I/O pool speed in operations per second.",
11939 "format_description" : "iops",
11940 "optional" : 1,
11941 "type" : "integer"
11942 },
11943 "iops_wr" : {
11944 "description" : "Maximum write I/O speed in operations per second.",
11945 "format_description" : "iops",
11946 "optional" : 1,
11947 "type" : "integer"
11948 },
11949 "iops_wr_max" : {
11950 "description" : "Maximum unthrottled write I/O pool speed in operations per second.",
11951 "format_description" : "iops",
11952 "optional" : 1,
11953 "type" : "integer"
11954 },
11955 "iothread" : {
11956 "description" : "Whether to use iothreads for this drive",
44660702
DM
11957 "optional" : 1,
11958 "type" : "boolean"
11959 },
11960 "mbps" : {
11961 "description" : "Maximum r/w speed speed in megabytes per second.",
11962 "format_description" : "mbps",
11963 "optional" : 1,
11964 "type" : "number"
11965 },
11966 "mbps_max" : {
11967 "description" : "Maximum unthrottled r/w pool speed in megabytes per second.",
11968 "format_description" : "mbps",
11969 "optional" : 1,
11970 "type" : "number"
11971 },
11972 "mbps_rd" : {
11973 "description" : "Maximum read speed speed in megabytes per second.",
11974 "format_description" : "mbps",
11975 "optional" : 1,
11976 "type" : "number"
11977 },
11978 "mbps_rd_max" : {
11979 "description" : "Maximum unthrottled read pool speed in megabytes per second.",
11980 "format_description" : "mbps",
11981 "optional" : 1,
11982 "type" : "number"
11983 },
11984 "mbps_wr" : {
11985 "description" : "Maximum write speed speed in megabytes per second.",
11986 "format_description" : "mbps",
11987 "optional" : 1,
11988 "type" : "number"
11989 },
11990 "mbps_wr_max" : {
11991 "description" : "Maximum unthrottled write pool speed in megabytes per second.",
11992 "format_description" : "mbps",
11993 "optional" : 1,
11994 "type" : "number"
11995 },
11996 "media" : {
11997 "default" : "disk",
11998 "description" : "The drive's media type.",
11999 "enum" : [
12000 "cdrom",
12001 "disk"
12002 ],
44660702
DM
12003 "optional" : 1,
12004 "type" : "string"
12005 },
12006 "rerror" : {
12007 "description" : "Read error action.",
12008 "enum" : [
12009 "ignore",
12010 "report",
12011 "stop"
12012 ],
44660702
DM
12013 "optional" : 1,
12014 "type" : "string"
12015 },
12016 "secs" : {
12017 "description" : "Force the drive's physical geometry to have a specific sector count.",
44660702
DM
12018 "optional" : 1,
12019 "type" : "integer"
12020 },
12021 "serial" : {
12022 "description" : "The drive's reported serial number, url-encoded, up to 20 bytes long.",
12023 "format" : "urlencoded",
12024 "format_description" : "serial",
12025 "maxLength" : 60,
12026 "optional" : 1,
12027 "type" : "string"
12028 },
12029 "size" : {
12030 "description" : "Disk size. This is purely informational and has no effect.",
12031 "format" : "disk-size",
f004f5b9 12032 "format_description" : "DiskSize",
44660702
DM
12033 "optional" : 1,
12034 "type" : "string"
12035 },
12036 "snapshot" : {
12037 "description" : "Whether the drive should be included when making snapshots.",
44660702
DM
12038 "optional" : 1,
12039 "type" : "boolean"
12040 },
12041 "trans" : {
12042 "description" : "Force disk geometry bios translation mode.",
12043 "enum" : [
12044 "none",
12045 "lba",
12046 "auto"
12047 ],
44660702
DM
12048 "optional" : 1,
12049 "type" : "string"
12050 },
12051 "volume" : {
12052 "alias" : "file"
12053 },
12054 "werror" : {
12055 "description" : "Write error action.",
12056 "enum" : [
12057 "enospc",
12058 "ignore",
12059 "report",
12060 "stop"
12061 ],
44660702
DM
12062 "optional" : 1,
12063 "type" : "string"
12064 }
12065 },
12066 "optional" : 1,
4bd7df8b
DM
12067 "type" : "string",
12068 "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 12069 },
44660702
DM
12070 "vmid" : {
12071 "description" : "The (unique) ID of the VM.",
12072 "format" : "pve-vmid",
12073 "minimum" : 1,
4bd7df8b
DM
12074 "type" : "integer",
12075 "typetext" : "integer (1- N)"
44660702
DM
12076 },
12077 "watchdog" : {
c2993fe5 12078 "description" : "Create a virtual hardware watchdog device.",
44660702 12079 "format" : "pve-qm-watchdog",
7aacca6f 12080 "optional" : 1,
c2993fe5 12081 "type" : "string",
4bd7df8b 12082 "typetext" : "[[model=]<i6300esb|ib700>] [,action=<reset|shutdown|poweroff|pause|debug|none>]",
c2993fe5 12083 "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 12084 }
44660702 12085 }
56122987 12086 },
56122987 12087 "permissions" : {
44660702
DM
12088 "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.",
12089 "user" : "all"
56122987 12090 },
44660702
DM
12091 "protected" : 1,
12092 "proxyto" : "node",
56122987 12093 "returns" : {
44660702 12094 "type" : "string"
7aacca6f 12095 }
56122987 12096 }
7aacca6f 12097 },
44660702 12098 "leaf" : 0,
7aacca6f 12099 "path" : "/nodes/{node}/qemu",
44660702 12100 "text" : "qemu"
56122987
DM
12101 },
12102 {
12103 "children" : [
12104 {
56122987
DM
12105 "children" : [
12106 {
56122987 12107 "info" : {
44660702
DM
12108 "GET" : {
12109 "description" : "Get container configuration.",
12110 "method" : "GET",
12111 "name" : "vm_config",
12112 "parameters" : {
12113 "additionalProperties" : 0,
12114 "properties" : {
12115 "node" : {
12116 "description" : "The cluster node name.",
12117 "format" : "pve-node",
12118 "type" : "string"
12119 },
12120 "vmid" : {
12121 "description" : "The (unique) ID of the VM.",
12122 "format" : "pve-vmid",
12123 "minimum" : 1,
4bd7df8b
DM
12124 "type" : "integer",
12125 "typetext" : "integer (1- N)"
44660702
DM
12126 }
12127 }
12128 },
12129 "permissions" : {
12130 "check" : [
12131 "perm",
12132 "/vms/{vmid}",
12133 [
12134 "VM.Audit"
12135 ]
12136 ]
12137 },
12138 "proxyto" : "node",
12139 "returns" : {
12140 "properties" : {
12141 "digest" : {
12142 "description" : "SHA1 digest of configuration file. This can be used to prevent concurrent modifications.",
12143 "type" : "string"
12144 }
12145 },
12146 "type" : "object"
12147 }
12148 },
56122987 12149 "PUT" : {
44660702
DM
12150 "description" : "Set container options.",
12151 "method" : "PUT",
12152 "name" : "update_vm",
56122987 12153 "parameters" : {
44660702 12154 "additionalProperties" : 0,
56122987 12155 "properties" : {
44660702
DM
12156 "arch" : {
12157 "default" : "amd64",
12158 "description" : "OS architecture type.",
12159 "enum" : [
12160 "amd64",
12161 "i386"
12162 ],
7aacca6f 12163 "optional" : 1,
44660702
DM
12164 "type" : "string"
12165 },
12166 "cmode" : {
7aacca6f 12167 "default" : "tty",
44660702 12168 "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
12169 "enum" : [
12170 "shell",
12171 "console",
12172 "tty"
12173 ],
44660702
DM
12174 "optional" : 1,
12175 "type" : "string"
7aacca6f 12176 },
44660702
DM
12177 "console" : {
12178 "default" : 1,
12179 "description" : "Attach a console device (/dev/console) to the container.",
7aacca6f 12180 "optional" : 1,
44660702 12181 "type" : "boolean"
7aacca6f 12182 },
44660702
DM
12183 "cpulimit" : {
12184 "default" : 0,
12185 "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.",
12186 "maximum" : 128,
7aacca6f 12187 "minimum" : 0,
7aacca6f 12188 "optional" : 1,
4bd7df8b
DM
12189 "type" : "number",
12190 "typetext" : "number (0-128)"
7aacca6f 12191 },
44660702
DM
12192 "cpuunits" : {
12193 "default" : 1024,
12194 "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.",
12195 "maximum" : 500000,
12196 "minimum" : 0,
12197 "optional" : 1,
4bd7df8b
DM
12198 "type" : "integer",
12199 "typetext" : "integer (0-500000)"
7aacca6f 12200 },
44660702
DM
12201 "delete" : {
12202 "description" : "A list of settings you want to delete.",
12203 "format" : "pve-configid-list",
7aacca6f 12204 "optional" : 1,
44660702 12205 "type" : "string"
7aacca6f 12206 },
44660702
DM
12207 "description" : {
12208 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 12209 "optional" : 1,
44660702 12210 "type" : "string"
7aacca6f 12211 },
44660702
DM
12212 "digest" : {
12213 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
12214 "maxLength" : 40,
7aacca6f 12215 "optional" : 1,
44660702 12216 "type" : "string"
7aacca6f 12217 },
44660702
DM
12218 "hostname" : {
12219 "description" : "Set a host name for the container.",
12220 "format" : "dns-name",
12221 "maxLength" : 255,
56122987 12222 "optional" : 1,
44660702
DM
12223 "type" : "string"
12224 },
12225 "lock" : {
12226 "description" : "Lock/unlock the VM.",
12227 "enum" : [
12228 "migrate",
12229 "backup",
12230 "snapshot",
12231 "rollback"
12232 ],
12233 "optional" : 1,
12234 "type" : "string"
12235 },
12236 "memory" : {
12237 "default" : 512,
12238 "description" : "Amount of RAM for the VM in MB.",
12239 "minimum" : 16,
12240 "optional" : 1,
4bd7df8b
DM
12241 "type" : "integer",
12242 "typetext" : "integer (16- N)"
7aacca6f
DM
12243 },
12244 "mp[n]" : {
c2993fe5 12245 "description" : "Use volume as container mount point.",
7aacca6f 12246 "format" : {
7aacca6f
DM
12247 "acl" : {
12248 "description" : "Explicitly enable or disable ACL support.",
7aacca6f 12249 "optional" : 1,
44660702 12250 "type" : "boolean"
7aacca6f
DM
12251 },
12252 "backup" : {
12253 "description" : "Whether to include the mountpoint in backups.",
12254 "optional" : 1,
4bd7df8b
DM
12255 "type" : "boolean",
12256 "verbose_description" : "Whether to include the mountpoint in backups (only used for volume mountpoints)."
7aacca6f
DM
12257 },
12258 "mp" : {
4bd7df8b 12259 "description" : "Path to the mountpoint as seen from inside the container (must not contain symlinks).",
7aacca6f 12260 "format" : "pve-lxc-mp-string",
44660702 12261 "format_description" : "Path",
4bd7df8b
DM
12262 "type" : "string",
12263 "verbose_description" : "Path to the mountpoint as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons."
44660702
DM
12264 },
12265 "quota" : {
12266 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12267 "optional" : 1,
12268 "type" : "boolean"
12269 },
12270 "ro" : {
4bd7df8b 12271 "description" : "Read-only mountpoint",
44660702
DM
12272 "optional" : 1,
12273 "type" : "boolean"
12274 },
12275 "size" : {
12276 "description" : "Volume size (read only value).",
12277 "format" : "disk-size",
12278 "format_description" : "DiskSize",
12279 "optional" : 1,
12280 "type" : "string"
12281 },
12282 "volume" : {
12283 "default_key" : 1,
12284 "description" : "Volume, device or directory to mount into the container.",
12285 "format" : "pve-lxc-mp-string",
12286 "format_description" : "volume",
12287 "type" : "string"
12288 }
12289 },
7aacca6f 12290 "optional" : 1,
4bd7df8b
DM
12291 "type" : "string",
12292 "typetext" : "[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
56122987 12293 },
44660702
DM
12294 "nameserver" : {
12295 "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.",
12296 "format" : "address-list",
56122987 12297 "optional" : 1,
44660702 12298 "type" : "string"
56122987
DM
12299 },
12300 "net[n]" : {
44660702 12301 "description" : "Specifies network interfaces for the container.",
56122987 12302 "format" : {
44660702
DM
12303 "bridge" : {
12304 "description" : "Bridge to attach the network device to.",
f004f5b9 12305 "format_description" : "bridge",
56122987 12306 "optional" : 1,
44660702
DM
12307 "pattern" : "[-_.\\w\\d]+",
12308 "type" : "string"
56122987 12309 },
44660702
DM
12310 "firewall" : {
12311 "description" : "Controls whether this interface's firewall rules should be used.",
56122987 12312 "optional" : 1,
44660702 12313 "type" : "boolean"
56122987 12314 },
44660702
DM
12315 "gw" : {
12316 "description" : "Default gateway for IPv4 traffic.",
12317 "format" : "ipv4",
12318 "format_description" : "GatewayIPv4",
56122987 12319 "optional" : 1,
44660702 12320 "type" : "string"
56122987
DM
12321 },
12322 "gw6" : {
7aacca6f 12323 "description" : "Default gateway for IPv6 traffic.",
44660702
DM
12324 "format" : "ipv6",
12325 "format_description" : "GatewayIPv6",
7aacca6f 12326 "optional" : 1,
56122987
DM
12327 "type" : "string"
12328 },
44660702 12329 "hwaddr" : {
f004f5b9
DM
12330 "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)",
12331 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
12332 "optional" : 1,
12333 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
12334 "type" : "string"
12335 },
12336 "ip" : {
12337 "description" : "IPv4 address in CIDR format.",
12338 "format" : "pve-ipv4-config",
12339 "format_description" : "IPv4Format/CIDR",
56122987 12340 "optional" : 1,
44660702 12341 "type" : "string"
56122987 12342 },
7aacca6f 12343 "ip6" : {
7aacca6f
DM
12344 "description" : "IPv6 address in CIDR format.",
12345 "format" : "pve-ipv6-config",
44660702 12346 "format_description" : "IPv6Format/CIDR",
7aacca6f 12347 "optional" : 1,
44660702 12348 "type" : "string"
56122987 12349 },
44660702
DM
12350 "mtu" : {
12351 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702 12352 "minimum" : 64,
56122987 12353 "optional" : 1,
44660702 12354 "type" : "integer"
56122987
DM
12355 },
12356 "name" : {
44660702 12357 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 12358 "format_description" : "string",
56122987 12359 "pattern" : "[-_.\\w\\d]+",
44660702 12360 "type" : "string"
56122987 12361 },
44660702
DM
12362 "rate" : {
12363 "description" : "Apply rate limiting to the interface",
12364 "format_description" : "mbps",
56122987 12365 "optional" : 1,
44660702 12366 "type" : "number"
7aacca6f 12367 },
44660702
DM
12368 "tag" : {
12369 "description" : "VLAN tag for this interface.",
4bd7df8b
DM
12370 "maximum" : 4094,
12371 "minimum" : 1,
56122987 12372 "optional" : 1,
7aacca6f 12373 "type" : "integer"
56122987 12374 },
44660702
DM
12375 "trunks" : {
12376 "description" : "VLAN ids to pass through the interface",
12377 "format_description" : "vlanid[;vlanid...]",
12378 "optional" : 1,
12379 "pattern" : "(?^:\\d+(?:;\\d+)*)",
12380 "type" : "string"
12381 },
12382 "type" : {
12383 "description" : "Network interface type.",
12384 "enum" : [
12385 "veth"
12386 ],
56122987 12387 "optional" : 1,
44660702 12388 "type" : "string"
56122987
DM
12389 }
12390 },
7aacca6f 12391 "optional" : 1,
4bd7df8b
DM
12392 "type" : "string",
12393 "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 12394 },
44660702
DM
12395 "node" : {
12396 "description" : "The cluster node name.",
12397 "format" : "pve-node",
12398 "type" : "string"
56122987 12399 },
44660702
DM
12400 "onboot" : {
12401 "default" : 0,
12402 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 12403 "optional" : 1,
44660702 12404 "type" : "boolean"
56122987 12405 },
44660702
DM
12406 "ostype" : {
12407 "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.",
12408 "enum" : [
12409 "debian",
12410 "ubuntu",
12411 "centos",
12412 "fedora",
12413 "opensuse",
12414 "archlinux",
12415 "alpine",
57b78691 12416 "gentoo",
44660702
DM
12417 "unmanaged"
12418 ],
56122987 12419 "optional" : 1,
44660702 12420 "type" : "string"
56122987 12421 },
44660702
DM
12422 "protection" : {
12423 "default" : 0,
12424 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
56122987 12425 "optional" : 1,
44660702 12426 "type" : "boolean"
56122987 12427 },
7aacca6f
DM
12428 "rootfs" : {
12429 "description" : "Use volume as container root.",
56122987
DM
12430 "format" : {
12431 "acl" : {
44660702 12432 "description" : "Explicitly enable or disable ACL support.",
7aacca6f
DM
12433 "optional" : 1,
12434 "type" : "boolean"
56122987 12435 },
44660702
DM
12436 "quota" : {
12437 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
44660702
DM
12438 "optional" : 1,
12439 "type" : "boolean"
12440 },
12441 "ro" : {
4bd7df8b 12442 "description" : "Read-only mountpoint",
56122987 12443 "optional" : 1,
44660702
DM
12444 "type" : "boolean"
12445 },
12446 "size" : {
7aacca6f 12447 "description" : "Volume size (read only value).",
44660702 12448 "format" : "disk-size",
56122987 12449 "format_description" : "DiskSize",
56122987 12450 "optional" : 1,
44660702 12451 "type" : "string"
7aacca6f
DM
12452 },
12453 "volume" : {
7aacca6f
DM
12454 "default_key" : 1,
12455 "description" : "Volume, device or directory to mount into the container.",
44660702
DM
12456 "format" : "pve-lxc-mp-string",
12457 "format_description" : "volume",
7aacca6f 12458 "type" : "string"
56122987 12459 }
44660702
DM
12460 },
12461 "optional" : 1,
4bd7df8b
DM
12462 "type" : "string",
12463 "typetext" : "[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
44660702
DM
12464 },
12465 "searchdomain" : {
12466 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
12467 "format" : "dns-name-list",
12468 "optional" : 1,
12469 "type" : "string"
12470 },
12471 "startup" : {
12472 "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.",
12473 "format" : "pve-startup-order",
12474 "optional" : 1,
12475 "type" : "string",
12476 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
12477 },
12478 "swap" : {
12479 "default" : 512,
12480 "description" : "Amount of SWAP for the VM in MB.",
12481 "minimum" : 0,
12482 "optional" : 1,
4bd7df8b
DM
12483 "type" : "integer",
12484 "typetext" : "integer (0- N)"
56122987 12485 },
56122987 12486 "template" : {
44660702 12487 "default" : 0,
7aacca6f 12488 "description" : "Enable/disable Template.",
56122987 12489 "optional" : 1,
44660702 12490 "type" : "boolean"
56122987 12491 },
44660702
DM
12492 "tty" : {
12493 "default" : 2,
12494 "description" : "Specify the number of tty available to the container",
12495 "maximum" : 6,
12496 "minimum" : 0,
12497 "optional" : 1,
4bd7df8b
DM
12498 "type" : "integer",
12499 "typetext" : "integer (0-6)"
56122987 12500 },
44660702
DM
12501 "unprivileged" : {
12502 "default" : 0,
12503 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
56122987 12504 "optional" : 1,
44660702 12505 "type" : "boolean"
56122987 12506 },
44660702 12507 "unused[n]" : {
c2993fe5 12508 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702 12509 "format" : "pve-volume-id",
56122987 12510 "optional" : 1,
44660702
DM
12511 "type" : "string"
12512 },
12513 "vmid" : {
12514 "description" : "The (unique) ID of the VM.",
12515 "format" : "pve-vmid",
12516 "minimum" : 1,
4bd7df8b
DM
12517 "type" : "integer",
12518 "typetext" : "integer (1- N)"
56122987 12519 }
44660702 12520 }
56122987 12521 },
56122987
DM
12522 "permissions" : {
12523 "check" : [
12524 "perm",
12525 "/vms/{vmid}",
12526 [
12527 "VM.Config.Disk",
12528 "VM.Config.CPU",
12529 "VM.Config.Memory",
12530 "VM.Config.Network",
12531 "VM.Config.Options"
12532 ],
12533 "any",
12534 1
12535 ]
12536 },
44660702
DM
12537 "protected" : 1,
12538 "proxyto" : "node",
56122987
DM
12539 "returns" : {
12540 "type" : "null"
7aacca6f 12541 }
56122987 12542 }
7aacca6f 12543 },
44660702 12544 "leaf" : 1,
7aacca6f 12545 "path" : "/nodes/{node}/lxc/{vmid}/config",
44660702 12546 "text" : "config"
56122987
DM
12547 },
12548 {
56122987
DM
12549 "children" : [
12550 {
12551 "info" : {
12552 "GET" : {
44660702 12553 "description" : "Get virtual machine status.",
7aacca6f 12554 "method" : "GET",
44660702 12555 "name" : "vm_status",
56122987 12556 "parameters" : {
44660702 12557 "additionalProperties" : 0,
56122987 12558 "properties" : {
56122987 12559 "node" : {
44660702 12560 "description" : "The cluster node name.",
56122987 12561 "format" : "pve-node",
44660702 12562 "type" : "string"
7aacca6f
DM
12563 },
12564 "vmid" : {
12565 "description" : "The (unique) ID of the VM.",
44660702 12566 "format" : "pve-vmid",
7aacca6f 12567 "minimum" : 1,
4bd7df8b
DM
12568 "type" : "integer",
12569 "typetext" : "integer (1- N)"
56122987 12570 }
44660702 12571 }
7aacca6f
DM
12572 },
12573 "permissions" : {
12574 "check" : [
12575 "perm",
12576 "/vms/{vmid}",
12577 [
12578 "VM.Audit"
12579 ]
12580 ]
12581 },
44660702 12582 "protected" : 1,
7aacca6f 12583 "proxyto" : "node",
44660702
DM
12584 "returns" : {
12585 "type" : "object"
12586 }
56122987
DM
12587 }
12588 },
44660702
DM
12589 "leaf" : 1,
12590 "path" : "/nodes/{node}/lxc/{vmid}/status/current",
56122987
DM
12591 "text" : "current"
12592 },
12593 {
56122987
DM
12594 "info" : {
12595 "POST" : {
7aacca6f 12596 "description" : "Start the container.",
44660702 12597 "method" : "POST",
7aacca6f 12598 "name" : "vm_start",
56122987
DM
12599 "parameters" : {
12600 "additionalProperties" : 0,
12601 "properties" : {
56122987 12602 "node" : {
7aacca6f 12603 "description" : "The cluster node name.",
44660702
DM
12604 "format" : "pve-node",
12605 "type" : "string"
56122987 12606 },
7aacca6f 12607 "skiplock" : {
44660702 12608 "description" : "Ignore locks - only root is allowed to use this option.",
7aacca6f 12609 "optional" : 1,
44660702 12610 "type" : "boolean"
7aacca6f 12611 },
56122987 12612 "vmid" : {
7aacca6f 12613 "description" : "The (unique) ID of the VM.",
44660702 12614 "format" : "pve-vmid",
56122987 12615 "minimum" : 1,
4bd7df8b
DM
12616 "type" : "integer",
12617 "typetext" : "integer (1- N)"
56122987
DM
12618 }
12619 }
12620 },
12621 "permissions" : {
12622 "check" : [
12623 "perm",
12624 "/vms/{vmid}",
12625 [
12626 "VM.PowerMgmt"
12627 ]
12628 ]
12629 },
44660702 12630 "protected" : 1,
7aacca6f 12631 "proxyto" : "node",
44660702
DM
12632 "returns" : {
12633 "type" : "string"
12634 }
12635 }
12636 },
12637 "leaf" : 1,
12638 "path" : "/nodes/{node}/lxc/{vmid}/status/start",
12639 "text" : "start"
12640 },
12641 {
12642 "info" : {
12643 "POST" : {
12644 "description" : "Stop the container. This will abruptly stop all processes running in the container.",
7aacca6f
DM
12645 "method" : "POST",
12646 "name" : "vm_stop",
12647 "parameters" : {
44660702 12648 "additionalProperties" : 0,
7aacca6f 12649 "properties" : {
44660702
DM
12650 "node" : {
12651 "description" : "The cluster node name.",
12652 "format" : "pve-node",
12653 "type" : "string"
12654 },
7aacca6f
DM
12655 "skiplock" : {
12656 "description" : "Ignore locks - only root is allowed to use this option.",
44660702
DM
12657 "optional" : 1,
12658 "type" : "boolean"
7aacca6f
DM
12659 },
12660 "vmid" : {
44660702 12661 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12662 "format" : "pve-vmid",
12663 "minimum" : 1,
4bd7df8b
DM
12664 "type" : "integer",
12665 "typetext" : "integer (1- N)"
7aacca6f 12666 }
44660702
DM
12667 }
12668 },
12669 "permissions" : {
12670 "check" : [
12671 "perm",
12672 "/vms/{vmid}",
12673 [
12674 "VM.PowerMgmt"
12675 ]
12676 ]
7aacca6f 12677 },
44660702
DM
12678 "protected" : 1,
12679 "proxyto" : "node",
12680 "returns" : {
12681 "type" : "string"
12682 }
56122987 12683 }
7aacca6f 12684 },
7aacca6f 12685 "leaf" : 1,
44660702
DM
12686 "path" : "/nodes/{node}/lxc/{vmid}/status/stop",
12687 "text" : "stop"
56122987
DM
12688 },
12689 {
56122987
DM
12690 "info" : {
12691 "POST" : {
44660702
DM
12692 "description" : "Shutdown the container. This will trigger a clean shutdown of the container, see lxc-stop(1) for details.",
12693 "method" : "POST",
7aacca6f 12694 "name" : "vm_shutdown",
56122987 12695 "parameters" : {
44660702 12696 "additionalProperties" : 0,
56122987 12697 "properties" : {
7aacca6f 12698 "forceStop" : {
44660702 12699 "default" : 0,
7aacca6f
DM
12700 "description" : "Make sure the Container stops.",
12701 "optional" : 1,
44660702
DM
12702 "type" : "boolean"
12703 },
12704 "node" : {
12705 "description" : "The cluster node name.",
12706 "format" : "pve-node",
12707 "type" : "string"
7aacca6f
DM
12708 },
12709 "timeout" : {
7aacca6f 12710 "default" : 60,
44660702
DM
12711 "description" : "Wait maximal timeout seconds.",
12712 "minimum" : 0,
56122987 12713 "optional" : 1,
4bd7df8b
DM
12714 "type" : "integer",
12715 "typetext" : "integer (0- N)"
56122987
DM
12716 },
12717 "vmid" : {
7aacca6f 12718 "description" : "The (unique) ID of the VM.",
44660702
DM
12719 "format" : "pve-vmid",
12720 "minimum" : 1,
4bd7df8b
DM
12721 "type" : "integer",
12722 "typetext" : "integer (1- N)"
56122987 12723 }
44660702 12724 }
56122987
DM
12725 },
12726 "permissions" : {
12727 "check" : [
12728 "perm",
12729 "/vms/{vmid}",
12730 [
12731 "VM.PowerMgmt"
12732 ]
12733 ]
12734 },
44660702
DM
12735 "protected" : 1,
12736 "proxyto" : "node",
7aacca6f
DM
12737 "returns" : {
12738 "type" : "string"
12739 }
56122987
DM
12740 }
12741 },
44660702
DM
12742 "leaf" : 1,
12743 "path" : "/nodes/{node}/lxc/{vmid}/status/shutdown",
7aacca6f 12744 "text" : "shutdown"
56122987
DM
12745 },
12746 {
56122987
DM
12747 "info" : {
12748 "POST" : {
7aacca6f 12749 "description" : "Suspend the container.",
7aacca6f 12750 "method" : "POST",
7aacca6f 12751 "name" : "vm_suspend",
56122987
DM
12752 "parameters" : {
12753 "additionalProperties" : 0,
12754 "properties" : {
44660702
DM
12755 "node" : {
12756 "description" : "The cluster node name.",
12757 "format" : "pve-node",
12758 "type" : "string"
12759 },
7aacca6f 12760 "vmid" : {
7aacca6f
DM
12761 "description" : "The (unique) ID of the VM.",
12762 "format" : "pve-vmid",
44660702 12763 "minimum" : 1,
4bd7df8b
DM
12764 "type" : "integer",
12765 "typetext" : "integer (1- N)"
56122987
DM
12766 }
12767 }
7aacca6f 12768 },
56122987
DM
12769 "permissions" : {
12770 "check" : [
12771 "perm",
12772 "/vms/{vmid}",
12773 [
12774 "VM.PowerMgmt"
12775 ]
12776 ]
12777 },
7aacca6f 12778 "protected" : 1,
44660702
DM
12779 "proxyto" : "node",
12780 "returns" : {
12781 "type" : "string"
12782 }
12783 }
12784 },
12785 "leaf" : 1,
12786 "path" : "/nodes/{node}/lxc/{vmid}/status/suspend",
12787 "text" : "suspend"
12788 },
12789 {
12790 "info" : {
12791 "POST" : {
12792 "description" : "Resume the container.",
12793 "method" : "POST",
12794 "name" : "vm_resume",
56122987 12795 "parameters" : {
44660702 12796 "additionalProperties" : 0,
56122987
DM
12797 "properties" : {
12798 "node" : {
7aacca6f 12799 "description" : "The cluster node name.",
44660702
DM
12800 "format" : "pve-node",
12801 "type" : "string"
56122987
DM
12802 },
12803 "vmid" : {
7aacca6f 12804 "description" : "The (unique) ID of the VM.",
56122987 12805 "format" : "pve-vmid",
44660702 12806 "minimum" : 1,
4bd7df8b
DM
12807 "type" : "integer",
12808 "typetext" : "integer (1- N)"
56122987 12809 }
44660702
DM
12810 }
12811 },
12812 "permissions" : {
12813 "check" : [
12814 "perm",
12815 "/vms/{vmid}",
12816 [
12817 "VM.PowerMgmt"
12818 ]
12819 ]
56122987 12820 },
44660702
DM
12821 "protected" : 1,
12822 "proxyto" : "node",
12823 "returns" : {
12824 "type" : "string"
12825 }
7aacca6f
DM
12826 }
12827 },
44660702
DM
12828 "leaf" : 1,
12829 "path" : "/nodes/{node}/lxc/{vmid}/status/resume",
7aacca6f
DM
12830 "text" : "resume"
12831 }
12832 ],
12833 "info" : {
12834 "GET" : {
7aacca6f 12835 "description" : "Directory index",
44660702 12836 "method" : "GET",
7aacca6f 12837 "name" : "vmcmdidx",
7aacca6f
DM
12838 "parameters" : {
12839 "additionalProperties" : 0,
12840 "properties" : {
12841 "node" : {
12842 "description" : "The cluster node name.",
44660702
DM
12843 "format" : "pve-node",
12844 "type" : "string"
56122987 12845 },
7aacca6f 12846 "vmid" : {
44660702 12847 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
12848 "format" : "pve-vmid",
12849 "minimum" : 1,
4bd7df8b
DM
12850 "type" : "integer",
12851 "typetext" : "integer (1- N)"
7aacca6f 12852 }
56122987
DM
12853 }
12854 },
44660702
DM
12855 "permissions" : {
12856 "user" : "all"
12857 },
12858 "proxyto" : "node",
7aacca6f 12859 "returns" : {
7aacca6f
DM
12860 "items" : {
12861 "properties" : {
12862 "subdir" : {
12863 "type" : "string"
12864 }
12865 },
12866 "type" : "object"
12867 },
12868 "links" : [
12869 {
44660702
DM
12870 "href" : "{subdir}",
12871 "rel" : "child"
7aacca6f 12872 }
44660702
DM
12873 ],
12874 "type" : "array"
7aacca6f
DM
12875 }
12876 }
44660702
DM
12877 },
12878 "leaf" : 0,
12879 "path" : "/nodes/{node}/lxc/{vmid}/status",
12880 "text" : "status"
7aacca6f
DM
12881 },
12882 {
7aacca6f 12883 "children" : [
56122987 12884 {
7aacca6f
DM
12885 "children" : [
12886 {
12887 "info" : {
12888 "POST" : {
7aacca6f 12889 "description" : "Rollback LXC state to specified snapshot.",
7aacca6f 12890 "method" : "POST",
44660702 12891 "name" : "rollback",
7aacca6f 12892 "parameters" : {
44660702 12893 "additionalProperties" : 0,
7aacca6f 12894 "properties" : {
44660702
DM
12895 "node" : {
12896 "description" : "The cluster node name.",
12897 "format" : "pve-node",
12898 "type" : "string"
12899 },
7aacca6f 12900 "snapname" : {
44660702 12901 "description" : "The name of the snapshot.",
7aacca6f
DM
12902 "format" : "pve-configid",
12903 "maxLength" : 40,
7aacca6f
DM
12904 "type" : "string"
12905 },
7aacca6f 12906 "vmid" : {
44660702 12907 "description" : "The (unique) ID of the VM.",
7aacca6f 12908 "format" : "pve-vmid",
44660702 12909 "minimum" : 1,
4bd7df8b
DM
12910 "type" : "integer",
12911 "typetext" : "integer (1- N)"
7aacca6f 12912 }
44660702
DM
12913 }
12914 },
12915 "permissions" : {
12916 "check" : [
12917 "perm",
12918 "/vms/{vmid}",
12919 [
12920 "VM.Snapshot"
12921 ]
12922 ]
7aacca6f 12923 },
44660702
DM
12924 "protected" : 1,
12925 "proxyto" : "node",
12926 "returns" : {
12927 "description" : "the task ID.",
12928 "type" : "string"
12929 }
7aacca6f
DM
12930 }
12931 },
7aacca6f 12932 "leaf" : 1,
44660702
DM
12933 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/rollback",
12934 "text" : "rollback"
7aacca6f
DM
12935 },
12936 {
7aacca6f
DM
12937 "info" : {
12938 "GET" : {
7aacca6f 12939 "description" : "Get snapshot configuration",
44660702
DM
12940 "method" : "GET",
12941 "name" : "get_snapshot_config",
7aacca6f
DM
12942 "parameters" : {
12943 "additionalProperties" : 0,
12944 "properties" : {
7aacca6f 12945 "node" : {
7aacca6f 12946 "description" : "The cluster node name.",
44660702 12947 "format" : "pve-node",
7aacca6f
DM
12948 "type" : "string"
12949 },
12950 "snapname" : {
44660702 12951 "description" : "The name of the snapshot.",
7aacca6f
DM
12952 "format" : "pve-configid",
12953 "maxLength" : 40,
44660702
DM
12954 "type" : "string"
12955 },
12956 "vmid" : {
12957 "description" : "The (unique) ID of the VM.",
12958 "format" : "pve-vmid",
12959 "minimum" : 1,
4bd7df8b
DM
12960 "type" : "integer",
12961 "typetext" : "integer (1- N)"
7aacca6f
DM
12962 }
12963 }
12964 },
12965 "permissions" : {
12966 "check" : [
12967 "perm",
12968 "/vms/{vmid}",
12969 [
12970 "VM.Snapshot"
12971 ]
12972 ]
12973 },
44660702
DM
12974 "proxyto" : "node",
12975 "returns" : {
12976 "type" : "object"
12977 }
7aacca6f
DM
12978 },
12979 "PUT" : {
44660702
DM
12980 "description" : "Update snapshot metadata.",
12981 "method" : "PUT",
7aacca6f
DM
12982 "name" : "update_snapshot_config",
12983 "parameters" : {
12984 "additionalProperties" : 0,
12985 "properties" : {
44660702
DM
12986 "description" : {
12987 "description" : "A textual description or comment.",
12988 "optional" : 1,
12989 "type" : "string"
12990 },
7aacca6f 12991 "node" : {
7aacca6f 12992 "description" : "The cluster node name.",
44660702
DM
12993 "format" : "pve-node",
12994 "type" : "string"
7aacca6f
DM
12995 },
12996 "snapname" : {
12997 "description" : "The name of the snapshot.",
7aacca6f 12998 "format" : "pve-configid",
44660702
DM
12999 "maxLength" : 40,
13000 "type" : "string"
7aacca6f
DM
13001 },
13002 "vmid" : {
44660702 13003 "description" : "The (unique) ID of the VM.",
7aacca6f 13004 "format" : "pve-vmid",
44660702 13005 "minimum" : 1,
4bd7df8b
DM
13006 "type" : "integer",
13007 "typetext" : "integer (1- N)"
7aacca6f
DM
13008 }
13009 }
13010 },
7aacca6f
DM
13011 "permissions" : {
13012 "check" : [
13013 "perm",
13014 "/vms/{vmid}",
13015 [
13016 "VM.Snapshot"
13017 ]
13018 ]
13019 },
44660702
DM
13020 "protected" : 1,
13021 "proxyto" : "node",
7aacca6f
DM
13022 "returns" : {
13023 "type" : "null"
13024 }
13025 }
13026 },
44660702 13027 "leaf" : 1,
7aacca6f 13028 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}/config",
44660702 13029 "text" : "config"
7aacca6f
DM
13030 }
13031 ],
56122987 13032 "info" : {
44660702
DM
13033 "DELETE" : {
13034 "description" : "Delete a LXC snapshot.",
13035 "method" : "DELETE",
13036 "name" : "delsnapshot",
56122987 13037 "parameters" : {
44660702 13038 "additionalProperties" : 0,
56122987 13039 "properties" : {
44660702
DM
13040 "force" : {
13041 "description" : "For removal from config file, even if removing disk snapshots fails.",
13042 "optional" : 1,
13043 "type" : "boolean"
13044 },
13045 "node" : {
13046 "description" : "The cluster node name.",
13047 "format" : "pve-node",
13048 "type" : "string"
7aacca6f
DM
13049 },
13050 "snapname" : {
7aacca6f
DM
13051 "description" : "The name of the snapshot.",
13052 "format" : "pve-configid",
44660702 13053 "maxLength" : 40,
7aacca6f 13054 "type" : "string"
44660702
DM
13055 },
13056 "vmid" : {
13057 "description" : "The (unique) ID of the VM.",
13058 "format" : "pve-vmid",
13059 "minimum" : 1,
4bd7df8b
DM
13060 "type" : "integer",
13061 "typetext" : "integer (1- N)"
56122987 13062 }
44660702 13063 }
7aacca6f 13064 },
56122987
DM
13065 "permissions" : {
13066 "check" : [
13067 "perm",
13068 "/vms/{vmid}",
13069 [
7aacca6f 13070 "VM.Snapshot"
56122987
DM
13071 ]
13072 ]
13073 },
44660702 13074 "protected" : 1,
7aacca6f 13075 "proxyto" : "node",
56122987 13076 "returns" : {
7aacca6f 13077 "description" : "the task ID.",
56122987 13078 "type" : "string"
44660702
DM
13079 }
13080 },
13081 "GET" : {
13082 "description" : "",
13083 "method" : "GET",
13084 "name" : "snapshot_cmd_idx",
7aacca6f
DM
13085 "parameters" : {
13086 "additionalProperties" : 0,
13087 "properties" : {
7aacca6f 13088 "node" : {
44660702 13089 "description" : "The cluster node name.",
7aacca6f 13090 "format" : "pve-node",
44660702 13091 "type" : "string"
7aacca6f
DM
13092 },
13093 "snapname" : {
44660702 13094 "description" : "The name of the snapshot.",
7aacca6f 13095 "format" : "pve-configid",
44660702
DM
13096 "maxLength" : 40,
13097 "type" : "string"
13098 },
13099 "vmid" : {
13100 "description" : "The (unique) ID of the VM.",
13101 "format" : "pve-vmid",
13102 "minimum" : 1,
4bd7df8b
DM
13103 "type" : "integer",
13104 "typetext" : "integer (1- N)"
7aacca6f
DM
13105 }
13106 }
13107 },
44660702
DM
13108 "permissions" : {
13109 "user" : "all"
13110 },
13111 "returns" : {
13112 "items" : {
13113 "properties" : {},
13114 "type" : "object"
13115 },
13116 "links" : [
13117 {
13118 "href" : "{cmd}",
13119 "rel" : "child"
13120 }
13121 ],
13122 "type" : "array"
13123 }
13124 }
13125 },
13126 "leaf" : 0,
13127 "path" : "/nodes/{node}/lxc/{vmid}/snapshot/{snapname}",
13128 "text" : "{snapname}"
13129 }
13130 ],
13131 "info" : {
13132 "GET" : {
13133 "description" : "List all snapshots.",
13134 "method" : "GET",
13135 "name" : "list",
13136 "parameters" : {
13137 "additionalProperties" : 0,
13138 "properties" : {
13139 "node" : {
13140 "description" : "The cluster node name.",
13141 "format" : "pve-node",
13142 "type" : "string"
13143 },
13144 "vmid" : {
13145 "description" : "The (unique) ID of the VM.",
13146 "format" : "pve-vmid",
13147 "minimum" : 1,
4bd7df8b
DM
13148 "type" : "integer",
13149 "typetext" : "integer (1- N)"
44660702 13150 }
56122987
DM
13151 }
13152 },
56122987 13153 "permissions" : {
7aacca6f
DM
13154 "check" : [
13155 "perm",
13156 "/vms/{vmid}",
13157 [
13158 "VM.Audit"
13159 ]
13160 ]
13161 },
44660702 13162 "protected" : 1,
56122987 13163 "proxyto" : "node",
7aacca6f 13164 "returns" : {
44660702
DM
13165 "items" : {
13166 "properties" : {},
13167 "type" : "object"
13168 },
7aacca6f
DM
13169 "links" : [
13170 {
13171 "href" : "{name}",
13172 "rel" : "child"
13173 }
13174 ],
7aacca6f 13175 "type" : "array"
44660702 13176 }
7aacca6f
DM
13177 },
13178 "POST" : {
44660702
DM
13179 "description" : "Snapshot a container.",
13180 "method" : "POST",
13181 "name" : "snapshot",
56122987
DM
13182 "parameters" : {
13183 "additionalProperties" : 0,
13184 "properties" : {
7aacca6f 13185 "description" : {
44660702 13186 "description" : "A textual description or comment.",
7aacca6f 13187 "optional" : 1,
44660702
DM
13188 "type" : "string"
13189 },
13190 "node" : {
13191 "description" : "The cluster node name.",
13192 "format" : "pve-node",
13193 "type" : "string"
56122987
DM
13194 },
13195 "snapname" : {
56122987 13196 "description" : "The name of the snapshot.",
44660702 13197 "format" : "pve-configid",
7aacca6f 13198 "maxLength" : 40,
44660702 13199 "type" : "string"
56122987 13200 },
44660702
DM
13201 "vmid" : {
13202 "description" : "The (unique) ID of the VM.",
13203 "format" : "pve-vmid",
13204 "minimum" : 1,
4bd7df8b
DM
13205 "type" : "integer",
13206 "typetext" : "integer (1- N)"
56122987 13207 }
7aacca6f 13208 }
56122987 13209 },
56122987
DM
13210 "permissions" : {
13211 "check" : [
13212 "perm",
13213 "/vms/{vmid}",
13214 [
7aacca6f 13215 "VM.Snapshot"
56122987
DM
13216 ]
13217 ]
7aacca6f 13218 },
44660702 13219 "protected" : 1,
7aacca6f
DM
13220 "proxyto" : "node",
13221 "returns" : {
13222 "description" : "the task ID.",
13223 "type" : "string"
56122987
DM
13224 }
13225 }
44660702
DM
13226 },
13227 "leaf" : 0,
13228 "path" : "/nodes/{node}/lxc/{vmid}/snapshot",
13229 "text" : "snapshot"
7aacca6f
DM
13230 },
13231 {
56122987
DM
13232 "children" : [
13233 {
56122987
DM
13234 "children" : [
13235 {
56122987 13236 "info" : {
44660702
DM
13237 "DELETE" : {
13238 "description" : "Delete rule.",
13239 "method" : "DELETE",
13240 "name" : "delete_rule",
56122987 13241 "parameters" : {
44660702 13242 "additionalProperties" : 0,
56122987 13243 "properties" : {
44660702
DM
13244 "digest" : {
13245 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13246 "maxLength" : 40,
7aacca6f 13247 "optional" : 1,
44660702 13248 "type" : "string"
7aacca6f
DM
13249 },
13250 "node" : {
44660702 13251 "description" : "The cluster node name.",
7aacca6f 13252 "format" : "pve-node",
44660702
DM
13253 "type" : "string"
13254 },
13255 "pos" : {
13256 "description" : "Update rule at position <pos>.",
13257 "minimum" : 0,
13258 "optional" : 1,
4bd7df8b
DM
13259 "type" : "integer",
13260 "typetext" : "integer (0- N)"
44660702
DM
13261 },
13262 "vmid" : {
13263 "description" : "The (unique) ID of the VM.",
13264 "format" : "pve-vmid",
13265 "minimum" : 1,
4bd7df8b
DM
13266 "type" : "integer",
13267 "typetext" : "integer (1- N)"
56122987 13268 }
44660702 13269 }
56122987 13270 },
56122987
DM
13271 "permissions" : {
13272 "check" : [
13273 "perm",
13274 "/vms/{vmid}",
13275 [
44660702 13276 "VM.Config.Network"
56122987
DM
13277 ]
13278 ]
13279 },
44660702 13280 "protected" : 1,
7aacca6f 13281 "proxyto" : null,
44660702
DM
13282 "returns" : {
13283 "type" : "null"
13284 }
7aacca6f 13285 },
44660702
DM
13286 "GET" : {
13287 "description" : "Get single rule data.",
13288 "method" : "GET",
13289 "name" : "get_rule",
56122987 13290 "parameters" : {
44660702 13291 "additionalProperties" : 0,
56122987 13292 "properties" : {
7aacca6f 13293 "node" : {
7aacca6f 13294 "description" : "The cluster node name.",
44660702 13295 "format" : "pve-node",
56122987
DM
13296 "type" : "string"
13297 },
7aacca6f 13298 "pos" : {
7aacca6f 13299 "description" : "Update rule at position <pos>.",
44660702 13300 "minimum" : 0,
7aacca6f 13301 "optional" : 1,
4bd7df8b
DM
13302 "type" : "integer",
13303 "typetext" : "integer (0- N)"
56122987 13304 },
7aacca6f 13305 "vmid" : {
44660702 13306 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
13307 "format" : "pve-vmid",
13308 "minimum" : 1,
4bd7df8b
DM
13309 "type" : "integer",
13310 "typetext" : "integer (1- N)"
56122987 13311 }
44660702 13312 }
56122987 13313 },
7aacca6f
DM
13314 "permissions" : {
13315 "check" : [
13316 "perm",
13317 "/vms/{vmid}",
13318 [
44660702 13319 "VM.Audit"
7aacca6f
DM
13320 ]
13321 ]
13322 },
7aacca6f
DM
13323 "proxyto" : null,
13324 "returns" : {
44660702
DM
13325 "properties" : {
13326 "pos" : {
13327 "type" : "integer"
13328 }
13329 },
13330 "type" : "object"
7aacca6f 13331 }
56122987 13332 },
44660702
DM
13333 "PUT" : {
13334 "description" : "Modify rule data.",
13335 "method" : "PUT",
13336 "name" : "update_rule",
56122987
DM
13337 "parameters" : {
13338 "additionalProperties" : 0,
13339 "properties" : {
44660702
DM
13340 "action" : {
13341 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
13342 "maxLength" : 20,
13343 "minLength" : 2,
13344 "optional" : 1,
13345 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13346 "type" : "string"
13347 },
13348 "comment" : {
e94f0d56 13349 "description" : "Descriptive comment.",
44660702
DM
13350 "optional" : 1,
13351 "type" : "string"
13352 },
13353 "delete" : {
13354 "description" : "A list of settings you want to delete.",
13355 "format" : "pve-configid-list",
13356 "optional" : 1,
13357 "type" : "string"
13358 },
13359 "dest" : {
13360 "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.",
13361 "format" : "pve-fw-addr-spec",
13362 "optional" : 1,
13363 "type" : "string"
13364 },
13365 "digest" : {
13366 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13367 "maxLength" : 40,
13368 "optional" : 1,
13369 "type" : "string"
13370 },
13371 "dport" : {
13372 "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.",
13373 "format" : "pve-fw-dport-spec",
13374 "optional" : 1,
13375 "type" : "string"
13376 },
13377 "enable" : {
e94f0d56 13378 "description" : "Flag to enable/disable a rule.",
44660702
DM
13379 "minimum" : 0,
13380 "optional" : 1,
4bd7df8b
DM
13381 "type" : "integer",
13382 "typetext" : "integer (0- N)"
44660702
DM
13383 },
13384 "iface" : {
13385 "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.",
13386 "format" : "pve-iface",
13387 "maxLength" : 20,
13388 "minLength" : 2,
13389 "optional" : 1,
13390 "type" : "string"
13391 },
13392 "macro" : {
e94f0d56 13393 "description" : "Use predefined standard macro.",
44660702
DM
13394 "maxLength" : 128,
13395 "optional" : 1,
13396 "type" : "string"
13397 },
13398 "moveto" : {
13399 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
13400 "minimum" : 0,
13401 "optional" : 1,
4bd7df8b
DM
13402 "type" : "integer",
13403 "typetext" : "integer (0- N)"
44660702 13404 },
7aacca6f
DM
13405 "node" : {
13406 "description" : "The cluster node name.",
44660702
DM
13407 "format" : "pve-node",
13408 "type" : "string"
56122987
DM
13409 },
13410 "pos" : {
44660702 13411 "description" : "Update rule at position <pos>.",
56122987 13412 "minimum" : 0,
7aacca6f 13413 "optional" : 1,
4bd7df8b
DM
13414 "type" : "integer",
13415 "typetext" : "integer (0- N)"
56122987 13416 },
44660702
DM
13417 "proto" : {
13418 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13419 "format" : "pve-fw-protocol-spec",
13420 "optional" : 1,
13421 "type" : "string"
7aacca6f 13422 },
44660702
DM
13423 "source" : {
13424 "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.",
13425 "format" : "pve-fw-addr-spec",
13426 "optional" : 1,
13427 "type" : "string"
13428 },
13429 "sport" : {
13430 "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.",
13431 "format" : "pve-fw-sport-spec",
13432 "optional" : 1,
13433 "type" : "string"
13434 },
13435 "type" : {
e94f0d56 13436 "description" : "Rule type.",
44660702
DM
13437 "enum" : [
13438 "in",
13439 "out",
13440 "group"
13441 ],
7aacca6f 13442 "optional" : 1,
44660702
DM
13443 "type" : "string"
13444 },
13445 "vmid" : {
13446 "description" : "The (unique) ID of the VM.",
13447 "format" : "pve-vmid",
13448 "minimum" : 1,
4bd7df8b
DM
13449 "type" : "integer",
13450 "typetext" : "integer (1- N)"
56122987
DM
13451 }
13452 }
13453 },
56122987
DM
13454 "permissions" : {
13455 "check" : [
13456 "perm",
13457 "/vms/{vmid}",
13458 [
7aacca6f 13459 "VM.Config.Network"
56122987
DM
13460 ]
13461 ]
13462 },
44660702 13463 "protected" : 1,
56122987 13464 "proxyto" : null,
56122987 13465 "returns" : {
7aacca6f
DM
13466 "type" : "null"
13467 }
56122987 13468 }
44660702
DM
13469 },
13470 "leaf" : 1,
13471 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules/{pos}",
13472 "text" : "{pos}"
56122987
DM
13473 }
13474 ],
13475 "info" : {
7aacca6f 13476 "GET" : {
44660702
DM
13477 "description" : "List rules.",
13478 "method" : "GET",
13479 "name" : "get_rules",
7aacca6f 13480 "parameters" : {
44660702 13481 "additionalProperties" : 0,
7aacca6f
DM
13482 "properties" : {
13483 "node" : {
7aacca6f 13484 "description" : "The cluster node name.",
44660702
DM
13485 "format" : "pve-node",
13486 "type" : "string"
7aacca6f
DM
13487 },
13488 "vmid" : {
13489 "description" : "The (unique) ID of the VM.",
44660702 13490 "format" : "pve-vmid",
7aacca6f 13491 "minimum" : 1,
4bd7df8b
DM
13492 "type" : "integer",
13493 "typetext" : "integer (1- N)"
7aacca6f 13494 }
44660702 13495 }
56122987 13496 },
56122987
DM
13497 "permissions" : {
13498 "check" : [
13499 "perm",
13500 "/vms/{vmid}",
13501 [
7aacca6f 13502 "VM.Audit"
56122987
DM
13503 ]
13504 ]
13505 },
13506 "proxyto" : null,
7aacca6f 13507 "returns" : {
7aacca6f
DM
13508 "items" : {
13509 "properties" : {
13510 "pos" : {
13511 "type" : "integer"
13512 }
13513 },
13514 "type" : "object"
13515 },
13516 "links" : [
13517 {
44660702
DM
13518 "href" : "{pos}",
13519 "rel" : "child"
7aacca6f 13520 }
44660702
DM
13521 ],
13522 "type" : "array"
13523 }
7aacca6f
DM
13524 },
13525 "POST" : {
44660702
DM
13526 "description" : "Create new rule.",
13527 "method" : "POST",
7aacca6f 13528 "name" : "create_rule",
56122987 13529 "parameters" : {
44660702 13530 "additionalProperties" : 0,
56122987 13531 "properties" : {
7aacca6f 13532 "action" : {
44660702 13533 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
7aacca6f 13534 "maxLength" : 20,
44660702 13535 "minLength" : 2,
7aacca6f
DM
13536 "optional" : 0,
13537 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987
DM
13538 "type" : "string"
13539 },
44660702 13540 "comment" : {
e94f0d56 13541 "description" : "Descriptive comment.",
7aacca6f 13542 "optional" : 1,
44660702 13543 "type" : "string"
56122987 13544 },
44660702
DM
13545 "dest" : {
13546 "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.",
13547 "format" : "pve-fw-addr-spec",
56122987 13548 "optional" : 1,
44660702 13549 "type" : "string"
56122987 13550 },
44660702
DM
13551 "digest" : {
13552 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13553 "maxLength" : 40,
56122987 13554 "optional" : 1,
44660702 13555 "type" : "string"
56122987 13556 },
44660702
DM
13557 "dport" : {
13558 "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.",
13559 "format" : "pve-fw-dport-spec",
56122987 13560 "optional" : 1,
44660702 13561 "type" : "string"
56122987 13562 },
44660702 13563 "enable" : {
e94f0d56 13564 "description" : "Flag to enable/disable a rule.",
44660702 13565 "minimum" : 0,
56122987 13566 "optional" : 1,
4bd7df8b
DM
13567 "type" : "integer",
13568 "typetext" : "integer (0- N)"
56122987 13569 },
44660702
DM
13570 "iface" : {
13571 "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.",
13572 "format" : "pve-iface",
13573 "maxLength" : 20,
13574 "minLength" : 2,
7aacca6f 13575 "optional" : 1,
56122987 13576 "type" : "string"
56122987 13577 },
44660702 13578 "macro" : {
e94f0d56 13579 "description" : "Use predefined standard macro.",
44660702 13580 "maxLength" : 128,
56122987
DM
13581 "optional" : 1,
13582 "type" : "string"
13583 },
13584 "node" : {
7aacca6f 13585 "description" : "The cluster node name.",
44660702
DM
13586 "format" : "pve-node",
13587 "type" : "string"
7aacca6f 13588 },
44660702
DM
13589 "pos" : {
13590 "description" : "Update rule at position <pos>.",
13591 "minimum" : 0,
13592 "optional" : 1,
4bd7df8b
DM
13593 "type" : "integer",
13594 "typetext" : "integer (0- N)"
44660702
DM
13595 },
13596 "proto" : {
13597 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
13598 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
13599 "optional" : 1,
13600 "type" : "string"
7aacca6f 13601 },
44660702
DM
13602 "source" : {
13603 "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.",
13604 "format" : "pve-fw-addr-spec",
13605 "optional" : 1,
13606 "type" : "string"
56122987 13607 },
44660702
DM
13608 "sport" : {
13609 "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.",
13610 "format" : "pve-fw-sport-spec",
13611 "optional" : 1,
13612 "type" : "string"
7aacca6f 13613 },
44660702 13614 "type" : {
e94f0d56 13615 "description" : "Rule type.",
44660702
DM
13616 "enum" : [
13617 "in",
13618 "out",
13619 "group"
13620 ],
13621 "optional" : 0,
13622 "type" : "string"
13623 },
13624 "vmid" : {
13625 "description" : "The (unique) ID of the VM.",
13626 "format" : "pve-vmid",
13627 "minimum" : 1,
4bd7df8b
DM
13628 "type" : "integer",
13629 "typetext" : "integer (1- N)"
44660702
DM
13630 }
13631 }
13632 },
13633 "permissions" : {
13634 "check" : [
13635 "perm",
13636 "/vms/{vmid}",
13637 [
13638 "VM.Config.Network"
13639 ]
13640 ]
13641 },
13642 "protected" : 1,
13643 "proxyto" : null,
13644 "returns" : {
13645 "type" : "null"
13646 }
13647 }
13648 },
13649 "leaf" : 0,
13650 "path" : "/nodes/{node}/lxc/{vmid}/firewall/rules",
13651 "text" : "rules"
13652 },
13653 {
13654 "children" : [
13655 {
13656 "info" : {
13657 "DELETE" : {
13658 "description" : "Remove IP or Network alias.",
13659 "method" : "DELETE",
13660 "name" : "remove_alias",
56122987 13661 "parameters" : {
44660702 13662 "additionalProperties" : 0,
56122987 13663 "properties" : {
44660702
DM
13664 "digest" : {
13665 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13666 "maxLength" : 40,
56122987
DM
13667 "optional" : 1,
13668 "type" : "string"
13669 },
7aacca6f 13670 "name" : {
44660702 13671 "description" : "Alias name.",
7aacca6f 13672 "maxLength" : 64,
7aacca6f
DM
13673 "minLength" : 2,
13674 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13675 "type" : "string"
7aacca6f
DM
13676 },
13677 "node" : {
44660702 13678 "description" : "The cluster node name.",
56122987 13679 "format" : "pve-node",
44660702 13680 "type" : "string"
7aacca6f 13681 },
56122987 13682 "vmid" : {
44660702 13683 "description" : "The (unique) ID of the VM.",
56122987 13684 "format" : "pve-vmid",
44660702 13685 "minimum" : 1,
4bd7df8b
DM
13686 "type" : "integer",
13687 "typetext" : "integer (1- N)"
56122987 13688 }
44660702 13689 }
56122987 13690 },
56122987
DM
13691 "permissions" : {
13692 "check" : [
13693 "perm",
13694 "/vms/{vmid}",
13695 [
7aacca6f 13696 "VM.Config.Network"
56122987
DM
13697 ]
13698 ]
13699 },
44660702 13700 "protected" : 1,
56122987 13701 "returns" : {
7aacca6f 13702 "type" : "null"
44660702 13703 }
56122987 13704 },
44660702
DM
13705 "GET" : {
13706 "description" : "Read alias.",
13707 "method" : "GET",
13708 "name" : "read_alias",
13709 "parameters" : {
13710 "additionalProperties" : 0,
13711 "properties" : {
13712 "name" : {
13713 "description" : "Alias name.",
13714 "maxLength" : 64,
13715 "minLength" : 2,
13716 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13717 "type" : "string"
13718 },
13719 "node" : {
13720 "description" : "The cluster node name.",
13721 "format" : "pve-node",
13722 "type" : "string"
13723 },
13724 "vmid" : {
13725 "description" : "The (unique) ID of the VM.",
13726 "format" : "pve-vmid",
13727 "minimum" : 1,
4bd7df8b
DM
13728 "type" : "integer",
13729 "typetext" : "integer (1- N)"
44660702
DM
13730 }
13731 }
56122987 13732 },
7aacca6f
DM
13733 "permissions" : {
13734 "check" : [
13735 "perm",
13736 "/vms/{vmid}",
13737 [
44660702 13738 "VM.Audit"
7aacca6f
DM
13739 ]
13740 ]
13741 },
44660702
DM
13742 "returns" : {
13743 "type" : "object"
13744 }
13745 },
13746 "PUT" : {
13747 "description" : "Update IP or Network alias.",
13748 "method" : "PUT",
13749 "name" : "update_alias",
56122987
DM
13750 "parameters" : {
13751 "additionalProperties" : 0,
13752 "properties" : {
44660702
DM
13753 "cidr" : {
13754 "description" : "Network/IP specification in CIDR format.",
13755 "format" : "IPorCIDR",
13756 "type" : "string"
13757 },
13758 "comment" : {
13759 "optional" : 1,
13760 "type" : "string"
13761 },
13762 "digest" : {
13763 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
13764 "maxLength" : 40,
13765 "optional" : 1,
13766 "type" : "string"
13767 },
56122987 13768 "name" : {
7aacca6f 13769 "description" : "Alias name.",
44660702
DM
13770 "maxLength" : 64,
13771 "minLength" : 2,
7aacca6f 13772 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13773 "type" : "string"
56122987
DM
13774 },
13775 "node" : {
13776 "description" : "The cluster node name.",
44660702
DM
13777 "format" : "pve-node",
13778 "type" : "string"
13779 },
13780 "rename" : {
13781 "description" : "Rename an existing alias.",
13782 "maxLength" : 64,
13783 "minLength" : 2,
13784 "optional" : 1,
13785 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
13786 "type" : "string"
56122987 13787 },
7aacca6f 13788 "vmid" : {
7aacca6f 13789 "description" : "The (unique) ID of the VM.",
44660702 13790 "format" : "pve-vmid",
7aacca6f 13791 "minimum" : 1,
4bd7df8b
DM
13792 "type" : "integer",
13793 "typetext" : "integer (1- N)"
56122987
DM
13794 }
13795 }
13796 },
44660702
DM
13797 "permissions" : {
13798 "check" : [
13799 "perm",
13800 "/vms/{vmid}",
13801 [
13802 "VM.Config.Network"
13803 ]
13804 ]
7aacca6f 13805 },
44660702
DM
13806 "protected" : 1,
13807 "returns" : {
13808 "type" : "null"
7aacca6f
DM
13809 }
13810 }
13811 },
44660702
DM
13812 "leaf" : 1,
13813 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases/{name}",
13814 "text" : "{name}"
13815 }
13816 ],
13817 "info" : {
13818 "GET" : {
13819 "description" : "List aliases",
13820 "method" : "GET",
13821 "name" : "get_aliases",
56122987
DM
13822 "parameters" : {
13823 "additionalProperties" : 0,
13824 "properties" : {
13825 "node" : {
44660702 13826 "description" : "The cluster node name.",
56122987 13827 "format" : "pve-node",
44660702 13828 "type" : "string"
56122987
DM
13829 },
13830 "vmid" : {
7aacca6f 13831 "description" : "The (unique) ID of the VM.",
44660702 13832 "format" : "pve-vmid",
7aacca6f 13833 "minimum" : 1,
4bd7df8b
DM
13834 "type" : "integer",
13835 "typetext" : "integer (1- N)"
56122987
DM
13836 }
13837 }
13838 },
44660702
DM
13839 "permissions" : {
13840 "check" : [
13841 "perm",
13842 "/vms/{vmid}",
13843 [
13844 "VM.Audit"
13845 ]
13846 ]
13847 },
56122987
DM
13848 "returns" : {
13849 "items" : {
56122987 13850 "properties" : {
44660702
DM
13851 "cidr" : {
13852 "type" : "string"
7aacca6f 13853 },
44660702
DM
13854 "comment" : {
13855 "optional" : 1,
56122987
DM
13856 "type" : "string"
13857 },
56122987 13858 "digest" : {
56122987 13859 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702
DM
13860 "maxLength" : 40,
13861 "optional" : 0,
13862 "type" : "string"
13863 },
13864 "name" : {
13865 "type" : "string"
56122987 13866 }
44660702
DM
13867 },
13868 "type" : "object"
13869 },
13870 "links" : [
13871 {
13872 "href" : "{name}",
13873 "rel" : "child"
56122987 13874 }
44660702
DM
13875 ],
13876 "type" : "array"
7aacca6f
DM
13877 }
13878 },
13879 "POST" : {
44660702 13880 "description" : "Create IP or Network Alias.",
7aacca6f 13881 "method" : "POST",
44660702 13882 "name" : "create_alias",
7aacca6f
DM
13883 "parameters" : {
13884 "additionalProperties" : 0,
13885 "properties" : {
44660702
DM
13886 "cidr" : {
13887 "description" : "Network/IP specification in CIDR format.",
13888 "format" : "IPorCIDR",
7aacca6f
DM
13889 "type" : "string"
13890 },
13891 "comment" : {
13892 "optional" : 1,
13893 "type" : "string"
13894 },
44660702
DM
13895 "name" : {
13896 "description" : "Alias name.",
13897 "maxLength" : 64,
7aacca6f
DM
13898 "minLength" : 2,
13899 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
44660702 13900 "type" : "string"
7aacca6f
DM
13901 },
13902 "node" : {
44660702 13903 "description" : "The cluster node name.",
7aacca6f 13904 "format" : "pve-node",
44660702 13905 "type" : "string"
7aacca6f 13906 },
44660702
DM
13907 "vmid" : {
13908 "description" : "The (unique) ID of the VM.",
13909 "format" : "pve-vmid",
13910 "minimum" : 1,
4bd7df8b
DM
13911 "type" : "integer",
13912 "typetext" : "integer (1- N)"
7aacca6f
DM
13913 }
13914 }
13915 },
44660702
DM
13916 "permissions" : {
13917 "check" : [
13918 "perm",
13919 "/vms/{vmid}",
13920 [
13921 "VM.Config.Network"
13922 ]
13923 ]
13924 },
13925 "protected" : 1,
13926 "returns" : {
13927 "type" : "null"
13928 }
56122987
DM
13929 }
13930 },
44660702
DM
13931 "leaf" : 0,
13932 "path" : "/nodes/{node}/lxc/{vmid}/firewall/aliases",
13933 "text" : "aliases"
13934 },
13935 {
56122987
DM
13936 "children" : [
13937 {
56122987
DM
13938 "children" : [
13939 {
13940 "info" : {
13941 "DELETE" : {
44660702 13942 "description" : "Remove IP or Network from IPSet.",
7aacca6f 13943 "method" : "DELETE",
44660702 13944 "name" : "remove_ip",
56122987
DM
13945 "parameters" : {
13946 "additionalProperties" : 0,
13947 "properties" : {
44660702
DM
13948 "cidr" : {
13949 "description" : "Network/IP specification in CIDR format.",
13950 "format" : "IPorCIDRorAlias",
13951 "type" : "string"
56122987
DM
13952 },
13953 "digest" : {
44660702 13954 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
56122987 13955 "maxLength" : 40,
7aacca6f 13956 "optional" : 1,
44660702 13957 "type" : "string"
56122987 13958 },
56122987 13959 "name" : {
44660702 13960 "description" : "IP set name.",
56122987 13961 "maxLength" : 64,
7aacca6f 13962 "minLength" : 2,
56122987 13963 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
56122987 13964 "type" : "string"
7aacca6f
DM
13965 },
13966 "node" : {
7aacca6f 13967 "description" : "The cluster node name.",
44660702
DM
13968 "format" : "pve-node",
13969 "type" : "string"
13970 },
13971 "vmid" : {
13972 "description" : "The (unique) ID of the VM.",
13973 "format" : "pve-vmid",
13974 "minimum" : 1,
4bd7df8b
DM
13975 "type" : "integer",
13976 "typetext" : "integer (1- N)"
56122987
DM
13977 }
13978 }
13979 },
44660702
DM
13980 "permissions" : {
13981 "check" : [
13982 "perm",
13983 "/vms/{vmid}",
13984 [
13985 "VM.Config.Network"
13986 ]
13987 ]
13988 },
7aacca6f 13989 "protected" : 1,
56122987
DM
13990 "returns" : {
13991 "type" : "null"
44660702
DM
13992 }
13993 },
13994 "GET" : {
13995 "description" : "Read IP or Network settings from IPSet.",
13996 "method" : "GET",
13997 "name" : "read_ip",
56122987
DM
13998 "parameters" : {
13999 "additionalProperties" : 0,
14000 "properties" : {
7aacca6f 14001 "cidr" : {
7aacca6f 14002 "description" : "Network/IP specification in CIDR format.",
44660702 14003 "format" : "IPorCIDRorAlias",
56122987
DM
14004 "type" : "string"
14005 },
7aacca6f 14006 "name" : {
44660702 14007 "description" : "IP set name.",
7aacca6f
DM
14008 "maxLength" : 64,
14009 "minLength" : 2,
7aacca6f
DM
14010 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14011 "type" : "string"
56122987 14012 },
44660702
DM
14013 "node" : {
14014 "description" : "The cluster node name.",
14015 "format" : "pve-node",
14016 "type" : "string"
14017 },
14018 "vmid" : {
14019 "description" : "The (unique) ID of the VM.",
14020 "format" : "pve-vmid",
14021 "minimum" : 1,
4bd7df8b
DM
14022 "type" : "integer",
14023 "typetext" : "integer (1- N)"
56122987
DM
14024 }
14025 }
14026 },
56122987
DM
14027 "permissions" : {
14028 "check" : [
14029 "perm",
14030 "/vms/{vmid}",
14031 [
44660702 14032 "VM.Audit"
56122987
DM
14033 ]
14034 ]
7aacca6f 14035 },
44660702 14036 "protected" : 1,
7aacca6f
DM
14037 "returns" : {
14038 "type" : "object"
44660702
DM
14039 }
14040 },
14041 "PUT" : {
14042 "description" : "Update IP or Network settings",
14043 "method" : "PUT",
14044 "name" : "update_ip",
7aacca6f 14045 "parameters" : {
44660702 14046 "additionalProperties" : 0,
7aacca6f
DM
14047 "properties" : {
14048 "cidr" : {
44660702 14049 "description" : "Network/IP specification in CIDR format.",
7aacca6f 14050 "format" : "IPorCIDRorAlias",
44660702 14051 "type" : "string"
7aacca6f 14052 },
44660702
DM
14053 "comment" : {
14054 "optional" : 1,
14055 "type" : "string"
14056 },
14057 "digest" : {
14058 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14059 "maxLength" : 40,
14060 "optional" : 1,
14061 "type" : "string"
14062 },
14063 "name" : {
14064 "description" : "IP set name.",
14065 "maxLength" : 64,
14066 "minLength" : 2,
14067 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14068 "type" : "string"
7aacca6f
DM
14069 },
14070 "node" : {
7aacca6f 14071 "description" : "The cluster node name.",
44660702 14072 "format" : "pve-node",
7aacca6f
DM
14073 "type" : "string"
14074 },
44660702
DM
14075 "nomatch" : {
14076 "optional" : 1,
14077 "type" : "boolean"
14078 },
14079 "vmid" : {
14080 "description" : "The (unique) ID of the VM.",
14081 "format" : "pve-vmid",
14082 "minimum" : 1,
4bd7df8b
DM
14083 "type" : "integer",
14084 "typetext" : "integer (1- N)"
7aacca6f 14085 }
44660702
DM
14086 }
14087 },
14088 "permissions" : {
14089 "check" : [
14090 "perm",
14091 "/vms/{vmid}",
14092 [
14093 "VM.Config.Network"
14094 ]
14095 ]
7aacca6f
DM
14096 },
14097 "protected" : 1,
44660702
DM
14098 "returns" : {
14099 "type" : "null"
14100 }
56122987
DM
14101 }
14102 },
56122987 14103 "leaf" : 1,
44660702
DM
14104 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}/{cidr}",
14105 "text" : "{cidr}"
56122987
DM
14106 }
14107 ],
14108 "info" : {
44660702
DM
14109 "DELETE" : {
14110 "description" : "Delete IPSet",
14111 "method" : "DELETE",
14112 "name" : "delete_ipset",
14113 "parameters" : {
14114 "additionalProperties" : 0,
14115 "properties" : {
14116 "name" : {
14117 "description" : "IP set name.",
14118 "maxLength" : 64,
14119 "minLength" : 2,
14120 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14121 "type" : "string"
14122 },
14123 "node" : {
14124 "description" : "The cluster node name.",
14125 "format" : "pve-node",
14126 "type" : "string"
14127 },
14128 "vmid" : {
14129 "description" : "The (unique) ID of the VM.",
14130 "format" : "pve-vmid",
14131 "minimum" : 1,
4bd7df8b
DM
14132 "type" : "integer",
14133 "typetext" : "integer (1- N)"
44660702
DM
14134 }
14135 }
14136 },
14137 "permissions" : {
14138 "check" : [
14139 "perm",
14140 "/vms/{vmid}",
14141 [
14142 "VM.Config.Network"
14143 ]
14144 ]
14145 },
14146 "protected" : 1,
14147 "returns" : {
14148 "type" : "null"
14149 }
14150 },
56122987 14151 "GET" : {
7aacca6f 14152 "description" : "List IPSet content",
44660702
DM
14153 "method" : "GET",
14154 "name" : "get_ipset",
7aacca6f
DM
14155 "parameters" : {
14156 "additionalProperties" : 0,
14157 "properties" : {
14158 "name" : {
14159 "description" : "IP set name.",
44660702 14160 "maxLength" : 64,
7aacca6f 14161 "minLength" : 2,
44660702
DM
14162 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14163 "type" : "string"
7aacca6f
DM
14164 },
14165 "node" : {
7aacca6f 14166 "description" : "The cluster node name.",
44660702 14167 "format" : "pve-node",
7aacca6f
DM
14168 "type" : "string"
14169 },
14170 "vmid" : {
14171 "description" : "The (unique) ID of the VM.",
44660702 14172 "format" : "pve-vmid",
7aacca6f 14173 "minimum" : 1,
4bd7df8b
DM
14174 "type" : "integer",
14175 "typetext" : "integer (1- N)"
56122987 14176 }
7aacca6f
DM
14177 }
14178 },
7aacca6f
DM
14179 "permissions" : {
14180 "check" : [
14181 "perm",
14182 "/vms/{vmid}",
14183 [
14184 "VM.Audit"
14185 ]
14186 ]
14187 },
14188 "returns" : {
56122987
DM
14189 "items" : {
14190 "properties" : {
14191 "cidr" : {
14192 "type" : "string"
14193 },
44660702
DM
14194 "comment" : {
14195 "optional" : 1,
14196 "type" : "string"
14197 },
56122987 14198 "digest" : {
56122987 14199 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 14200 "maxLength" : 40,
7aacca6f 14201 "optional" : 0,
56122987 14202 "type" : "string"
7aacca6f
DM
14203 },
14204 "nomatch" : {
44660702
DM
14205 "optional" : 1,
14206 "type" : "boolean"
56122987 14207 }
44660702
DM
14208 },
14209 "type" : "object"
56122987 14210 },
7aacca6f
DM
14211 "links" : [
14212 {
44660702
DM
14213 "href" : "{cidr}",
14214 "rel" : "child"
56122987 14215 }
44660702
DM
14216 ],
14217 "type" : "array"
14218 }
56122987 14219 },
7aacca6f
DM
14220 "POST" : {
14221 "description" : "Add IP or Network to IPSet.",
44660702 14222 "method" : "POST",
7aacca6f 14223 "name" : "create_ip",
56122987 14224 "parameters" : {
44660702 14225 "additionalProperties" : 0,
56122987 14226 "properties" : {
44660702
DM
14227 "cidr" : {
14228 "description" : "Network/IP specification in CIDR format.",
14229 "format" : "IPorCIDRorAlias",
14230 "type" : "string"
14231 },
14232 "comment" : {
14233 "optional" : 1,
14234 "type" : "string"
56122987
DM
14235 },
14236 "name" : {
56122987 14237 "description" : "IP set name.",
44660702 14238 "maxLength" : 64,
7aacca6f 14239 "minLength" : 2,
44660702 14240 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
7aacca6f 14241 "type" : "string"
56122987 14242 },
7aacca6f 14243 "node" : {
7aacca6f 14244 "description" : "The cluster node name.",
44660702 14245 "format" : "pve-node",
56122987
DM
14246 "type" : "string"
14247 },
44660702
DM
14248 "nomatch" : {
14249 "optional" : 1,
14250 "type" : "boolean"
7aacca6f
DM
14251 },
14252 "vmid" : {
44660702 14253 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14254 "format" : "pve-vmid",
14255 "minimum" : 1,
4bd7df8b
DM
14256 "type" : "integer",
14257 "typetext" : "integer (1- N)"
56122987 14258 }
44660702
DM
14259 }
14260 },
14261 "permissions" : {
14262 "check" : [
14263 "perm",
14264 "/vms/{vmid}",
14265 [
14266 "VM.Config.Network"
14267 ]
14268 ]
14269 },
14270 "protected" : 1,
14271 "returns" : {
14272 "type" : "null"
14273 }
14274 }
14275 },
14276 "leaf" : 0,
14277 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset/{name}",
14278 "text" : "{name}"
14279 }
14280 ],
14281 "info" : {
14282 "GET" : {
14283 "description" : "List IPSets",
14284 "method" : "GET",
14285 "name" : "ipset_index",
14286 "parameters" : {
14287 "additionalProperties" : 0,
14288 "properties" : {
14289 "node" : {
14290 "description" : "The cluster node name.",
14291 "format" : "pve-node",
14292 "type" : "string"
14293 },
14294 "vmid" : {
14295 "description" : "The (unique) ID of the VM.",
14296 "format" : "pve-vmid",
14297 "minimum" : 1,
4bd7df8b
DM
14298 "type" : "integer",
14299 "typetext" : "integer (1- N)"
44660702
DM
14300 }
14301 }
14302 },
14303 "permissions" : {
14304 "check" : [
14305 "perm",
14306 "/vms/{vmid}",
14307 [
14308 "VM.Audit"
14309 ]
14310 ]
14311 },
14312 "returns" : {
14313 "items" : {
14314 "properties" : {
14315 "comment" : {
14316 "optional" : 1,
14317 "type" : "string"
14318 },
14319 "digest" : {
14320 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14321 "maxLength" : 40,
14322 "optional" : 0,
14323 "type" : "string"
7aacca6f 14324 },
44660702
DM
14325 "name" : {
14326 "description" : "IP set name.",
14327 "maxLength" : 64,
14328 "minLength" : 2,
14329 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14330 "type" : "string"
14331 }
14332 },
14333 "type" : "object"
14334 },
14335 "links" : [
14336 {
14337 "href" : "{name}",
14338 "rel" : "child"
14339 }
14340 ],
14341 "type" : "array"
14342 }
14343 },
14344 "POST" : {
14345 "description" : "Create new IPSet",
14346 "method" : "POST",
14347 "name" : "create_ipset",
14348 "parameters" : {
14349 "additionalProperties" : 0,
14350 "properties" : {
14351 "comment" : {
14352 "optional" : 1,
14353 "type" : "string"
14354 },
14355 "digest" : {
14356 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14357 "maxLength" : 40,
14358 "optional" : 1,
14359 "type" : "string"
56122987 14360 },
44660702
DM
14361 "name" : {
14362 "description" : "IP set name.",
14363 "maxLength" : 64,
14364 "minLength" : 2,
14365 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14366 "type" : "string"
14367 },
14368 "node" : {
14369 "description" : "The cluster node name.",
14370 "format" : "pve-node",
14371 "type" : "string"
7aacca6f 14372 },
44660702
DM
14373 "rename" : {
14374 "description" : "Rename an existing IPSet. You can set 'rename' to the same value as 'name' to update the 'comment' of an existing IPSet.",
14375 "maxLength" : 64,
14376 "minLength" : 2,
14377 "optional" : 1,
14378 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
14379 "type" : "string"
14380 },
14381 "vmid" : {
14382 "description" : "The (unique) ID of the VM.",
14383 "format" : "pve-vmid",
14384 "minimum" : 1,
4bd7df8b
DM
14385 "type" : "integer",
14386 "typetext" : "integer (1- N)"
44660702 14387 }
56122987 14388 }
44660702
DM
14389 },
14390 "permissions" : {
14391 "check" : [
14392 "perm",
14393 "/vms/{vmid}",
14394 [
14395 "VM.Config.Network"
14396 ]
14397 ]
14398 },
14399 "protected" : 1,
14400 "returns" : {
14401 "type" : "null"
56122987
DM
14402 }
14403 }
44660702
DM
14404 },
14405 "leaf" : 0,
14406 "path" : "/nodes/{node}/lxc/{vmid}/firewall/ipset",
14407 "text" : "ipset"
56122987
DM
14408 },
14409 {
56122987 14410 "info" : {
7aacca6f 14411 "GET" : {
44660702 14412 "description" : "Get VM firewall options.",
7aacca6f 14413 "method" : "GET",
44660702
DM
14414 "name" : "get_options",
14415 "parameters" : {
14416 "additionalProperties" : 0,
14417 "properties" : {
14418 "node" : {
14419 "description" : "The cluster node name.",
14420 "format" : "pve-node",
14421 "type" : "string"
14422 },
14423 "vmid" : {
14424 "description" : "The (unique) ID of the VM.",
14425 "format" : "pve-vmid",
14426 "minimum" : 1,
4bd7df8b
DM
14427 "type" : "integer",
14428 "typetext" : "integer (1- N)"
44660702
DM
14429 }
14430 }
14431 },
14432 "permissions" : {
14433 "check" : [
14434 "perm",
14435 "/vms/{vmid}",
14436 [
14437 "VM.Audit"
14438 ]
14439 ]
14440 },
14441 "proxyto" : "node",
56122987 14442 "returns" : {
56122987 14443 "properties" : {
44660702
DM
14444 "dhcp" : {
14445 "description" : "Enable DHCP.",
14446 "optional" : 1,
14447 "type" : "boolean"
14448 },
14449 "enable" : {
14450 "description" : "Enable/disable firewall rules.",
14451 "optional" : 1,
14452 "type" : "boolean"
14453 },
14454 "ipfilter" : {
14455 "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 14456 "optional" : 1,
44660702
DM
14457 "type" : "boolean"
14458 },
14459 "log_level_in" : {
7aacca6f
DM
14460 "description" : "Log level for incoming traffic.",
14461 "enum" : [
14462 "emerg",
14463 "alert",
14464 "crit",
14465 "err",
14466 "warning",
14467 "notice",
14468 "info",
14469 "debug",
14470 "nolog"
44660702
DM
14471 ],
14472 "optional" : 1,
14473 "type" : "string"
56122987 14474 },
44660702
DM
14475 "log_level_out" : {
14476 "description" : "Log level for outgoing traffic.",
56122987 14477 "enum" : [
44660702
DM
14478 "emerg",
14479 "alert",
14480 "crit",
14481 "err",
14482 "warning",
14483 "notice",
14484 "info",
14485 "debug",
14486 "nolog"
7aacca6f 14487 ],
7aacca6f
DM
14488 "optional" : 1,
14489 "type" : "string"
56122987 14490 },
44660702
DM
14491 "macfilter" : {
14492 "description" : "Enable/disable MAC address filter.",
14493 "optional" : 1,
14494 "type" : "boolean"
7aacca6f 14495 },
44660702
DM
14496 "ndp" : {
14497 "description" : "Enable NDP.",
56122987 14498 "optional" : 1,
44660702 14499 "type" : "boolean"
56122987
DM
14500 },
14501 "policy_in" : {
7aacca6f 14502 "description" : "Input policy.",
56122987
DM
14503 "enum" : [
14504 "ACCEPT",
14505 "REJECT",
14506 "DROP"
14507 ],
7aacca6f 14508 "optional" : 1,
44660702 14509 "type" : "string"
56122987 14510 },
44660702
DM
14511 "policy_out" : {
14512 "description" : "Output policy.",
56122987 14513 "enum" : [
44660702
DM
14514 "ACCEPT",
14515 "REJECT",
14516 "DROP"
56122987 14517 ],
7aacca6f 14518 "optional" : 1,
56122987
DM
14519 "type" : "string"
14520 },
44660702
DM
14521 "radv" : {
14522 "description" : "Allow sending Router Advertisement.",
56122987 14523 "optional" : 1,
7aacca6f
DM
14524 "type" : "boolean"
14525 }
7aacca6f 14526 },
44660702
DM
14527 "type" : "object"
14528 }
7aacca6f
DM
14529 },
14530 "PUT" : {
44660702
DM
14531 "description" : "Set Firewall options.",
14532 "method" : "PUT",
7aacca6f
DM
14533 "name" : "set_options",
14534 "parameters" : {
44660702 14535 "additionalProperties" : 0,
7aacca6f 14536 "properties" : {
44660702
DM
14537 "delete" : {
14538 "description" : "A list of settings you want to delete.",
14539 "format" : "pve-configid-list",
14540 "optional" : 1,
14541 "type" : "string"
14542 },
14543 "dhcp" : {
14544 "description" : "Enable DHCP.",
14545 "optional" : 1,
14546 "type" : "boolean"
14547 },
14548 "digest" : {
14549 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
14550 "maxLength" : 40,
14551 "optional" : 1,
14552 "type" : "string"
14553 },
7aacca6f
DM
14554 "enable" : {
14555 "description" : "Enable/disable firewall rules.",
56122987 14556 "optional" : 1,
7aacca6f 14557 "type" : "boolean"
56122987 14558 },
44660702
DM
14559 "ipfilter" : {
14560 "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.",
14561 "optional" : 1,
14562 "type" : "boolean"
14563 },
14564 "log_level_in" : {
14565 "description" : "Log level for incoming traffic.",
56122987
DM
14566 "enum" : [
14567 "emerg",
14568 "alert",
14569 "crit",
14570 "err",
14571 "warning",
14572 "notice",
14573 "info",
14574 "debug",
14575 "nolog"
14576 ],
56122987 14577 "optional" : 1,
44660702 14578 "type" : "string"
56122987 14579 },
44660702
DM
14580 "log_level_out" : {
14581 "description" : "Log level for outgoing traffic.",
56122987
DM
14582 "enum" : [
14583 "emerg",
14584 "alert",
14585 "crit",
14586 "err",
14587 "warning",
14588 "notice",
14589 "info",
14590 "debug",
14591 "nolog"
14592 ],
44660702
DM
14593 "optional" : 1,
14594 "type" : "string"
56122987 14595 },
44660702
DM
14596 "macfilter" : {
14597 "description" : "Enable/disable MAC address filter.",
14598 "optional" : 1,
14599 "type" : "boolean"
14600 },
14601 "ndp" : {
14602 "description" : "Enable NDP.",
56122987 14603 "optional" : 1,
56122987
DM
14604 "type" : "boolean"
14605 },
7aacca6f
DM
14606 "node" : {
14607 "description" : "The cluster node name.",
44660702
DM
14608 "format" : "pve-node",
14609 "type" : "string"
7aacca6f 14610 },
44660702
DM
14611 "policy_in" : {
14612 "description" : "Input policy.",
14613 "enum" : [
14614 "ACCEPT",
14615 "REJECT",
14616 "DROP"
14617 ],
7aacca6f 14618 "optional" : 1,
44660702 14619 "type" : "string"
7aacca6f 14620 },
44660702
DM
14621 "policy_out" : {
14622 "description" : "Output policy.",
56122987 14623 "enum" : [
7aacca6f
DM
14624 "ACCEPT",
14625 "REJECT",
14626 "DROP"
56122987
DM
14627 ],
14628 "optional" : 1,
56122987 14629 "type" : "string"
7aacca6f 14630 },
44660702
DM
14631 "radv" : {
14632 "description" : "Allow sending Router Advertisement.",
7aacca6f 14633 "optional" : 1,
44660702
DM
14634 "type" : "boolean"
14635 },
14636 "vmid" : {
14637 "description" : "The (unique) ID of the VM.",
14638 "format" : "pve-vmid",
14639 "minimum" : 1,
4bd7df8b
DM
14640 "type" : "integer",
14641 "typetext" : "integer (1- N)"
56122987 14642 }
44660702 14643 }
56122987 14644 },
7aacca6f
DM
14645 "permissions" : {
14646 "check" : [
14647 "perm",
14648 "/vms/{vmid}",
14649 [
14650 "VM.Config.Network"
14651 ]
14652 ]
14653 },
44660702
DM
14654 "protected" : 1,
14655 "proxyto" : "node",
7aacca6f
DM
14656 "returns" : {
14657 "type" : "null"
56122987
DM
14658 }
14659 }
14660 },
44660702 14661 "leaf" : 1,
7aacca6f 14662 "path" : "/nodes/{node}/lxc/{vmid}/firewall/options",
44660702 14663 "text" : "options"
56122987
DM
14664 },
14665 {
56122987
DM
14666 "info" : {
14667 "GET" : {
44660702 14668 "description" : "Read firewall log",
56122987 14669 "method" : "GET",
7aacca6f 14670 "name" : "log",
56122987
DM
14671 "parameters" : {
14672 "additionalProperties" : 0,
14673 "properties" : {
44660702
DM
14674 "limit" : {
14675 "minimum" : 0,
14676 "optional" : 1,
4bd7df8b
DM
14677 "type" : "integer",
14678 "typetext" : "integer (0- N)"
44660702 14679 },
56122987
DM
14680 "node" : {
14681 "description" : "The cluster node name.",
44660702
DM
14682 "format" : "pve-node",
14683 "type" : "string"
56122987 14684 },
44660702
DM
14685 "start" : {
14686 "minimum" : 0,
7aacca6f 14687 "optional" : 1,
4bd7df8b
DM
14688 "type" : "integer",
14689 "typetext" : "integer (0- N)"
56122987
DM
14690 },
14691 "vmid" : {
44660702 14692 "description" : "The (unique) ID of the VM.",
7aacca6f 14693 "format" : "pve-vmid",
56122987 14694 "minimum" : 1,
4bd7df8b
DM
14695 "type" : "integer",
14696 "typetext" : "integer (1- N)"
56122987
DM
14697 }
14698 }
14699 },
44660702
DM
14700 "permissions" : {
14701 "check" : [
14702 "perm",
14703 "/vms/{vmid}",
14704 [
14705 "VM.Console"
14706 ]
14707 ]
14708 },
56122987 14709 "protected" : 1,
44660702 14710 "proxyto" : "node",
7aacca6f
DM
14711 "returns" : {
14712 "items" : {
14713 "properties" : {
7aacca6f
DM
14714 "n" : {
14715 "description" : "Line number",
14716 "type" : "integer"
44660702
DM
14717 },
14718 "t" : {
14719 "description" : "Line text",
14720 "type" : "string"
7aacca6f
DM
14721 }
14722 },
14723 "type" : "object"
14724 },
14725 "type" : "array"
44660702 14726 }
56122987
DM
14727 }
14728 },
7aacca6f 14729 "leaf" : 1,
44660702
DM
14730 "path" : "/nodes/{node}/lxc/{vmid}/firewall/log",
14731 "text" : "log"
56122987
DM
14732 },
14733 {
56122987
DM
14734 "info" : {
14735 "GET" : {
7aacca6f 14736 "description" : "Lists possible IPSet/Alias reference which are allowed in source/dest properties.",
44660702
DM
14737 "method" : "GET",
14738 "name" : "refs",
56122987 14739 "parameters" : {
7aacca6f 14740 "additionalProperties" : 0,
56122987 14741 "properties" : {
44660702
DM
14742 "node" : {
14743 "description" : "The cluster node name.",
14744 "format" : "pve-node",
14745 "type" : "string"
7aacca6f 14746 },
56122987 14747 "type" : {
44660702 14748 "description" : "Only list references of specified type.",
56122987
DM
14749 "enum" : [
14750 "alias",
14751 "ipset"
14752 ],
44660702
DM
14753 "optional" : 1,
14754 "type" : "string"
56122987 14755 },
44660702
DM
14756 "vmid" : {
14757 "description" : "The (unique) ID of the VM.",
14758 "format" : "pve-vmid",
14759 "minimum" : 1,
4bd7df8b
DM
14760 "type" : "integer",
14761 "typetext" : "integer (1- N)"
56122987 14762 }
7aacca6f 14763 }
56122987 14764 },
44660702
DM
14765 "permissions" : {
14766 "check" : [
14767 "perm",
14768 "/vms/{vmid}",
14769 [
14770 "VM.Audit"
14771 ]
14772 ]
14773 },
56122987 14774 "returns" : {
56122987 14775 "items" : {
56122987 14776 "properties" : {
44660702
DM
14777 "comment" : {
14778 "optional" : 1,
14779 "type" : "string"
14780 },
14781 "name" : {
14782 "type" : "string"
14783 },
56122987 14784 "type" : {
56122987
DM
14785 "enum" : [
14786 "alias",
14787 "ipset"
44660702 14788 ],
7aacca6f 14789 "type" : "string"
56122987 14790 }
44660702
DM
14791 },
14792 "type" : "object"
14793 },
14794 "type" : "array"
56122987
DM
14795 }
14796 }
14797 },
44660702 14798 "leaf" : 1,
7aacca6f 14799 "path" : "/nodes/{node}/lxc/{vmid}/firewall/refs",
44660702 14800 "text" : "refs"
56122987
DM
14801 }
14802 ],
56122987
DM
14803 "info" : {
14804 "GET" : {
7aacca6f 14805 "description" : "Directory index.",
44660702
DM
14806 "method" : "GET",
14807 "name" : "index",
56122987 14808 "parameters" : {
44660702 14809 "additionalProperties" : 0,
56122987 14810 "properties" : {
56122987 14811 "node" : {
44660702 14812 "description" : "The cluster node name.",
56122987 14813 "format" : "pve-node",
44660702
DM
14814 "type" : "string"
14815 },
14816 "vmid" : {
14817 "description" : "The (unique) ID of the VM.",
14818 "format" : "pve-vmid",
14819 "minimum" : 1,
4bd7df8b
DM
14820 "type" : "integer",
14821 "typetext" : "integer (1- N)"
56122987 14822 }
44660702
DM
14823 }
14824 },
14825 "permissions" : {
14826 "user" : "all"
56122987
DM
14827 },
14828 "returns" : {
7aacca6f 14829 "items" : {
44660702
DM
14830 "properties" : {},
14831 "type" : "object"
7aacca6f 14832 },
56122987
DM
14833 "links" : [
14834 {
44660702
DM
14835 "href" : "{name}",
14836 "rel" : "child"
56122987 14837 }
44660702
DM
14838 ],
14839 "type" : "array"
56122987
DM
14840 }
14841 }
14842 },
44660702 14843 "leaf" : 0,
7aacca6f 14844 "path" : "/nodes/{node}/lxc/{vmid}/firewall",
44660702 14845 "text" : "firewall"
56122987
DM
14846 },
14847 {
56122987
DM
14848 "info" : {
14849 "GET" : {
56122987 14850 "description" : "Read VM RRD statistics (returns PNG)",
44660702 14851 "method" : "GET",
7aacca6f 14852 "name" : "rrd",
56122987 14853 "parameters" : {
7aacca6f 14854 "additionalProperties" : 0,
56122987 14855 "properties" : {
44660702
DM
14856 "cf" : {
14857 "description" : "The RRD consolidation function",
14858 "enum" : [
14859 "AVERAGE",
14860 "MAX"
14861 ],
14862 "optional" : 1,
14863 "type" : "string"
14864 },
14865 "ds" : {
14866 "description" : "The list of datasources you want to display.",
14867 "format" : "pve-configid-list",
14868 "type" : "string"
14869 },
7aacca6f
DM
14870 "node" : {
14871 "description" : "The cluster node name.",
44660702
DM
14872 "format" : "pve-node",
14873 "type" : "string"
56122987
DM
14874 },
14875 "timeframe" : {
14876 "description" : "Specify the time frame you are interested in.",
14877 "enum" : [
14878 "hour",
14879 "day",
14880 "week",
14881 "month",
14882 "year"
7aacca6f 14883 ],
44660702 14884 "type" : "string"
7aacca6f
DM
14885 },
14886 "vmid" : {
44660702 14887 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
14888 "format" : "pve-vmid",
14889 "minimum" : 1,
4bd7df8b
DM
14890 "type" : "integer",
14891 "typetext" : "integer (1- N)"
56122987 14892 }
7aacca6f
DM
14893 }
14894 },
14895 "permissions" : {
14896 "check" : [
14897 "perm",
14898 "/vms/{vmid}",
14899 [
14900 "VM.Audit"
14901 ]
14902 ]
56122987 14903 },
44660702 14904 "protected" : 1,
7aacca6f
DM
14905 "returns" : {
14906 "properties" : {
14907 "filename" : {
14908 "type" : "string"
14909 }
14910 },
14911 "type" : "object"
14912 }
56122987 14913 }
7aacca6f 14914 },
44660702 14915 "leaf" : 1,
7aacca6f 14916 "path" : "/nodes/{node}/lxc/{vmid}/rrd",
44660702 14917 "text" : "rrd"
56122987
DM
14918 },
14919 {
56122987
DM
14920 "info" : {
14921 "GET" : {
44660702
DM
14922 "description" : "Read VM RRD statistics",
14923 "method" : "GET",
14924 "name" : "rrddata",
56122987 14925 "parameters" : {
7aacca6f 14926 "additionalProperties" : 0,
56122987 14927 "properties" : {
44660702
DM
14928 "cf" : {
14929 "description" : "The RRD consolidation function",
14930 "enum" : [
14931 "AVERAGE",
14932 "MAX"
14933 ],
14934 "optional" : 1,
14935 "type" : "string"
14936 },
7aacca6f 14937 "node" : {
44660702 14938 "description" : "The cluster node name.",
7aacca6f 14939 "format" : "pve-node",
44660702 14940 "type" : "string"
7aacca6f 14941 },
56122987
DM
14942 "timeframe" : {
14943 "description" : "Specify the time frame you are interested in.",
14944 "enum" : [
14945 "hour",
14946 "day",
14947 "week",
14948 "month",
14949 "year"
44660702
DM
14950 ],
14951 "type" : "string"
7aacca6f
DM
14952 },
14953 "vmid" : {
14954 "description" : "The (unique) ID of the VM.",
44660702 14955 "format" : "pve-vmid",
7aacca6f 14956 "minimum" : 1,
4bd7df8b
DM
14957 "type" : "integer",
14958 "typetext" : "integer (1- N)"
56122987 14959 }
56122987
DM
14960 }
14961 },
56122987
DM
14962 "permissions" : {
14963 "check" : [
14964 "perm",
14965 "/vms/{vmid}",
14966 [
14967 "VM.Audit"
14968 ]
14969 ]
14970 },
7aacca6f
DM
14971 "protected" : 1,
14972 "returns" : {
7aacca6f
DM
14973 "items" : {
14974 "properties" : {},
14975 "type" : "object"
44660702
DM
14976 },
14977 "type" : "array"
14978 }
56122987
DM
14979 }
14980 },
44660702 14981 "leaf" : 1,
7aacca6f 14982 "path" : "/nodes/{node}/lxc/{vmid}/rrddata",
44660702 14983 "text" : "rrddata"
56122987
DM
14984 },
14985 {
14986 "info" : {
14987 "POST" : {
14988 "description" : "Creates a TCP VNC proxy connections.",
44660702
DM
14989 "method" : "POST",
14990 "name" : "vncproxy",
7aacca6f 14991 "parameters" : {
44660702 14992 "additionalProperties" : 0,
7aacca6f 14993 "properties" : {
44660702
DM
14994 "node" : {
14995 "description" : "The cluster node name.",
14996 "format" : "pve-node",
14997 "type" : "string"
14998 },
7aacca6f 14999 "vmid" : {
44660702 15000 "description" : "The (unique) ID of the VM.",
7aacca6f
DM
15001 "format" : "pve-vmid",
15002 "minimum" : 1,
4bd7df8b
DM
15003 "type" : "integer",
15004 "typetext" : "integer (1- N)"
7aacca6f
DM
15005 },
15006 "websocket" : {
44660702 15007 "description" : "use websocket instead of standard VNC.",
7aacca6f 15008 "optional" : 1,
44660702 15009 "type" : "boolean"
7aacca6f 15010 }
44660702 15011 }
7aacca6f 15012 },
56122987
DM
15013 "permissions" : {
15014 "check" : [
15015 "perm",
15016 "/vms/{vmid}",
15017 [
15018 "VM.Console"
15019 ]
15020 ]
15021 },
44660702 15022 "protected" : 1,
56122987 15023 "returns" : {
7aacca6f 15024 "additionalProperties" : 0,
56122987 15025 "properties" : {
7aacca6f 15026 "cert" : {
56122987
DM
15027 "type" : "string"
15028 },
44660702
DM
15029 "port" : {
15030 "type" : "integer"
56122987 15031 },
44660702 15032 "ticket" : {
56122987
DM
15033 "type" : "string"
15034 },
44660702 15035 "upid" : {
56122987
DM
15036 "type" : "string"
15037 },
44660702
DM
15038 "user" : {
15039 "type" : "string"
56122987 15040 }
7aacca6f 15041 }
56122987
DM
15042 }
15043 }
15044 },
44660702 15045 "leaf" : 1,
56122987 15046 "path" : "/nodes/{node}/lxc/{vmid}/vncproxy",
44660702 15047 "text" : "vncproxy"
56122987
DM
15048 },
15049 {
56122987
DM
15050 "info" : {
15051 "GET" : {
44660702
DM
15052 "description" : "Opens a weksocket for VNC traffic.",
15053 "method" : "GET",
15054 "name" : "vncwebsocket",
56122987 15055 "parameters" : {
44660702 15056 "additionalProperties" : 0,
56122987 15057 "properties" : {
56122987
DM
15058 "node" : {
15059 "description" : "The cluster node name.",
44660702 15060 "format" : "pve-node",
56122987 15061 "type" : "string"
7aacca6f 15062 },
44660702
DM
15063 "port" : {
15064 "description" : "Port number returned by previous vncproxy call.",
15065 "maximum" : 5999,
15066 "minimum" : 5900,
4bd7df8b
DM
15067 "type" : "integer",
15068 "typetext" : "integer (5900-5999)"
44660702 15069 },
7aacca6f
DM
15070 "vmid" : {
15071 "description" : "The (unique) ID of the VM.",
7aacca6f 15072 "format" : "pve-vmid",
44660702 15073 "minimum" : 1,
4bd7df8b
DM
15074 "type" : "integer",
15075 "typetext" : "integer (1- N)"
44660702
DM
15076 },
15077 "vncticket" : {
15078 "description" : "Ticket from previous call to vncproxy.",
15079 "maxLength" : 512,
15080 "type" : "string"
56122987 15081 }
44660702 15082 }
7aacca6f 15083 },
7aacca6f
DM
15084 "permissions" : {
15085 "check" : [
15086 "perm",
15087 "/vms/{vmid}",
15088 [
15089 "VM.Console"
15090 ]
15091 ],
15092 "description" : "You also need to pass a valid ticket (vncticket)."
56122987
DM
15093 },
15094 "returns" : {
56122987
DM
15095 "properties" : {
15096 "port" : {
15097 "type" : "string"
15098 }
44660702
DM
15099 },
15100 "type" : "object"
15101 }
56122987
DM
15102 }
15103 },
44660702 15104 "leaf" : 1,
7aacca6f 15105 "path" : "/nodes/{node}/lxc/{vmid}/vncwebsocket",
44660702 15106 "text" : "vncwebsocket"
56122987
DM
15107 },
15108 {
56122987
DM
15109 "info" : {
15110 "POST" : {
44660702
DM
15111 "description" : "Returns a SPICE configuration to connect to the CT.",
15112 "method" : "POST",
15113 "name" : "spiceproxy",
56122987
DM
15114 "parameters" : {
15115 "additionalProperties" : 0,
15116 "properties" : {
44660702
DM
15117 "node" : {
15118 "description" : "The cluster node name.",
15119 "format" : "pve-node",
15120 "type" : "string"
56122987
DM
15121 },
15122 "proxy" : {
7aacca6f 15123 "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
15124 "format" : "address",
15125 "optional" : 1,
7aacca6f 15126 "type" : "string"
44660702
DM
15127 },
15128 "vmid" : {
15129 "description" : "The (unique) ID of the VM.",
15130 "format" : "pve-vmid",
15131 "minimum" : 1,
4bd7df8b
DM
15132 "type" : "integer",
15133 "typetext" : "integer (1- N)"
56122987
DM
15134 }
15135 }
15136 },
56122987
DM
15137 "permissions" : {
15138 "check" : [
15139 "perm",
15140 "/vms/{vmid}",
15141 [
15142 "VM.Console"
15143 ]
15144 ]
15145 },
44660702
DM
15146 "protected" : 1,
15147 "proxyto" : "node",
56122987 15148 "returns" : {
7aacca6f 15149 "additionalProperties" : 1,
44660702 15150 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
56122987 15151 "properties" : {
44660702 15152 "host" : {
56122987
DM
15153 "type" : "string"
15154 },
44660702 15155 "password" : {
56122987
DM
15156 "type" : "string"
15157 },
15158 "proxy" : {
15159 "type" : "string"
15160 },
56122987
DM
15161 "tls-port" : {
15162 "type" : "integer"
7aacca6f 15163 },
44660702 15164 "type" : {
7aacca6f 15165 "type" : "string"
56122987 15166 }
7aacca6f
DM
15167 }
15168 }
56122987 15169 }
44660702
DM
15170 },
15171 "leaf" : 1,
15172 "path" : "/nodes/{node}/lxc/{vmid}/spiceproxy",
15173 "text" : "spiceproxy"
56122987
DM
15174 },
15175 {
56122987
DM
15176 "info" : {
15177 "POST" : {
44660702 15178 "description" : "Migrate the container to another node. Creates a new migration task.",
7aacca6f 15179 "method" : "POST",
44660702 15180 "name" : "migrate_vm",
56122987 15181 "parameters" : {
44660702 15182 "additionalProperties" : 0,
56122987 15183 "properties" : {
44660702
DM
15184 "force" : {
15185 "description" : "Force migration despite local bind / device mounts. WARNING: identical bind / device mounts need to be available on the target node.",
15186 "optional" : 1,
15187 "type" : "boolean"
15188 },
15189 "node" : {
15190 "description" : "The cluster node name.",
7aacca6f 15191 "format" : "pve-node",
7aacca6f
DM
15192 "type" : "string"
15193 },
56122987 15194 "online" : {
56122987 15195 "description" : "Use online/live migration.",
44660702
DM
15196 "optional" : 1,
15197 "type" : "boolean"
56122987 15198 },
44660702
DM
15199 "target" : {
15200 "description" : "Target node.",
56122987 15201 "format" : "pve-node",
44660702 15202 "type" : "string"
56122987 15203 },
44660702
DM
15204 "vmid" : {
15205 "description" : "The (unique) ID of the VM.",
15206 "format" : "pve-vmid",
15207 "minimum" : 1,
4bd7df8b
DM
15208 "type" : "integer",
15209 "typetext" : "integer (1- N)"
56122987 15210 }
44660702 15211 }
7aacca6f 15212 },
56122987
DM
15213 "permissions" : {
15214 "check" : [
15215 "perm",
15216 "/vms/{vmid}",
15217 [
15218 "VM.Migrate"
15219 ]
15220 ]
15221 },
44660702 15222 "protected" : 1,
7aacca6f 15223 "proxyto" : "node",
44660702
DM
15224 "returns" : {
15225 "description" : "the task ID.",
15226 "type" : "string"
15227 }
56122987
DM
15228 }
15229 },
44660702
DM
15230 "leaf" : 1,
15231 "path" : "/nodes/{node}/lxc/{vmid}/migrate",
7aacca6f 15232 "text" : "migrate"
56122987
DM
15233 },
15234 {
56122987
DM
15235 "info" : {
15236 "GET" : {
44660702
DM
15237 "description" : "Check if feature for virtual machine is available.",
15238 "method" : "GET",
56122987 15239 "name" : "vm_feature",
56122987 15240 "parameters" : {
7aacca6f 15241 "additionalProperties" : 0,
56122987 15242 "properties" : {
44660702
DM
15243 "feature" : {
15244 "description" : "Feature to check.",
15245 "enum" : [
15246 "snapshot"
15247 ],
15248 "type" : "string"
15249 },
7aacca6f 15250 "node" : {
44660702 15251 "description" : "The cluster node name.",
7aacca6f 15252 "format" : "pve-node",
44660702 15253 "type" : "string"
7aacca6f 15254 },
56122987 15255 "snapname" : {
7aacca6f
DM
15256 "description" : "The name of the snapshot.",
15257 "format" : "pve-configid",
44660702
DM
15258 "maxLength" : 40,
15259 "optional" : 1,
56122987
DM
15260 "type" : "string"
15261 },
15262 "vmid" : {
7aacca6f 15263 "description" : "The (unique) ID of the VM.",
44660702 15264 "format" : "pve-vmid",
7aacca6f 15265 "minimum" : 1,
4bd7df8b
DM
15266 "type" : "integer",
15267 "typetext" : "integer (1- N)"
56122987 15268 }
7aacca6f 15269 }
56122987
DM
15270 },
15271 "permissions" : {
15272 "check" : [
15273 "perm",
15274 "/vms/{vmid}",
15275 [
15276 "VM.Audit"
15277 ]
15278 ]
15279 },
44660702 15280 "protected" : 1,
7aacca6f 15281 "proxyto" : "node",
7aacca6f
DM
15282 "returns" : {
15283 "properties" : {
15284 "hasFeature" : {
15285 "type" : "boolean"
15286 }
15287 },
15288 "type" : "object"
15289 }
56122987
DM
15290 }
15291 },
7aacca6f 15292 "leaf" : 1,
44660702
DM
15293 "path" : "/nodes/{node}/lxc/{vmid}/feature",
15294 "text" : "feature"
56122987
DM
15295 },
15296 {
56122987
DM
15297 "info" : {
15298 "POST" : {
44660702
DM
15299 "description" : "Create a Template.",
15300 "method" : "POST",
56122987 15301 "name" : "template",
56122987
DM
15302 "parameters" : {
15303 "additionalProperties" : 0,
15304 "properties" : {
44660702
DM
15305 "experimental" : {
15306 "default" : 0,
15307 "description" : "The template feature is experimental, set this flag if you know what you are doing.",
15308 "type" : "boolean"
7aacca6f
DM
15309 },
15310 "node" : {
7aacca6f 15311 "description" : "The cluster node name.",
44660702 15312 "format" : "pve-node",
7aacca6f 15313 "type" : "string"
56122987 15314 },
44660702
DM
15315 "vmid" : {
15316 "description" : "The (unique) ID of the VM.",
15317 "format" : "pve-vmid",
15318 "minimum" : 1,
4bd7df8b
DM
15319 "type" : "integer",
15320 "typetext" : "integer (1- N)"
56122987
DM
15321 }
15322 }
15323 },
56122987 15324 "permissions" : {
56122987
DM
15325 "check" : [
15326 "perm",
15327 "/vms/{vmid}",
15328 [
15329 "VM.Allocate"
15330 ]
44660702
DM
15331 ],
15332 "description" : "You need 'VM.Allocate' permissions on /vms/{vmid}"
7aacca6f 15333 },
44660702 15334 "protected" : 1,
7aacca6f
DM
15335 "proxyto" : "node",
15336 "returns" : {
15337 "type" : "null"
56122987
DM
15338 }
15339 }
15340 },
44660702 15341 "leaf" : 1,
7aacca6f 15342 "path" : "/nodes/{node}/lxc/{vmid}/template",
44660702 15343 "text" : "template"
56122987
DM
15344 },
15345 {
56122987
DM
15346 "info" : {
15347 "POST" : {
44660702
DM
15348 "description" : "Create a container clone/copy",
15349 "method" : "POST",
56122987 15350 "name" : "clone_vm",
7aacca6f
DM
15351 "parameters" : {
15352 "additionalProperties" : 0,
15353 "properties" : {
44660702
DM
15354 "description" : {
15355 "description" : "Description for the new CT.",
7aacca6f 15356 "optional" : 1,
44660702 15357 "type" : "string"
7aacca6f
DM
15358 },
15359 "experimental" : {
7aacca6f 15360 "default" : 0,
44660702
DM
15361 "description" : "The clone feature is experimental, set this flag if you know what you are doing.",
15362 "type" : "boolean"
7aacca6f 15363 },
44660702
DM
15364 "full" : {
15365 "default" : 0,
15366 "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 15367 "optional" : 1,
44660702 15368 "type" : "boolean"
7aacca6f
DM
15369 },
15370 "hostname" : {
44660702 15371 "description" : "Set a hostname for the new CT.",
7aacca6f 15372 "format" : "dns-name",
7aacca6f 15373 "optional" : 1,
44660702 15374 "type" : "string"
7aacca6f 15375 },
44660702
DM
15376 "newid" : {
15377 "description" : "VMID for the clone.",
7aacca6f 15378 "format" : "pve-vmid",
44660702 15379 "minimum" : 1,
4bd7df8b
DM
15380 "type" : "integer",
15381 "typetext" : "integer (1- N)"
7aacca6f
DM
15382 },
15383 "node" : {
15384 "description" : "The cluster node name.",
44660702
DM
15385 "format" : "pve-node",
15386 "type" : "string"
15387 },
15388 "pool" : {
15389 "description" : "Add the new CT to the specified pool.",
15390 "format" : "pve-poolid",
15391 "optional" : 1,
15392 "type" : "string"
7aacca6f
DM
15393 },
15394 "snapname" : {
44660702 15395 "description" : "The name of the snapshot.",
7aacca6f
DM
15396 "format" : "pve-configid",
15397 "maxLength" : 40,
7aacca6f 15398 "optional" : 1,
44660702 15399 "type" : "string"
7aacca6f
DM
15400 },
15401 "storage" : {
44660702 15402 "description" : "Target storage for full clone.",
7aacca6f
DM
15403 "format" : "pve-storage-id",
15404 "optional" : 1,
7aacca6f 15405 "requires" : "full",
44660702
DM
15406 "type" : "string"
15407 },
15408 "vmid" : {
15409 "description" : "The (unique) ID of the VM.",
15410 "format" : "pve-vmid",
15411 "minimum" : 1,
4bd7df8b
DM
15412 "type" : "integer",
15413 "typetext" : "integer (1- N)"
7aacca6f
DM
15414 }
15415 }
56122987
DM
15416 },
15417 "permissions" : {
56122987
DM
15418 "check" : [
15419 "and",
15420 [
15421 "perm",
15422 "/vms/{vmid}",
15423 [
15424 "VM.Clone"
15425 ]
15426 ],
15427 [
15428 "or",
15429 [
15430 "perm",
15431 "/vms/{newid}",
15432 [
15433 "VM.Allocate"
15434 ]
15435 ],
15436 [
15437 "perm",
15438 "/pool/{pool}",
15439 [
15440 "VM.Allocate"
15441 ],
15442 "require_param",
15443 "pool"
15444 ]
15445 ]
7aacca6f
DM
15446 ],
15447 "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 15448 },
44660702 15449 "protected" : 1,
56122987 15450 "proxyto" : "node",
7aacca6f
DM
15451 "returns" : {
15452 "type" : "string"
56122987
DM
15453 }
15454 }
44660702
DM
15455 },
15456 "leaf" : 1,
15457 "path" : "/nodes/{node}/lxc/{vmid}/clone",
15458 "text" : "clone"
56122987
DM
15459 },
15460 {
56122987
DM
15461 "info" : {
15462 "PUT" : {
44660702
DM
15463 "description" : "Resize a container mountpoint.",
15464 "method" : "PUT",
15465 "name" : "resize_vm",
56122987 15466 "parameters" : {
44660702 15467 "additionalProperties" : 0,
56122987 15468 "properties" : {
44660702
DM
15469 "digest" : {
15470 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
15471 "maxLength" : 40,
15472 "optional" : 1,
15473 "type" : "string"
56122987
DM
15474 },
15475 "disk" : {
7aacca6f 15476 "description" : "The disk you want to resize.",
56122987
DM
15477 "enum" : [
15478 "rootfs",
15479 "mp0",
15480 "mp1",
15481 "mp2",
15482 "mp3",
15483 "mp4",
15484 "mp5",
15485 "mp6",
15486 "mp7",
15487 "mp8",
15488 "mp9"
15489 ],
7aacca6f
DM
15490 "type" : "string"
15491 },
44660702
DM
15492 "node" : {
15493 "description" : "The cluster node name.",
15494 "format" : "pve-node",
15495 "type" : "string"
15496 },
15497 "size" : {
15498 "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.",
15499 "pattern" : "\\+?\\d+(\\.\\d+)?[KMGT]?",
15500 "type" : "string"
15501 },
15502 "vmid" : {
15503 "description" : "The (unique) ID of the VM.",
15504 "format" : "pve-vmid",
15505 "minimum" : 1,
4bd7df8b
DM
15506 "type" : "integer",
15507 "typetext" : "integer (1- N)"
56122987 15508 }
44660702 15509 }
56122987 15510 },
7aacca6f
DM
15511 "permissions" : {
15512 "check" : [
15513 "perm",
15514 "/vms/{vmid}",
15515 [
15516 "VM.Config.Disk"
15517 ],
15518 "any",
15519 1
15520 ]
15521 },
44660702 15522 "protected" : 1,
7aacca6f
DM
15523 "proxyto" : "node",
15524 "returns" : {
15525 "description" : "the task ID.",
15526 "type" : "string"
15527 }
56122987
DM
15528 }
15529 },
44660702 15530 "leaf" : 1,
7aacca6f 15531 "path" : "/nodes/{node}/lxc/{vmid}/resize",
44660702 15532 "text" : "resize"
56122987
DM
15533 }
15534 ],
15535 "info" : {
15536 "DELETE" : {
7aacca6f 15537 "description" : "Destroy the container (also delete all uses files).",
44660702
DM
15538 "method" : "DELETE",
15539 "name" : "destroy_vm",
15540 "parameters" : {
15541 "additionalProperties" : 0,
15542 "properties" : {
15543 "node" : {
15544 "description" : "The cluster node name.",
15545 "format" : "pve-node",
15546 "type" : "string"
15547 },
15548 "vmid" : {
15549 "description" : "The (unique) ID of the VM.",
15550 "format" : "pve-vmid",
15551 "minimum" : 1,
4bd7df8b
DM
15552 "type" : "integer",
15553 "typetext" : "integer (1- N)"
44660702
DM
15554 }
15555 }
15556 },
7aacca6f
DM
15557 "permissions" : {
15558 "check" : [
15559 "perm",
15560 "/vms/{vmid}",
15561 [
15562 "VM.Allocate"
15563 ]
15564 ]
15565 },
44660702
DM
15566 "protected" : 1,
15567 "proxyto" : "node",
56122987
DM
15568 "returns" : {
15569 "type" : "string"
44660702 15570 }
56122987
DM
15571 },
15572 "GET" : {
7aacca6f 15573 "description" : "Directory index",
44660702 15574 "method" : "GET",
7aacca6f 15575 "name" : "vmdiridx",
56122987 15576 "parameters" : {
7aacca6f 15577 "additionalProperties" : 0,
56122987
DM
15578 "properties" : {
15579 "node" : {
7aacca6f 15580 "description" : "The cluster node name.",
44660702
DM
15581 "format" : "pve-node",
15582 "type" : "string"
56122987
DM
15583 },
15584 "vmid" : {
15585 "description" : "The (unique) ID of the VM.",
56122987 15586 "format" : "pve-vmid",
44660702 15587 "minimum" : 1,
4bd7df8b
DM
15588 "type" : "integer",
15589 "typetext" : "integer (1- N)"
56122987 15590 }
7aacca6f 15591 }
56122987 15592 },
56122987
DM
15593 "permissions" : {
15594 "user" : "all"
44660702
DM
15595 },
15596 "proxyto" : "node",
15597 "returns" : {
15598 "items" : {
15599 "properties" : {
15600 "subdir" : {
15601 "type" : "string"
15602 }
15603 },
15604 "type" : "object"
15605 },
15606 "links" : [
15607 {
15608 "href" : "{subdir}",
15609 "rel" : "child"
15610 }
15611 ],
15612 "type" : "array"
56122987
DM
15613 }
15614 }
44660702
DM
15615 },
15616 "leaf" : 0,
15617 "path" : "/nodes/{node}/lxc/{vmid}",
15618 "text" : "{vmid}"
56122987
DM
15619 }
15620 ],
56122987 15621 "info" : {
44660702
DM
15622 "GET" : {
15623 "description" : "LXC container index (per node).",
15624 "method" : "GET",
15625 "name" : "vmlist",
15626 "parameters" : {
15627 "additionalProperties" : 0,
15628 "properties" : {
15629 "node" : {
15630 "description" : "The cluster node name.",
15631 "format" : "pve-node",
15632 "type" : "string"
15633 }
15634 }
15635 },
15636 "permissions" : {
15637 "description" : "Only list CTs where you have VM.Audit permissons on /vms/<vmid>.",
15638 "user" : "all"
15639 },
15640 "protected" : 1,
15641 "proxyto" : "node",
15642 "returns" : {
15643 "items" : {
15644 "properties" : {},
15645 "type" : "object"
15646 },
15647 "links" : [
15648 {
15649 "href" : "{vmid}",
15650 "rel" : "child"
15651 }
15652 ],
15653 "type" : "array"
15654 }
15655 },
56122987 15656 "POST" : {
44660702 15657 "description" : "Create or restore a container.",
7aacca6f
DM
15658 "method" : "POST",
15659 "name" : "create_vm",
56122987 15660 "parameters" : {
7aacca6f 15661 "additionalProperties" : 0,
56122987 15662 "properties" : {
44660702
DM
15663 "arch" : {
15664 "default" : "amd64",
15665 "description" : "OS architecture type.",
15666 "enum" : [
15667 "amd64",
15668 "i386"
15669 ],
7aacca6f 15670 "optional" : 1,
44660702 15671 "type" : "string"
7aacca6f 15672 },
44660702
DM
15673 "cmode" : {
15674 "default" : "tty",
15675 "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).",
15676 "enum" : [
15677 "shell",
15678 "console",
15679 "tty"
15680 ],
7aacca6f 15681 "optional" : 1,
44660702 15682 "type" : "string"
7aacca6f
DM
15683 },
15684 "console" : {
7aacca6f 15685 "default" : 1,
44660702 15686 "description" : "Attach a console device (/dev/console) to the container.",
56122987 15687 "optional" : 1,
7aacca6f 15688 "type" : "boolean"
56122987 15689 },
44660702
DM
15690 "cpulimit" : {
15691 "default" : 0,
15692 "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.",
15693 "maximum" : 128,
15694 "minimum" : 0,
56122987 15695 "optional" : 1,
4bd7df8b
DM
15696 "type" : "number",
15697 "typetext" : "number (0-128)"
56122987 15698 },
44660702
DM
15699 "cpuunits" : {
15700 "default" : 1024,
15701 "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.",
15702 "maximum" : 500000,
15703 "minimum" : 0,
56122987 15704 "optional" : 1,
4bd7df8b
DM
15705 "type" : "integer",
15706 "typetext" : "integer (0-500000)"
7aacca6f
DM
15707 },
15708 "description" : {
44660702 15709 "description" : "Container description. Only used on the configuration web interface.",
7aacca6f 15710 "optional" : 1,
44660702 15711 "type" : "string"
7aacca6f 15712 },
44660702
DM
15713 "force" : {
15714 "description" : "Allow to overwrite existing container.",
7aacca6f 15715 "optional" : 1,
44660702
DM
15716 "type" : "boolean"
15717 },
15718 "hostname" : {
15719 "description" : "Set a host name for the container.",
15720 "format" : "dns-name",
15721 "maxLength" : 255,
15722 "optional" : 1,
15723 "type" : "string"
15724 },
15725 "ignore-unpack-errors" : {
15726 "description" : "Ignore errors when extracting the template.",
15727 "optional" : 1,
15728 "type" : "boolean"
15729 },
15730 "lock" : {
15731 "description" : "Lock/unlock the VM.",
7aacca6f
DM
15732 "enum" : [
15733 "migrate",
15734 "backup",
15735 "snapshot",
15736 "rollback"
15737 ],
44660702
DM
15738 "optional" : 1,
15739 "type" : "string"
7aacca6f 15740 },
44660702
DM
15741 "memory" : {
15742 "default" : 512,
15743 "description" : "Amount of RAM for the VM in MB.",
15744 "minimum" : 16,
7aacca6f 15745 "optional" : 1,
4bd7df8b
DM
15746 "type" : "integer",
15747 "typetext" : "integer (16- N)"
44660702
DM
15748 },
15749 "mp[n]" : {
c2993fe5 15750 "description" : "Use volume as container mount point.",
56122987 15751 "format" : {
7aacca6f
DM
15752 "acl" : {
15753 "description" : "Explicitly enable or disable ACL support.",
15754 "optional" : 1,
44660702 15755 "type" : "boolean"
56122987
DM
15756 },
15757 "backup" : {
56122987 15758 "description" : "Whether to include the mountpoint in backups.",
44660702 15759 "optional" : 1,
4bd7df8b
DM
15760 "type" : "boolean",
15761 "verbose_description" : "Whether to include the mountpoint in backups (only used for volume mountpoints)."
44660702
DM
15762 },
15763 "mp" : {
4bd7df8b 15764 "description" : "Path to the mountpoint as seen from inside the container (must not contain symlinks).",
44660702
DM
15765 "format" : "pve-lxc-mp-string",
15766 "format_description" : "Path",
4bd7df8b
DM
15767 "type" : "string",
15768 "verbose_description" : "Path to the mountpoint as seen from inside the container.\n\nNOTE: Must not contain any symlinks for security reasons."
44660702
DM
15769 },
15770 "quota" : {
15771 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15772 "optional" : 1,
44660702
DM
15773 "type" : "boolean"
15774 },
15775 "ro" : {
4bd7df8b 15776 "description" : "Read-only mountpoint",
44660702
DM
15777 "optional" : 1,
15778 "type" : "boolean"
7aacca6f
DM
15779 },
15780 "size" : {
44660702 15781 "description" : "Volume size (read only value).",
7aacca6f
DM
15782 "format" : "disk-size",
15783 "format_description" : "DiskSize",
7aacca6f
DM
15784 "optional" : 1,
15785 "type" : "string"
56122987
DM
15786 },
15787 "volume" : {
7aacca6f 15788 "default_key" : 1,
44660702 15789 "description" : "Volume, device or directory to mount into the container.",
56122987 15790 "format" : "pve-lxc-mp-string",
56122987 15791 "format_description" : "volume",
44660702 15792 "type" : "string"
56122987 15793 }
44660702 15794 },
56122987 15795 "optional" : 1,
4bd7df8b
DM
15796 "type" : "string",
15797 "typetext" : "[volume=]<volume> ,mp=<Path> [,acl=<1|0>] [,backup=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
56122987 15798 },
44660702
DM
15799 "nameserver" : {
15800 "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.",
15801 "format" : "address-list",
56122987 15802 "optional" : 1,
44660702 15803 "type" : "string"
56122987 15804 },
44660702
DM
15805 "net[n]" : {
15806 "description" : "Specifies network interfaces for the container.",
7aacca6f 15807 "format" : {
44660702
DM
15808 "bridge" : {
15809 "description" : "Bridge to attach the network device to.",
f004f5b9 15810 "format_description" : "bridge",
7aacca6f 15811 "optional" : 1,
44660702
DM
15812 "pattern" : "[-_.\\w\\d]+",
15813 "type" : "string"
7aacca6f 15814 },
44660702
DM
15815 "firewall" : {
15816 "description" : "Controls whether this interface's firewall rules should be used.",
7aacca6f 15817 "optional" : 1,
44660702 15818 "type" : "boolean"
7aacca6f 15819 },
44660702
DM
15820 "gw" : {
15821 "description" : "Default gateway for IPv4 traffic.",
15822 "format" : "ipv4",
15823 "format_description" : "GatewayIPv4",
7aacca6f 15824 "optional" : 1,
44660702 15825 "type" : "string"
7aacca6f 15826 },
44660702
DM
15827 "gw6" : {
15828 "description" : "Default gateway for IPv6 traffic.",
15829 "format" : "ipv6",
15830 "format_description" : "GatewayIPv6",
15831 "optional" : 1,
15832 "type" : "string"
7aacca6f 15833 },
44660702 15834 "hwaddr" : {
f004f5b9
DM
15835 "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)",
15836 "format_description" : "XX:XX:XX:XX:XX:XX",
44660702
DM
15837 "optional" : 1,
15838 "pattern" : "(?^i:(?:[a-f0-9]{2}:){5}[a-f0-9]{2})",
7aacca6f
DM
15839 "type" : "string"
15840 },
44660702
DM
15841 "ip" : {
15842 "description" : "IPv4 address in CIDR format.",
15843 "format" : "pve-ipv4-config",
15844 "format_description" : "IPv4Format/CIDR",
7aacca6f 15845 "optional" : 1,
44660702 15846 "type" : "string"
7aacca6f 15847 },
44660702
DM
15848 "ip6" : {
15849 "description" : "IPv6 address in CIDR format.",
15850 "format" : "pve-ipv6-config",
15851 "format_description" : "IPv6Format/CIDR",
15852 "optional" : 1,
15853 "type" : "string"
15854 },
15855 "mtu" : {
15856 "description" : "Maximum transfer unit of the interface. (lxc.network.mtu)",
44660702
DM
15857 "minimum" : 64,
15858 "optional" : 1,
15859 "type" : "integer"
15860 },
15861 "name" : {
15862 "description" : "Name of the network device as seen from inside the container. (lxc.network.name)",
f004f5b9 15863 "format_description" : "string",
44660702
DM
15864 "pattern" : "[-_.\\w\\d]+",
15865 "type" : "string"
15866 },
15867 "rate" : {
15868 "description" : "Apply rate limiting to the interface",
15869 "format_description" : "mbps",
15870 "optional" : 1,
15871 "type" : "number"
15872 },
15873 "tag" : {
15874 "description" : "VLAN tag for this interface.",
4bd7df8b
DM
15875 "maximum" : 4094,
15876 "minimum" : 1,
44660702
DM
15877 "optional" : 1,
15878 "type" : "integer"
15879 },
15880 "trunks" : {
15881 "description" : "VLAN ids to pass through the interface",
15882 "format_description" : "vlanid[;vlanid...]",
15883 "optional" : 1,
15884 "pattern" : "(?^:\\d+(?:;\\d+)*)",
15885 "type" : "string"
15886 },
15887 "type" : {
15888 "description" : "Network interface type.",
15889 "enum" : [
15890 "veth"
15891 ],
15892 "optional" : 1,
15893 "type" : "string"
7aacca6f
DM
15894 }
15895 },
56122987 15896 "optional" : 1,
4bd7df8b
DM
15897 "type" : "string",
15898 "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 15899 },
44660702
DM
15900 "node" : {
15901 "description" : "The cluster node name.",
15902 "format" : "pve-node",
15903 "type" : "string"
56122987 15904 },
44660702
DM
15905 "onboot" : {
15906 "default" : 0,
15907 "description" : "Specifies whether a VM will be started during system bootup.",
56122987 15908 "optional" : 1,
44660702
DM
15909 "type" : "boolean"
15910 },
15911 "ostemplate" : {
15912 "description" : "The OS template or backup file.",
15913 "maxLength" : 255,
15914 "type" : "string"
56122987
DM
15915 },
15916 "ostype" : {
7aacca6f 15917 "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
15918 "enum" : [
15919 "debian",
15920 "ubuntu",
15921 "centos",
15922 "fedora",
15923 "opensuse",
15924 "archlinux",
15925 "alpine",
57b78691 15926 "gentoo",
56122987 15927 "unmanaged"
44660702 15928 ],
56122987 15929 "optional" : 1,
7aacca6f 15930 "type" : "string"
56122987 15931 },
44660702
DM
15932 "password" : {
15933 "description" : "Sets root password inside container.",
15934 "minLength" : 5,
7aacca6f
DM
15935 "optional" : 1,
15936 "type" : "string"
15937 },
44660702
DM
15938 "pool" : {
15939 "description" : "Add the VM to the specified pool.",
15940 "format" : "pve-poolid",
7aacca6f 15941 "optional" : 1,
44660702 15942 "type" : "string"
7aacca6f 15943 },
44660702
DM
15944 "protection" : {
15945 "default" : 0,
15946 "description" : "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
7aacca6f 15947 "optional" : 1,
44660702 15948 "type" : "boolean"
7aacca6f 15949 },
44660702
DM
15950 "restore" : {
15951 "description" : "Mark this as restore task.",
15952 "optional" : 1,
15953 "type" : "boolean"
7aacca6f 15954 },
44660702
DM
15955 "rootfs" : {
15956 "description" : "Use volume as container root.",
56122987 15957 "format" : {
44660702
DM
15958 "acl" : {
15959 "description" : "Explicitly enable or disable ACL support.",
56122987 15960 "optional" : 1,
44660702 15961 "type" : "boolean"
56122987 15962 },
44660702
DM
15963 "quota" : {
15964 "description" : "Enable user quotas inside the container (not supported with zfs subvolumes)",
7aacca6f 15965 "optional" : 1,
44660702 15966 "type" : "boolean"
7aacca6f 15967 },
44660702 15968 "ro" : {
4bd7df8b 15969 "description" : "Read-only mountpoint",
7aacca6f 15970 "optional" : 1,
44660702 15971 "type" : "boolean"
7aacca6f 15972 },
44660702
DM
15973 "size" : {
15974 "description" : "Volume size (read only value).",
15975 "format" : "disk-size",
15976 "format_description" : "DiskSize",
7aacca6f
DM
15977 "optional" : 1,
15978 "type" : "string"
15979 },
44660702
DM
15980 "volume" : {
15981 "default_key" : 1,
15982 "description" : "Volume, device or directory to mount into the container.",
15983 "format" : "pve-lxc-mp-string",
15984 "format_description" : "volume",
15985 "type" : "string"
56122987 15986 }
7aacca6f 15987 },
7aacca6f 15988 "optional" : 1,
4bd7df8b
DM
15989 "type" : "string",
15990 "typetext" : "[volume=]<volume> [,acl=<1|0>] [,quota=<1|0>] [,ro=<1|0>] [,size=<DiskSize>]"
44660702
DM
15991 },
15992 "searchdomain" : {
15993 "description" : "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
15994 "format" : "dns-name-list",
15995 "optional" : 1,
15996 "type" : "string"
15997 },
15998 "ssh-public-keys" : {
15999 "description" : "Setup public SSH keys (one key per line, OpenSSH format).",
16000 "optional" : 1,
16001 "type" : "string"
16002 },
16003 "startup" : {
16004 "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.",
16005 "format" : "pve-startup-order",
16006 "optional" : 1,
7aacca6f 16007 "type" : "string",
44660702 16008 "typetext" : "[[order=]\\d+] [,up=\\d+] [,down=\\d+] "
7aacca6f 16009 },
44660702
DM
16010 "storage" : {
16011 "default" : "local",
16012 "description" : "Default Storage.",
16013 "format" : "pve-storage-id",
16014 "optional" : 1,
7aacca6f 16015 "type" : "string"
7aacca6f 16016 },
44660702
DM
16017 "swap" : {
16018 "default" : 512,
16019 "description" : "Amount of SWAP for the VM in MB.",
16020 "minimum" : 0,
16021 "optional" : 1,
4bd7df8b
DM
16022 "type" : "integer",
16023 "typetext" : "integer (0- N)"
44660702
DM
16024 },
16025 "template" : {
16026 "default" : 0,
16027 "description" : "Enable/disable Template.",
16028 "optional" : 1,
16029 "type" : "boolean"
7aacca6f 16030 },
44660702
DM
16031 "tty" : {
16032 "default" : 2,
16033 "description" : "Specify the number of tty available to the container",
16034 "maximum" : 6,
16035 "minimum" : 0,
16036 "optional" : 1,
4bd7df8b
DM
16037 "type" : "integer",
16038 "typetext" : "integer (0-6)"
7aacca6f 16039 },
44660702
DM
16040 "unprivileged" : {
16041 "default" : 0,
16042 "description" : "Makes the container run as unprivileged user. (Should not be modified manually.)",
16043 "optional" : 1,
16044 "type" : "boolean"
16045 },
16046 "unused[n]" : {
c2993fe5 16047 "description" : "Reference to unused volumes. This is used internally, and should not be modified manually.",
44660702
DM
16048 "format" : "pve-volume-id",
16049 "optional" : 1,
16050 "type" : "string"
16051 },
16052 "vmid" : {
16053 "description" : "The (unique) ID of the VM.",
16054 "format" : "pve-vmid",
16055 "minimum" : 1,
4bd7df8b
DM
16056 "type" : "integer",
16057 "typetext" : "integer (1- N)"
44660702 16058 }
7aacca6f
DM
16059 }
16060 },
44660702
DM
16061 "permissions" : {
16062 "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.",
16063 "user" : "all"
16064 },
16065 "protected" : 1,
16066 "proxyto" : "node",
16067 "returns" : {
16068 "type" : "string"
16069 }
16070 }
16071 },
16072 "leaf" : 0,
16073 "path" : "/nodes/{node}/lxc",
16074 "text" : "lxc"
16075 },
16076 {
16077 "children" : [
16078 {
56122987
DM
16079 "children" : [
16080 {
7aacca6f
DM
16081 "children" : [
16082 {
7aacca6f
DM
16083 "info" : {
16084 "POST" : {
44660702
DM
16085 "description" : "ceph osd in",
16086 "method" : "POST",
16087 "name" : "in",
16088 "parameters" : {
16089 "additionalProperties" : 0,
16090 "properties" : {
16091 "node" : {
16092 "description" : "The cluster node name.",
16093 "format" : "pve-node",
16094 "type" : "string"
16095 },
16096 "osdid" : {
16097 "description" : "OSD ID",
16098 "type" : "integer"
16099 }
16100 }
16101 },
56122987
DM
16102 "permissions" : {
16103 "check" : [
16104 "perm",
16105 "/",
16106 [
16107 "Sys.Modify"
16108 ]
16109 ]
7aacca6f 16110 },
44660702 16111 "protected" : 1,
7aacca6f
DM
16112 "proxyto" : "node",
16113 "returns" : {
16114 "type" : "null"
44660702 16115 }
56122987
DM
16116 }
16117 },
44660702 16118 "leaf" : 1,
7aacca6f 16119 "path" : "/nodes/{node}/ceph/osd/{osdid}/in",
44660702 16120 "text" : "in"
56122987
DM
16121 },
16122 {
56122987
DM
16123 "info" : {
16124 "POST" : {
44660702
DM
16125 "description" : "ceph osd out",
16126 "method" : "POST",
16127 "name" : "out",
16128 "parameters" : {
16129 "additionalProperties" : 0,
16130 "properties" : {
16131 "node" : {
16132 "description" : "The cluster node name.",
16133 "format" : "pve-node",
16134 "type" : "string"
16135 },
16136 "osdid" : {
16137 "description" : "OSD ID",
16138 "type" : "integer"
16139 }
16140 }
16141 },
56122987
DM
16142 "permissions" : {
16143 "check" : [
16144 "perm",
16145 "/",
16146 [
16147 "Sys.Modify"
16148 ]
16149 ]
16150 },
44660702 16151 "protected" : 1,
56122987 16152 "proxyto" : "node",
7aacca6f
DM
16153 "returns" : {
16154 "type" : "null"
44660702
DM
16155 }
16156 }
16157 },
16158 "leaf" : 1,
16159 "path" : "/nodes/{node}/ceph/osd/{osdid}/out",
16160 "text" : "out"
16161 }
16162 ],
16163 "info" : {
16164 "DELETE" : {
16165 "description" : "Destroy OSD",
16166 "method" : "DELETE",
16167 "name" : "destroyosd",
16168 "parameters" : {
16169 "additionalProperties" : 0,
16170 "properties" : {
16171 "cleanup" : {
16172 "default" : 0,
16173 "description" : "If set, we remove partition table entries.",
16174 "optional" : 1,
16175 "type" : "boolean"
7aacca6f 16176 },
44660702
DM
16177 "node" : {
16178 "description" : "The cluster node name.",
16179 "format" : "pve-node",
16180 "type" : "string"
56122987 16181 },
44660702
DM
16182 "osdid" : {
16183 "description" : "OSD ID",
16184 "type" : "integer"
16185 }
56122987
DM
16186 }
16187 },
44660702
DM
16188 "protected" : 1,
16189 "proxyto" : "node",
16190 "returns" : {
16191 "type" : "string"
16192 }
16193 }
16194 },
16195 "leaf" : 0,
16196 "path" : "/nodes/{node}/ceph/osd/{osdid}",
16197 "text" : "{osdid}"
16198 }
16199 ],
16200 "info" : {
16201 "GET" : {
16202 "description" : "Get Ceph osd list/tree.",
16203 "method" : "GET",
16204 "name" : "index",
16205 "parameters" : {
16206 "additionalProperties" : 0,
16207 "properties" : {
16208 "node" : {
16209 "description" : "The cluster node name.",
16210 "format" : "pve-node",
16211 "type" : "string"
16212 }
16213 }
16214 },
16215 "permissions" : {
16216 "check" : [
16217 "perm",
16218 "/",
16219 [
16220 "Sys.Audit",
16221 "Datastore.Audit"
16222 ],
16223 "any",
16224 1
16225 ]
16226 },
16227 "protected" : 1,
16228 "proxyto" : "node",
16229 "returns" : {
16230 "type" : "object"
16231 }
16232 },
16233 "POST" : {
16234 "description" : "Create OSD",
16235 "method" : "POST",
16236 "name" : "createosd",
16237 "parameters" : {
16238 "additionalProperties" : 0,
16239 "properties" : {
16240 "dev" : {
16241 "description" : "Block device name.",
16242 "type" : "string"
16243 },
16244 "fstype" : {
16245 "default" : "xfs",
16246 "description" : "File system type.",
16247 "enum" : [
16248 "xfs",
16249 "ext4",
16250 "btrfs"
16251 ],
16252 "optional" : 1,
16253 "type" : "string"
16254 },
16255 "journal_dev" : {
16256 "description" : "Block device name for journal.",
16257 "optional" : 1,
16258 "type" : "string"
16259 },
16260 "node" : {
16261 "description" : "The cluster node name.",
16262 "format" : "pve-node",
16263 "type" : "string"
16264 }
56122987 16265 }
44660702
DM
16266 },
16267 "protected" : 1,
16268 "proxyto" : "node",
16269 "returns" : {
16270 "type" : "string"
16271 }
56122987 16272 }
44660702 16273 },
7aacca6f 16274 "leaf" : 0,
44660702
DM
16275 "path" : "/nodes/{node}/ceph/osd",
16276 "text" : "osd"
7aacca6f
DM
16277 },
16278 {
56122987
DM
16279 "info" : {
16280 "GET" : {
7aacca6f 16281 "description" : "List local disks.",
44660702
DM
16282 "method" : "GET",
16283 "name" : "disks",
16284 "parameters" : {
16285 "additionalProperties" : 0,
16286 "properties" : {
16287 "node" : {
16288 "description" : "The cluster node name.",
16289 "format" : "pve-node",
16290 "type" : "string"
16291 },
16292 "type" : {
16293 "description" : "Only list specific types of disks.",
16294 "enum" : [
16295 "unused",
16296 "journal_disks"
16297 ],
16298 "optional" : 1,
16299 "type" : "string"
16300 }
16301 }
16302 },
56122987
DM
16303 "permissions" : {
16304 "check" : [
16305 "perm",
16306 "/",
16307 [
16308 "Sys.Audit",
16309 "Datastore.Audit"
16310 ],
16311 "any",
16312 1
16313 ]
7aacca6f 16314 },
44660702
DM
16315 "protected" : 1,
16316 "proxyto" : "node",
56122987 16317 "returns" : {
7aacca6f
DM
16318 "items" : {
16319 "properties" : {
44660702
DM
16320 "dev" : {
16321 "type" : "string"
16322 },
16323 "gpt" : {
16324 "type" : "boolean"
16325 },
16326 "model" : {
16327 "optional" : 1,
16328 "type" : "string"
7aacca6f
DM
16329 },
16330 "osdid" : {
16331 "type" : "integer"
16332 },
16333 "serial" : {
7aacca6f
DM
16334 "optional" : 1,
16335 "type" : "string"
16336 },
16337 "size" : {
16338 "type" : "integer"
16339 },
44660702
DM
16340 "used" : {
16341 "optional" : 1,
7aacca6f
DM
16342 "type" : "string"
16343 },
44660702
DM
16344 "vendor" : {
16345 "optional" : 1,
16346 "type" : "string"
7aacca6f
DM
16347 }
16348 },
16349 "type" : "object"
44660702
DM
16350 },
16351 "type" : "array"
16352 }
56122987 16353 }
44660702
DM
16354 },
16355 "leaf" : 1,
16356 "path" : "/nodes/{node}/ceph/disks",
16357 "text" : "disks"
56122987
DM
16358 },
16359 {
56122987
DM
16360 "info" : {
16361 "GET" : {
7aacca6f 16362 "description" : "Get Ceph configuration.",
44660702
DM
16363 "method" : "GET",
16364 "name" : "config",
56122987 16365 "parameters" : {
7aacca6f 16366 "additionalProperties" : 0,
56122987 16367 "properties" : {
56122987 16368 "node" : {
7aacca6f 16369 "description" : "The cluster node name.",
44660702 16370 "format" : "pve-node",
56122987
DM
16371 "type" : "string"
16372 }
7aacca6f 16373 }
56122987 16374 },
56122987
DM
16375 "permissions" : {
16376 "check" : [
16377 "perm",
16378 "/",
16379 [
16380 "Sys.Audit",
16381 "Datastore.Audit"
16382 ],
16383 "any",
16384 1
16385 ]
44660702
DM
16386 },
16387 "returns" : {
16388 "type" : "string"
7aacca6f
DM
16389 }
16390 }
44660702
DM
16391 },
16392 "leaf" : 1,
16393 "path" : "/nodes/{node}/ceph/config",
16394 "text" : "config"
7aacca6f
DM
16395 },
16396 {
7aacca6f
DM
16397 "children" : [
16398 {
7aacca6f
DM
16399 "info" : {
16400 "DELETE" : {
7aacca6f 16401 "description" : "Destroy Ceph monitor.",
44660702
DM
16402 "method" : "DELETE",
16403 "name" : "destroymon",
16404 "parameters" : {
16405 "additionalProperties" : 0,
16406 "properties" : {
16407 "monid" : {
16408 "description" : "Monitor ID",
16409 "type" : "integer"
16410 },
16411 "node" : {
16412 "description" : "The cluster node name.",
16413 "format" : "pve-node",
16414 "type" : "string"
16415 }
16416 }
16417 },
7aacca6f
DM
16418 "permissions" : {
16419 "check" : [
16420 "perm",
16421 "/",
16422 [
16423 "Sys.Modify"
16424 ]
16425 ]
16426 },
44660702
DM
16427 "protected" : 1,
16428 "proxyto" : "node",
7aacca6f
DM
16429 "returns" : {
16430 "type" : "string"
44660702 16431 }
7aacca6f 16432 }
44660702
DM
16433 },
16434 "leaf" : 1,
16435 "path" : "/nodes/{node}/ceph/mon/{monid}",
16436 "text" : "{monid}"
7aacca6f
DM
16437 }
16438 ],
16439 "info" : {
16440 "GET" : {
44660702 16441 "description" : "Get Ceph monitor list.",
7aacca6f 16442 "method" : "GET",
44660702 16443 "name" : "listmon",
7aacca6f
DM
16444 "parameters" : {
16445 "additionalProperties" : 0,
16446 "properties" : {
16447 "node" : {
7aacca6f 16448 "description" : "The cluster node name.",
44660702
DM
16449 "format" : "pve-node",
16450 "type" : "string"
7aacca6f
DM
16451 }
16452 }
16453 },
44660702
DM
16454 "permissions" : {
16455 "check" : [
16456 "perm",
16457 "/",
16458 [
16459 "Sys.Audit",
16460 "Datastore.Audit"
16461 ],
16462 "any",
16463 1
16464 ]
16465 },
7aacca6f 16466 "protected" : 1,
44660702 16467 "proxyto" : "node",
7aacca6f
DM
16468 "returns" : {
16469 "items" : {
16470 "properties" : {
44660702 16471 "addr" : {
7aacca6f 16472 "type" : "string"
56122987 16473 },
44660702 16474 "name" : {
56122987
DM
16475 "type" : "string"
16476 }
7aacca6f
DM
16477 },
16478 "type" : "object"
56122987 16479 },
7aacca6f
DM
16480 "links" : [
16481 {
16482 "href" : "{name}",
16483 "rel" : "child"
16484 }
16485 ],
56122987 16486 "type" : "array"
44660702 16487 }
7aacca6f
DM
16488 },
16489 "POST" : {
44660702
DM
16490 "description" : "Create Ceph Monitor",
16491 "method" : "POST",
16492 "name" : "createmon",
16493 "parameters" : {
16494 "additionalProperties" : 0,
16495 "properties" : {
16496 "node" : {
16497 "description" : "The cluster node name.",
16498 "format" : "pve-node",
16499 "type" : "string"
16500 }
16501 }
16502 },
7aacca6f
DM
16503 "permissions" : {
16504 "check" : [
16505 "perm",
16506 "/",
16507 [
16508 "Sys.Modify"
16509 ]
16510 ]
16511 },
44660702 16512 "protected" : 1,
7aacca6f 16513 "proxyto" : "node",
56122987
DM
16514 "returns" : {
16515 "type" : "string"
44660702 16516 }
56122987 16517 }
44660702
DM
16518 },
16519 "leaf" : 0,
16520 "path" : "/nodes/{node}/ceph/mon",
16521 "text" : "mon"
56122987
DM
16522 },
16523 {
16524 "info" : {
16525 "POST" : {
44660702
DM
16526 "description" : "Create initial ceph default configuration and setup symlinks.",
16527 "method" : "POST",
16528 "name" : "init",
16529 "parameters" : {
16530 "additionalProperties" : 0,
16531 "properties" : {
16532 "network" : {
16533 "description" : "Use specific network for all ceph related traffic",
16534 "format" : "CIDR",
16535 "maxLength" : 128,
16536 "optional" : 1,
16537 "type" : "string"
16538 },
16539 "node" : {
16540 "description" : "The cluster node name.",
16541 "format" : "pve-node",
16542 "type" : "string"
16543 },
16544 "pg_bits" : {
16545 "default" : 6,
16546 "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.",
16547 "maximum" : 14,
16548 "minimum" : 6,
16549 "optional" : 1,
4bd7df8b
DM
16550 "type" : "integer",
16551 "typetext" : "integer (6-14)"
44660702
DM
16552 },
16553 "size" : {
16554 "default" : 2,
16555 "description" : "Number of replicas per object",
16556 "maximum" : 3,
16557 "minimum" : 1,
16558 "optional" : 1,
4bd7df8b
DM
16559 "type" : "integer",
16560 "typetext" : "integer (1-3)"
44660702
DM
16561 }
16562 }
7aacca6f 16563 },
56122987
DM
16564 "permissions" : {
16565 "check" : [
16566 "perm",
16567 "/",
16568 [
16569 "Sys.Modify"
16570 ]
16571 ]
16572 },
7aacca6f 16573 "protected" : 1,
44660702
DM
16574 "proxyto" : "node",
16575 "returns" : {
16576 "type" : "null"
7aacca6f
DM
16577 }
16578 }
16579 },
7aacca6f 16580 "leaf" : 1,
44660702
DM
16581 "path" : "/nodes/{node}/ceph/init",
16582 "text" : "init"
7aacca6f
DM
16583 },
16584 {
7aacca6f
DM
16585 "info" : {
16586 "POST" : {
44660702 16587 "description" : "Stop ceph services.",
7aacca6f
DM
16588 "method" : "POST",
16589 "name" : "stop",
16590 "parameters" : {
44660702 16591 "additionalProperties" : 0,
7aacca6f
DM
16592 "properties" : {
16593 "node" : {
7aacca6f 16594 "description" : "The cluster node name.",
44660702 16595 "format" : "pve-node",
56122987 16596 "type" : "string"
7aacca6f
DM
16597 },
16598 "service" : {
7aacca6f 16599 "description" : "Ceph service name.",
44660702
DM
16600 "optional" : 1,
16601 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
16602 "type" : "string"
56122987 16603 }
44660702 16604 }
7aacca6f
DM
16605 },
16606 "permissions" : {
16607 "check" : [
16608 "perm",
16609 "/",
16610 [
16611 "Sys.Modify"
16612 ]
16613 ]
16614 },
44660702
DM
16615 "protected" : 1,
16616 "proxyto" : "node",
16617 "returns" : {
16618 "type" : "string"
16619 }
7aacca6f 16620 }
44660702
DM
16621 },
16622 "leaf" : 1,
16623 "path" : "/nodes/{node}/ceph/stop",
16624 "text" : "stop"
7aacca6f
DM
16625 },
16626 {
7aacca6f
DM
16627 "info" : {
16628 "POST" : {
7aacca6f 16629 "description" : "Start ceph services.",
44660702 16630 "method" : "POST",
7aacca6f 16631 "name" : "start",
56122987
DM
16632 "parameters" : {
16633 "additionalProperties" : 0,
16634 "properties" : {
16635 "node" : {
7aacca6f 16636 "description" : "The cluster node name.",
44660702 16637 "format" : "pve-node",
7aacca6f
DM
16638 "type" : "string"
16639 },
16640 "service" : {
16641 "description" : "Ceph service name.",
44660702 16642 "optional" : 1,
7aacca6f 16643 "pattern" : "(mon|mds|osd)\\.[A-Za-z0-9]{1,32}",
44660702 16644 "type" : "string"
7aacca6f
DM
16645 }
16646 }
16647 },
44660702
DM
16648 "permissions" : {
16649 "check" : [
16650 "perm",
16651 "/",
16652 [
16653 "Sys.Modify"
16654 ]
16655 ]
16656 },
7aacca6f 16657 "protected" : 1,
44660702
DM
16658 "proxyto" : "node",
16659 "returns" : {
16660 "type" : "string"
16661 }
7aacca6f 16662 }
44660702
DM
16663 },
16664 "leaf" : 1,
16665 "path" : "/nodes/{node}/ceph/start",
16666 "text" : "start"
7aacca6f
DM
16667 },
16668 {
7aacca6f
DM
16669 "info" : {
16670 "GET" : {
44660702
DM
16671 "description" : "Get ceph status.",
16672 "method" : "GET",
16673 "name" : "status",
7aacca6f
DM
16674 "parameters" : {
16675 "additionalProperties" : 0,
16676 "properties" : {
16677 "node" : {
7aacca6f 16678 "description" : "The cluster node name.",
44660702 16679 "format" : "pve-node",
7aacca6f 16680 "type" : "string"
56122987
DM
16681 }
16682 }
16683 },
16684 "permissions" : {
16685 "check" : [
16686 "perm",
16687 "/",
16688 [
16689 "Sys.Audit",
16690 "Datastore.Audit"
16691 ],
16692 "any",
16693 1
16694 ]
16695 },
44660702
DM
16696 "protected" : 1,
16697 "proxyto" : "node",
56122987 16698 "returns" : {
7aacca6f
DM
16699 "type" : "object"
16700 }
16701 }
16702 },
44660702 16703 "leaf" : 1,
7aacca6f 16704 "path" : "/nodes/{node}/ceph/status",
44660702 16705 "text" : "status"
7aacca6f
DM
16706 },
16707 {
44660702
DM
16708 "children" : [
16709 {
16710 "info" : {
16711 "DELETE" : {
16712 "description" : "Destroy pool",
16713 "method" : "DELETE",
16714 "name" : "destroypool",
16715 "parameters" : {
16716 "additionalProperties" : 0,
16717 "properties" : {
4bd7df8b
DM
16718 "force" : {
16719 "default" : 0,
16720 "description" : "If true, destroys pool even if in use",
16721 "optional" : 1,
16722 "type" : "boolean"
16723 },
44660702
DM
16724 "name" : {
16725 "description" : "The name of the pool. It must be unique.",
16726 "type" : "string"
16727 },
16728 "node" : {
16729 "description" : "The cluster node name.",
16730 "format" : "pve-node",
16731 "type" : "string"
16732 }
16733 }
16734 },
16735 "permissions" : {
16736 "check" : [
16737 "perm",
16738 "/",
16739 [
16740 "Sys.Modify"
16741 ]
16742 ]
16743 },
16744 "protected" : 1,
16745 "proxyto" : "node",
16746 "returns" : {
16747 "type" : "null"
16748 }
16749 }
16750 },
16751 "leaf" : 1,
16752 "path" : "/nodes/{node}/ceph/pools/{name}",
16753 "text" : "{name}"
16754 }
16755 ],
7aacca6f
DM
16756 "info" : {
16757 "GET" : {
44660702
DM
16758 "description" : "List all pools.",
16759 "method" : "GET",
16760 "name" : "lspools",
7aacca6f
DM
16761 "parameters" : {
16762 "additionalProperties" : 0,
16763 "properties" : {
16764 "node" : {
7aacca6f 16765 "description" : "The cluster node name.",
44660702
DM
16766 "format" : "pve-node",
16767 "type" : "string"
7aacca6f
DM
16768 }
16769 }
16770 },
7aacca6f
DM
16771 "permissions" : {
16772 "check" : [
16773 "perm",
16774 "/",
16775 [
16776 "Sys.Audit",
16777 "Datastore.Audit"
16778 ],
16779 "any",
16780 1
16781 ]
16782 },
44660702
DM
16783 "protected" : 1,
16784 "proxyto" : "node",
7aacca6f 16785 "returns" : {
56122987 16786 "items" : {
56122987 16787 "properties" : {
7aacca6f
DM
16788 "pool" : {
16789 "type" : "integer"
16790 },
44660702
DM
16791 "pool_name" : {
16792 "type" : "string"
16793 },
7aacca6f
DM
16794 "size" : {
16795 "type" : "integer"
56122987 16796 }
44660702
DM
16797 },
16798 "type" : "object"
7aacca6f 16799 },
44660702
DM
16800 "links" : [
16801 {
16802 "href" : "{pool_name}",
16803 "rel" : "child"
16804 }
16805 ],
7aacca6f
DM
16806 "type" : "array"
16807 }
16808 },
16809 "POST" : {
7aacca6f 16810 "description" : "Create POOL",
7aacca6f 16811 "method" : "POST",
7aacca6f
DM
16812 "name" : "createpool",
16813 "parameters" : {
16814 "additionalProperties" : 0,
16815 "properties" : {
7aacca6f 16816 "crush_ruleset" : {
7aacca6f 16817 "default" : 0,
44660702 16818 "description" : "The ruleset to use for mapping object placement in the cluster.",
7aacca6f 16819 "maximum" : 32768,
44660702 16820 "minimum" : 0,
7aacca6f 16821 "optional" : 1,
4bd7df8b
DM
16822 "type" : "integer",
16823 "typetext" : "integer (0-32768)"
56122987 16824 },
44660702
DM
16825 "min_size" : {
16826 "default" : 1,
16827 "description" : "Minimum number of replicas per object",
16828 "maximum" : 3,
16829 "minimum" : 1,
16830 "optional" : 1,
4bd7df8b
DM
16831 "type" : "integer",
16832 "typetext" : "integer (1-3)"
7aacca6f 16833 },
44660702
DM
16834 "name" : {
16835 "description" : "The name of the pool. It must be unique.",
16836 "type" : "string"
16837 },
16838 "node" : {
16839 "description" : "The cluster node name.",
16840 "format" : "pve-node",
16841 "type" : "string"
16842 },
16843 "pg_num" : {
16844 "default" : 64,
16845 "description" : "Number of placement groups.",
16846 "maximum" : 32768,
16847 "minimum" : 8,
16848 "optional" : 1,
4bd7df8b
DM
16849 "type" : "integer",
16850 "typetext" : "integer (8-32768)"
44660702
DM
16851 },
16852 "size" : {
16853 "default" : 2,
16854 "description" : "Number of replicas per object",
16855 "maximum" : 3,
16856 "minimum" : 1,
16857 "optional" : 1,
4bd7df8b
DM
16858 "type" : "integer",
16859 "typetext" : "integer (1-3)"
56122987
DM
16860 }
16861 }
44660702
DM
16862 },
16863 "permissions" : {
16864 "check" : [
16865 "perm",
16866 "/",
16867 [
16868 "Sys.Modify"
16869 ]
16870 ]
16871 },
16872 "protected" : 1,
16873 "proxyto" : "node",
16874 "returns" : {
16875 "type" : "null"
7aacca6f 16876 }
56122987 16877 }
44660702 16878 },
56122987 16879 "leaf" : 0,
44660702
DM
16880 "path" : "/nodes/{node}/ceph/pools",
16881 "text" : "pools"
56122987
DM
16882 },
16883 {
56122987 16884 "info" : {
7aacca6f 16885 "GET" : {
44660702
DM
16886 "description" : "Get OSD crush map",
16887 "method" : "GET",
16888 "name" : "crush",
16889 "parameters" : {
16890 "additionalProperties" : 0,
16891 "properties" : {
16892 "node" : {
16893 "description" : "The cluster node name.",
16894 "format" : "pve-node",
16895 "type" : "string"
16896 }
16897 }
16898 },
7aacca6f
DM
16899 "permissions" : {
16900 "check" : [
16901 "perm",
16902 "/",
16903 [
16904 "Sys.Audit",
16905 "Datastore.Audit"
16906 ],
16907 "any",
16908 1
16909 ]
16910 },
44660702 16911 "protected" : 1,
7aacca6f 16912 "proxyto" : "node",
56122987 16913 "returns" : {
7aacca6f 16914 "type" : "string"
44660702 16915 }
56122987
DM
16916 }
16917 },
44660702
DM
16918 "leaf" : 1,
16919 "path" : "/nodes/{node}/ceph/crush",
7aacca6f 16920 "text" : "crush"
56122987
DM
16921 },
16922 {
56122987 16923 "info" : {
7aacca6f 16924 "GET" : {
44660702
DM
16925 "description" : "Read ceph log",
16926 "method" : "GET",
16927 "name" : "log",
16928 "parameters" : {
16929 "additionalProperties" : 0,
16930 "properties" : {
16931 "limit" : {
16932 "minimum" : 0,
16933 "optional" : 1,
4bd7df8b
DM
16934 "type" : "integer",
16935 "typetext" : "integer (0- N)"
7aacca6f 16936 },
44660702
DM
16937 "node" : {
16938 "description" : "The cluster node name.",
16939 "format" : "pve-node",
16940 "type" : "string"
16941 },
16942 "start" : {
16943 "minimum" : 0,
16944 "optional" : 1,
4bd7df8b
DM
16945 "type" : "integer",
16946 "typetext" : "integer (0- N)"
44660702 16947 }
7aacca6f 16948 }
56122987 16949 },
56122987
DM
16950 "permissions" : {
16951 "check" : [
16952 "perm",
7aacca6f 16953 "/nodes/{node}",
56122987 16954 [
7aacca6f 16955 "Sys.Syslog"
56122987
DM
16956 ]
16957 ]
16958 },
7aacca6f 16959 "protected" : 1,
44660702
DM
16960 "proxyto" : "node",
16961 "returns" : {
16962 "items" : {
16963 "properties" : {
16964 "n" : {
16965 "description" : "Line number",
16966 "type" : "integer"
16967 },
16968 "t" : {
16969 "description" : "Line text",
16970 "type" : "string"
16971 }
56122987 16972 },
44660702 16973 "type" : "object"
56122987 16974 },
44660702 16975 "type" : "array"
7aacca6f 16976 }
56122987
DM
16977 }
16978 },
16979 "leaf" : 1,
44660702
DM
16980 "path" : "/nodes/{node}/ceph/log",
16981 "text" : "log"
7aacca6f
DM
16982 }
16983 ],
44660702
DM
16984 "info" : {
16985 "GET" : {
16986 "description" : "Directory index.",
16987 "method" : "GET",
16988 "name" : "index",
16989 "parameters" : {
16990 "additionalProperties" : 0,
16991 "properties" : {
16992 "node" : {
16993 "description" : "The cluster node name.",
16994 "format" : "pve-node",
16995 "type" : "string"
16996 }
16997 }
16998 },
16999 "permissions" : {
17000 "check" : [
17001 "perm",
17002 "/",
17003 [
17004 "Sys.Audit",
17005 "Datastore.Audit"
17006 ],
17007 "any",
17008 1
17009 ]
17010 },
17011 "returns" : {
17012 "items" : {
17013 "properties" : {},
17014 "type" : "object"
17015 },
17016 "links" : [
17017 {
17018 "href" : "{name}",
17019 "rel" : "child"
17020 }
17021 ],
17022 "type" : "array"
17023 }
17024 }
17025 },
7aacca6f 17026 "leaf" : 0,
44660702
DM
17027 "path" : "/nodes/{node}/ceph",
17028 "text" : "ceph"
7aacca6f
DM
17029 },
17030 {
4bd7df8b
DM
17031 "children" : [
17032 {
17033 "info" : {
17034 "GET" : {
17035 "description" : "Extract configuration from vzdump backup archive.",
17036 "method" : "GET",
17037 "name" : "extractconfig",
17038 "parameters" : {
17039 "additionalProperties" : 0,
17040 "properties" : {
17041 "node" : {
17042 "description" : "The cluster node name.",
17043 "format" : "pve-node",
17044 "type" : "string"
17045 },
17046 "volume" : {
17047 "description" : "Volume identifier",
17048 "type" : "string"
17049 }
17050 }
17051 },
17052 "permissions" : {
17053 "description" : "The user needs 'VM.Backup' permissions on the backed up guest ID, and 'Datastore.AllocateSpace' on the backup storage.",
17054 "user" : "all"
17055 },
17056 "protected" : 1,
17057 "proxyto" : "node",
17058 "returns" : {
17059 "type" : "string"
17060 }
17061 }
17062 },
17063 "leaf" : 1,
17064 "path" : "/nodes/{node}/vzdump/extractconfig",
17065 "text" : "extractconfig"
17066 }
17067 ],
7aacca6f
DM
17068 "info" : {
17069 "POST" : {
7aacca6f 17070 "description" : "Create backup.",
44660702 17071 "method" : "POST",
7aacca6f
DM
17072 "name" : "vzdump",
17073 "parameters" : {
44660702 17074 "additionalProperties" : 0,
7aacca6f 17075 "properties" : {
44660702
DM
17076 "all" : {
17077 "default" : 0,
17078 "description" : "Backup all known guest systems on this host.",
7aacca6f 17079 "optional" : 1,
44660702 17080 "type" : "boolean"
56122987 17081 },
44660702 17082 "bwlimit" : {
7aacca6f 17083 "default" : 0,
44660702
DM
17084 "description" : "Limit I/O bandwidth (KBytes per second).",
17085 "minimum" : 0,
7aacca6f 17086 "optional" : 1,
4bd7df8b
DM
17087 "type" : "integer",
17088 "typetext" : "integer (0- N)"
56122987 17089 },
44660702
DM
17090 "compress" : {
17091 "default" : "0",
17092 "description" : "Compress dump file.",
17093 "enum" : [
17094 "0",
17095 "1",
17096 "gzip",
17097 "lzo"
17098 ],
7aacca6f 17099 "optional" : 1,
44660702 17100 "type" : "string"
56122987 17101 },
44660702
DM
17102 "dumpdir" : {
17103 "description" : "Store resulting files to specified directory.",
7aacca6f 17104 "optional" : 1,
44660702 17105 "type" : "string"
7aacca6f 17106 },
44660702
DM
17107 "exclude" : {
17108 "description" : "Exclude specified guest systems (assumes --all)",
17109 "format" : "pve-vmid-list",
7aacca6f 17110 "optional" : 1,
44660702 17111 "type" : "string"
7aacca6f 17112 },
44660702
DM
17113 "exclude-path" : {
17114 "description" : "Exclude certain files/directories (shell globs).",
17115 "format" : "string-alist",
7aacca6f 17116 "optional" : 1,
44660702 17117 "type" : "string"
7aacca6f 17118 },
44660702
DM
17119 "ionice" : {
17120 "default" : 7,
17121 "description" : "Set CFQ ionice priority.",
17122 "maximum" : 8,
17123 "minimum" : 0,
17124 "optional" : 1,
4bd7df8b
DM
17125 "type" : "integer",
17126 "typetext" : "integer (0-8)"
7aacca6f 17127 },
44660702
DM
17128 "lockwait" : {
17129 "default" : 180,
17130 "description" : "Maximal time to wait for the global lock (minutes).",
17131 "minimum" : 0,
7aacca6f 17132 "optional" : 1,
4bd7df8b
DM
17133 "type" : "integer",
17134 "typetext" : "integer (0- N)"
7aacca6f
DM
17135 },
17136 "mailnotification" : {
44660702 17137 "default" : "always",
7aacca6f
DM
17138 "description" : "Specify when to send an email",
17139 "enum" : [
17140 "always",
17141 "failure"
17142 ],
7aacca6f 17143 "optional" : 1,
44660702 17144 "type" : "string"
7aacca6f
DM
17145 },
17146 "mailto" : {
7aacca6f 17147 "description" : "Comma-separated list of email addresses that should receive email notifications.",
44660702 17148 "format" : "string-list",
7aacca6f 17149 "optional" : 1,
44660702 17150 "type" : "string"
56122987 17151 },
44660702
DM
17152 "maxfiles" : {
17153 "default" : 1,
17154 "description" : "Maximal number of backup files per guest system.",
17155 "minimum" : 1,
7aacca6f 17156 "optional" : 1,
4bd7df8b
DM
17157 "type" : "integer",
17158 "typetext" : "integer (1- N)"
56122987 17159 },
7aacca6f 17160 "mode" : {
44660702 17161 "default" : "snapshot",
7aacca6f
DM
17162 "description" : "Backup mode.",
17163 "enum" : [
17164 "snapshot",
17165 "suspend",
17166 "stop"
17167 ],
44660702
DM
17168 "optional" : 1,
17169 "type" : "string"
7aacca6f 17170 },
44660702
DM
17171 "node" : {
17172 "description" : "Only run if executed on this node.",
17173 "format" : "pve-node",
17174 "optional" : 1,
17175 "type" : "string"
17176 },
17177 "pigz" : {
17178 "default" : 0,
17179 "description" : "Use pigz instead of gzip when N>0. N=1 uses half of cores, N>1 uses N as thread count.",
17180 "optional" : 1,
17181 "type" : "integer"
17182 },
17183 "quiet" : {
17184 "default" : 0,
17185 "description" : "Be quiet.",
17186 "optional" : 1,
17187 "type" : "boolean"
17188 },
17189 "remove" : {
7aacca6f 17190 "default" : 1,
44660702 17191 "description" : "Remove old backup files if there are more than 'maxfiles' backup files.",
7aacca6f 17192 "optional" : 1,
44660702 17193 "type" : "boolean"
7aacca6f 17194 },
44660702
DM
17195 "script" : {
17196 "description" : "Use specified hook script.",
17197 "optional" : 1,
17198 "type" : "string"
17199 },
17200 "size" : {
17201 "default" : 1024,
17202 "description" : "Unused, will be removed in a future release.",
17203 "minimum" : 500,
17204 "optional" : 1,
4bd7df8b
DM
17205 "type" : "integer",
17206 "typetext" : "integer (500- N)"
44660702
DM
17207 },
17208 "stdexcludes" : {
17209 "default" : 1,
17210 "description" : "Exclude temporary files and logs.",
17211 "optional" : 1,
17212 "type" : "boolean"
17213 },
17214 "stdout" : {
17215 "description" : "Write tar to stdout, not to a file.",
7aacca6f 17216 "optional" : 1,
44660702
DM
17217 "type" : "boolean"
17218 },
17219 "stop" : {
7aacca6f 17220 "default" : 0,
44660702
DM
17221 "description" : "Stop runnig backup jobs on this host.",
17222 "optional" : 1,
17223 "type" : "boolean"
7aacca6f 17224 },
44660702
DM
17225 "stopwait" : {
17226 "default" : 10,
17227 "description" : "Maximal time to wait until a guest system is stopped (minutes).",
7aacca6f
DM
17228 "minimum" : 0,
17229 "optional" : 1,
4bd7df8b
DM
17230 "type" : "integer",
17231 "typetext" : "integer (0- N)"
7aacca6f 17232 },
44660702
DM
17233 "storage" : {
17234 "description" : "Store resulting file to this storage.",
17235 "format" : "pve-storage-id",
7aacca6f 17236 "optional" : 1,
44660702
DM
17237 "type" : "string"
17238 },
17239 "tmpdir" : {
17240 "description" : "Store temporary files to specified directory.",
17241 "optional" : 1,
17242 "type" : "string"
7aacca6f
DM
17243 },
17244 "vmid" : {
7aacca6f 17245 "description" : "The ID of the guest system you want to backup.",
44660702 17246 "format" : "pve-vmid-list",
7aacca6f
DM
17247 "optional" : 1,
17248 "type" : "string"
17249 }
7aacca6f
DM
17250 }
17251 },
7aacca6f 17252 "permissions" : {
44660702
DM
17253 "description" : "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage.",
17254 "user" : "all"
7aacca6f 17255 },
44660702 17256 "protected" : 1,
7aacca6f 17257 "proxyto" : "node",
7aacca6f 17258 "returns" : {
44660702 17259 "type" : "string"
7aacca6f
DM
17260 }
17261 }
17262 },
4bd7df8b 17263 "leaf" : 0,
44660702
DM
17264 "path" : "/nodes/{node}/vzdump",
17265 "text" : "vzdump"
17266 },
17267 {
7aacca6f
DM
17268 "children" : [
17269 {
7aacca6f
DM
17270 "children" : [
17271 {
7aacca6f
DM
17272 "info" : {
17273 "GET" : {
7aacca6f
DM
17274 "description" : "Read service properties",
17275 "method" : "GET",
17276 "name" : "service_state",
17277 "parameters" : {
44660702 17278 "additionalProperties" : 0,
7aacca6f
DM
17279 "properties" : {
17280 "node" : {
7aacca6f 17281 "description" : "The cluster node name.",
44660702
DM
17282 "format" : "pve-node",
17283 "type" : "string"
7aacca6f
DM
17284 },
17285 "service" : {
44660702 17286 "description" : "Service ID",
7aacca6f
DM
17287 "enum" : [
17288 "pveproxy",
17289 "pvedaemon",
17290 "spiceproxy",
17291 "pvestatd",
17292 "pve-cluster",
17293 "corosync",
17294 "pve-firewall",
17295 "pvefw-logger",
17296 "pve-ha-crm",
17297 "pve-ha-lrm",
17298 "sshd",
17299 "syslog",
17300 "cron",
17301 "postfix",
17302 "ksmtuned",
17303 "systemd-timesyncd"
17304 ],
7aacca6f
DM
17305 "type" : "string"
17306 }
44660702 17307 }
56122987 17308 },
7aacca6f
DM
17309 "permissions" : {
17310 "check" : [
17311 "perm",
17312 "/nodes/{node}",
17313 [
44660702 17314 "Sys.Audit"
7aacca6f
DM
17315 ]
17316 ]
56122987 17317 },
44660702 17318 "protected" : 1,
7aacca6f 17319 "proxyto" : "node",
44660702
DM
17320 "returns" : {
17321 "properties" : {},
17322 "type" : "object"
17323 }
17324 }
17325 },
17326 "leaf" : 1,
17327 "path" : "/nodes/{node}/services/{service}/state",
17328 "text" : "state"
17329 },
17330 {
17331 "info" : {
17332 "POST" : {
17333 "description" : "Start service.",
7aacca6f
DM
17334 "method" : "POST",
17335 "name" : "service_start",
17336 "parameters" : {
44660702 17337 "additionalProperties" : 0,
7aacca6f 17338 "properties" : {
44660702
DM
17339 "node" : {
17340 "description" : "The cluster node name.",
17341 "format" : "pve-node",
17342 "type" : "string"
17343 },
7aacca6f 17344 "service" : {
44660702 17345 "description" : "Service ID",
7aacca6f
DM
17346 "enum" : [
17347 "pveproxy",
17348 "pvedaemon",
17349 "spiceproxy",
17350 "pvestatd",
17351 "pve-cluster",
17352 "corosync",
17353 "pve-firewall",
17354 "pvefw-logger",
17355 "pve-ha-crm",
17356 "pve-ha-lrm",
17357 "sshd",
17358 "syslog",
17359 "cron",
17360 "postfix",
17361 "ksmtuned",
17362 "systemd-timesyncd"
17363 ],
7aacca6f
DM
17364 "type" : "string"
17365 }
44660702 17366 }
56122987 17367 },
56122987
DM
17368 "permissions" : {
17369 "check" : [
17370 "perm",
17371 "/nodes/{node}",
17372 [
7aacca6f 17373 "Sys.Modify"
56122987
DM
17374 ]
17375 ]
7aacca6f 17376 },
7aacca6f 17377 "protected" : 1,
44660702
DM
17378 "proxyto" : "node",
17379 "returns" : {
17380 "type" : "string"
17381 }
17382 }
17383 },
17384 "leaf" : 1,
17385 "path" : "/nodes/{node}/services/{service}/start",
17386 "text" : "start"
17387 },
17388 {
17389 "info" : {
17390 "POST" : {
17391 "description" : "Stop service.",
17392 "method" : "POST",
7aacca6f 17393 "name" : "service_stop",
56122987 17394 "parameters" : {
7aacca6f 17395 "additionalProperties" : 0,
56122987
DM
17396 "properties" : {
17397 "node" : {
44660702 17398 "description" : "The cluster node name.",
56122987 17399 "format" : "pve-node",
44660702 17400 "type" : "string"
56122987
DM
17401 },
17402 "service" : {
44660702 17403 "description" : "Service ID",
56122987
DM
17404 "enum" : [
17405 "pveproxy",
17406 "pvedaemon",
17407 "spiceproxy",
17408 "pvestatd",
17409 "pve-cluster",
17410 "corosync",
17411 "pve-firewall",
17412 "pvefw-logger",
17413 "pve-ha-crm",
17414 "pve-ha-lrm",
17415 "sshd",
17416 "syslog",
17417 "cron",
17418 "postfix",
17419 "ksmtuned",
17420 "systemd-timesyncd"
17421 ],
56122987
DM
17422 "type" : "string"
17423 }
7aacca6f 17424 }
44660702 17425 },
56122987
DM
17426 "permissions" : {
17427 "check" : [
17428 "perm",
17429 "/nodes/{node}",
17430 [
17431 "Sys.Modify"
17432 ]
17433 ]
17434 },
44660702
DM
17435 "protected" : 1,
17436 "proxyto" : "node",
7aacca6f
DM
17437 "returns" : {
17438 "type" : "string"
44660702
DM
17439 }
17440 }
17441 },
17442 "leaf" : 1,
17443 "path" : "/nodes/{node}/services/{service}/stop",
17444 "text" : "stop"
17445 },
17446 {
17447 "info" : {
17448 "POST" : {
17449 "description" : "Restart service.",
17450 "method" : "POST",
17451 "name" : "service_restart",
56122987
DM
17452 "parameters" : {
17453 "additionalProperties" : 0,
17454 "properties" : {
7aacca6f
DM
17455 "node" : {
17456 "description" : "The cluster node name.",
44660702
DM
17457 "format" : "pve-node",
17458 "type" : "string"
7aacca6f
DM
17459 },
17460 "service" : {
44660702 17461 "description" : "Service ID",
56122987
DM
17462 "enum" : [
17463 "pveproxy",
17464 "pvedaemon",
17465 "spiceproxy",
17466 "pvestatd",
17467 "pve-cluster",
17468 "corosync",
17469 "pve-firewall",
17470 "pvefw-logger",
17471 "pve-ha-crm",
17472 "pve-ha-lrm",
17473 "sshd",
17474 "syslog",
17475 "cron",
17476 "postfix",
17477 "ksmtuned",
17478 "systemd-timesyncd"
7aacca6f 17479 ],
7aacca6f 17480 "type" : "string"
56122987
DM
17481 }
17482 }
17483 },
44660702
DM
17484 "permissions" : {
17485 "check" : [
17486 "perm",
17487 "/nodes/{node}",
17488 [
17489 "Sys.Modify"
17490 ]
17491 ]
17492 },
17493 "protected" : 1,
17494 "proxyto" : "node",
17495 "returns" : {
17496 "type" : "string"
17497 }
56122987 17498 }
44660702
DM
17499 },
17500 "leaf" : 1,
17501 "path" : "/nodes/{node}/services/{service}/restart",
17502 "text" : "restart"
56122987
DM
17503 },
17504 {
56122987
DM
17505 "info" : {
17506 "POST" : {
44660702
DM
17507 "description" : "Reload service.",
17508 "method" : "POST",
7aacca6f 17509 "name" : "service_reload",
56122987
DM
17510 "parameters" : {
17511 "additionalProperties" : 0,
17512 "properties" : {
44660702
DM
17513 "node" : {
17514 "description" : "The cluster node name.",
17515 "format" : "pve-node",
17516 "type" : "string"
17517 },
56122987 17518 "service" : {
56122987
DM
17519 "description" : "Service ID",
17520 "enum" : [
17521 "pveproxy",
17522 "pvedaemon",
17523 "spiceproxy",
17524 "pvestatd",
17525 "pve-cluster",
17526 "corosync",
17527 "pve-firewall",
17528 "pvefw-logger",
17529 "pve-ha-crm",
17530 "pve-ha-lrm",
17531 "sshd",
17532 "syslog",
17533 "cron",
17534 "postfix",
17535 "ksmtuned",
17536 "systemd-timesyncd"
44660702
DM
17537 ],
17538 "type" : "string"
56122987
DM
17539 }
17540 }
17541 },
56122987
DM
17542 "permissions" : {
17543 "check" : [
17544 "perm",
17545 "/nodes/{node}",
17546 [
17547 "Sys.Modify"
17548 ]
17549 ]
17550 },
44660702 17551 "protected" : 1,
56122987 17552 "proxyto" : "node",
7aacca6f
DM
17553 "returns" : {
17554 "type" : "string"
56122987
DM
17555 }
17556 }
44660702
DM
17557 },
17558 "leaf" : 1,
17559 "path" : "/nodes/{node}/services/{service}/reload",
17560 "text" : "reload"
17561 }
17562 ],
17563 "info" : {
17564 "GET" : {
17565 "description" : "Directory index",
17566 "method" : "GET",
17567 "name" : "srvcmdidx",
17568 "parameters" : {
17569 "additionalProperties" : 0,
17570 "properties" : {
17571 "node" : {
17572 "description" : "The cluster node name.",
17573 "format" : "pve-node",
17574 "type" : "string"
17575 },
17576 "service" : {
17577 "description" : "Service ID",
17578 "enum" : [
17579 "pveproxy",
17580 "pvedaemon",
17581 "spiceproxy",
17582 "pvestatd",
17583 "pve-cluster",
17584 "corosync",
17585 "pve-firewall",
17586 "pvefw-logger",
17587 "pve-ha-crm",
17588 "pve-ha-lrm",
17589 "sshd",
17590 "syslog",
17591 "cron",
17592 "postfix",
17593 "ksmtuned",
17594 "systemd-timesyncd"
17595 ],
17596 "type" : "string"
17597 }
17598 }
17599 },
17600 "permissions" : {
17601 "check" : [
17602 "perm",
17603 "/nodes/{node}",
17604 [
17605 "Sys.Audit"
17606 ]
17607 ]
17608 },
17609 "returns" : {
17610 "items" : {
17611 "properties" : {
17612 "subdir" : {
17613 "type" : "string"
17614 }
17615 },
17616 "type" : "object"
17617 },
17618 "links" : [
17619 {
17620 "href" : "{subdir}",
17621 "rel" : "child"
17622 }
17623 ],
17624 "type" : "array"
17625 }
17626 }
17627 },
17628 "leaf" : 0,
17629 "path" : "/nodes/{node}/services/{service}",
17630 "text" : "{service}"
17631 }
17632 ],
17633 "info" : {
17634 "GET" : {
17635 "description" : "Service list.",
17636 "method" : "GET",
17637 "name" : "index",
17638 "parameters" : {
17639 "additionalProperties" : 0,
17640 "properties" : {
17641 "node" : {
17642 "description" : "The cluster node name.",
17643 "format" : "pve-node",
17644 "type" : "string"
17645 }
17646 }
17647 },
17648 "permissions" : {
17649 "check" : [
17650 "perm",
17651 "/nodes/{node}",
17652 [
17653 "Sys.Audit"
17654 ]
17655 ]
17656 },
17657 "protected" : 1,
17658 "proxyto" : "node",
17659 "returns" : {
17660 "items" : {
17661 "properties" : {},
17662 "type" : "object"
17663 },
17664 "links" : [
17665 {
17666 "href" : "{service}",
17667 "rel" : "child"
56122987 17668 }
44660702
DM
17669 ],
17670 "type" : "array"
17671 }
7aacca6f 17672 }
44660702 17673 },
7aacca6f 17674 "leaf" : 0,
44660702
DM
17675 "path" : "/nodes/{node}/services",
17676 "text" : "services"
7aacca6f
DM
17677 },
17678 {
7aacca6f
DM
17679 "info" : {
17680 "GET" : {
44660702
DM
17681 "description" : "Read subscription info.",
17682 "method" : "GET",
17683 "name" : "get",
7aacca6f 17684 "parameters" : {
44660702 17685 "additionalProperties" : 0,
7aacca6f
DM
17686 "properties" : {
17687 "node" : {
17688 "description" : "The cluster node name.",
44660702
DM
17689 "format" : "pve-node",
17690 "type" : "string"
7aacca6f 17691 }
44660702
DM
17692 }
17693 },
17694 "permissions" : {
17695 "user" : "all"
7aacca6f 17696 },
7aacca6f
DM
17697 "proxyto" : "node",
17698 "returns" : {
17699 "type" : "object"
44660702 17700 }
7aacca6f 17701 },
44660702
DM
17702 "POST" : {
17703 "description" : "Update subscription info.",
17704 "method" : "POST",
17705 "name" : "update",
7aacca6f
DM
17706 "parameters" : {
17707 "additionalProperties" : 0,
17708 "properties" : {
44660702
DM
17709 "force" : {
17710 "default" : 0,
17711 "description" : "Always connect to server, even if we have up to date info inside local cache.",
17712 "optional" : 1,
17713 "type" : "boolean"
17714 },
7aacca6f 17715 "node" : {
7aacca6f 17716 "description" : "The cluster node name.",
44660702 17717 "format" : "pve-node",
7aacca6f
DM
17718 "type" : "string"
17719 }
17720 }
17721 },
7aacca6f 17722 "protected" : 1,
7aacca6f 17723 "proxyto" : "node",
44660702
DM
17724 "returns" : {
17725 "type" : "null"
17726 }
17727 },
17728 "PUT" : {
17729 "description" : "Set subscription key.",
17730 "method" : "PUT",
17731 "name" : "set",
7aacca6f
DM
17732 "parameters" : {
17733 "additionalProperties" : 0,
17734 "properties" : {
44660702
DM
17735 "key" : {
17736 "description" : "Proxmox VE subscription key",
17737 "type" : "string"
7aacca6f
DM
17738 },
17739 "node" : {
7aacca6f 17740 "description" : "The cluster node name.",
44660702
DM
17741 "format" : "pve-node",
17742 "type" : "string"
7aacca6f
DM
17743 }
17744 }
17745 },
44660702
DM
17746 "protected" : 1,
17747 "proxyto" : "node",
7aacca6f
DM
17748 "returns" : {
17749 "type" : "null"
44660702 17750 }
7aacca6f
DM
17751 }
17752 },
44660702 17753 "leaf" : 1,
7aacca6f 17754 "path" : "/nodes/{node}/subscription",
44660702 17755 "text" : "subscription"
7aacca6f
DM
17756 },
17757 {
7aacca6f
DM
17758 "children" : [
17759 {
56122987 17760 "info" : {
7aacca6f 17761 "DELETE" : {
44660702
DM
17762 "description" : "Delete network device configuration",
17763 "method" : "DELETE",
17764 "name" : "delete_network",
17765 "parameters" : {
17766 "additionalProperties" : 0,
17767 "properties" : {
17768 "iface" : {
17769 "description" : "Network interface name.",
17770 "format" : "pve-iface",
17771 "maxLength" : 20,
17772 "minLength" : 2,
17773 "type" : "string"
17774 },
17775 "node" : {
17776 "description" : "The cluster node name.",
17777 "format" : "pve-node",
17778 "type" : "string"
17779 }
17780 }
7aacca6f
DM
17781 },
17782 "permissions" : {
17783 "check" : [
17784 "perm",
17785 "/nodes/{node}",
17786 [
17787 "Sys.Modify"
17788 ]
17789 ]
17790 },
44660702 17791 "protected" : 1,
7aacca6f 17792 "proxyto" : "node",
44660702
DM
17793 "returns" : {
17794 "type" : "null"
17795 }
17796 },
17797 "GET" : {
17798 "description" : "Read network device configuration",
17799 "method" : "GET",
17800 "name" : "network_config",
56122987 17801 "parameters" : {
44660702 17802 "additionalProperties" : 0,
56122987 17803 "properties" : {
7aacca6f 17804 "iface" : {
7aacca6f 17805 "description" : "Network interface name.",
44660702
DM
17806 "format" : "pve-iface",
17807 "maxLength" : 20,
7aacca6f
DM
17808 "minLength" : 2,
17809 "type" : "string"
44660702
DM
17810 },
17811 "node" : {
17812 "description" : "The cluster node name.",
17813 "format" : "pve-node",
17814 "type" : "string"
56122987 17815 }
44660702 17816 }
7aacca6f
DM
17817 },
17818 "permissions" : {
17819 "check" : [
17820 "perm",
17821 "/nodes/{node}",
17822 [
44660702 17823 "Sys.Audit"
7aacca6f
DM
17824 ]
17825 ]
17826 },
17827 "proxyto" : "node",
44660702
DM
17828 "returns" : {
17829 "properties" : {
17830 "method" : {
17831 "type" : "string"
17832 },
17833 "type" : {
17834 "type" : "string"
17835 }
17836 },
17837 "type" : "object"
17838 }
17839 },
17840 "PUT" : {
7aacca6f
DM
17841 "description" : "Update network device configuration",
17842 "method" : "PUT",
17843 "name" : "update_network",
17844 "parameters" : {
17845 "additionalProperties" : 0,
17846 "properties" : {
7aacca6f 17847 "address" : {
44660702 17848 "description" : "IP address.",
7aacca6f 17849 "format" : "ipv4",
44660702 17850 "optional" : 1,
7aacca6f 17851 "requires" : "netmask",
44660702 17852 "type" : "string"
7aacca6f 17853 },
44660702
DM
17854 "address6" : {
17855 "description" : "IP address.",
17856 "format" : "ipv6",
17857 "optional" : 1,
17858 "requires" : "netmask6",
17859 "type" : "string"
7aacca6f
DM
17860 },
17861 "autostart" : {
44660702 17862 "description" : "Automatically start interface on boot.",
7aacca6f 17863 "optional" : 1,
44660702 17864 "type" : "boolean"
7aacca6f 17865 },
44660702
DM
17866 "bond_mode" : {
17867 "description" : "Bonding mode.",
7aacca6f 17868 "enum" : [
44660702
DM
17869 "balance-rr",
17870 "active-backup",
17871 "balance-xor",
17872 "broadcast",
17873 "802.3ad",
17874 "balance-tlb",
17875 "balance-alb",
17876 "balance-slb",
17877 "lacp-balance-slb",
17878 "lacp-balance-tcp"
17879 ],
7aacca6f 17880 "optional" : 1,
44660702 17881 "type" : "string"
7aacca6f 17882 },
44660702
DM
17883 "bond_xmit_hash_policy" : {
17884 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
17885 "enum" : [
17886 "layer2",
17887 "layer2+3",
17888 "layer3+4"
17889 ],
7aacca6f 17890 "optional" : 1,
44660702 17891 "type" : "string"
7aacca6f 17892 },
44660702
DM
17893 "bridge_ports" : {
17894 "description" : "Specify the iterfaces you want to add to your bridge.",
17895 "format" : "pve-iface-list",
7aacca6f 17896 "optional" : 1,
44660702 17897 "type" : "string"
7aacca6f 17898 },
44660702
DM
17899 "bridge_vlan_aware" : {
17900 "description" : "Enable bridge vlan support.",
7aacca6f 17901 "optional" : 1,
44660702 17902 "type" : "boolean"
7aacca6f
DM
17903 },
17904 "comments" : {
44660702 17905 "description" : "Comments",
7aacca6f 17906 "optional" : 1,
44660702 17907 "type" : "string"
7aacca6f 17908 },
44660702
DM
17909 "comments6" : {
17910 "description" : "Comments",
7aacca6f 17911 "optional" : 1,
44660702 17912 "type" : "string"
7aacca6f 17913 },
44660702
DM
17914 "delete" : {
17915 "description" : "A list of settings you want to delete.",
17916 "format" : "pve-configid-list",
7aacca6f
DM
17917 "optional" : 1,
17918 "type" : "string"
17919 },
44660702
DM
17920 "gateway" : {
17921 "description" : "Default gateway address.",
17922 "format" : "ipv4",
7aacca6f
DM
17923 "optional" : 1,
17924 "type" : "string"
17925 },
44660702
DM
17926 "gateway6" : {
17927 "description" : "Default ipv6 gateway address.",
17928 "format" : "ipv6",
7aacca6f 17929 "optional" : 1,
44660702 17930 "type" : "string"
7aacca6f
DM
17931 },
17932 "iface" : {
44660702 17933 "description" : "Network interface name.",
7aacca6f
DM
17934 "format" : "pve-iface",
17935 "maxLength" : 20,
17936 "minLength" : 2,
7aacca6f
DM
17937 "type" : "string"
17938 },
44660702
DM
17939 "netmask" : {
17940 "description" : "Network mask.",
17941 "format" : "ipv4mask",
7aacca6f 17942 "optional" : 1,
44660702
DM
17943 "requires" : "address",
17944 "type" : "string"
7aacca6f
DM
17945 },
17946 "netmask6" : {
44660702 17947 "description" : "Network mask.",
7aacca6f 17948 "maximum" : 128,
44660702 17949 "minimum" : 0,
7aacca6f
DM
17950 "optional" : 1,
17951 "requires" : "address6",
4bd7df8b
DM
17952 "type" : "integer",
17953 "typetext" : "integer (0-128)"
44660702 17954 },
7aacca6f 17955 "node" : {
44660702 17956 "description" : "The cluster node name.",
7aacca6f 17957 "format" : "pve-node",
44660702 17958 "type" : "string"
7aacca6f 17959 },
44660702
DM
17960 "ovs_bonds" : {
17961 "description" : "Specify the interfaces used by the bonding device.",
17962 "format" : "pve-iface-list",
17963 "optional" : 1,
17964 "type" : "string"
17965 },
17966 "ovs_bridge" : {
17967 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
17968 "format" : "pve-iface",
17969 "optional" : 1,
17970 "type" : "string"
17971 },
17972 "ovs_options" : {
17973 "description" : "OVS interface options.",
17974 "maxLength" : 1024,
17975 "optional" : 1,
17976 "type" : "string"
17977 },
17978 "ovs_ports" : {
17979 "description" : "Specify the iterfaces you want to add to your bridge.",
17980 "format" : "pve-iface-list",
17981 "optional" : 1,
17982 "type" : "string"
17983 },
17984 "ovs_tag" : {
17985 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
17986 "maximum" : 4094,
17987 "minimum" : 1,
17988 "optional" : 1,
4bd7df8b
DM
17989 "type" : "integer",
17990 "typetext" : "integer (1-4094)"
44660702
DM
17991 },
17992 "slaves" : {
17993 "description" : "Specify the interfaces used by the bonding device.",
17994 "format" : "pve-iface-list",
17995 "optional" : 1,
17996 "type" : "string"
17997 },
17998 "type" : {
17999 "description" : "Network interface type",
18000 "enum" : [
18001 "bridge",
18002 "bond",
18003 "eth",
18004 "alias",
18005 "vlan",
18006 "OVSBridge",
18007 "OVSBond",
18008 "OVSPort",
18009 "OVSIntPort",
18010 "unknown"
18011 ],
18012 "type" : "string"
7aacca6f
DM
18013 }
18014 }
18015 },
7aacca6f
DM
18016 "permissions" : {
18017 "check" : [
18018 "perm",
18019 "/nodes/{node}",
18020 [
44660702 18021 "Sys.Modify"
7aacca6f
DM
18022 ]
18023 ]
18024 },
44660702
DM
18025 "protected" : 1,
18026 "proxyto" : "node",
7aacca6f 18027 "returns" : {
44660702
DM
18028 "type" : "null"
18029 }
7aacca6f
DM
18030 }
18031 },
7aacca6f 18032 "leaf" : 1,
44660702
DM
18033 "path" : "/nodes/{node}/network/{iface}",
18034 "text" : "{iface}"
7aacca6f
DM
18035 }
18036 ],
7aacca6f 18037 "info" : {
44660702
DM
18038 "DELETE" : {
18039 "description" : "Revert network configuration changes.",
18040 "method" : "DELETE",
18041 "name" : "revert_network_changes",
7aacca6f
DM
18042 "parameters" : {
18043 "additionalProperties" : 0,
18044 "properties" : {
7aacca6f 18045 "node" : {
7aacca6f 18046 "description" : "The cluster node name.",
44660702 18047 "format" : "pve-node",
7aacca6f
DM
18048 "type" : "string"
18049 }
18050 }
44660702 18051 },
7aacca6f
DM
18052 "permissions" : {
18053 "check" : [
18054 "perm",
18055 "/nodes/{node}",
18056 [
18057 "Sys.Modify"
18058 ]
18059 ]
18060 },
44660702
DM
18061 "protected" : 1,
18062 "proxyto" : "node",
7aacca6f
DM
18063 "returns" : {
18064 "type" : "null"
44660702 18065 }
7aacca6f 18066 },
44660702
DM
18067 "GET" : {
18068 "description" : "List available networks",
18069 "method" : "GET",
18070 "name" : "index",
7aacca6f 18071 "parameters" : {
44660702 18072 "additionalProperties" : 0,
7aacca6f 18073 "properties" : {
7aacca6f 18074 "node" : {
44660702
DM
18075 "description" : "The cluster node name.",
18076 "format" : "pve-node",
18077 "type" : "string"
7aacca6f
DM
18078 },
18079 "type" : {
44660702 18080 "description" : "Only list specific interface types.",
7aacca6f
DM
18081 "enum" : [
18082 "bridge",
18083 "bond",
18084 "eth",
18085 "alias",
18086 "vlan",
18087 "OVSBridge",
18088 "OVSBond",
18089 "OVSPort",
18090 "OVSIntPort",
44660702 18091 "any_bridge"
7aacca6f 18092 ],
7aacca6f 18093 "optional" : 1,
44660702
DM
18094 "type" : "string"
18095 }
18096 }
18097 },
18098 "permissions" : {
18099 "user" : "all"
18100 },
18101 "proxyto" : "node",
18102 "returns" : {
18103 "items" : {
18104 "properties" : {},
18105 "type" : "object"
18106 },
18107 "links" : [
18108 {
18109 "href" : "{iface}",
18110 "rel" : "child"
18111 }
18112 ],
18113 "type" : "array"
18114 }
18115 },
18116 "POST" : {
18117 "description" : "Create network device configuration",
18118 "method" : "POST",
18119 "name" : "create_network",
18120 "parameters" : {
18121 "additionalProperties" : 0,
18122 "properties" : {
7aacca6f 18123 "address" : {
44660702
DM
18124 "description" : "IP address.",
18125 "format" : "ipv4",
18126 "optional" : 1,
7aacca6f 18127 "requires" : "netmask",
44660702
DM
18128 "type" : "string"
18129 },
18130 "address6" : {
7aacca6f 18131 "description" : "IP address.",
44660702
DM
18132 "format" : "ipv6",
18133 "optional" : 1,
18134 "requires" : "netmask6",
18135 "type" : "string"
18136 },
18137 "autostart" : {
18138 "description" : "Automatically start interface on boot.",
7aacca6f 18139 "optional" : 1,
44660702 18140 "type" : "boolean"
7aacca6f
DM
18141 },
18142 "bond_mode" : {
18143 "description" : "Bonding mode.",
18144 "enum" : [
18145 "balance-rr",
18146 "active-backup",
18147 "balance-xor",
18148 "broadcast",
18149 "802.3ad",
18150 "balance-tlb",
18151 "balance-alb",
18152 "balance-slb",
18153 "lacp-balance-slb",
18154 "lacp-balance-tcp"
18155 ],
18156 "optional" : 1,
18157 "type" : "string"
18158 },
44660702
DM
18159 "bond_xmit_hash_policy" : {
18160 "description" : "Selects the transmit hash policy to use for slave selection in balance-xor and 802.3ad modes.",
18161 "enum" : [
18162 "layer2",
18163 "layer2+3",
18164 "layer3+4"
18165 ],
18166 "optional" : 1,
18167 "type" : "string"
18168 },
18169 "bridge_ports" : {
18170 "description" : "Specify the iterfaces you want to add to your bridge.",
7aacca6f 18171 "format" : "pve-iface-list",
7aacca6f 18172 "optional" : 1,
44660702 18173 "type" : "string"
7aacca6f 18174 },
44660702
DM
18175 "bridge_vlan_aware" : {
18176 "description" : "Enable bridge vlan support.",
7aacca6f 18177 "optional" : 1,
44660702 18178 "type" : "boolean"
7aacca6f 18179 },
44660702
DM
18180 "comments" : {
18181 "description" : "Comments",
7aacca6f 18182 "optional" : 1,
44660702
DM
18183 "type" : "string"
18184 },
18185 "comments6" : {
18186 "description" : "Comments",
18187 "optional" : 1,
18188 "type" : "string"
18189 },
18190 "gateway" : {
18191 "description" : "Default gateway address.",
18192 "format" : "ipv4",
18193 "optional" : 1,
18194 "type" : "string"
18195 },
18196 "gateway6" : {
18197 "description" : "Default ipv6 gateway address.",
18198 "format" : "ipv6",
18199 "optional" : 1,
18200 "type" : "string"
56122987 18201 },
7aacca6f 18202 "iface" : {
44660702 18203 "description" : "Network interface name.",
7aacca6f
DM
18204 "format" : "pve-iface",
18205 "maxLength" : 20,
44660702
DM
18206 "minLength" : 2,
18207 "type" : "string"
56122987 18208 },
44660702
DM
18209 "netmask" : {
18210 "description" : "Network mask.",
18211 "format" : "ipv4mask",
7aacca6f 18212 "optional" : 1,
44660702
DM
18213 "requires" : "address",
18214 "type" : "string"
7aacca6f 18215 },
44660702
DM
18216 "netmask6" : {
18217 "description" : "Network mask.",
18218 "maximum" : 128,
18219 "minimum" : 0,
7aacca6f 18220 "optional" : 1,
44660702 18221 "requires" : "address6",
4bd7df8b
DM
18222 "type" : "integer",
18223 "typetext" : "integer (0-128)"
7aacca6f 18224 },
44660702
DM
18225 "node" : {
18226 "description" : "The cluster node name.",
18227 "format" : "pve-node",
18228 "type" : "string"
18229 },
18230 "ovs_bonds" : {
18231 "description" : "Specify the interfaces used by the bonding device.",
18232 "format" : "pve-iface-list",
7aacca6f
DM
18233 "optional" : 1,
18234 "type" : "string"
18235 },
44660702
DM
18236 "ovs_bridge" : {
18237 "description" : "The OVS bridge associated with a OVS port. This is required when you create an OVS port.",
18238 "format" : "pve-iface",
18239 "optional" : 1,
18240 "type" : "string"
18241 },
18242 "ovs_options" : {
18243 "description" : "OVS interface options.",
18244 "maxLength" : 1024,
18245 "optional" : 1,
18246 "type" : "string"
18247 },
18248 "ovs_ports" : {
18249 "description" : "Specify the iterfaces you want to add to your bridge.",
18250 "format" : "pve-iface-list",
18251 "optional" : 1,
18252 "type" : "string"
18253 },
18254 "ovs_tag" : {
18255 "description" : "Specify a VLan tag (used by OVSPort, OVSIntPort, OVSBond)",
18256 "maximum" : 4094,
18257 "minimum" : 1,
18258 "optional" : 1,
4bd7df8b
DM
18259 "type" : "integer",
18260 "typetext" : "integer (1-4094)"
44660702
DM
18261 },
18262 "slaves" : {
18263 "description" : "Specify the interfaces used by the bonding device.",
18264 "format" : "pve-iface-list",
7aacca6f 18265 "optional" : 1,
44660702
DM
18266 "type" : "string"
18267 },
18268 "type" : {
18269 "description" : "Network interface type",
7aacca6f 18270 "enum" : [
44660702
DM
18271 "bridge",
18272 "bond",
18273 "eth",
18274 "alias",
18275 "vlan",
18276 "OVSBridge",
18277 "OVSBond",
18278 "OVSPort",
18279 "OVSIntPort",
18280 "unknown"
7aacca6f 18281 ],
44660702 18282 "type" : "string"
56122987 18283 }
44660702 18284 }
56122987 18285 },
56122987
DM
18286 "permissions" : {
18287 "check" : [
18288 "perm",
18289 "/nodes/{node}",
18290 [
7aacca6f 18291 "Sys.Modify"
44660702
DM
18292 ]
18293 ]
7aacca6f 18294 },
44660702
DM
18295 "protected" : 1,
18296 "proxyto" : "node",
18297 "returns" : {
18298 "type" : "null"
18299 }
18300 }
18301 },
18302 "leaf" : 0,
18303 "path" : "/nodes/{node}/network",
18304 "text" : "network"
18305 },
18306 {
18307 "children" : [
18308 {
7aacca6f
DM
18309 "children" : [
18310 {
18311 "info" : {
18312 "GET" : {
44660702 18313 "description" : "Read task log.",
7aacca6f
DM
18314 "method" : "GET",
18315 "name" : "read_task_log",
18316 "parameters" : {
44660702 18317 "additionalProperties" : 0,
7aacca6f 18318 "properties" : {
44660702
DM
18319 "limit" : {
18320 "minimum" : 0,
7aacca6f 18321 "optional" : 1,
4bd7df8b
DM
18322 "type" : "integer",
18323 "typetext" : "integer (0- N)"
7aacca6f
DM
18324 },
18325 "node" : {
18326 "description" : "The cluster node name.",
44660702
DM
18327 "format" : "pve-node",
18328 "type" : "string"
7aacca6f 18329 },
44660702
DM
18330 "start" : {
18331 "minimum" : 0,
7aacca6f 18332 "optional" : 1,
4bd7df8b
DM
18333 "type" : "integer",
18334 "typetext" : "integer (0- N)"
44660702
DM
18335 },
18336 "upid" : {
18337 "type" : "string"
7aacca6f 18338 }
44660702
DM
18339 }
18340 },
18341 "permissions" : {
18342 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
18343 "user" : "all"
7aacca6f
DM
18344 },
18345 "protected" : 1,
44660702 18346 "proxyto" : "node",
7aacca6f 18347 "returns" : {
7aacca6f 18348 "items" : {
7aacca6f
DM
18349 "properties" : {
18350 "n" : {
44660702
DM
18351 "description" : "Line number",
18352 "type" : "integer"
7aacca6f
DM
18353 },
18354 "t" : {
44660702
DM
18355 "description" : "Line text",
18356 "type" : "string"
7aacca6f 18357 }
44660702
DM
18358 },
18359 "type" : "object"
18360 },
18361 "type" : "array"
18362 }
7aacca6f 18363 }
56122987 18364 },
7aacca6f 18365 "leaf" : 1,
44660702
DM
18366 "path" : "/nodes/{node}/tasks/{upid}/log",
18367 "text" : "log"
7aacca6f
DM
18368 },
18369 {
7aacca6f
DM
18370 "info" : {
18371 "GET" : {
44660702
DM
18372 "description" : "Read task status.",
18373 "method" : "GET",
7aacca6f
DM
18374 "name" : "read_task_status",
18375 "parameters" : {
18376 "additionalProperties" : 0,
18377 "properties" : {
18378 "node" : {
7aacca6f 18379 "description" : "The cluster node name.",
44660702 18380 "format" : "pve-node",
7aacca6f
DM
18381 "type" : "string"
18382 },
18383 "upid" : {
18384 "type" : "string"
18385 }
18386 }
18387 },
7aacca6f
DM
18388 "permissions" : {
18389 "description" : "The user needs 'Sys.Audit' permissions on '/nodes/<node>' if the task does not belong to him.",
18390 "user" : "all"
56122987 18391 },
44660702 18392 "protected" : 1,
7aacca6f 18393 "proxyto" : "node",
7aacca6f
DM
18394 "returns" : {
18395 "properties" : {
18396 "pid" : {
18397 "type" : "integer"
18398 },
18399 "status" : {
7aacca6f
DM
18400 "enum" : [
18401 "running",
18402 "stopped"
44660702
DM
18403 ],
18404 "type" : "string"
7aacca6f
DM
18405 }
18406 },
18407 "type" : "object"
56122987 18408 }
7aacca6f 18409 }
44660702
DM
18410 },
18411 "leaf" : 1,
18412 "path" : "/nodes/{node}/tasks/{upid}/status",
18413 "text" : "status"
56122987 18414 }
7aacca6f 18415 ],
44660702
DM
18416 "info" : {
18417 "DELETE" : {
18418 "description" : "Stop a task.",
18419 "method" : "DELETE",
18420 "name" : "stop_task",
18421 "parameters" : {
18422 "additionalProperties" : 0,
18423 "properties" : {
18424 "node" : {
18425 "description" : "The cluster node name.",
18426 "format" : "pve-node",
18427 "type" : "string"
18428 },
18429 "upid" : {
18430 "type" : "string"
18431 }
7aacca6f 18432 }
44660702
DM
18433 },
18434 "permissions" : {
18435 "description" : "The user needs 'Sys.Modify' permissions on '/nodes/<node>' if the task does not belong to him.",
18436 "user" : "all"
18437 },
18438 "protected" : 1,
18439 "proxyto" : "node",
18440 "returns" : {
18441 "type" : "null"
7aacca6f 18442 }
56122987 18443 },
44660702
DM
18444 "GET" : {
18445 "description" : "",
18446 "method" : "GET",
18447 "name" : "upid_index",
18448 "parameters" : {
18449 "additionalProperties" : 0,
18450 "properties" : {
18451 "node" : {
18452 "description" : "The cluster node name.",
18453 "format" : "pve-node",
18454 "type" : "string"
18455 },
18456 "upid" : {
18457 "type" : "string"
18458 }
18459 }
18460 },
18461 "permissions" : {
18462 "user" : "all"
18463 },
18464 "returns" : {
18465 "items" : {
18466 "properties" : {},
18467 "type" : "object"
18468 },
18469 "links" : [
18470 {
18471 "href" : "{name}",
18472 "rel" : "child"
18473 }
18474 ],
18475 "type" : "array"
56122987 18476 }
44660702 18477 }
56122987 18478 },
44660702
DM
18479 "leaf" : 0,
18480 "path" : "/nodes/{node}/tasks/{upid}",
18481 "text" : "{upid}"
18482 }
18483 ],
18484 "info" : {
18485 "GET" : {
7aacca6f 18486 "description" : "Read task list for one node (finished tasks).",
44660702
DM
18487 "method" : "GET",
18488 "name" : "node_tasks",
56122987 18489 "parameters" : {
7aacca6f 18490 "additionalProperties" : 0,
56122987 18491 "properties" : {
44660702 18492 "errors" : {
56122987 18493 "optional" : 1,
44660702 18494 "type" : "boolean"
56122987 18495 },
44660702 18496 "limit" : {
56122987 18497 "minimum" : 0,
56122987 18498 "optional" : 1,
4bd7df8b
DM
18499 "type" : "integer",
18500 "typetext" : "integer (0- N)"
56122987 18501 },
56122987
DM
18502 "node" : {
18503 "description" : "The cluster node name.",
44660702
DM
18504 "format" : "pve-node",
18505 "type" : "string"
56122987 18506 },
44660702 18507 "start" : {
7aacca6f 18508 "minimum" : 0,
44660702 18509 "optional" : 1,
4bd7df8b
DM
18510 "type" : "integer",
18511 "typetext" : "integer (0- N)"
56122987 18512 },
7aacca6f 18513 "userfilter" : {
44660702
DM
18514 "optional" : 1,
18515 "type" : "string"
18516 },
18517 "vmid" : {
18518 "description" : "Only list tasks for this VM.",
18519 "format" : "pve-vmid",
18520 "minimum" : 1,
18521 "optional" : 1,
4bd7df8b
DM
18522 "type" : "integer",
18523 "typetext" : "integer (1- N)"
56122987
DM
18524 }
18525 }
18526 },
7aacca6f 18527 "permissions" : {
44660702 18528 "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
18529 "user" : "all"
18530 },
44660702 18531 "proxyto" : "node",
56122987
DM
18532 "returns" : {
18533 "items" : {
18534 "properties" : {
44660702 18535 "upid" : {
56122987
DM
18536 "type" : "string"
18537 }
18538 },
18539 "type" : "object"
18540 },
56122987
DM
18541 "links" : [
18542 {
44660702
DM
18543 "href" : "{upid}",
18544 "rel" : "child"
56122987 18545 }
44660702
DM
18546 ],
18547 "type" : "array"
56122987
DM
18548 }
18549 }
18550 },
44660702
DM
18551 "leaf" : 0,
18552 "path" : "/nodes/{node}/tasks",
18553 "text" : "tasks"
18554 },
18555 {
56122987
DM
18556 "children" : [
18557 {
56122987
DM
18558 "info" : {
18559 "GET" : {
7aacca6f 18560 "description" : "Scan zfs pool list on local node.",
44660702
DM
18561 "method" : "GET",
18562 "name" : "zfsscan",
56122987 18563 "parameters" : {
44660702 18564 "additionalProperties" : 0,
56122987 18565 "properties" : {
56122987
DM
18566 "node" : {
18567 "description" : "The cluster node name.",
44660702
DM
18568 "format" : "pve-node",
18569 "type" : "string"
56122987 18570 }
44660702
DM
18571 }
18572 },
7aacca6f
DM
18573 "permissions" : {
18574 "check" : [
18575 "perm",
18576 "/storage",
18577 [
18578 "Datastore.Allocate"
18579 ]
18580 ]
18581 },
44660702
DM
18582 "protected" : 1,
18583 "proxyto" : "node",
56122987 18584 "returns" : {
56122987
DM
18585 "items" : {
18586 "properties" : {
44660702 18587 "pool" : {
56122987
DM
18588 "type" : "string"
18589 }
44660702
DM
18590 },
18591 "type" : "object"
18592 },
18593 "type" : "array"
18594 }
18595 }
18596 },
18597 "leaf" : 1,
18598 "path" : "/nodes/{node}/scan/zfs",
18599 "text" : "zfs"
18600 },
18601 {
18602 "info" : {
18603 "GET" : {
18604 "description" : "Scan remote NFS server.",
18605 "method" : "GET",
7aacca6f 18606 "name" : "nfsscan",
56122987 18607 "parameters" : {
44660702 18608 "additionalProperties" : 0,
56122987
DM
18609 "properties" : {
18610 "node" : {
7aacca6f 18611 "description" : "The cluster node name.",
44660702 18612 "format" : "pve-node",
7aacca6f
DM
18613 "type" : "string"
18614 },
18615 "server" : {
18616 "format" : "pve-storage-server",
18617 "type" : "string"
56122987 18618 }
44660702 18619 }
56122987 18620 },
56122987
DM
18621 "permissions" : {
18622 "check" : [
18623 "perm",
18624 "/storage",
18625 [
18626 "Datastore.Allocate"
18627 ]
18628 ]
18629 },
44660702 18630 "protected" : 1,
56122987 18631 "proxyto" : "node",
44660702
DM
18632 "returns" : {
18633 "items" : {
18634 "properties" : {
18635 "options" : {
18636 "type" : "string"
18637 },
18638 "path" : {
18639 "type" : "string"
18640 }
18641 },
18642 "type" : "object"
18643 },
18644 "type" : "array"
18645 }
18646 }
18647 },
18648 "leaf" : 1,
18649 "path" : "/nodes/{node}/scan/nfs",
18650 "text" : "nfs"
18651 },
18652 {
18653 "info" : {
18654 "GET" : {
18655 "description" : "Scan remote GlusterFS server.",
7aacca6f
DM
18656 "method" : "GET",
18657 "name" : "glusterfsscan",
56122987 18658 "parameters" : {
44660702 18659 "additionalProperties" : 0,
56122987 18660 "properties" : {
56122987 18661 "node" : {
44660702 18662 "description" : "The cluster node name.",
56122987 18663 "format" : "pve-node",
44660702 18664 "type" : "string"
7aacca6f
DM
18665 },
18666 "server" : {
18667 "format" : "pve-storage-server",
18668 "type" : "string"
56122987 18669 }
44660702
DM
18670 }
18671 },
18672 "permissions" : {
18673 "check" : [
18674 "perm",
18675 "/storage",
18676 [
18677 "Datastore.Allocate"
18678 ]
18679 ]
7aacca6f 18680 },
44660702
DM
18681 "protected" : 1,
18682 "proxyto" : "node",
18683 "returns" : {
18684 "items" : {
18685 "properties" : {
18686 "volname" : {
18687 "type" : "string"
18688 }
18689 },
18690 "type" : "object"
18691 },
18692 "type" : "array"
18693 }
56122987
DM
18694 }
18695 },
44660702
DM
18696 "leaf" : 1,
18697 "path" : "/nodes/{node}/scan/glusterfs",
7aacca6f 18698 "text" : "glusterfs"
56122987
DM
18699 },
18700 {
56122987
DM
18701 "info" : {
18702 "GET" : {
7aacca6f 18703 "description" : "Scan remote iSCSI server.",
44660702
DM
18704 "method" : "GET",
18705 "name" : "iscsiscan",
18706 "parameters" : {
18707 "additionalProperties" : 0,
18708 "properties" : {
18709 "node" : {
18710 "description" : "The cluster node name.",
18711 "format" : "pve-node",
18712 "type" : "string"
18713 },
18714 "portal" : {
18715 "format" : "pve-storage-portal-dns",
18716 "type" : "string"
18717 }
18718 }
18719 },
56122987
DM
18720 "permissions" : {
18721 "check" : [
18722 "perm",
18723 "/storage",
18724 [
18725 "Datastore.Allocate"
18726 ]
18727 ]
18728 },
44660702
DM
18729 "protected" : 1,
18730 "proxyto" : "node",
56122987 18731 "returns" : {
56122987
DM
18732 "items" : {
18733 "properties" : {
44660702 18734 "portal" : {
56122987
DM
18735 "type" : "string"
18736 },
44660702 18737 "target" : {
56122987
DM
18738 "type" : "string"
18739 }
18740 },
18741 "type" : "object"
56122987 18742 },
44660702
DM
18743 "type" : "array"
18744 }
56122987
DM
18745 }
18746 },
44660702 18747 "leaf" : 1,
7aacca6f 18748 "path" : "/nodes/{node}/scan/iscsi",
44660702 18749 "text" : "iscsi"
56122987
DM
18750 },
18751 {
56122987
DM
18752 "info" : {
18753 "GET" : {
44660702
DM
18754 "description" : "List local LVM volume groups.",
18755 "method" : "GET",
18756 "name" : "lvmscan",
18757 "parameters" : {
18758 "additionalProperties" : 0,
18759 "properties" : {
18760 "node" : {
18761 "description" : "The cluster node name.",
18762 "format" : "pve-node",
18763 "type" : "string"
56122987 18764 }
7aacca6f 18765 }
56122987 18766 },
56122987
DM
18767 "permissions" : {
18768 "check" : [
18769 "perm",
18770 "/storage",
18771 [
18772 "Datastore.Allocate"
18773 ]
18774 ]
18775 },
7aacca6f 18776 "protected" : 1,
44660702
DM
18777 "proxyto" : "node",
18778 "returns" : {
18779 "items" : {
18780 "properties" : {
18781 "vg" : {
18782 "type" : "string"
18783 }
18784 },
18785 "type" : "object"
18786 },
18787 "type" : "array"
7aacca6f 18788 }
56122987
DM
18789 }
18790 },
18791 "leaf" : 1,
44660702
DM
18792 "path" : "/nodes/{node}/scan/lvm",
18793 "text" : "lvm"
56122987
DM
18794 },
18795 {
56122987
DM
18796 "info" : {
18797 "GET" : {
44660702
DM
18798 "description" : "List local LVM Thin Pools.",
18799 "method" : "GET",
18800 "name" : "lvmthinscan",
56122987 18801 "parameters" : {
44660702 18802 "additionalProperties" : 0,
56122987
DM
18803 "properties" : {
18804 "node" : {
44660702 18805 "description" : "The cluster node name.",
56122987 18806 "format" : "pve-node",
44660702 18807 "type" : "string"
56122987
DM
18808 },
18809 "vg" : {
44660702 18810 "maxLength" : 100,
56122987 18811 "pattern" : "[a-zA-Z0-9\\.\\+\\_][a-zA-Z0-9\\.\\+\\_\\-]+",
44660702 18812 "type" : "string"
56122987 18813 }
44660702 18814 }
56122987 18815 },
7aacca6f
DM
18816 "permissions" : {
18817 "check" : [
18818 "perm",
18819 "/storage",
18820 [
18821 "Datastore.Allocate"
18822 ]
18823 ]
18824 },
44660702 18825 "protected" : 1,
7aacca6f 18826 "proxyto" : "node",
56122987 18827 "returns" : {
56122987
DM
18828 "items" : {
18829 "properties" : {
18830 "lv" : {
18831 "type" : "string"
18832 }
18833 },
18834 "type" : "object"
44660702
DM
18835 },
18836 "type" : "array"
7aacca6f 18837 }
56122987
DM
18838 }
18839 },
7aacca6f 18840 "leaf" : 1,
44660702
DM
18841 "path" : "/nodes/{node}/scan/lvmthin",
18842 "text" : "lvmthin"
56122987
DM
18843 },
18844 {
56122987
DM
18845 "info" : {
18846 "GET" : {
44660702
DM
18847 "description" : "List local USB devices.",
18848 "method" : "GET",
18849 "name" : "usbscan",
18850 "parameters" : {
18851 "additionalProperties" : 0,
18852 "properties" : {
18853 "node" : {
18854 "description" : "The cluster node name.",
18855 "format" : "pve-node",
18856 "type" : "string"
18857 }
18858 }
18859 },
7aacca6f
DM
18860 "permissions" : {
18861 "check" : [
18862 "perm",
18863 "/",
18864 [
18865 "Sys.Modify"
18866 ]
18867 ]
18868 },
44660702 18869 "protected" : 1,
7aacca6f 18870 "proxyto" : "node",
56122987
DM
18871 "returns" : {
18872 "items" : {
18873 "properties" : {
44660702
DM
18874 "busnum" : {
18875 "type" : "integer"
56122987 18876 },
44660702
DM
18877 "class" : {
18878 "type" : "integer"
56122987 18879 },
7aacca6f 18880 "devnum" : {
56122987
DM
18881 "type" : "integer"
18882 },
44660702
DM
18883 "level" : {
18884 "type" : "integer"
18885 },
18886 "manufacturer" : {
18887 "optional" : 1,
7aacca6f
DM
18888 "type" : "string"
18889 },
44660702 18890 "port" : {
56122987
DM
18891 "type" : "integer"
18892 },
44660702
DM
18893 "prodid" : {
18894 "type" : "string"
56122987 18895 },
44660702
DM
18896 "product" : {
18897 "optional" : 1,
18898 "type" : "string"
18899 },
18900 "serial" : {
7aacca6f 18901 "optional" : 1,
56122987
DM
18902 "type" : "string"
18903 },
44660702 18904 "speed" : {
7aacca6f 18905 "type" : "string"
56122987 18906 },
44660702 18907 "usbpath" : {
56122987
DM
18908 "optional" : 1,
18909 "type" : "string"
18910 },
44660702
DM
18911 "vendid" : {
18912 "type" : "string"
56122987
DM
18913 }
18914 },
18915 "type" : "object"
7aacca6f
DM
18916 },
18917 "type" : "array"
44660702
DM
18918 }
18919 }
18920 },
18921 "leaf" : 1,
18922 "path" : "/nodes/{node}/scan/usb",
18923 "text" : "usb"
18924 }
18925 ],
18926 "info" : {
18927 "GET" : {
18928 "description" : "Index of available scan methods",
18929 "method" : "GET",
18930 "name" : "index",
18931 "parameters" : {
18932 "additionalProperties" : 0,
18933 "properties" : {
18934 "node" : {
18935 "description" : "The cluster node name.",
18936 "format" : "pve-node",
18937 "type" : "string"
18938 }
18939 }
18940 },
18941 "permissions" : {
18942 "user" : "all"
18943 },
18944 "returns" : {
18945 "items" : {
18946 "properties" : {
18947 "method" : {
18948 "type" : "string"
56122987
DM
18949 }
18950 },
44660702
DM
18951 "type" : "object"
18952 },
18953 "links" : [
18954 {
18955 "href" : "{method}",
18956 "rel" : "child"
18957 }
18958 ],
18959 "type" : "array"
56122987
DM
18960 }
18961 }
44660702
DM
18962 },
18963 "leaf" : 0,
18964 "path" : "/nodes/{node}/scan",
7aacca6f 18965 "text" : "scan"
56122987
DM
18966 },
18967 {
56122987
DM
18968 "children" : [
18969 {
56122987
DM
18970 "children" : [
18971 {
7aacca6f
DM
18972 "children" : [
18973 {
18974 "info" : {
44660702
DM
18975 "DELETE" : {
18976 "description" : "Delete volume",
18977 "method" : "DELETE",
18978 "name" : "delete",
7aacca6f
DM
18979 "parameters" : {
18980 "additionalProperties" : 0,
18981 "properties" : {
7aacca6f
DM
18982 "node" : {
18983 "description" : "The cluster node name.",
44660702
DM
18984 "format" : "pve-node",
18985 "type" : "string"
18986 },
18987 "storage" : {
18988 "description" : "The storage identifier.",
18989 "format" : "pve-storage-id",
18990 "optional" : 1,
18991 "type" : "string"
7aacca6f
DM
18992 },
18993 "volume" : {
18994 "description" : "Volume identifier",
18995 "type" : "string"
18996 }
18997 }
18998 },
44660702
DM
18999 "permissions" : {
19000 "description" : "You need 'Datastore.Allocate' privilege on the storage (or 'Datastore.AllocateSpace' for backup volumes if you have VM.Backup privilege on the VM).",
19001 "user" : "all"
19002 },
19003 "protected" : 1,
19004 "proxyto" : "node",
19005 "returns" : {
19006 "type" : "null"
19007 }
7aacca6f 19008 },
44660702
DM
19009 "GET" : {
19010 "description" : "Get volume attributes",
19011 "method" : "GET",
19012 "name" : "info",
7aacca6f
DM
19013 "parameters" : {
19014 "additionalProperties" : 0,
19015 "properties" : {
7aacca6f
DM
19016 "node" : {
19017 "description" : "The cluster node name.",
44660702
DM
19018 "format" : "pve-node",
19019 "type" : "string"
7aacca6f
DM
19020 },
19021 "storage" : {
7aacca6f 19022 "description" : "The storage identifier.",
44660702 19023 "format" : "pve-storage-id",
7aacca6f
DM
19024 "optional" : 1,
19025 "type" : "string"
44660702
DM
19026 },
19027 "volume" : {
19028 "description" : "Volume identifier",
19029 "type" : "string"
7aacca6f
DM
19030 }
19031 }
19032 },
7aacca6f 19033 "permissions" : {
44660702 19034 "description" : "You need read access for the volume.",
7aacca6f
DM
19035 "user" : "all"
19036 },
44660702 19037 "protected" : 1,
7aacca6f 19038 "proxyto" : "node",
7aacca6f 19039 "returns" : {
44660702 19040 "type" : "object"
7aacca6f
DM
19041 }
19042 },
19043 "POST" : {
44660702
DM
19044 "description" : "Copy a volume. This is experimental code - do not use.",
19045 "method" : "POST",
19046 "name" : "copy",
7aacca6f
DM
19047 "parameters" : {
19048 "additionalProperties" : 0,
19049 "properties" : {
44660702
DM
19050 "node" : {
19051 "description" : "The cluster node name.",
19052 "format" : "pve-node",
19053 "type" : "string"
19054 },
19055 "storage" : {
19056 "description" : "The storage identifier.",
19057 "format" : "pve-storage-id",
19058 "optional" : 1,
19059 "type" : "string"
19060 },
7aacca6f 19061 "target" : {
44660702
DM
19062 "description" : "Target volume identifier",
19063 "type" : "string"
7aacca6f
DM
19064 },
19065 "target_node" : {
7aacca6f 19066 "description" : "Target node. Default is local node.",
44660702
DM
19067 "format" : "pve-node",
19068 "optional" : 1,
19069 "type" : "string"
7aacca6f
DM
19070 },
19071 "volume" : {
44660702
DM
19072 "description" : "Source volume identifier",
19073 "type" : "string"
7aacca6f
DM
19074 }
19075 }
19076 },
7aacca6f
DM
19077 "protected" : 1,
19078 "proxyto" : "node",
19079 "returns" : {
19080 "type" : "string"
44660702 19081 }
7aacca6f
DM
19082 }
19083 },
7aacca6f 19084 "leaf" : 1,
44660702
DM
19085 "path" : "/nodes/{node}/storage/{storage}/content/{volume}",
19086 "text" : "{volume}"
7aacca6f
DM
19087 }
19088 ],
56122987
DM
19089 "info" : {
19090 "GET" : {
44660702
DM
19091 "description" : "List storage content.",
19092 "method" : "GET",
19093 "name" : "index",
19094 "parameters" : {
19095 "additionalProperties" : 0,
19096 "properties" : {
19097 "content" : {
19098 "description" : "Only list content of this type.",
19099 "format" : "pve-storage-content",
19100 "optional" : 1,
19101 "type" : "string"
19102 },
19103 "node" : {
19104 "description" : "The cluster node name.",
19105 "format" : "pve-node",
19106 "type" : "string"
19107 },
19108 "storage" : {
19109 "description" : "The storage identifier.",
19110 "format" : "pve-storage-id",
19111 "type" : "string"
19112 },
19113 "vmid" : {
19114 "description" : "Only list images for this VM",
19115 "format" : "pve-vmid",
19116 "minimum" : 1,
19117 "optional" : 1,
4bd7df8b
DM
19118 "type" : "integer",
19119 "typetext" : "integer (1- N)"
44660702
DM
19120 }
19121 }
19122 },
7aacca6f
DM
19123 "permissions" : {
19124 "check" : [
19125 "perm",
19126 "/storage/{storage}",
19127 [
19128 "Datastore.Audit",
19129 "Datastore.AllocateSpace"
19130 ],
19131 "any",
19132 1
19133 ]
19134 },
44660702 19135 "protected" : 1,
7aacca6f 19136 "proxyto" : "node",
56122987 19137 "returns" : {
44660702
DM
19138 "items" : {
19139 "properties" : {
19140 "volid" : {
19141 "type" : "string"
19142 }
19143 },
19144 "type" : "object"
19145 },
19146 "links" : [
19147 {
19148 "href" : "{volid}",
19149 "rel" : "child"
19150 }
19151 ],
19152 "type" : "array"
19153 }
19154 },
19155 "POST" : {
19156 "description" : "Allocate disk images.",
19157 "method" : "POST",
19158 "name" : "create",
56122987 19159 "parameters" : {
44660702 19160 "additionalProperties" : 0,
56122987 19161 "properties" : {
44660702
DM
19162 "filename" : {
19163 "description" : "The name of the file to create.",
19164 "type" : "string"
19165 },
19166 "format" : {
19167 "enum" : [
19168 "raw",
19169 "qcow2",
19170 "subvol"
19171 ],
19172 "optional" : 1,
19173 "requires" : "size",
19174 "type" : "string"
19175 },
19176 "node" : {
19177 "description" : "The cluster node name.",
19178 "format" : "pve-node",
19179 "type" : "string"
19180 },
19181 "size" : {
19182 "description" : "Size in kilobyte (1024 bytes). Optional suffixes 'M' (megabyte, 1024K) and 'G' (gigabyte, 1024M)",
19183 "pattern" : "\\d+[MG]?",
19184 "type" : "string"
19185 },
56122987
DM
19186 "storage" : {
19187 "description" : "The storage identifier.",
44660702
DM
19188 "format" : "pve-storage-id",
19189 "type" : "string"
56122987 19190 },
44660702
DM
19191 "vmid" : {
19192 "description" : "Specify owner VM",
19193 "format" : "pve-vmid",
19194 "minimum" : 1,
4bd7df8b
DM
19195 "type" : "integer",
19196 "typetext" : "integer (1- N)"
44660702
DM
19197 }
19198 }
19199 },
19200 "permissions" : {
19201 "check" : [
19202 "perm",
19203 "/storage/{storage}",
19204 [
19205 "Datastore.AllocateSpace"
19206 ]
19207 ]
19208 },
19209 "protected" : 1,
19210 "proxyto" : "node",
19211 "returns" : {
19212 "description" : "Volume identifier",
19213 "type" : "string"
19214 }
19215 }
19216 },
19217 "leaf" : 0,
19218 "path" : "/nodes/{node}/storage/{storage}/content",
19219 "text" : "content"
19220 },
19221 {
19222 "info" : {
19223 "GET" : {
19224 "description" : "Read storage status.",
19225 "method" : "GET",
19226 "name" : "read_status",
19227 "parameters" : {
19228 "additionalProperties" : 0,
19229 "properties" : {
56122987
DM
19230 "node" : {
19231 "description" : "The cluster node name.",
44660702
DM
19232 "format" : "pve-node",
19233 "type" : "string"
19234 },
19235 "storage" : {
19236 "description" : "The storage identifier.",
19237 "format" : "pve-storage-id",
19238 "type" : "string"
56122987 19239 }
44660702
DM
19240 }
19241 },
19242 "permissions" : {
19243 "check" : [
19244 "perm",
19245 "/storage/{storage}",
19246 [
19247 "Datastore.Audit",
19248 "Datastore.AllocateSpace"
19249 ],
19250 "any",
19251 1
19252 ]
56122987
DM
19253 },
19254 "protected" : 1,
44660702
DM
19255 "proxyto" : "node",
19256 "returns" : {
19257 "properties" : {},
19258 "type" : "object"
19259 }
56122987
DM
19260 }
19261 },
44660702
DM
19262 "leaf" : 1,
19263 "path" : "/nodes/{node}/storage/{storage}/status",
7aacca6f 19264 "text" : "status"
56122987
DM
19265 },
19266 {
56122987
DM
19267 "info" : {
19268 "GET" : {
44660702
DM
19269 "description" : "Read storage RRD statistics (returns PNG).",
19270 "method" : "GET",
19271 "name" : "rrd",
56122987 19272 "parameters" : {
44660702 19273 "additionalProperties" : 0,
56122987 19274 "properties" : {
44660702
DM
19275 "cf" : {
19276 "description" : "The RRD consolidation function",
19277 "enum" : [
19278 "AVERAGE",
19279 "MAX"
19280 ],
19281 "optional" : 1,
19282 "type" : "string"
19283 },
7aacca6f 19284 "ds" : {
7aacca6f 19285 "description" : "The list of datasources you want to display.",
44660702
DM
19286 "format" : "pve-configid-list",
19287 "type" : "string"
56122987 19288 },
7aacca6f
DM
19289 "node" : {
19290 "description" : "The cluster node name.",
44660702
DM
19291 "format" : "pve-node",
19292 "type" : "string"
56122987 19293 },
7aacca6f 19294 "storage" : {
7aacca6f 19295 "description" : "The storage identifier.",
44660702
DM
19296 "format" : "pve-storage-id",
19297 "type" : "string"
19298 },
19299 "timeframe" : {
19300 "description" : "Specify the time frame you are interested in.",
7aacca6f 19301 "enum" : [
44660702
DM
19302 "hour",
19303 "day",
19304 "week",
19305 "month",
19306 "year"
7aacca6f 19307 ],
44660702 19308 "type" : "string"
56122987 19309 }
44660702 19310 }
56122987
DM
19311 },
19312 "permissions" : {
19313 "check" : [
19314 "perm",
19315 "/storage/{storage}",
19316 [
19317 "Datastore.Audit",
19318 "Datastore.AllocateSpace"
19319 ],
19320 "any",
19321 1
19322 ]
19323 },
44660702
DM
19324 "protected" : 1,
19325 "proxyto" : "node",
7aacca6f
DM
19326 "returns" : {
19327 "properties" : {
19328 "filename" : {
19329 "type" : "string"
19330 }
19331 },
19332 "type" : "object"
19333 }
56122987
DM
19334 }
19335 },
19336 "leaf" : 1,
44660702
DM
19337 "path" : "/nodes/{node}/storage/{storage}/rrd",
19338 "text" : "rrd"
56122987
DM
19339 },
19340 {
56122987
DM
19341 "info" : {
19342 "GET" : {
44660702
DM
19343 "description" : "Read storage RRD statistics.",
19344 "method" : "GET",
19345 "name" : "rrddata",
56122987 19346 "parameters" : {
44660702 19347 "additionalProperties" : 0,
56122987 19348 "properties" : {
44660702
DM
19349 "cf" : {
19350 "description" : "The RRD consolidation function",
19351 "enum" : [
19352 "AVERAGE",
19353 "MAX"
19354 ],
19355 "optional" : 1,
19356 "type" : "string"
19357 },
7aacca6f 19358 "node" : {
7aacca6f 19359 "description" : "The cluster node name.",
44660702
DM
19360 "format" : "pve-node",
19361 "type" : "string"
19362 },
19363 "storage" : {
19364 "description" : "The storage identifier.",
19365 "format" : "pve-storage-id",
7aacca6f
DM
19366 "type" : "string"
19367 },
56122987 19368 "timeframe" : {
7aacca6f 19369 "description" : "Specify the time frame you are interested in.",
56122987
DM
19370 "enum" : [
19371 "hour",
19372 "day",
19373 "week",
19374 "month",
19375 "year"
56122987 19376 ],
44660702 19377 "type" : "string"
56122987 19378 }
44660702 19379 }
7aacca6f 19380 },
7aacca6f
DM
19381 "permissions" : {
19382 "check" : [
19383 "perm",
19384 "/storage/{storage}",
19385 [
19386 "Datastore.Audit",
19387 "Datastore.AllocateSpace"
19388 ],
19389 "any",
19390 1
19391 ]
19392 },
44660702
DM
19393 "protected" : 1,
19394 "proxyto" : "node",
7aacca6f
DM
19395 "returns" : {
19396 "items" : {
44660702
DM
19397 "properties" : {},
19398 "type" : "object"
7aacca6f
DM
19399 },
19400 "type" : "array"
56122987
DM
19401 }
19402 }
7aacca6f 19403 },
7aacca6f 19404 "leaf" : 1,
44660702
DM
19405 "path" : "/nodes/{node}/storage/{storage}/rrddata",
19406 "text" : "rrddata"
56122987
DM
19407 },
19408 {
56122987
DM
19409 "info" : {
19410 "POST" : {
7aacca6f 19411 "description" : "Upload templates and ISO images.",
44660702
DM
19412 "method" : "POST",
19413 "name" : "upload",
56122987 19414 "parameters" : {
7aacca6f 19415 "additionalProperties" : 0,
56122987 19416 "properties" : {
56122987 19417 "content" : {
7aacca6f 19418 "description" : "Content type.",
44660702
DM
19419 "format" : "pve-storage-content",
19420 "type" : "string"
56122987
DM
19421 },
19422 "filename" : {
44660702
DM
19423 "description" : "The name of the file to create.",
19424 "type" : "string"
56122987
DM
19425 },
19426 "node" : {
19427 "description" : "The cluster node name.",
44660702
DM
19428 "format" : "pve-node",
19429 "type" : "string"
19430 },
19431 "storage" : {
19432 "description" : "The storage identifier.",
19433 "format" : "pve-storage-id",
19434 "type" : "string"
19435 },
19436 "tmpfilename" : {
19437 "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.",
19438 "optional" : 1,
19439 "type" : "string"
56122987 19440 }
7aacca6f 19441 }
56122987 19442 },
56122987
DM
19443 "permissions" : {
19444 "check" : [
19445 "perm",
19446 "/storage/{storage}",
19447 [
19448 "Datastore.AllocateTemplate"
19449 ]
19450 ]
44660702
DM
19451 },
19452 "protected" : 1,
19453 "returns" : {
19454 "type" : "string"
19455 }
19456 }
19457 },
19458 "leaf" : 1,
19459 "path" : "/nodes/{node}/storage/{storage}/upload",
19460 "text" : "upload"
19461 }
19462 ],
19463 "info" : {
19464 "GET" : {
19465 "description" : "",
19466 "method" : "GET",
19467 "name" : "diridx",
19468 "parameters" : {
19469 "additionalProperties" : 0,
19470 "properties" : {
19471 "node" : {
19472 "description" : "The cluster node name.",
19473 "format" : "pve-node",
19474 "type" : "string"
19475 },
19476 "storage" : {
19477 "description" : "The storage identifier.",
19478 "format" : "pve-storage-id",
19479 "type" : "string"
56122987
DM
19480 }
19481 }
44660702
DM
19482 },
19483 "permissions" : {
19484 "check" : [
19485 "perm",
19486 "/storage/{storage}",
19487 [
19488 "Datastore.Audit",
19489 "Datastore.AllocateSpace"
19490 ],
19491 "any",
19492 1
19493 ]
19494 },
19495 "returns" : {
19496 "items" : {
19497 "properties" : {
19498 "subdir" : {
19499 "type" : "string"
19500 }
19501 },
19502 "type" : "object"
19503 },
19504 "links" : [
19505 {
19506 "href" : "{subdir}",
19507 "rel" : "child"
19508 }
19509 ],
19510 "type" : "array"
56122987
DM
19511 }
19512 }
44660702
DM
19513 },
19514 "leaf" : 0,
19515 "path" : "/nodes/{node}/storage/{storage}",
19516 "text" : "{storage}"
56122987
DM
19517 }
19518 ],
56122987
DM
19519 "info" : {
19520 "GET" : {
44660702
DM
19521 "description" : "Get status for all datastores.",
19522 "method" : "GET",
19523 "name" : "index",
19524 "parameters" : {
19525 "additionalProperties" : 0,
19526 "properties" : {
19527 "content" : {
19528 "description" : "Only list stores which support this content type.",
19529 "format" : "pve-storage-content-list",
19530 "optional" : 1,
19531 "type" : "string"
19532 },
19533 "enabled" : {
19534 "default" : 0,
19535 "description" : "Only list stores which are enabled (not disabled in config).",
19536 "optional" : 1,
19537 "type" : "boolean"
19538 },
19539 "node" : {
19540 "description" : "The cluster node name.",
19541 "format" : "pve-node",
19542 "type" : "string"
19543 },
19544 "storage" : {
19545 "description" : "Only list status for specified storage",
19546 "format" : "pve-storage-id",
19547 "optional" : 1,
19548 "type" : "string"
19549 },
19550 "target" : {
19551 "description" : "If target is different to 'node', we only lists shared storages which content is accessible on this 'node' and the specified 'target' node.",
19552 "format" : "pve-node",
19553 "optional" : 1,
19554 "type" : "string"
19555 }
19556 }
19557 },
7aacca6f
DM
19558 "permissions" : {
19559 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
19560 "user" : "all"
19561 },
44660702 19562 "protected" : 1,
7aacca6f 19563 "proxyto" : "node",
56122987
DM
19564 "returns" : {
19565 "items" : {
56122987
DM
19566 "properties" : {
19567 "storage" : {
19568 "type" : "string"
19569 }
44660702
DM
19570 },
19571 "type" : "object"
56122987 19572 },
56122987
DM
19573 "links" : [
19574 {
7aacca6f
DM
19575 "href" : "{storage}",
19576 "rel" : "child"
56122987 19577 }
44660702
DM
19578 ],
19579 "type" : "array"
19580 }
56122987 19581 }
44660702
DM
19582 },
19583 "leaf" : 0,
19584 "path" : "/nodes/{node}/storage",
19585 "text" : "storage"
56122987
DM
19586 },
19587 {
56122987
DM
19588 "children" : [
19589 {
19590 "info" : {
44660702
DM
19591 "GET" : {
19592 "description" : "List available updates.",
19593 "method" : "GET",
19594 "name" : "list_updates",
19595 "parameters" : {
19596 "additionalProperties" : 0,
19597 "properties" : {
19598 "node" : {
19599 "description" : "The cluster node name.",
19600 "format" : "pve-node",
19601 "type" : "string"
19602 }
19603 }
7aacca6f
DM
19604 },
19605 "permissions" : {
19606 "check" : [
19607 "perm",
19608 "/nodes/{node}",
19609 [
19610 "Sys.Modify"
19611 ]
19612 ]
19613 },
44660702 19614 "protected" : 1,
56122987 19615 "proxyto" : "node",
44660702
DM
19616 "returns" : {
19617 "items" : {
19618 "properties" : {},
19619 "type" : "object"
19620 },
19621 "type" : "array"
19622 }
19623 },
19624 "POST" : {
19625 "description" : "This is used to resynchronize the package index files from their sources (apt-get update).",
7aacca6f
DM
19626 "method" : "POST",
19627 "name" : "update_database",
56122987
DM
19628 "parameters" : {
19629 "additionalProperties" : 0,
19630 "properties" : {
44660702
DM
19631 "node" : {
19632 "description" : "The cluster node name.",
19633 "format" : "pve-node",
19634 "type" : "string"
19635 },
56122987 19636 "notify" : {
56122987 19637 "default" : 0,
44660702
DM
19638 "description" : "Send notification mail about new packages (to email address specified for user 'root@pam').",
19639 "optional" : 1,
19640 "type" : "boolean"
56122987
DM
19641 },
19642 "quiet" : {
56122987 19643 "default" : 0,
44660702 19644 "description" : "Only produces output suitable for logging, omitting progress indicators.",
56122987 19645 "optional" : 1,
44660702 19646 "type" : "boolean"
56122987 19647 }
7aacca6f
DM
19648 }
19649 },
19650 "permissions" : {
19651 "check" : [
19652 "perm",
19653 "/nodes/{node}",
19654 [
19655 "Sys.Modify"
19656 ]
19657 ]
19658 },
44660702
DM
19659 "protected" : 1,
19660 "proxyto" : "node",
19661 "returns" : {
19662 "type" : "string"
19663 }
56122987
DM
19664 }
19665 },
7aacca6f 19666 "leaf" : 1,
44660702
DM
19667 "path" : "/nodes/{node}/apt/update",
19668 "text" : "update"
56122987
DM
19669 },
19670 {
56122987
DM
19671 "info" : {
19672 "GET" : {
44660702 19673 "description" : "Get package changelogs.",
56122987 19674 "method" : "GET",
7aacca6f 19675 "name" : "changelog",
56122987 19676 "parameters" : {
44660702 19677 "additionalProperties" : 0,
56122987
DM
19678 "properties" : {
19679 "name" : {
19680 "description" : "Package name.",
19681 "type" : "string"
19682 },
44660702
DM
19683 "node" : {
19684 "description" : "The cluster node name.",
19685 "format" : "pve-node",
19686 "type" : "string"
19687 },
56122987 19688 "version" : {
7aacca6f 19689 "description" : "Package version.",
44660702
DM
19690 "optional" : 1,
19691 "type" : "string"
56122987 19692 }
44660702 19693 }
56122987 19694 },
44660702
DM
19695 "permissions" : {
19696 "check" : [
19697 "perm",
19698 "/nodes/{node}",
19699 [
19700 "Sys.Modify"
19701 ]
19702 ]
19703 },
19704 "proxyto" : "node",
19705 "returns" : {
19706 "type" : "string"
19707 }
56122987
DM
19708 }
19709 },
44660702
DM
19710 "leaf" : 1,
19711 "path" : "/nodes/{node}/apt/changelog",
7aacca6f 19712 "text" : "changelog"
56122987
DM
19713 },
19714 {
56122987
DM
19715 "info" : {
19716 "GET" : {
44660702
DM
19717 "description" : "Get package information for important Proxmox packages.",
19718 "method" : "GET",
7aacca6f
DM
19719 "name" : "versions",
19720 "parameters" : {
44660702 19721 "additionalProperties" : 0,
7aacca6f
DM
19722 "properties" : {
19723 "node" : {
44660702 19724 "description" : "The cluster node name.",
7aacca6f 19725 "format" : "pve-node",
44660702 19726 "type" : "string"
7aacca6f 19727 }
44660702 19728 }
7aacca6f 19729 },
56122987
DM
19730 "permissions" : {
19731 "check" : [
19732 "perm",
19733 "/nodes/{node}",
19734 [
19735 "Sys.Audit"
19736 ]
19737 ]
19738 },
7aacca6f 19739 "proxyto" : "node",
56122987
DM
19740 "returns" : {
19741 "items" : {
7aacca6f
DM
19742 "properties" : {},
19743 "type" : "object"
44660702
DM
19744 },
19745 "type" : "array"
56122987
DM
19746 }
19747 }
19748 },
44660702 19749 "leaf" : 1,
7aacca6f 19750 "path" : "/nodes/{node}/apt/versions",
44660702 19751 "text" : "versions"
56122987
DM
19752 }
19753 ],
56122987
DM
19754 "info" : {
19755 "GET" : {
44660702 19756 "description" : "Directory index for apt (Advanced Package Tool).",
7aacca6f 19757 "method" : "GET",
44660702 19758 "name" : "index",
7aacca6f
DM
19759 "parameters" : {
19760 "additionalProperties" : 0,
19761 "properties" : {
19762 "node" : {
44660702 19763 "description" : "The cluster node name.",
7aacca6f 19764 "format" : "pve-node",
44660702 19765 "type" : "string"
7aacca6f
DM
19766 }
19767 }
19768 },
7aacca6f
DM
19769 "permissions" : {
19770 "user" : "all"
19771 },
44660702
DM
19772 "returns" : {
19773 "items" : {
19774 "properties" : {
19775 "id" : {
19776 "type" : "string"
19777 }
19778 },
19779 "type" : "object"
19780 },
19781 "links" : [
19782 {
19783 "href" : "{id}",
19784 "rel" : "child"
19785 }
19786 ],
19787 "type" : "array"
19788 }
56122987 19789 }
7aacca6f 19790 },
44660702 19791 "leaf" : 0,
7aacca6f 19792 "path" : "/nodes/{node}/apt",
44660702 19793 "text" : "apt"
56122987
DM
19794 },
19795 {
56122987
DM
19796 "children" : [
19797 {
19798 "children" : [
19799 {
56122987
DM
19800 "info" : {
19801 "DELETE" : {
44660702 19802 "description" : "Delete rule.",
7aacca6f 19803 "method" : "DELETE",
44660702 19804 "name" : "delete_rule",
56122987
DM
19805 "parameters" : {
19806 "additionalProperties" : 0,
19807 "properties" : {
56122987
DM
19808 "digest" : {
19809 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
44660702 19810 "maxLength" : 40,
56122987 19811 "optional" : 1,
56122987
DM
19812 "type" : "string"
19813 },
44660702
DM
19814 "node" : {
19815 "description" : "The cluster node name.",
19816 "format" : "pve-node",
19817 "type" : "string"
19818 },
7aacca6f 19819 "pos" : {
7aacca6f 19820 "description" : "Update rule at position <pos>.",
44660702
DM
19821 "minimum" : 0,
19822 "optional" : 1,
4bd7df8b
DM
19823 "type" : "integer",
19824 "typetext" : "integer (0- N)"
56122987
DM
19825 }
19826 }
19827 },
44660702
DM
19828 "permissions" : {
19829 "check" : [
19830 "perm",
19831 "/nodes/{node}",
19832 [
19833 "Sys.Modify"
19834 ]
19835 ]
19836 },
19837 "protected" : 1,
19838 "proxyto" : "node",
56122987
DM
19839 "returns" : {
19840 "type" : "null"
44660702
DM
19841 }
19842 },
19843 "GET" : {
19844 "description" : "Get single rule data.",
19845 "method" : "GET",
19846 "name" : "get_rule",
19847 "parameters" : {
19848 "additionalProperties" : 0,
19849 "properties" : {
19850 "node" : {
19851 "description" : "The cluster node name.",
19852 "format" : "pve-node",
19853 "type" : "string"
19854 },
19855 "pos" : {
19856 "description" : "Update rule at position <pos>.",
19857 "minimum" : 0,
19858 "optional" : 1,
4bd7df8b
DM
19859 "type" : "integer",
19860 "typetext" : "integer (0- N)"
44660702
DM
19861 }
19862 }
56122987 19863 },
56122987
DM
19864 "permissions" : {
19865 "check" : [
19866 "perm",
19867 "/nodes/{node}",
19868 [
44660702 19869 "Sys.Audit"
56122987
DM
19870 ]
19871 ]
44660702
DM
19872 },
19873 "proxyto" : "node",
19874 "returns" : {
19875 "properties" : {
19876 "pos" : {
19877 "type" : "integer"
19878 }
19879 },
19880 "type" : "object"
7aacca6f 19881 }
56122987
DM
19882 },
19883 "PUT" : {
44660702
DM
19884 "description" : "Modify rule data.",
19885 "method" : "PUT",
56122987 19886 "name" : "update_rule",
56122987 19887 "parameters" : {
44660702 19888 "additionalProperties" : 0,
56122987 19889 "properties" : {
44660702
DM
19890 "action" : {
19891 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
19892 "maxLength" : 20,
19893 "minLength" : 2,
56122987 19894 "optional" : 1,
44660702
DM
19895 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
19896 "type" : "string"
56122987 19897 },
7aacca6f 19898 "comment" : {
e94f0d56 19899 "description" : "Descriptive comment.",
56122987 19900 "optional" : 1,
56122987
DM
19901 "type" : "string"
19902 },
44660702
DM
19903 "delete" : {
19904 "description" : "A list of settings you want to delete.",
19905 "format" : "pve-configid-list",
56122987 19906 "optional" : 1,
44660702 19907 "type" : "string"
56122987 19908 },
44660702
DM
19909 "dest" : {
19910 "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.",
19911 "format" : "pve-fw-addr-spec",
56122987 19912 "optional" : 1,
44660702 19913 "type" : "string"
56122987 19914 },
44660702
DM
19915 "digest" : {
19916 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
19917 "maxLength" : 40,
56122987 19918 "optional" : 1,
44660702 19919 "type" : "string"
56122987 19920 },
7aacca6f 19921 "dport" : {
7aacca6f 19922 "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
19923 "format" : "pve-fw-dport-spec",
19924 "optional" : 1,
19925 "type" : "string"
7aacca6f 19926 },
44660702 19927 "enable" : {
e94f0d56 19928 "description" : "Flag to enable/disable a rule.",
44660702 19929 "minimum" : 0,
56122987 19930 "optional" : 1,
4bd7df8b
DM
19931 "type" : "integer",
19932 "typetext" : "integer (0- N)"
56122987 19933 },
7aacca6f 19934 "iface" : {
44660702 19935 "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 19936 "format" : "pve-iface",
44660702 19937 "maxLength" : 20,
56122987 19938 "minLength" : 2,
44660702
DM
19939 "optional" : 1,
19940 "type" : "string"
56122987 19941 },
44660702 19942 "macro" : {
e94f0d56 19943 "description" : "Use predefined standard macro.",
44660702
DM
19944 "maxLength" : 128,
19945 "optional" : 1,
19946 "type" : "string"
19947 },
19948 "moveto" : {
19949 "description" : "Move rule to new position <moveto>. Other arguments are ignored.",
19950 "minimum" : 0,
7aacca6f 19951 "optional" : 1,
4bd7df8b
DM
19952 "type" : "integer",
19953 "typetext" : "integer (0- N)"
44660702
DM
19954 },
19955 "node" : {
19956 "description" : "The cluster node name.",
19957 "format" : "pve-node",
19958 "type" : "string"
56122987
DM
19959 },
19960 "pos" : {
44660702 19961 "description" : "Update rule at position <pos>.",
7aacca6f 19962 "minimum" : 0,
7aacca6f 19963 "optional" : 1,
4bd7df8b
DM
19964 "type" : "integer",
19965 "typetext" : "integer (0- N)"
7aacca6f 19966 },
44660702
DM
19967 "proto" : {
19968 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
19969 "format" : "pve-fw-protocol-spec",
7aacca6f
DM
19970 "optional" : 1,
19971 "type" : "string"
19972 },
44660702
DM
19973 "source" : {
19974 "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.",
19975 "format" : "pve-fw-addr-spec",
56122987 19976 "optional" : 1,
44660702 19977 "type" : "string"
7aacca6f 19978 },
44660702
DM
19979 "sport" : {
19980 "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.",
19981 "format" : "pve-fw-sport-spec",
19982 "optional" : 1,
19983 "type" : "string"
19984 },
19985 "type" : {
e94f0d56 19986 "description" : "Rule type.",
44660702
DM
19987 "enum" : [
19988 "in",
19989 "out",
19990 "group"
19991 ],
19992 "optional" : 1,
19993 "type" : "string"
56122987 19994 }
44660702 19995 }
56122987 19996 },
56122987
DM
19997 "permissions" : {
19998 "check" : [
19999 "perm",
20000 "/nodes/{node}",
20001 [
20002 "Sys.Modify"
20003 ]
20004 ]
7aacca6f 20005 },
44660702 20006 "protected" : 1,
7aacca6f 20007 "proxyto" : "node",
7aacca6f
DM
20008 "returns" : {
20009 "type" : "null"
56122987
DM
20010 }
20011 }
7aacca6f 20012 },
44660702 20013 "leaf" : 1,
7aacca6f 20014 "path" : "/nodes/{node}/firewall/rules/{pos}",
44660702 20015 "text" : "{pos}"
56122987
DM
20016 }
20017 ],
56122987
DM
20018 "info" : {
20019 "GET" : {
44660702
DM
20020 "description" : "List rules.",
20021 "method" : "GET",
20022 "name" : "get_rules",
20023 "parameters" : {
20024 "additionalProperties" : 0,
20025 "properties" : {
20026 "node" : {
20027 "description" : "The cluster node name.",
20028 "format" : "pve-node",
20029 "type" : "string"
20030 }
20031 }
20032 },
20033 "permissions" : {
20034 "check" : [
20035 "perm",
20036 "/nodes/{node}",
20037 [
20038 "Sys.Audit"
20039 ]
20040 ]
20041 },
20042 "proxyto" : "node",
56122987 20043 "returns" : {
56122987
DM
20044 "items" : {
20045 "properties" : {
20046 "pos" : {
20047 "type" : "integer"
20048 }
44660702
DM
20049 },
20050 "type" : "object"
56122987 20051 },
7aacca6f
DM
20052 "links" : [
20053 {
20054 "href" : "{pos}",
20055 "rel" : "child"
20056 }
20057 ],
20058 "type" : "array"
44660702 20059 }
56122987
DM
20060 },
20061 "POST" : {
44660702 20062 "description" : "Create new rule.",
7aacca6f
DM
20063 "method" : "POST",
20064 "name" : "create_rule",
56122987 20065 "parameters" : {
44660702 20066 "additionalProperties" : 0,
56122987 20067 "properties" : {
7aacca6f 20068 "action" : {
7aacca6f 20069 "description" : "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name.",
44660702 20070 "maxLength" : 20,
7aacca6f
DM
20071 "minLength" : 2,
20072 "optional" : 0,
44660702
DM
20073 "pattern" : "[A-Za-z][A-Za-z0-9\\-\\_]+",
20074 "type" : "string"
56122987 20075 },
44660702 20076 "comment" : {
e94f0d56 20077 "description" : "Descriptive comment.",
56122987 20078 "optional" : 1,
44660702 20079 "type" : "string"
56122987 20080 },
44660702
DM
20081 "dest" : {
20082 "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.",
20083 "format" : "pve-fw-addr-spec",
7aacca6f 20084 "optional" : 1,
44660702 20085 "type" : "string"
56122987 20086 },
44660702
DM
20087 "digest" : {
20088 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
20089 "maxLength" : 40,
20090 "optional" : 1,
20091 "type" : "string"
56122987 20092 },
44660702
DM
20093 "dport" : {
20094 "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.",
20095 "format" : "pve-fw-dport-spec",
7aacca6f
DM
20096 "optional" : 1,
20097 "type" : "string"
56122987 20098 },
44660702 20099 "enable" : {
e94f0d56 20100 "description" : "Flag to enable/disable a rule.",
44660702
DM
20101 "minimum" : 0,
20102 "optional" : 1,
4bd7df8b
DM
20103 "type" : "integer",
20104 "typetext" : "integer (0- N)"
44660702 20105 },
7aacca6f 20106 "iface" : {
44660702 20107 "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 20108 "format" : "pve-iface",
56122987 20109 "maxLength" : 20,
7aacca6f 20110 "minLength" : 2,
7aacca6f 20111 "optional" : 1,
56122987
DM
20112 "type" : "string"
20113 },
44660702 20114 "macro" : {
e94f0d56 20115 "description" : "Use predefined standard macro.",
44660702 20116 "maxLength" : 128,
7aacca6f
DM
20117 "optional" : 1,
20118 "type" : "string"
56122987 20119 },
44660702
DM
20120 "node" : {
20121 "description" : "The cluster node name.",
20122 "format" : "pve-node",
20123 "type" : "string"
20124 },
20125 "pos" : {
20126 "description" : "Update rule at position <pos>.",
20127 "minimum" : 0,
20128 "optional" : 1,
4bd7df8b
DM
20129 "type" : "integer",
20130 "typetext" : "integer (0- N)"
44660702
DM
20131 },
20132 "proto" : {
20133 "description" : "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'.",
20134 "format" : "pve-fw-protocol-spec",
56122987 20135 "optional" : 1,
44660702 20136 "type" : "string"
56122987 20137 },
7aacca6f 20138 "source" : {
7aacca6f 20139 "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
20140 "format" : "pve-fw-addr-spec",
20141 "optional" : 1,
20142 "type" : "string"
7aacca6f 20143 },
44660702
DM
20144 "sport" : {
20145 "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.",
20146 "format" : "pve-fw-sport-spec",
7aacca6f 20147 "optional" : 1,
44660702
DM
20148 "type" : "string"
20149 },
20150 "type" : {
e94f0d56 20151 "description" : "Rule type.",
44660702
DM
20152 "enum" : [
20153 "in",
20154 "out",
20155 "group"
20156 ],
20157 "optional" : 0,
20158 "type" : "string"
56122987 20159 }
44660702 20160 }
7aacca6f 20161 },
56122987
DM
20162 "permissions" : {
20163 "check" : [
20164 "perm",
20165 "/nodes/{node}",
20166 [
20167 "Sys.Modify"
20168 ]
20169 ]
20170 },
44660702
DM
20171 "protected" : 1,
20172 "proxyto" : "node",
20173 "returns" : {
20174 "type" : "null"
20175 }
56122987
DM
20176 }
20177 },
44660702 20178 "leaf" : 0,
7aacca6f 20179 "path" : "/nodes/{node}/firewall/rules",
44660702 20180 "text" : "rules"
56122987
DM
20181 },
20182 {
56122987 20183 "info" : {
44660702
DM
20184 "GET" : {
20185 "description" : "Get host firewall options.",
20186 "method" : "GET",
20187 "name" : "get_options",
56122987 20188 "parameters" : {
7aacca6f 20189 "additionalProperties" : 0,
56122987 20190 "properties" : {
44660702
DM
20191 "node" : {
20192 "description" : "The cluster node name.",
20193 "format" : "pve-node",
20194 "type" : "string"
20195 }
20196 }
20197 },
20198 "permissions" : {
20199 "check" : [
20200 "perm",
20201 "/nodes/{node}",
20202 [
20203 "Sys.Audit"
20204 ]
20205 ]
20206 },
20207 "proxyto" : "node",
20208 "returns" : {
20209 "properties" : {
20210 "enable" : {
20211 "description" : "Enable host firewall rules.",
7aacca6f 20212 "optional" : 1,
44660702 20213 "type" : "boolean"
7aacca6f 20214 },
44660702
DM
20215 "log_level_in" : {
20216 "description" : "Log level for incoming traffic.",
56122987
DM
20217 "enum" : [
20218 "emerg",
20219 "alert",
20220 "crit",
20221 "err",
20222 "warning",
20223 "notice",
20224 "info",
20225 "debug",
20226 "nolog"
20227 ],
56122987 20228 "optional" : 1,
44660702
DM
20229 "type" : "string"
20230 },
20231 "log_level_out" : {
20232 "description" : "Log level for outgoing traffic.",
56122987
DM
20233 "enum" : [
20234 "emerg",
20235 "alert",
20236 "crit",
20237 "err",
20238 "warning",
20239 "notice",
20240 "info",
20241 "debug",
20242 "nolog"
20243 ],
44660702
DM
20244 "optional" : 1,
20245 "type" : "string"
20246 },
20247 "ndp" : {
20248 "description" : "Enable NDP.",
20249 "optional" : 1,
20250 "type" : "boolean"
20251 },
20252 "nf_conntrack_max" : {
20253 "description" : "Maximum number of tracked connections.",
20254 "minimum" : 32768,
20255 "optional" : 1,
20256 "type" : "integer"
20257 },
20258 "nf_conntrack_tcp_timeout_established" : {
20259 "description" : "Conntrack established timeout.",
20260 "minimum" : 7875,
20261 "optional" : 1,
20262 "type" : "integer"
20263 },
20264 "nosmurfs" : {
20265 "description" : "Enable SMURFS filter.",
20266 "optional" : 1,
20267 "type" : "boolean"
56122987 20268 },
7aacca6f 20269 "smurf_log_level" : {
44660702 20270 "description" : "Log level for SMURFS filter.",
56122987
DM
20271 "enum" : [
20272 "emerg",
20273 "alert",
20274 "crit",
20275 "err",
20276 "warning",
20277 "notice",
20278 "info",
20279 "debug",
20280 "nolog"
7aacca6f 20281 ],
7aacca6f
DM
20282 "optional" : 1,
20283 "type" : "string"
56122987 20284 },
44660702
DM
20285 "tcp_flags_log_level" : {
20286 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
20287 "enum" : [
20288 "emerg",
20289 "alert",
20290 "crit",
20291 "err",
20292 "warning",
20293 "notice",
20294 "info",
20295 "debug",
20296 "nolog"
20297 ],
44660702
DM
20298 "optional" : 1,
20299 "type" : "string"
7aacca6f 20300 },
44660702
DM
20301 "tcpflags" : {
20302 "description" : "Filter illegal combinations of TCP flags.",
56122987 20303 "optional" : 1,
44660702 20304 "type" : "boolean"
56122987 20305 }
44660702
DM
20306 },
20307 "type" : "object"
7aacca6f 20308 }
56122987 20309 },
44660702
DM
20310 "PUT" : {
20311 "description" : "Set Firewall options.",
20312 "method" : "PUT",
20313 "name" : "set_options",
7aacca6f 20314 "parameters" : {
44660702 20315 "additionalProperties" : 0,
7aacca6f 20316 "properties" : {
44660702
DM
20317 "delete" : {
20318 "description" : "A list of settings you want to delete.",
20319 "format" : "pve-configid-list",
7aacca6f 20320 "optional" : 1,
44660702 20321 "type" : "string"
56122987 20322 },
44660702
DM
20323 "digest" : {
20324 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
20325 "maxLength" : 40,
20326 "optional" : 1,
20327 "type" : "string"
56122987 20328 },
44660702
DM
20329 "enable" : {
20330 "description" : "Enable host firewall rules.",
7aacca6f 20331 "optional" : 1,
44660702
DM
20332 "type" : "boolean"
20333 },
20334 "log_level_in" : {
20335 "description" : "Log level for incoming traffic.",
56122987
DM
20336 "enum" : [
20337 "emerg",
20338 "alert",
20339 "crit",
20340 "err",
20341 "warning",
20342 "notice",
20343 "info",
20344 "debug",
20345 "nolog"
44660702 20346 ],
7aacca6f 20347 "optional" : 1,
44660702 20348 "type" : "string"
7aacca6f 20349 },
44660702
DM
20350 "log_level_out" : {
20351 "description" : "Log level for outgoing traffic.",
56122987
DM
20352 "enum" : [
20353 "emerg",
20354 "alert",
20355 "crit",
20356 "err",
20357 "warning",
20358 "notice",
20359 "info",
20360 "debug",
20361 "nolog"
20362 ],
20363 "optional" : 1,
7aacca6f 20364 "type" : "string"
56122987 20365 },
44660702
DM
20366 "ndp" : {
20367 "description" : "Enable NDP.",
7aacca6f 20368 "optional" : 1,
44660702
DM
20369 "type" : "boolean"
20370 },
20371 "nf_conntrack_max" : {
20372 "description" : "Maximum number of tracked connections.",
20373 "minimum" : 32768,
20374 "optional" : 1,
4bd7df8b
DM
20375 "type" : "integer",
20376 "typetext" : "integer (32768- N)"
44660702
DM
20377 },
20378 "nf_conntrack_tcp_timeout_established" : {
20379 "description" : "Conntrack established timeout.",
20380 "minimum" : 7875,
20381 "optional" : 1,
4bd7df8b
DM
20382 "type" : "integer",
20383 "typetext" : "integer (7875- N)"
44660702
DM
20384 },
20385 "node" : {
20386 "description" : "The cluster node name.",
20387 "format" : "pve-node",
20388 "type" : "string"
20389 },
20390 "nosmurfs" : {
20391 "description" : "Enable SMURFS filter.",
20392 "optional" : 1,
20393 "type" : "boolean"
20394 },
20395 "smurf_log_level" : {
20396 "description" : "Log level for SMURFS filter.",
56122987
DM
20397 "enum" : [
20398 "emerg",
20399 "alert",
20400 "crit",
20401 "err",
20402 "warning",
20403 "notice",
20404 "info",
20405 "debug",
20406 "nolog"
44660702
DM
20407 ],
20408 "optional" : 1,
20409 "type" : "string"
56122987 20410 },
44660702
DM
20411 "tcp_flags_log_level" : {
20412 "description" : "Log level for illegal tcp flags filter.",
56122987
DM
20413 "enum" : [
20414 "emerg",
20415 "alert",
20416 "crit",
20417 "err",
20418 "warning",
20419 "notice",
20420 "info",
20421 "debug",
20422 "nolog"
20423 ],
44660702
DM
20424 "optional" : 1,
20425 "type" : "string"
7aacca6f 20426 },
44660702
DM
20427 "tcpflags" : {
20428 "description" : "Filter illegal combinations of TCP flags.",
56122987 20429 "optional" : 1,
7aacca6f 20430 "type" : "boolean"
56122987 20431 }
7aacca6f 20432 }
56122987 20433 },
44660702
DM
20434 "permissions" : {
20435 "check" : [
20436 "perm",
20437 "/nodes/{node}",
20438 [
20439 "Sys.Modify"
20440 ]
20441 ]
20442 },
20443 "protected" : 1,
20444 "proxyto" : "node",
20445 "returns" : {
20446 "type" : "null"
20447 }
7aacca6f
DM
20448 }
20449 },
44660702
DM
20450 "leaf" : 1,
20451 "path" : "/nodes/{node}/firewall/options",
7aacca6f
DM
20452 "text" : "options"
20453 },
20454 {
7aacca6f
DM
20455 "info" : {
20456 "GET" : {
44660702
DM
20457 "description" : "Read firewall log",
20458 "method" : "GET",
7aacca6f 20459 "name" : "log",
56122987 20460 "parameters" : {
44660702 20461 "additionalProperties" : 0,
56122987 20462 "properties" : {
7aacca6f 20463 "limit" : {
44660702 20464 "minimum" : 0,
7aacca6f 20465 "optional" : 1,
4bd7df8b
DM
20466 "type" : "integer",
20467 "typetext" : "integer (0- N)"
7aacca6f 20468 },
56122987 20469 "node" : {
7aacca6f 20470 "description" : "The cluster node name.",
44660702 20471 "format" : "pve-node",
7aacca6f 20472 "type" : "string"
44660702
DM
20473 },
20474 "start" : {
20475 "minimum" : 0,
20476 "optional" : 1,
4bd7df8b
DM
20477 "type" : "integer",
20478 "typetext" : "integer (0- N)"
56122987 20479 }
44660702 20480 }
7aacca6f 20481 },
56122987
DM
20482 "permissions" : {
20483 "check" : [
20484 "perm",
20485 "/nodes/{node}",
20486 [
20487 "Sys.Syslog"
20488 ]
20489 ]
20490 },
44660702
DM
20491 "protected" : 1,
20492 "proxyto" : "node",
56122987
DM
20493 "returns" : {
20494 "items" : {
56122987 20495 "properties" : {
56122987 20496 "n" : {
44660702
DM
20497 "description" : "Line number",
20498 "type" : "integer"
7aacca6f
DM
20499 },
20500 "t" : {
44660702
DM
20501 "description" : "Line text",
20502 "type" : "string"
56122987 20503 }
44660702
DM
20504 },
20505 "type" : "object"
56122987
DM
20506 },
20507 "type" : "array"
7aacca6f 20508 }
56122987
DM
20509 }
20510 },
44660702
DM
20511 "leaf" : 1,
20512 "path" : "/nodes/{node}/firewall/log",
7aacca6f 20513 "text" : "log"
56122987
DM
20514 }
20515 ],
20516 "info" : {
20517 "GET" : {
44660702
DM
20518 "description" : "Directory index.",
20519 "method" : "GET",
20520 "name" : "index",
56122987 20521 "parameters" : {
44660702 20522 "additionalProperties" : 0,
56122987
DM
20523 "properties" : {
20524 "node" : {
20525 "description" : "The cluster node name.",
44660702
DM
20526 "format" : "pve-node",
20527 "type" : "string"
56122987 20528 }
44660702 20529 }
56122987 20530 },
7aacca6f
DM
20531 "permissions" : {
20532 "user" : "all"
20533 },
56122987
DM
20534 "returns" : {
20535 "items" : {
20536 "properties" : {},
20537 "type" : "object"
20538 },
56122987
DM
20539 "links" : [
20540 {
44660702
DM
20541 "href" : "{name}",
20542 "rel" : "child"
56122987 20543 }
44660702
DM
20544 ],
20545 "type" : "array"
20546 }
56122987 20547 }
7aacca6f 20548 },
44660702 20549 "leaf" : 0,
7aacca6f 20550 "path" : "/nodes/{node}/firewall",
44660702 20551 "text" : "firewall"
56122987
DM
20552 },
20553 {
56122987
DM
20554 "info" : {
20555 "GET" : {
44660702
DM
20556 "description" : "API version details",
20557 "method" : "GET",
20558 "name" : "version",
56122987 20559 "parameters" : {
44660702 20560 "additionalProperties" : 0,
56122987
DM
20561 "properties" : {
20562 "node" : {
56122987 20563 "description" : "The cluster node name.",
44660702 20564 "format" : "pve-node",
7aacca6f 20565 "type" : "string"
56122987 20566 }
44660702 20567 }
56122987 20568 },
56122987 20569 "permissions" : {
7aacca6f 20570 "user" : "all"
56122987 20571 },
56122987 20572 "proxyto" : "node",
56122987 20573 "returns" : {
56122987 20574 "properties" : {
44660702 20575 "release" : {
56122987
DM
20576 "type" : "string"
20577 },
44660702 20578 "repoid" : {
7aacca6f
DM
20579 "type" : "string"
20580 },
20581 "version" : {
20582 "type" : "string"
20583 }
44660702
DM
20584 },
20585 "type" : "object"
7aacca6f 20586 }
56122987
DM
20587 }
20588 },
56122987 20589 "leaf" : 1,
44660702
DM
20590 "path" : "/nodes/{node}/version",
20591 "text" : "version"
56122987
DM
20592 },
20593 {
56122987
DM
20594 "info" : {
20595 "GET" : {
7aacca6f 20596 "description" : "Read node status",
44660702 20597 "method" : "GET",
7aacca6f 20598 "name" : "status",
56122987 20599 "parameters" : {
44660702 20600 "additionalProperties" : 0,
56122987
DM
20601 "properties" : {
20602 "node" : {
7aacca6f 20603 "description" : "The cluster node name.",
44660702
DM
20604 "format" : "pve-node",
20605 "type" : "string"
56122987 20606 }
44660702 20607 }
56122987 20608 },
56122987
DM
20609 "permissions" : {
20610 "check" : [
20611 "perm",
20612 "/nodes/{node}",
20613 [
20614 "Sys.Audit"
20615 ]
20616 ]
44660702
DM
20617 },
20618 "proxyto" : "node",
20619 "returns" : {
20620 "properties" : {},
20621 "type" : "object"
7aacca6f
DM
20622 }
20623 },
20624 "POST" : {
44660702
DM
20625 "description" : "Reboot or shutdown a node.",
20626 "method" : "POST",
7aacca6f 20627 "name" : "node_cmd",
56122987 20628 "parameters" : {
44660702 20629 "additionalProperties" : 0,
56122987 20630 "properties" : {
7aacca6f
DM
20631 "command" : {
20632 "description" : "Specify the command.",
56122987 20633 "enum" : [
7aacca6f
DM
20634 "reboot",
20635 "shutdown"
56122987
DM
20636 ],
20637 "type" : "string"
44660702
DM
20638 },
20639 "node" : {
20640 "description" : "The cluster node name.",
20641 "format" : "pve-node",
20642 "type" : "string"
56122987 20643 }
44660702 20644 }
7aacca6f 20645 },
7aacca6f
DM
20646 "permissions" : {
20647 "check" : [
20648 "perm",
20649 "/nodes/{node}",
20650 [
20651 "Sys.PowerMgmt"
20652 ]
20653 ]
20654 },
44660702 20655 "protected" : 1,
7aacca6f 20656 "proxyto" : "node",
7aacca6f
DM
20657 "returns" : {
20658 "type" : "null"
56122987
DM
20659 }
20660 }
20661 },
7aacca6f 20662 "leaf" : 1,
44660702
DM
20663 "path" : "/nodes/{node}/status",
20664 "text" : "status"
56122987
DM
20665 },
20666 {
56122987
DM
20667 "info" : {
20668 "GET" : {
44660702
DM
20669 "description" : "Read tap/vm network device interface counters",
20670 "method" : "GET",
20671 "name" : "netstat",
20672 "parameters" : {
20673 "additionalProperties" : 0,
20674 "properties" : {
20675 "node" : {
20676 "description" : "The cluster node name.",
20677 "format" : "pve-node",
20678 "type" : "string"
20679 }
56122987
DM
20680 }
20681 },
20682 "permissions" : {
20683 "check" : [
20684 "perm",
20685 "/nodes/{node}",
20686 [
7aacca6f 20687 "Sys.Audit"
56122987
DM
20688 ]
20689 ]
20690 },
7aacca6f 20691 "proxyto" : "node",
44660702
DM
20692 "returns" : {
20693 "items" : {
20694 "properties" : {},
20695 "type" : "object"
20696 },
20697 "type" : "array"
20698 }
7aacca6f
DM
20699 }
20700 },
44660702
DM
20701 "leaf" : 1,
20702 "path" : "/nodes/{node}/netstat",
7aacca6f
DM
20703 "text" : "netstat"
20704 },
20705 {
20706 "info" : {
20707 "POST" : {
7aacca6f 20708 "description" : "Execute multiple commands in order.",
7aacca6f 20709 "method" : "POST",
7aacca6f 20710 "name" : "execute",
56122987
DM
20711 "parameters" : {
20712 "additionalProperties" : 0,
20713 "properties" : {
7aacca6f
DM
20714 "commands" : {
20715 "description" : "JSON encoded array of commands.",
56122987
DM
20716 "type" : "string"
20717 },
20718 "node" : {
44660702 20719 "description" : "The cluster node name.",
56122987 20720 "format" : "pve-node",
44660702 20721 "type" : "string"
56122987
DM
20722 }
20723 }
44660702
DM
20724 },
20725 "permissions" : {
20726 "check" : [
20727 "perm",
20728 "/nodes/{node}",
20729 [
20730 "Sys.Audit"
20731 ]
20732 ]
20733 },
20734 "protected" : 1,
20735 "proxyto" : "node",
20736 "returns" : {
20737 "properties" : {},
20738 "type" : "array"
56122987
DM
20739 }
20740 }
20741 },
56122987 20742 "leaf" : 1,
44660702
DM
20743 "path" : "/nodes/{node}/execute",
20744 "text" : "execute"
56122987
DM
20745 },
20746 {
20747 "info" : {
7aacca6f 20748 "GET" : {
44660702
DM
20749 "description" : "Read node RRD statistics (returns PNG)",
20750 "method" : "GET",
7aacca6f 20751 "name" : "rrd",
56122987 20752 "parameters" : {
7aacca6f 20753 "additionalProperties" : 0,
56122987 20754 "properties" : {
44660702
DM
20755 "cf" : {
20756 "description" : "The RRD consolidation function",
20757 "enum" : [
20758 "AVERAGE",
20759 "MAX"
20760 ],
20761 "optional" : 1,
20762 "type" : "string"
20763 },
7aacca6f 20764 "ds" : {
7aacca6f 20765 "description" : "The list of datasources you want to display.",
44660702
DM
20766 "format" : "pve-configid-list",
20767 "type" : "string"
20768 },
20769 "node" : {
20770 "description" : "The cluster node name.",
20771 "format" : "pve-node",
20772 "type" : "string"
7aacca6f
DM
20773 },
20774 "timeframe" : {
20775 "description" : "Specify the time frame you are interested in.",
20776 "enum" : [
20777 "hour",
20778 "day",
20779 "week",
20780 "month",
20781 "year"
20782 ],
20783 "type" : "string"
56122987 20784 }
7aacca6f 20785 }
56122987 20786 },
56122987 20787 "permissions" : {
56122987
DM
20788 "check" : [
20789 "perm",
20790 "/nodes/{node}",
20791 [
7aacca6f 20792 "Sys.Audit"
56122987
DM
20793 ]
20794 ]
20795 },
7aacca6f 20796 "protected" : 1,
56122987 20797 "returns" : {
56122987 20798 "properties" : {
7aacca6f 20799 "filename" : {
56122987
DM
20800 "type" : "string"
20801 }
44660702
DM
20802 },
20803 "type" : "object"
20804 }
56122987
DM
20805 }
20806 },
44660702 20807 "leaf" : 1,
7aacca6f 20808 "path" : "/nodes/{node}/rrd",
44660702 20809 "text" : "rrd"
56122987
DM
20810 },
20811 {
20812 "info" : {
7aacca6f 20813 "GET" : {
44660702
DM
20814 "description" : "Read node RRD statistics",
20815 "method" : "GET",
7aacca6f 20816 "name" : "rrddata",
56122987 20817 "parameters" : {
44660702 20818 "additionalProperties" : 0,
56122987 20819 "properties" : {
7aacca6f 20820 "cf" : {
7aacca6f
DM
20821 "description" : "The RRD consolidation function",
20822 "enum" : [
20823 "AVERAGE",
20824 "MAX"
44660702
DM
20825 ],
20826 "optional" : 1,
20827 "type" : "string"
56122987
DM
20828 },
20829 "node" : {
44660702 20830 "description" : "The cluster node name.",
56122987 20831 "format" : "pve-node",
44660702 20832 "type" : "string"
56122987 20833 },
7aacca6f 20834 "timeframe" : {
7aacca6f
DM
20835 "description" : "Specify the time frame you are interested in.",
20836 "enum" : [
20837 "hour",
20838 "day",
20839 "week",
20840 "month",
20841 "year"
44660702
DM
20842 ],
20843 "type" : "string"
56122987 20844 }
56122987
DM
20845 }
20846 },
56122987
DM
20847 "permissions" : {
20848 "check" : [
20849 "perm",
20850 "/nodes/{node}",
20851 [
44660702 20852 "Sys.Audit"
56122987
DM
20853 ]
20854 ]
7aacca6f 20855 },
44660702 20856 "protected" : 1,
56122987 20857 "returns" : {
7aacca6f 20858 "items" : {
44660702 20859 "properties" : {},
7aacca6f
DM
20860 "type" : "object"
20861 },
20862 "type" : "array"
44660702
DM
20863 }
20864 }
20865 },
20866 "leaf" : 1,
20867 "path" : "/nodes/{node}/rrddata",
20868 "text" : "rrddata"
20869 },
20870 {
20871 "info" : {
20872 "GET" : {
20873 "description" : "Read system log",
20874 "method" : "GET",
20875 "name" : "syslog",
56122987 20876 "parameters" : {
44660702 20877 "additionalProperties" : 0,
56122987 20878 "properties" : {
44660702
DM
20879 "limit" : {
20880 "minimum" : 0,
7aacca6f 20881 "optional" : 1,
4bd7df8b
DM
20882 "type" : "integer",
20883 "typetext" : "integer (0- N)"
7aacca6f 20884 },
56122987 20885 "node" : {
7aacca6f 20886 "description" : "The cluster node name.",
44660702
DM
20887 "format" : "pve-node",
20888 "type" : "string"
56122987 20889 },
44660702
DM
20890 "since" : {
20891 "description" : "Display all log since this date-time string.",
20892 "optional" : 1,
20893 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
20894 "type" : "string"
20895 },
20896 "start" : {
7aacca6f
DM
20897 "minimum" : 0,
20898 "optional" : 1,
4bd7df8b
DM
20899 "type" : "integer",
20900 "typetext" : "integer (0- N)"
7aacca6f
DM
20901 },
20902 "until" : {
20903 "description" : "Display all log until this date-time string.",
7aacca6f 20904 "optional" : 1,
44660702 20905 "pattern" : "^\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2}(:\\d{2})?)?$",
56122987
DM
20906 "type" : "string"
20907 }
44660702 20908 }
56122987 20909 },
44660702
DM
20910 "permissions" : {
20911 "check" : [
20912 "perm",
20913 "/nodes/{node}",
20914 [
20915 "Sys.Syslog"
20916 ]
20917 ]
20918 },
20919 "protected" : 1,
20920 "proxyto" : "node",
20921 "returns" : {
20922 "items" : {
20923 "properties" : {
20924 "n" : {
20925 "description" : "Line number",
20926 "type" : "integer"
20927 },
20928 "t" : {
20929 "description" : "Line text",
20930 "type" : "string"
20931 }
20932 },
20933 "type" : "object"
20934 },
20935 "type" : "array"
20936 }
56122987
DM
20937 }
20938 },
44660702
DM
20939 "leaf" : 1,
20940 "path" : "/nodes/{node}/syslog",
7aacca6f 20941 "text" : "syslog"
56122987
DM
20942 },
20943 {
56122987
DM
20944 "info" : {
20945 "POST" : {
44660702
DM
20946 "description" : "Creates a VNC Shell proxy.",
20947 "method" : "POST",
20948 "name" : "vncshell",
20949 "parameters" : {
20950 "additionalProperties" : 0,
56122987 20951 "properties" : {
44660702
DM
20952 "node" : {
20953 "description" : "The cluster node name.",
20954 "format" : "pve-node",
7aacca6f
DM
20955 "type" : "string"
20956 },
44660702
DM
20957 "upgrade" : {
20958 "default" : 0,
20959 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
20960 "optional" : 1,
20961 "type" : "boolean"
7aacca6f 20962 },
44660702
DM
20963 "websocket" : {
20964 "description" : "use websocket instead of standard vnc.",
20965 "optional" : 1,
20966 "type" : "boolean"
56122987 20967 }
44660702 20968 }
56122987 20969 },
56122987
DM
20970 "permissions" : {
20971 "check" : [
20972 "perm",
7aacca6f 20973 "/nodes/{node}",
56122987 20974 [
7aacca6f 20975 "Sys.Console"
56122987 20976 ]
44660702
DM
20977 ],
20978 "description" : "Restricted to users on realm 'pam'"
56122987 20979 },
44660702
DM
20980 "protected" : 1,
20981 "returns" : {
20982 "additionalProperties" : 0,
56122987 20983 "properties" : {
44660702
DM
20984 "cert" : {
20985 "type" : "string"
7aacca6f 20986 },
44660702
DM
20987 "port" : {
20988 "type" : "integer"
7aacca6f 20989 },
44660702
DM
20990 "ticket" : {
20991 "type" : "string"
20992 },
20993 "upid" : {
20994 "type" : "string"
20995 },
20996 "user" : {
20997 "type" : "string"
56122987 20998 }
44660702
DM
20999 }
21000 }
56122987
DM
21001 }
21002 },
7aacca6f 21003 "leaf" : 1,
44660702
DM
21004 "path" : "/nodes/{node}/vncshell",
21005 "text" : "vncshell"
56122987
DM
21006 },
21007 {
21008 "info" : {
21009 "GET" : {
7aacca6f 21010 "description" : "Opens a weksocket for VNC traffic.",
44660702
DM
21011 "method" : "GET",
21012 "name" : "vncwebsocket",
56122987 21013 "parameters" : {
44660702 21014 "additionalProperties" : 0,
56122987
DM
21015 "properties" : {
21016 "node" : {
21017 "description" : "The cluster node name.",
44660702 21018 "format" : "pve-node",
7aacca6f
DM
21019 "type" : "string"
21020 },
21021 "port" : {
7aacca6f
DM
21022 "description" : "Port number returned by previous vncproxy call.",
21023 "maximum" : 5999,
44660702 21024 "minimum" : 5900,
4bd7df8b
DM
21025 "type" : "integer",
21026 "typetext" : "integer (5900-5999)"
44660702
DM
21027 },
21028 "vncticket" : {
21029 "description" : "Ticket from previous call to vncproxy.",
21030 "maxLength" : 512,
21031 "type" : "string"
56122987 21032 }
44660702 21033 }
56122987 21034 },
56122987
DM
21035 "permissions" : {
21036 "check" : [
21037 "perm",
21038 "/nodes/{node}",
21039 [
7aacca6f 21040 "Sys.Console"
56122987 21041 ]
44660702
DM
21042 ],
21043 "description" : "Restricted to users on realm 'pam'. You also need to pass a valid ticket (vncticket)."
21044 },
21045 "returns" : {
21046 "properties" : {
21047 "port" : {
21048 "type" : "string"
21049 }
21050 },
21051 "type" : "object"
7aacca6f 21052 }
56122987
DM
21053 }
21054 },
44660702 21055 "leaf" : 1,
7aacca6f 21056 "path" : "/nodes/{node}/vncwebsocket",
44660702 21057 "text" : "vncwebsocket"
56122987
DM
21058 },
21059 {
21060 "info" : {
21061 "POST" : {
44660702 21062 "description" : "Creates a SPICE shell.",
7aacca6f 21063 "method" : "POST",
44660702 21064 "name" : "spiceshell",
56122987 21065 "parameters" : {
7aacca6f 21066 "additionalProperties" : 0,
56122987 21067 "properties" : {
7aacca6f 21068 "node" : {
44660702 21069 "description" : "The cluster node name.",
56122987 21070 "format" : "pve-node",
7aacca6f
DM
21071 "type" : "string"
21072 },
44660702
DM
21073 "proxy" : {
21074 "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).",
21075 "format" : "address",
21076 "optional" : 1,
7aacca6f
DM
21077 "type" : "string"
21078 },
44660702
DM
21079 "upgrade" : {
21080 "default" : 0,
21081 "description" : "Run 'apt-get dist-upgrade' instead of normal shell.",
21082 "optional" : 1,
21083 "type" : "boolean"
56122987 21084 }
7aacca6f 21085 }
56122987 21086 },
56122987
DM
21087 "permissions" : {
21088 "check" : [
21089 "perm",
7aacca6f 21090 "/nodes/{node}",
56122987 21091 [
7aacca6f 21092 "Sys.Console"
56122987 21093 ]
7aacca6f
DM
21094 ],
21095 "description" : "Restricted to users on realm 'pam'"
44660702
DM
21096 },
21097 "protected" : 1,
21098 "proxyto" : "node",
21099 "returns" : {
21100 "additionalProperties" : 1,
21101 "description" : "Returned values can be directly passed to the 'remote-viewer' application.",
21102 "properties" : {
21103 "host" : {
21104 "type" : "string"
21105 },
21106 "password" : {
21107 "type" : "string"
21108 },
21109 "proxy" : {
21110 "type" : "string"
21111 },
21112 "tls-port" : {
21113 "type" : "integer"
21114 },
21115 "type" : {
21116 "type" : "string"
21117 }
21118 }
7aacca6f 21119 }
56122987
DM
21120 }
21121 },
56122987 21122 "leaf" : 1,
44660702
DM
21123 "path" : "/nodes/{node}/spiceshell",
21124 "text" : "spiceshell"
56122987
DM
21125 },
21126 {
56122987 21127 "info" : {
7aacca6f 21128 "GET" : {
44660702 21129 "description" : "Read DNS settings.",
7aacca6f 21130 "method" : "GET",
44660702
DM
21131 "name" : "dns",
21132 "parameters" : {
7aacca6f
DM
21133 "additionalProperties" : 0,
21134 "properties" : {
44660702
DM
21135 "node" : {
21136 "description" : "The cluster node name.",
21137 "format" : "pve-node",
21138 "type" : "string"
7aacca6f
DM
21139 }
21140 }
21141 },
7aacca6f
DM
21142 "permissions" : {
21143 "check" : [
21144 "perm",
21145 "/nodes/{node}",
21146 [
21147 "Sys.Audit"
21148 ]
21149 ]
21150 },
44660702
DM
21151 "proxyto" : "node",
21152 "returns" : {
56122987
DM
21153 "additionalProperties" : 0,
21154 "properties" : {
44660702
DM
21155 "dns1" : {
21156 "description" : "First name server IP address.",
21157 "optional" : 1,
21158 "type" : "string"
21159 },
21160 "dns2" : {
21161 "description" : "Second name server IP address.",
21162 "optional" : 1,
21163 "type" : "string"
21164 },
21165 "dns3" : {
21166 "description" : "Third name server IP address.",
21167 "optional" : 1,
21168 "type" : "string"
21169 },
21170 "search" : {
21171 "description" : "Search domain for host-name lookup.",
21172 "optional" : 1,
21173 "type" : "string"
7aacca6f 21174 }
44660702
DM
21175 },
21176 "type" : "object"
21177 }
7aacca6f
DM
21178 },
21179 "PUT" : {
44660702
DM
21180 "description" : "Write DNS settings.",
21181 "method" : "PUT",
7aacca6f
DM
21182 "name" : "update_dns",
21183 "parameters" : {
21184 "additionalProperties" : 0,
21185 "properties" : {
44660702
DM
21186 "dns1" : {
21187 "description" : "First name server IP address.",
21188 "format" : "ip",
21189 "optional" : 1,
7aacca6f
DM
21190 "type" : "string"
21191 },
44660702
DM
21192 "dns2" : {
21193 "description" : "Second name server IP address.",
21194 "format" : "ip",
7aacca6f 21195 "optional" : 1,
44660702 21196 "type" : "string"
7aacca6f 21197 },
44660702
DM
21198 "dns3" : {
21199 "description" : "Third name server IP address.",
21200 "format" : "ip",
7aacca6f 21201 "optional" : 1,
44660702 21202 "type" : "string"
7aacca6f
DM
21203 },
21204 "node" : {
44660702 21205 "description" : "The cluster node name.",
56122987 21206 "format" : "pve-node",
44660702 21207 "type" : "string"
7aacca6f 21208 },
44660702
DM
21209 "search" : {
21210 "description" : "Search domain for host-name lookup.",
21211 "type" : "string"
56122987
DM
21212 }
21213 }
21214 },
21215 "permissions" : {
21216 "check" : [
21217 "perm",
7aacca6f 21218 "/nodes/{node}",
56122987 21219 [
7aacca6f 21220 "Sys.Modify"
56122987
DM
21221 ]
21222 ]
21223 },
44660702 21224 "protected" : 1,
7aacca6f 21225 "proxyto" : "node",
56122987 21226 "returns" : {
7aacca6f
DM
21227 "type" : "null"
21228 }
56122987 21229 }
44660702
DM
21230 },
21231 "leaf" : 1,
21232 "path" : "/nodes/{node}/dns",
21233 "text" : "dns"
56122987
DM
21234 },
21235 {
21236 "info" : {
7aacca6f 21237 "GET" : {
7aacca6f 21238 "description" : "Read server time and time zone settings.",
44660702
DM
21239 "method" : "GET",
21240 "name" : "time",
56122987 21241 "parameters" : {
44660702 21242 "additionalProperties" : 0,
56122987
DM
21243 "properties" : {
21244 "node" : {
44660702 21245 "description" : "The cluster node name.",
56122987 21246 "format" : "pve-node",
44660702 21247 "type" : "string"
56122987 21248 }
44660702 21249 }
56122987
DM
21250 },
21251 "permissions" : {
21252 "check" : [
21253 "perm",
7aacca6f 21254 "/nodes/{node}",
56122987 21255 [
7aacca6f 21256 "Sys.Audit"
56122987
DM
21257 ]
21258 ]
44660702
DM
21259 },
21260 "proxyto" : "node",
21261 "returns" : {
21262 "additionalProperties" : 0,
21263 "properties" : {
21264 "localtime" : {
21265 "description" : "Seconds since 1970-01-01 00:00:00 (local time)",
21266 "minimum" : 1297163644,
21267 "type" : "integer"
21268 },
21269 "time" : {
21270 "description" : "Seconds since 1970-01-01 00:00:00 UTC.",
21271 "minimum" : 1297163644,
21272 "type" : "integer"
21273 },
21274 "timezone" : {
21275 "description" : "Time zone",
21276 "type" : "string"
21277 }
21278 },
21279 "type" : "object"
7aacca6f
DM
21280 }
21281 },
21282 "PUT" : {
7aacca6f 21283 "description" : "Set time zone.",
44660702
DM
21284 "method" : "PUT",
21285 "name" : "set_timezone",
21286 "parameters" : {
21287 "additionalProperties" : 0,
21288 "properties" : {
21289 "node" : {
21290 "description" : "The cluster node name.",
21291 "format" : "pve-node",
21292 "type" : "string"
21293 },
21294 "timezone" : {
21295 "description" : "Time zone. The file '/usr/share/zoneinfo/zone.tab' contains the list of valid names.",
21296 "type" : "string"
21297 }
21298 }
21299 },
7aacca6f
DM
21300 "permissions" : {
21301 "check" : [
21302 "perm",
21303 "/nodes/{node}",
21304 [
21305 "Sys.Modify"
21306 ]
21307 ]
56122987 21308 },
7aacca6f 21309 "protected" : 1,
44660702
DM
21310 "proxyto" : "node",
21311 "returns" : {
21312 "type" : "null"
21313 }
7aacca6f
DM
21314 }
21315 },
7aacca6f 21316 "leaf" : 1,
44660702
DM
21317 "path" : "/nodes/{node}/time",
21318 "text" : "time"
7aacca6f
DM
21319 },
21320 {
21321 "info" : {
44660702
DM
21322 "GET" : {
21323 "description" : "Get list of appliances.",
21324 "method" : "GET",
21325 "name" : "aplinfo",
7aacca6f
DM
21326 "parameters" : {
21327 "additionalProperties" : 0,
21328 "properties" : {
7aacca6f 21329 "node" : {
44660702 21330 "description" : "The cluster node name.",
7aacca6f 21331 "format" : "pve-node",
44660702 21332 "type" : "string"
7aacca6f
DM
21333 }
21334 }
56122987 21335 },
7aacca6f 21336 "permissions" : {
44660702 21337 "user" : "all"
56122987 21338 },
44660702 21339 "proxyto" : "node",
7aacca6f
DM
21340 "returns" : {
21341 "items" : {
44660702
DM
21342 "properties" : {},
21343 "type" : "object"
7aacca6f
DM
21344 },
21345 "type" : "array"
44660702
DM
21346 }
21347 },
21348 "POST" : {
21349 "description" : "Download appliance templates.",
21350 "method" : "POST",
21351 "name" : "apl_download",
7aacca6f
DM
21352 "parameters" : {
21353 "additionalProperties" : 0,
21354 "properties" : {
21355 "node" : {
7aacca6f 21356 "description" : "The cluster node name.",
44660702
DM
21357 "format" : "pve-node",
21358 "type" : "string"
21359 },
21360 "storage" : {
4bd7df8b 21361 "description" : "The storage where the template will be stored",
44660702
DM
21362 "format" : "pve-storage-id",
21363 "type" : "string"
21364 },
21365 "template" : {
21366 "description" : "The template wich will downloaded",
21367 "maxLength" : 255,
7aacca6f
DM
21368 "type" : "string"
21369 }
21370 }
56122987 21371 },
7aacca6f 21372 "permissions" : {
44660702
DM
21373 "check" : [
21374 "perm",
21375 "/storage/{storage}",
21376 [
21377 "Datastore.AllocateTemplate"
21378 ]
21379 ]
21380 },
21381 "protected" : 1,
21382 "proxyto" : "node",
21383 "returns" : {
21384 "type" : "string"
7aacca6f
DM
21385 }
21386 }
21387 },
7aacca6f 21388 "leaf" : 1,
44660702
DM
21389 "path" : "/nodes/{node}/aplinfo",
21390 "text" : "aplinfo"
7aacca6f
DM
21391 },
21392 {
21393 "info" : {
21394 "GET" : {
44660702
DM
21395 "description" : "Gather various systems information about a node",
21396 "method" : "GET",
21397 "name" : "report",
7aacca6f 21398 "parameters" : {
44660702 21399 "additionalProperties" : 0,
7aacca6f
DM
21400 "properties" : {
21401 "node" : {
7aacca6f 21402 "description" : "The cluster node name.",
44660702 21403 "format" : "pve-node",
7aacca6f
DM
21404 "type" : "string"
21405 }
44660702 21406 }
56122987 21407 },
7aacca6f
DM
21408 "permissions" : {
21409 "check" : [
21410 "perm",
21411 "/nodes/{node}",
21412 [
21413 "Sys.Audit"
21414 ]
21415 ]
56122987 21416 },
44660702 21417 "protected" : 1,
7aacca6f
DM
21418 "proxyto" : "node",
21419 "returns" : {
56122987 21420 "type" : "string"
7aacca6f
DM
21421 }
21422 }
21423 },
7aacca6f 21424 "leaf" : 1,
44660702
DM
21425 "path" : "/nodes/{node}/report",
21426 "text" : "report"
7aacca6f
DM
21427 },
21428 {
7aacca6f
DM
21429 "info" : {
21430 "POST" : {
44660702 21431 "description" : "Start all VMs and containers (when onboot=1).",
7aacca6f 21432 "method" : "POST",
44660702 21433 "name" : "startall",
7aacca6f 21434 "parameters" : {
44660702 21435 "additionalProperties" : 0,
7aacca6f
DM
21436 "properties" : {
21437 "force" : {
44660702 21438 "description" : "force if onboot=0.",
7aacca6f 21439 "optional" : 1,
44660702 21440 "type" : "boolean"
7aacca6f
DM
21441 },
21442 "node" : {
7aacca6f 21443 "description" : "The cluster node name.",
44660702
DM
21444 "format" : "pve-node",
21445 "type" : "string"
7aacca6f 21446 }
44660702 21447 }
56122987 21448 },
7aacca6f
DM
21449 "permissions" : {
21450 "check" : [
21451 "perm",
21452 "/",
21453 [
21454 "VM.PowerMgmt"
21455 ]
21456 ]
44660702
DM
21457 },
21458 "protected" : 1,
21459 "proxyto" : "node",
21460 "returns" : {
21461 "type" : "string"
7aacca6f
DM
21462 }
21463 }
21464 },
44660702 21465 "leaf" : 1,
7aacca6f 21466 "path" : "/nodes/{node}/startall",
44660702 21467 "text" : "startall"
7aacca6f
DM
21468 },
21469 {
7aacca6f
DM
21470 "info" : {
21471 "POST" : {
21472 "description" : "Stop all VMs and Containers.",
44660702
DM
21473 "method" : "POST",
21474 "name" : "stopall",
7aacca6f 21475 "parameters" : {
44660702 21476 "additionalProperties" : 0,
7aacca6f
DM
21477 "properties" : {
21478 "node" : {
44660702 21479 "description" : "The cluster node name.",
7aacca6f 21480 "format" : "pve-node",
44660702 21481 "type" : "string"
7aacca6f 21482 }
44660702 21483 }
56122987 21484 },
7aacca6f
DM
21485 "permissions" : {
21486 "check" : [
21487 "perm",
21488 "/",
21489 [
44660702 21490 "VM.PowerMgmt"
7aacca6f
DM
21491 ]
21492 ]
56122987 21493 },
44660702 21494 "protected" : 1,
7aacca6f 21495 "proxyto" : "node",
44660702
DM
21496 "returns" : {
21497 "type" : "string"
21498 }
21499 }
56122987 21500 },
44660702
DM
21501 "leaf" : 1,
21502 "path" : "/nodes/{node}/stopall",
21503 "text" : "stopall"
21504 },
21505 {
21506 "info" : {
21507 "POST" : {
21508 "description" : "Migrate all VMs and Containers.",
21509 "method" : "POST",
21510 "name" : "migrateall",
21511 "parameters" : {
21512 "additionalProperties" : 0,
21513 "properties" : {
21514 "maxworkers" : {
21515 "description" : "Maximal number of parallel migration job. If not set use 'max_workers' from datacenter.cfg, one of both must be set!",
21516 "minimum" : 1,
21517 "optional" : 1,
4bd7df8b
DM
21518 "type" : "integer",
21519 "typetext" : "integer (1- N)"
44660702
DM
21520 },
21521 "node" : {
21522 "description" : "The cluster node name.",
21523 "format" : "pve-node",
21524 "type" : "string"
21525 },
21526 "target" : {
21527 "description" : "Target node.",
21528 "format" : "pve-node",
21529 "type" : "string"
21530 }
21531 }
21532 },
21533 "permissions" : {
21534 "check" : [
21535 "perm",
21536 "/",
21537 [
21538 "VM.Migrate"
21539 ]
21540 ]
21541 },
21542 "protected" : 1,
21543 "proxyto" : "node",
21544 "returns" : {
21545 "type" : "string"
21546 }
21547 }
56122987 21548 },
44660702
DM
21549 "leaf" : 1,
21550 "path" : "/nodes/{node}/migrateall",
21551 "text" : "migrateall"
21552 }
21553 ],
21554 "info" : {
21555 "GET" : {
21556 "description" : "Node index.",
21557 "method" : "GET",
21558 "name" : "index",
21559 "parameters" : {
21560 "additionalProperties" : 0,
21561 "properties" : {
21562 "node" : {
21563 "description" : "The cluster node name.",
21564 "format" : "pve-node",
21565 "type" : "string"
21566 }
21567 }
56122987 21568 },
44660702
DM
21569 "permissions" : {
21570 "user" : "all"
56122987 21571 },
44660702
DM
21572 "returns" : {
21573 "items" : {
21574 "properties" : {},
21575 "type" : "object"
21576 },
21577 "links" : [
21578 {
21579 "href" : "{name}",
21580 "rel" : "child"
21581 }
56122987 21582 ],
44660702 21583 "type" : "array"
7aacca6f
DM
21584 }
21585 }
21586 },
44660702
DM
21587 "leaf" : 0,
21588 "path" : "/nodes/{node}",
21589 "text" : "{node}"
21590 }
21591 ],
21592 "info" : {
7aacca6f 21593 "GET" : {
44660702 21594 "description" : "Cluster node index.",
7aacca6f 21595 "method" : "GET",
44660702 21596 "name" : "index",
7aacca6f 21597 "parameters" : {
7aacca6f
DM
21598 "additionalProperties" : 0
21599 },
21600 "permissions" : {
7aacca6f
DM
21601 "user" : "all"
21602 },
44660702
DM
21603 "returns" : {
21604 "items" : {
21605 "properties" : {},
21606 "type" : "object"
21607 },
21608 "links" : [
21609 {
21610 "href" : "{node}",
21611 "rel" : "child"
21612 }
21613 ],
21614 "type" : "array"
21615 }
7aacca6f
DM
21616 }
21617 },
44660702
DM
21618 "leaf" : 0,
21619 "path" : "/nodes",
21620 "text" : "nodes"
21621 },
21622 {
7aacca6f
DM
21623 "children" : [
21624 {
7aacca6f 21625 "info" : {
44660702
DM
21626 "DELETE" : {
21627 "description" : "Delete storage configuration.",
21628 "method" : "DELETE",
21629 "name" : "delete",
7aacca6f
DM
21630 "parameters" : {
21631 "additionalProperties" : 0,
21632 "properties" : {
21633 "storage" : {
7aacca6f 21634 "description" : "The storage identifier.",
44660702 21635 "format" : "pve-storage-id",
7aacca6f
DM
21636 "type" : "string"
21637 }
21638 }
56122987 21639 },
7aacca6f
DM
21640 "permissions" : {
21641 "check" : [
21642 "perm",
21643 "/storage",
21644 [
21645 "Datastore.Allocate"
21646 ]
21647 ]
56122987 21648 },
44660702
DM
21649 "protected" : 1,
21650 "returns" : {
21651 "type" : "null"
21652 }
21653 },
21654 "GET" : {
21655 "description" : "Read storage configuration.",
21656 "method" : "GET",
21657 "name" : "read",
7aacca6f
DM
21658 "parameters" : {
21659 "additionalProperties" : 0,
21660 "properties" : {
21661 "storage" : {
44660702 21662 "description" : "The storage identifier.",
7aacca6f 21663 "format" : "pve-storage-id",
44660702 21664 "type" : "string"
7aacca6f
DM
21665 }
21666 }
21667 },
44660702
DM
21668 "permissions" : {
21669 "check" : [
21670 "perm",
21671 "/storage/{storage}",
21672 [
21673 "Datastore.Allocate"
21674 ]
21675 ]
21676 },
21677 "returns" : {}
7aacca6f
DM
21678 },
21679 "PUT" : {
44660702
DM
21680 "description" : "Update storage configuration.",
21681 "method" : "PUT",
21682 "name" : "update",
21683 "parameters" : {
21684 "additionalProperties" : 0,
21685 "properties" : {
21686 "blocksize" : {
21687 "description" : "block size",
7aacca6f 21688 "optional" : 1,
44660702 21689 "type" : "string"
7aacca6f 21690 },
44660702
DM
21691 "comstar_hg" : {
21692 "description" : "host group for comstar views",
21693 "optional" : 1,
21694 "type" : "string"
7aacca6f 21695 },
44660702
DM
21696 "comstar_tg" : {
21697 "description" : "target group for comstar views",
7aacca6f 21698 "optional" : 1,
44660702 21699 "type" : "string"
7aacca6f 21700 },
44660702
DM
21701 "content" : {
21702 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21703 "format" : "pve-storage-content-list",
7aacca6f 21704 "optional" : 1,
44660702 21705 "type" : "string"
7aacca6f 21706 },
44660702
DM
21707 "delete" : {
21708 "description" : "A list of settings you want to delete.",
21709 "format" : "pve-configid-list",
21710 "maxLength" : 4096,
7aacca6f 21711 "optional" : 1,
44660702 21712 "type" : "string"
7aacca6f
DM
21713 },
21714 "digest" : {
44660702 21715 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
7aacca6f 21716 "maxLength" : 40,
7aacca6f 21717 "optional" : 1,
7aacca6f
DM
21718 "type" : "string"
21719 },
44660702
DM
21720 "disable" : {
21721 "description" : "Flag to disable the storage.",
21722 "optional" : 1,
21723 "type" : "boolean"
7aacca6f
DM
21724 },
21725 "format" : {
21726 "description" : "Default image format.",
44660702 21727 "format" : "pve-storage-format",
7aacca6f 21728 "optional" : 1,
44660702 21729 "type" : "string"
7aacca6f 21730 },
44660702
DM
21731 "krbd" : {
21732 "description" : "Access rbd through krbd kernel module.",
7aacca6f 21733 "optional" : 1,
44660702 21734 "type" : "boolean"
7aacca6f 21735 },
44660702
DM
21736 "maxfiles" : {
21737 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21738 "minimum" : 0,
21739 "optional" : 1,
4bd7df8b
DM
21740 "type" : "integer",
21741 "typetext" : "integer (0- N)"
21742 },
21743 "mkdir" : {
21744 "default" : "yes",
21745 "description" : "Create the directory if it doesn't exist.",
21746 "optional" : 1,
21747 "type" : "boolean"
7aacca6f
DM
21748 },
21749 "nodes" : {
44660702 21750 "description" : "List of cluster node names.",
7aacca6f
DM
21751 "format" : "pve-node-list",
21752 "optional" : 1,
44660702 21753 "type" : "string"
7aacca6f 21754 },
44660702
DM
21755 "nowritecache" : {
21756 "description" : "disable write caching on the target",
7aacca6f 21757 "optional" : 1,
44660702 21758 "type" : "boolean"
7aacca6f
DM
21759 },
21760 "options" : {
7aacca6f 21761 "description" : "NFS mount options (see 'man nfs')",
44660702
DM
21762 "format" : "pve-storage-options",
21763 "optional" : 1,
21764 "type" : "string"
21765 },
21766 "pool" : {
21767 "description" : "Pool.",
21768 "optional" : 1,
21769 "type" : "string"
21770 },
21771 "redundancy" : {
21772 "default" : 2,
21773 "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.",
21774 "maximum" : 16,
21775 "minimum" : 1,
21776 "optional" : 1,
4bd7df8b
DM
21777 "type" : "integer",
21778 "typetext" : "integer (1-16)"
44660702
DM
21779 },
21780 "saferemove" : {
21781 "description" : "Zero-out data when removing LVs.",
21782 "optional" : 1,
21783 "type" : "boolean"
7aacca6f
DM
21784 },
21785 "saferemove_throughput" : {
44660702 21786 "description" : "Wipe throughput (cstream -t parameter value).",
7aacca6f 21787 "optional" : 1,
44660702 21788 "type" : "string"
7aacca6f 21789 },
44660702
DM
21790 "server" : {
21791 "description" : "Server IP or DNS name.",
21792 "format" : "pve-storage-server",
7aacca6f 21793 "optional" : 1,
44660702 21794 "type" : "string"
7aacca6f 21795 },
44660702
DM
21796 "server2" : {
21797 "description" : "Backup volfile server IP or DNS name.",
21798 "format" : "pve-storage-server",
7aacca6f 21799 "optional" : 1,
44660702
DM
21800 "requires" : "server",
21801 "type" : "string"
21802 },
21803 "shared" : {
21804 "description" : "Mark storage as shared.",
21805 "optional" : 1,
21806 "type" : "boolean"
21807 },
21808 "sparse" : {
21809 "description" : "use sparse volumes",
21810 "optional" : 1,
21811 "type" : "boolean"
21812 },
21813 "storage" : {
21814 "description" : "The storage identifier.",
21815 "format" : "pve-storage-id",
21816 "type" : "string"
21817 },
4bd7df8b
DM
21818 "tagged_only" : {
21819 "description" : "Only use logical volumes tagged with 'pve-vm-ID'.",
21820 "optional" : 1,
21821 "type" : "boolean"
21822 },
44660702
DM
21823 "transport" : {
21824 "description" : "Gluster transport: tcp or rdma",
21825 "enum" : [
21826 "tcp",
21827 "rdma",
21828 "unix"
21829 ],
21830 "optional" : 1,
21831 "type" : "string"
7aacca6f
DM
21832 },
21833 "username" : {
21834 "description" : "RBD Id.",
44660702
DM
21835 "optional" : 1,
21836 "type" : "string"
7aacca6f 21837 }
44660702
DM
21838 },
21839 "type" : "object"
21840 },
21841 "permissions" : {
21842 "check" : [
21843 "perm",
21844 "/storage",
21845 [
21846 "Datastore.Allocate"
21847 ]
21848 ]
21849 },
21850 "protected" : 1,
21851 "returns" : {
21852 "type" : "null"
21853 }
21854 }
21855 },
21856 "leaf" : 1,
21857 "path" : "/storage/{storage}",
21858 "text" : "{storage}"
21859 }
21860 ],
21861 "info" : {
21862 "GET" : {
21863 "description" : "Storage index.",
21864 "method" : "GET",
21865 "name" : "index",
21866 "parameters" : {
21867 "additionalProperties" : 0,
21868 "properties" : {
21869 "type" : {
21870 "description" : "Only list storage of specific type",
21871 "enum" : [
21872 "dir",
21873 "drbd",
21874 "glusterfs",
21875 "iscsi",
21876 "iscsidirect",
21877 "lvm",
21878 "lvmthin",
21879 "nfs",
21880 "rbd",
21881 "sheepdog",
21882 "zfs",
21883 "zfspool"
21884 ],
21885 "optional" : 1,
21886 "type" : "string"
21887 }
21888 }
21889 },
21890 "permissions" : {
21891 "description" : "Only list entries where you have 'Datastore.Audit' or 'Datastore.AllocateSpace' permissions on '/storage/<storage>'",
21892 "user" : "all"
21893 },
21894 "returns" : {
21895 "items" : {
21896 "properties" : {
21897 "storage" : {
21898 "type" : "string"
7aacca6f 21899 }
56122987 21900 },
44660702
DM
21901 "type" : "object"
21902 },
21903 "links" : [
21904 {
21905 "href" : "{storage}",
21906 "rel" : "child"
21907 }
21908 ],
21909 "type" : "array"
21910 }
21911 },
21912 "POST" : {
21913 "description" : "Create a new storage.",
21914 "method" : "POST",
21915 "name" : "create",
21916 "parameters" : {
21917 "additionalProperties" : 0,
21918 "properties" : {
21919 "authsupported" : {
21920 "description" : "Authsupported.",
21921 "optional" : 1,
21922 "type" : "string"
21923 },
21924 "base" : {
21925 "description" : "Base volume. This volume is automatically activated.",
21926 "format" : "pve-volume-id",
21927 "optional" : 1,
21928 "type" : "string"
21929 },
21930 "blocksize" : {
21931 "description" : "block size",
21932 "optional" : 1,
21933 "type" : "string"
21934 },
21935 "comstar_hg" : {
21936 "description" : "host group for comstar views",
21937 "optional" : 1,
21938 "type" : "string"
21939 },
21940 "comstar_tg" : {
21941 "description" : "target group for comstar views",
21942 "optional" : 1,
21943 "type" : "string"
21944 },
21945 "content" : {
21946 "description" : "Allowed content types.\n\nNOTE: the value 'rootdir' is used for Containers, and value 'images' for VMs.\n",
21947 "format" : "pve-storage-content-list",
21948 "optional" : 1,
21949 "type" : "string"
21950 },
21951 "disable" : {
21952 "description" : "Flag to disable the storage.",
21953 "optional" : 1,
21954 "type" : "boolean"
21955 },
21956 "export" : {
21957 "description" : "NFS export path.",
21958 "format" : "pve-storage-path",
21959 "optional" : 1,
21960 "type" : "string"
21961 },
21962 "format" : {
21963 "description" : "Default image format.",
21964 "format" : "pve-storage-format",
21965 "optional" : 1,
21966 "type" : "string"
21967 },
21968 "iscsiprovider" : {
21969 "description" : "iscsi provider",
21970 "optional" : 1,
21971 "type" : "string"
21972 },
21973 "krbd" : {
21974 "description" : "Access rbd through krbd kernel module.",
21975 "optional" : 1,
21976 "type" : "boolean"
56122987 21977 },
44660702
DM
21978 "maxfiles" : {
21979 "description" : "Maximal number of backup files per VM. Use '0' for unlimted.",
21980 "minimum" : 0,
21981 "optional" : 1,
4bd7df8b
DM
21982 "type" : "integer",
21983 "typetext" : "integer (0- N)"
21984 },
21985 "mkdir" : {
21986 "default" : "yes",
21987 "description" : "Create the directory if it doesn't exist.",
21988 "optional" : 1,
21989 "type" : "boolean"
7aacca6f 21990 },
44660702
DM
21991 "monhost" : {
21992 "description" : "Monitors daemon ips.",
4bd7df8b 21993 "format" : "pve-storage-portal-dns-list",
44660702
DM
21994 "optional" : 1,
21995 "type" : "string"
7aacca6f 21996 },
44660702
DM
21997 "nodes" : {
21998 "description" : "List of cluster node names.",
21999 "format" : "pve-node-list",
22000 "optional" : 1,
22001 "type" : "string"
7aacca6f 22002 },
44660702
DM
22003 "nowritecache" : {
22004 "description" : "disable write caching on the target",
22005 "optional" : 1,
22006 "type" : "boolean"
22007 },
22008 "options" : {
22009 "description" : "NFS mount options (see 'man nfs')",
22010 "format" : "pve-storage-options",
22011 "optional" : 1,
22012 "type" : "string"
22013 },
22014 "path" : {
22015 "description" : "File system path.",
22016 "format" : "pve-storage-path",
22017 "optional" : 1,
22018 "type" : "string"
22019 },
22020 "pool" : {
22021 "description" : "Pool.",
22022 "optional" : 1,
22023 "type" : "string"
22024 },
22025 "portal" : {
22026 "description" : "iSCSI portal (IP or DNS name with optional port).",
22027 "format" : "pve-storage-portal-dns",
22028 "optional" : 1,
22029 "type" : "string"
22030 },
22031 "redundancy" : {
22032 "default" : 2,
22033 "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.",
22034 "maximum" : 16,
22035 "minimum" : 1,
22036 "optional" : 1,
4bd7df8b
DM
22037 "type" : "integer",
22038 "typetext" : "integer (1-16)"
44660702
DM
22039 },
22040 "saferemove" : {
22041 "description" : "Zero-out data when removing LVs.",
22042 "optional" : 1,
22043 "type" : "boolean"
22044 },
22045 "saferemove_throughput" : {
22046 "description" : "Wipe throughput (cstream -t parameter value).",
22047 "optional" : 1,
22048 "type" : "string"
22049 },
22050 "server" : {
22051 "description" : "Server IP or DNS name.",
22052 "format" : "pve-storage-server",
22053 "optional" : 1,
22054 "type" : "string"
22055 },
22056 "server2" : {
22057 "description" : "Backup volfile server IP or DNS name.",
22058 "format" : "pve-storage-server",
22059 "optional" : 1,
22060 "requires" : "server",
22061 "type" : "string"
22062 },
22063 "shared" : {
22064 "description" : "Mark storage as shared.",
22065 "optional" : 1,
22066 "type" : "boolean"
22067 },
22068 "sparse" : {
22069 "description" : "use sparse volumes",
22070 "optional" : 1,
22071 "type" : "boolean"
22072 },
22073 "storage" : {
22074 "description" : "The storage identifier.",
22075 "format" : "pve-storage-id",
22076 "type" : "string"
22077 },
4bd7df8b
DM
22078 "tagged_only" : {
22079 "description" : "Only use logical volumes tagged with 'pve-vm-ID'.",
22080 "optional" : 1,
22081 "type" : "boolean"
22082 },
44660702
DM
22083 "target" : {
22084 "description" : "iSCSI target.",
22085 "optional" : 1,
22086 "type" : "string"
22087 },
22088 "thinpool" : {
22089 "description" : "LVM thin pool LV name.",
22090 "format" : "pve-storage-vgname",
22091 "optional" : 1,
22092 "type" : "string"
22093 },
22094 "transport" : {
22095 "description" : "Gluster transport: tcp or rdma",
22096 "enum" : [
22097 "tcp",
22098 "rdma",
22099 "unix"
7aacca6f 22100 ],
44660702
DM
22101 "optional" : 1,
22102 "type" : "string"
56122987 22103 },
44660702
DM
22104 "type" : {
22105 "description" : "Storage type.",
22106 "enum" : [
22107 "dir",
22108 "drbd",
22109 "glusterfs",
22110 "iscsi",
22111 "iscsidirect",
22112 "lvm",
22113 "lvmthin",
22114 "nfs",
22115 "rbd",
22116 "sheepdog",
22117 "zfs",
22118 "zfspool"
22119 ],
22120 "type" : "string"
56122987 22121 },
44660702
DM
22122 "username" : {
22123 "description" : "RBD Id.",
22124 "optional" : 1,
22125 "type" : "string"
7aacca6f 22126 },
44660702
DM
22127 "vgname" : {
22128 "description" : "Volume group name.",
22129 "format" : "pve-storage-vgname",
22130 "optional" : 1,
22131 "type" : "string"
22132 },
22133 "volume" : {
22134 "description" : "Glusterfs Volume.",
22135 "optional" : 1,
22136 "type" : "string"
22137 }
22138 },
22139 "type" : "object"
22140 },
22141 "permissions" : {
22142 "check" : [
22143 "perm",
22144 "/storage",
22145 [
22146 "Datastore.Allocate"
22147 ]
22148 ]
56122987 22149 },
44660702
DM
22150 "protected" : 1,
22151 "returns" : {
22152 "type" : "null"
22153 }
22154 }
22155 },
22156 "leaf" : 0,
22157 "path" : "/storage",
22158 "text" : "storage"
22159 },
22160 {
22161 "children" : [
22162 {
56122987
DM
22163 "children" : [
22164 {
56122987 22165 "info" : {
44660702
DM
22166 "DELETE" : {
22167 "description" : "Delete user.",
22168 "method" : "DELETE",
22169 "name" : "delete_user",
56122987 22170 "parameters" : {
7aacca6f 22171 "additionalProperties" : 0,
56122987 22172 "properties" : {
56122987 22173 "userid" : {
56122987
DM
22174 "description" : "User ID",
22175 "format" : "pve-userid",
44660702 22176 "maxLength" : 64,
56122987
DM
22177 "type" : "string"
22178 }
7aacca6f 22179 }
56122987 22180 },
56122987
DM
22181 "permissions" : {
22182 "check" : [
44660702 22183 "and",
56122987 22184 [
44660702
DM
22185 "userid-param",
22186 "Realm.AllocateUser"
56122987 22187 ],
44660702
DM
22188 [
22189 "userid-group",
22190 [
22191 "User.Modify"
22192 ]
22193 ]
56122987 22194 ]
7aacca6f 22195 },
44660702 22196 "protected" : 1,
56122987
DM
22197 "returns" : {
22198 "type" : "null"
44660702 22199 }
7aacca6f 22200 },
44660702
DM
22201 "GET" : {
22202 "description" : "Get user configuration.",
22203 "method" : "GET",
22204 "name" : "read_user",
56122987
DM
22205 "parameters" : {
22206 "additionalProperties" : 0,
22207 "properties" : {
22208 "userid" : {
44660702 22209 "description" : "User ID",
56122987 22210 "format" : "pve-userid",
44660702
DM
22211 "maxLength" : 64,
22212 "type" : "string"
56122987
DM
22213 }
22214 }
22215 },
56122987
DM
22216 "permissions" : {
22217 "check" : [
44660702 22218 "userid-group",
56122987 22219 [
44660702
DM
22220 "User.Modify",
22221 "Sys.Audit"
56122987
DM
22222 ]
22223 ]
22224 },
56122987 22225 "returns" : {
7aacca6f 22226 "additionalProperties" : 0,
56122987 22227 "properties" : {
44660702
DM
22228 "comment" : {
22229 "optional" : 1,
22230 "type" : "string"
56122987 22231 },
44660702
DM
22232 "email" : {
22233 "optional" : 1,
22234 "type" : "string"
7aacca6f
DM
22235 },
22236 "enable" : {
22237 "type" : "boolean"
22238 },
44660702
DM
22239 "expire" : {
22240 "optional" : 1,
22241 "type" : "integer"
22242 },
22243 "firstname" : {
56122987
DM
22244 "optional" : 1,
22245 "type" : "string"
22246 },
44660702
DM
22247 "groups" : {
22248 "type" : "array"
56122987 22249 },
44660702
DM
22250 "keys" : {
22251 "optional" : 1,
22252 "type" : "string"
7aacca6f 22253 },
44660702
DM
22254 "lastname" : {
22255 "optional" : 1,
22256 "type" : "string"
56122987 22257 }
7aacca6f 22258 }
44660702
DM
22259 }
22260 },
22261 "PUT" : {
22262 "description" : "Update user configuration.",
22263 "method" : "PUT",
22264 "name" : "update_user",
56122987 22265 "parameters" : {
44660702 22266 "additionalProperties" : 0,
56122987 22267 "properties" : {
44660702
DM
22268 "append" : {
22269 "optional" : 1,
22270 "requires" : "groups",
22271 "type" : "boolean"
22272 },
22273 "comment" : {
22274 "optional" : 1,
22275 "type" : "string"
22276 },
22277 "email" : {
22278 "format" : "email-opt",
22279 "optional" : 1,
22280 "type" : "string"
22281 },
22282 "enable" : {
22283 "description" : "Enable/disable the account.",
22284 "optional" : 1,
22285 "type" : "boolean"
22286 },
22287 "expire" : {
22288 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
22289 "minimum" : 0,
22290 "optional" : 1,
4bd7df8b
DM
22291 "type" : "integer",
22292 "typetext" : "integer (0- N)"
44660702
DM
22293 },
22294 "firstname" : {
22295 "optional" : 1,
22296 "type" : "string"
22297 },
22298 "groups" : {
22299 "format" : "pve-groupid-list",
22300 "optional" : 1,
22301 "type" : "string"
22302 },
22303 "keys" : {
22304 "description" : "Keys for two factor auth (yubico).",
22305 "optional" : 1,
22306 "type" : "string"
22307 },
22308 "lastname" : {
22309 "optional" : 1,
22310 "type" : "string"
22311 },
56122987 22312 "userid" : {
56122987
DM
22313 "description" : "User ID",
22314 "format" : "pve-userid",
44660702
DM
22315 "maxLength" : 64,
22316 "type" : "string"
56122987 22317 }
44660702 22318 }
56122987 22319 },
56122987
DM
22320 "permissions" : {
22321 "check" : [
22322 "userid-group",
22323 [
44660702
DM
22324 "User.Modify"
22325 ],
22326 "groups_param",
22327 1
56122987
DM
22328 ]
22329 },
44660702
DM
22330 "protected" : 1,
22331 "returns" : {
22332 "type" : "null"
22333 }
56122987
DM
22334 }
22335 },
44660702
DM
22336 "leaf" : 1,
22337 "path" : "/access/users/{userid}",
7aacca6f 22338 "text" : "{userid}"
56122987 22339 }
7aacca6f 22340 ],
56122987 22341 "info" : {
7aacca6f 22342 "GET" : {
44660702
DM
22343 "description" : "User index.",
22344 "method" : "GET",
7aacca6f 22345 "name" : "index",
56122987 22346 "parameters" : {
44660702
DM
22347 "additionalProperties" : 0,
22348 "properties" : {
22349 "enabled" : {
22350 "description" : "Optional filter for enable property.",
22351 "optional" : 1,
22352 "type" : "boolean"
22353 }
22354 }
22355 },
22356 "permissions" : {
22357 "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.",
22358 "user" : "all"
56122987 22359 },
7aacca6f 22360 "returns" : {
7aacca6f
DM
22361 "items" : {
22362 "properties" : {
44660702 22363 "userid" : {
7aacca6f
DM
22364 "type" : "string"
22365 }
22366 },
22367 "type" : "object"
22368 },
44660702
DM
22369 "links" : [
22370 {
22371 "href" : "{userid}",
22372 "rel" : "child"
22373 }
22374 ],
7aacca6f
DM
22375 "type" : "array"
22376 }
22377 },
22378 "POST" : {
44660702 22379 "description" : "Create new user.",
7aacca6f 22380 "method" : "POST",
44660702 22381 "name" : "create_user",
56122987 22382 "parameters" : {
7aacca6f
DM
22383 "additionalProperties" : 0,
22384 "properties" : {
44660702
DM
22385 "comment" : {
22386 "optional" : 1,
7aacca6f
DM
22387 "type" : "string"
22388 },
44660702
DM
22389 "email" : {
22390 "format" : "email-opt",
22391 "optional" : 1,
22392 "type" : "string"
22393 },
22394 "enable" : {
22395 "default" : 1,
22396 "description" : "Enable the account (default). You can set this to '0' to disable the accout",
22397 "optional" : 1,
22398 "type" : "boolean"
22399 },
22400 "expire" : {
22401 "description" : "Account expiration date (seconds since epoch). '0' means no expiration date.",
22402 "minimum" : 0,
22403 "optional" : 1,
4bd7df8b
DM
22404 "type" : "integer",
22405 "typetext" : "integer (0- N)"
44660702
DM
22406 },
22407 "firstname" : {
22408 "optional" : 1,
22409 "type" : "string"
22410 },
22411 "groups" : {
22412 "format" : "pve-groupid-list",
22413 "optional" : 1,
22414 "type" : "string"
22415 },
22416 "keys" : {
22417 "description" : "Keys for two factor auth (yubico).",
22418 "optional" : 1,
22419 "type" : "string"
22420 },
22421 "lastname" : {
7aacca6f
DM
22422 "optional" : 1,
22423 "type" : "string"
44660702
DM
22424 },
22425 "password" : {
22426 "description" : "Initial password.",
22427 "maxLength" : 64,
22428 "minLength" : 5,
22429 "optional" : 1,
22430 "type" : "string"
22431 },
22432 "userid" : {
22433 "description" : "User ID",
22434 "format" : "pve-userid",
22435 "maxLength" : 64,
22436 "type" : "string"
56122987 22437 }
7aacca6f 22438 }
56122987 22439 },
44660702
DM
22440 "permissions" : {
22441 "check" : [
22442 "and",
22443 [
22444 "userid-param",
22445 "Realm.AllocateUser"
22446 ],
22447 [
22448 "userid-group",
22449 [
22450 "User.Modify"
22451 ],
22452 "groups_param",
22453 1
22454 ]
22455 ],
22456 "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."
22457 },
22458 "protected" : 1,
22459 "returns" : {
22460 "type" : "null"
22461 }
56122987
DM
22462 }
22463 },
44660702
DM
22464 "leaf" : 0,
22465 "path" : "/access/users",
22466 "text" : "users"
22467 },
22468 {
56122987
DM
22469 "children" : [
22470 {
56122987
DM
22471 "info" : {
22472 "DELETE" : {
44660702
DM
22473 "description" : "Delete group.",
22474 "method" : "DELETE",
22475 "name" : "delete_group",
22476 "parameters" : {
22477 "additionalProperties" : 0,
22478 "properties" : {
22479 "groupid" : {
22480 "format" : "pve-groupid",
22481 "type" : "string"
22482 }
22483 }
22484 },
7aacca6f
DM
22485 "permissions" : {
22486 "check" : [
22487 "perm",
22488 "/access/groups",
22489 [
22490 "Group.Allocate"
22491 ]
22492 ]
22493 },
7aacca6f 22494 "protected" : 1,
7aacca6f
DM
22495 "returns" : {
22496 "type" : "null"
44660702 22497 }
7aacca6f 22498 },
44660702
DM
22499 "GET" : {
22500 "description" : "Get group configuration.",
22501 "method" : "GET",
22502 "name" : "read_group",
22503 "parameters" : {
22504 "additionalProperties" : 0,
22505 "properties" : {
22506 "groupid" : {
22507 "format" : "pve-groupid",
22508 "type" : "string"
22509 }
22510 }
56122987 22511 },
7aacca6f
DM
22512 "permissions" : {
22513 "check" : [
22514 "perm",
22515 "/access/groups",
22516 [
44660702 22517 "Sys.Audit",
7aacca6f 22518 "Group.Allocate"
44660702
DM
22519 ],
22520 "any",
22521 1
7aacca6f
DM
22522 ]
22523 },
7aacca6f 22524 "returns" : {
44660702 22525 "additionalProperties" : 0,
7aacca6f
DM
22526 "properties" : {
22527 "comment" : {
44660702
DM
22528 "optional" : 1,
22529 "type" : "string"
7aacca6f
DM
22530 },
22531 "members" : {
22532 "items" : {
22533 "type" : "string"
22534 },
22535 "type" : "array"
22536 }
22537 },
44660702
DM
22538 "type" : "object"
22539 }
22540 },
22541 "PUT" : {
22542 "description" : "Update group data.",
22543 "method" : "PUT",
22544 "name" : "update_group",
56122987 22545 "parameters" : {
44660702 22546 "additionalProperties" : 0,
56122987 22547 "properties" : {
44660702
DM
22548 "comment" : {
22549 "optional" : 1,
22550 "type" : "string"
22551 },
56122987
DM
22552 "groupid" : {
22553 "format" : "pve-groupid",
22554 "type" : "string"
22555 }
44660702 22556 }
56122987 22557 },
56122987
DM
22558 "permissions" : {
22559 "check" : [
22560 "perm",
22561 "/access/groups",
22562 [
22563 "Group.Allocate"
44660702 22564 ]
56122987
DM
22565 ]
22566 },
44660702
DM
22567 "protected" : 1,
22568 "returns" : {
22569 "type" : "null"
22570 }
7aacca6f
DM
22571 }
22572 },
7aacca6f 22573 "leaf" : 1,
44660702
DM
22574 "path" : "/access/groups/{groupid}",
22575 "text" : "{groupid}"
22576 }
22577 ],
22578 "info" : {
22579 "GET" : {
22580 "description" : "Group index.",
22581 "method" : "GET",
22582 "name" : "index",
22583 "parameters" : {
22584 "additionalProperties" : 0
22585 },
22586 "permissions" : {
22587 "description" : "The returned list is restricted to groups where you have 'User.Modify', 'Sys.Audit' or 'Group.Allocate' permissions on /access/groups/<group>.",
22588 "user" : "all"
22589 },
22590 "returns" : {
22591 "items" : {
22592 "properties" : {
22593 "groupid" : {
22594 "type" : "string"
22595 }
22596 },
22597 "type" : "object"
22598 },
22599 "links" : [
22600 {
22601 "href" : "{groupid}",
22602 "rel" : "child"
22603 }
22604 ],
22605 "type" : "array"
22606 }
22607 },
22608 "POST" : {
22609 "description" : "Create new group.",
22610 "method" : "POST",
22611 "name" : "create_group",
22612 "parameters" : {
22613 "additionalProperties" : 0,
22614 "properties" : {
22615 "comment" : {
22616 "optional" : 1,
22617 "type" : "string"
22618 },
22619 "groupid" : {
22620 "format" : "pve-groupid",
22621 "type" : "string"
22622 }
22623 }
22624 },
22625 "permissions" : {
22626 "check" : [
22627 "perm",
22628 "/access/groups",
22629 [
22630 "Group.Allocate"
22631 ]
22632 ]
22633 },
22634 "protected" : 1,
22635 "returns" : {
22636 "type" : "null"
22637 }
7aacca6f 22638 }
44660702 22639 },
7aacca6f 22640 "leaf" : 0,
44660702
DM
22641 "path" : "/access/groups",
22642 "text" : "groups"
7aacca6f
DM
22643 },
22644 {
22645 "children" : [
22646 {
7aacca6f 22647 "info" : {
7aacca6f 22648 "DELETE" : {
7aacca6f 22649 "description" : "Delete role.",
44660702 22650 "method" : "DELETE",
7aacca6f 22651 "name" : "delete_role",
56122987
DM
22652 "parameters" : {
22653 "additionalProperties" : 0,
22654 "properties" : {
7aacca6f
DM
22655 "roleid" : {
22656 "format" : "pve-roleid",
22657 "type" : "string"
56122987
DM
22658 }
22659 }
22660 },
56122987
DM
22661 "permissions" : {
22662 "check" : [
22663 "perm",
7aacca6f 22664 "/access",
56122987 22665 [
7aacca6f
DM
22666 "Sys.Modify"
22667 ]
56122987 22668 ]
44660702
DM
22669 },
22670 "protected" : 1,
22671 "returns" : {
22672 "type" : "null"
56122987
DM
22673 }
22674 },
44660702
DM
22675 "GET" : {
22676 "description" : "Get role configuration.",
22677 "method" : "GET",
22678 "name" : "read_role",
22679 "parameters" : {
22680 "additionalProperties" : 0,
22681 "properties" : {
22682 "roleid" : {
22683 "format" : "pve-roleid",
22684 "type" : "string"
22685 }
22686 }
22687 },
7aacca6f 22688 "permissions" : {
44660702 22689 "user" : "all"
56122987 22690 },
44660702
DM
22691 "returns" : {}
22692 },
22693 "PUT" : {
22694 "description" : "Create new role.",
22695 "method" : "PUT",
22696 "name" : "update_role",
56122987
DM
22697 "parameters" : {
22698 "additionalProperties" : 0,
22699 "properties" : {
7aacca6f 22700 "append" : {
44660702 22701 "optional" : 1,
7aacca6f 22702 "requires" : "privs",
44660702 22703 "type" : "boolean"
7aacca6f
DM
22704 },
22705 "privs" : {
22706 "format" : "pve-priv-list",
56122987 22707 "type" : "string"
44660702
DM
22708 },
22709 "roleid" : {
22710 "format" : "pve-roleid",
22711 "type" : "string"
56122987
DM
22712 }
22713 }
22714 },
44660702
DM
22715 "permissions" : {
22716 "check" : [
22717 "perm",
22718 "/access",
22719 [
22720 "Sys.Modify"
22721 ]
22722 ]
22723 },
56122987 22724 "protected" : 1,
7aacca6f
DM
22725 "returns" : {
22726 "type" : "null"
56122987
DM
22727 }
22728 }
22729 },
44660702 22730 "leaf" : 1,
7aacca6f 22731 "path" : "/access/roles/{roleid}",
44660702 22732 "text" : "{roleid}"
56122987
DM
22733 }
22734 ],
56122987 22735 "info" : {
7aacca6f
DM
22736 "GET" : {
22737 "description" : "Role index.",
44660702 22738 "method" : "GET",
7aacca6f 22739 "name" : "index",
56122987 22740 "parameters" : {
56122987
DM
22741 "additionalProperties" : 0
22742 },
7aacca6f
DM
22743 "permissions" : {
22744 "user" : "all"
22745 },
56122987 22746 "returns" : {
7aacca6f 22747 "items" : {
7aacca6f
DM
22748 "properties" : {
22749 "roleid" : {
22750 "type" : "string"
22751 }
44660702
DM
22752 },
22753 "type" : "object"
22754 },
22755 "links" : [
22756 {
22757 "href" : "{roleid}",
22758 "rel" : "child"
7aacca6f 22759 }
44660702
DM
22760 ],
22761 "type" : "array"
22762 }
7aacca6f
DM
22763 },
22764 "POST" : {
22765 "description" : "Create new role.",
44660702
DM
22766 "method" : "POST",
22767 "name" : "create_role",
7aacca6f
DM
22768 "parameters" : {
22769 "additionalProperties" : 0,
22770 "properties" : {
7aacca6f
DM
22771 "privs" : {
22772 "format" : "pve-priv-list",
22773 "optional" : 1,
22774 "type" : "string"
44660702
DM
22775 },
22776 "roleid" : {
22777 "format" : "pve-roleid",
22778 "type" : "string"
7aacca6f
DM
22779 }
22780 }
22781 },
44660702
DM
22782 "permissions" : {
22783 "check" : [
22784 "perm",
22785 "/access",
22786 [
22787 "Sys.Modify"
22788 ]
22789 ]
22790 },
22791 "protected" : 1,
7aacca6f
DM
22792 "returns" : {
22793 "type" : "null"
22794 }
22795 }
22796 },
44660702 22797 "leaf" : 0,
7aacca6f 22798 "path" : "/access/roles",
44660702 22799 "text" : "roles"
7aacca6f
DM
22800 },
22801 {
22802 "info" : {
56122987 22803 "GET" : {
44660702
DM
22804 "description" : "Get Access Control List (ACLs).",
22805 "method" : "GET",
22806 "name" : "read_acl",
7aacca6f
DM
22807 "parameters" : {
22808 "additionalProperties" : 0
22809 },
44660702
DM
22810 "permissions" : {
22811 "description" : "The returned list is restricted to objects where you have rights to modify permissions.",
22812 "user" : "all"
22813 },
56122987 22814 "returns" : {
56122987 22815 "items" : {
44660702 22816 "additionalProperties" : 0,
56122987 22817 "properties" : {
7aacca6f
DM
22818 "path" : {
22819 "type" : "string"
22820 },
44660702
DM
22821 "propagate" : {
22822 "type" : "boolean"
22823 },
22824 "roleid" : {
22825 "type" : "string"
22826 },
7aacca6f
DM
22827 "type" : {
22828 "enum" : [
22829 "user",
22830 "group"
22831 ],
22832 "type" : "string"
22833 },
7aacca6f
DM
22834 "ugid" : {
22835 "type" : "string"
56122987 22836 }
7aacca6f 22837 },
44660702 22838 "type" : "object"
7aacca6f
DM
22839 },
22840 "type" : "array"
44660702 22841 }
7aacca6f
DM
22842 },
22843 "PUT" : {
44660702
DM
22844 "description" : "Update Access Control List (add or remove permissions).",
22845 "method" : "PUT",
7aacca6f
DM
22846 "name" : "update_acl",
22847 "parameters" : {
22848 "additionalProperties" : 0,
22849 "properties" : {
22850 "delete" : {
44660702 22851 "description" : "Remove permissions (instead of adding it).",
7aacca6f 22852 "optional" : 1,
44660702 22853 "type" : "boolean"
7aacca6f 22854 },
44660702
DM
22855 "groups" : {
22856 "description" : "List of groups.",
22857 "format" : "pve-groupid-list",
7aacca6f 22858 "optional" : 1,
44660702 22859 "type" : "string"
7aacca6f
DM
22860 },
22861 "path" : {
22862 "description" : "Access control path",
22863 "type" : "string"
22864 },
7aacca6f 22865 "propagate" : {
44660702 22866 "default" : 1,
7aacca6f 22867 "description" : "Allow to propagate (inherit) permissions.",
7aacca6f 22868 "optional" : 1,
44660702 22869 "type" : "boolean"
7aacca6f 22870 },
44660702
DM
22871 "roles" : {
22872 "description" : "List of roles.",
22873 "format" : "pve-roleid-list",
22874 "type" : "string"
22875 },
22876 "users" : {
22877 "description" : "List of users.",
22878 "format" : "pve-userid-list",
7aacca6f 22879 "optional" : 1,
44660702 22880 "type" : "string"
56122987
DM
22881 }
22882 }
22883 },
56122987 22884 "permissions" : {
7aacca6f
DM
22885 "check" : [
22886 "perm-modify",
22887 "{path}"
22888 ]
22889 },
7aacca6f
DM
22890 "protected" : 1,
22891 "returns" : {
22892 "type" : "null"
44660702 22893 }
56122987
DM
22894 }
22895 },
7aacca6f 22896 "leaf" : 1,
44660702
DM
22897 "path" : "/access/acl",
22898 "text" : "acl"
7aacca6f
DM
22899 },
22900 {
56122987
DM
22901 "children" : [
22902 {
56122987 22903 "info" : {
44660702
DM
22904 "DELETE" : {
22905 "description" : "Delete an authentication server.",
22906 "method" : "DELETE",
22907 "name" : "delete",
22908 "parameters" : {
22909 "additionalProperties" : 0,
22910 "properties" : {
22911 "realm" : {
22912 "description" : "Authentication domain ID",
22913 "format" : "pve-realm",
22914 "maxLength" : 32,
22915 "type" : "string"
56122987 22916 }
44660702 22917 }
56122987 22918 },
56122987
DM
22919 "permissions" : {
22920 "check" : [
22921 "perm",
7aacca6f 22922 "/access/realm",
56122987 22923 [
7aacca6f 22924 "Realm.Allocate"
56122987
DM
22925 ]
22926 ]
22927 },
7aacca6f 22928 "protected" : 1,
7aacca6f
DM
22929 "returns" : {
22930 "type" : "null"
44660702 22931 }
7aacca6f 22932 },
44660702
DM
22933 "GET" : {
22934 "description" : "Get auth server configuration.",
22935 "method" : "GET",
22936 "name" : "read",
56122987 22937 "parameters" : {
44660702 22938 "additionalProperties" : 0,
56122987 22939 "properties" : {
7aacca6f 22940 "realm" : {
44660702 22941 "description" : "Authentication domain ID",
7aacca6f
DM
22942 "format" : "pve-realm",
22943 "maxLength" : 32,
44660702 22944 "type" : "string"
56122987 22945 }
44660702 22946 }
7aacca6f 22947 },
7aacca6f
DM
22948 "permissions" : {
22949 "check" : [
22950 "perm",
22951 "/access/realm",
22952 [
44660702
DM
22953 "Realm.Allocate",
22954 "Sys.Audit"
22955 ],
22956 "any",
22957 1
7aacca6f 22958 ]
44660702
DM
22959 },
22960 "returns" : {}
7aacca6f 22961 },
44660702
DM
22962 "PUT" : {
22963 "description" : "Update authentication server settings.",
22964 "method" : "PUT",
22965 "name" : "update",
7aacca6f 22966 "parameters" : {
44660702 22967 "additionalProperties" : 0,
7aacca6f 22968 "properties" : {
44660702
DM
22969 "base_dn" : {
22970 "description" : "LDAP base domain name",
22971 "maxLength" : 256,
22972 "optional" : 1,
22973 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22974 "type" : "string"
22975 },
4bd7df8b
DM
22976 "bind_dn" : {
22977 "description" : "LDAP bind domain name",
22978 "maxLength" : 256,
22979 "optional" : 1,
22980 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
22981 "type" : "string"
22982 },
44660702
DM
22983 "comment" : {
22984 "description" : "Description.",
22985 "maxLength" : 4096,
22986 "optional" : 1,
22987 "type" : "string"
22988 },
22989 "default" : {
22990 "description" : "Use this as default realm",
22991 "optional" : 1,
22992 "type" : "boolean"
22993 },
22994 "delete" : {
22995 "description" : "A list of settings you want to delete.",
22996 "format" : "pve-configid-list",
22997 "maxLength" : 4096,
22998 "optional" : 1,
22999 "type" : "string"
23000 },
23001 "digest" : {
23002 "description" : "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications.",
23003 "maxLength" : 40,
23004 "optional" : 1,
23005 "type" : "string"
23006 },
23007 "domain" : {
23008 "description" : "AD domain name",
23009 "maxLength" : 256,
23010 "optional" : 1,
23011 "pattern" : "\\S+",
23012 "type" : "string"
23013 },
23014 "port" : {
23015 "description" : "Server port.",
23016 "maximum" : 65535,
23017 "minimum" : 1,
23018 "optional" : 1,
4bd7df8b
DM
23019 "type" : "integer",
23020 "typetext" : "integer (1-65535)"
44660702 23021 },
7aacca6f 23022 "realm" : {
7aacca6f
DM
23023 "description" : "Authentication domain ID",
23024 "format" : "pve-realm",
44660702
DM
23025 "maxLength" : 32,
23026 "type" : "string"
23027 },
23028 "secure" : {
23029 "description" : "Use secure LDAPS protocol.",
23030 "optional" : 1,
23031 "type" : "boolean"
23032 },
23033 "server1" : {
23034 "description" : "Server IP address (or DNS name)",
23035 "format" : "address",
23036 "maxLength" : 256,
23037 "optional" : 1,
23038 "type" : "string"
23039 },
23040 "server2" : {
23041 "description" : "Fallback Server IP address (or DNS name)",
23042 "format" : "address",
23043 "maxLength" : 256,
23044 "optional" : 1,
23045 "type" : "string"
23046 },
23047 "tfa" : {
23048 "description" : "Use Two-factor authentication.",
23049 "format" : "pve-tfa-config",
23050 "maxLength" : 128,
23051 "optional" : 1,
23052 "type" : "string"
23053 },
23054 "user_attr" : {
23055 "description" : "LDAP user attribute name",
23056 "maxLength" : 256,
23057 "optional" : 1,
23058 "pattern" : "\\S{2,}",
23059 "type" : "string"
7aacca6f 23060 }
56122987 23061 },
44660702 23062 "type" : "object"
56122987 23063 },
7aacca6f
DM
23064 "permissions" : {
23065 "check" : [
23066 "perm",
23067 "/access/realm",
23068 [
44660702
DM
23069 "Realm.Allocate"
23070 ]
7aacca6f
DM
23071 ]
23072 },
44660702
DM
23073 "protected" : 1,
23074 "returns" : {
23075 "type" : "null"
23076 }
56122987 23077 }
44660702
DM
23078 },
23079 "leaf" : 1,
23080 "path" : "/access/domains/{realm}",
23081 "text" : "{realm}"
56122987 23082 }
7aacca6f 23083 ],
56122987
DM
23084 "info" : {
23085 "GET" : {
44660702
DM
23086 "description" : "Authentication domain index.",
23087 "method" : "GET",
23088 "name" : "index",
23089 "parameters" : {
23090 "additionalProperties" : 0
23091 },
23092 "permissions" : {
23093 "description" : "Anyone can access that, because we need that list for the login box (before the user is authenticated).",
23094 "user" : "world"
23095 },
56122987 23096 "returns" : {
56122987
DM
23097 "items" : {
23098 "properties" : {
7aacca6f
DM
23099 "comment" : {
23100 "optional" : 1,
23101 "type" : "string"
23102 },
56122987
DM
23103 "realm" : {
23104 "type" : "string"
23105 },
23106 "tfa" : {
7aacca6f 23107 "description" : "Two-factor authentication provider.",
56122987
DM
23108 "enum" : [
23109 "yubico",
23110 "oath"
23111 ],
44660702
DM
23112 "optional" : 1,
23113 "type" : "string"
56122987
DM
23114 }
23115 },
23116 "type" : "object"
44660702
DM
23117 },
23118 "links" : [
23119 {
23120 "href" : "{realm}",
23121 "rel" : "child"
23122 }
23123 ],
23124 "type" : "array"
23125 }
56122987
DM
23126 },
23127 "POST" : {
7aacca6f 23128 "description" : "Add an authentication server.",
44660702 23129 "method" : "POST",
7aacca6f 23130 "name" : "create",
56122987 23131 "parameters" : {
44660702 23132 "additionalProperties" : 0,
56122987 23133 "properties" : {
44660702
DM
23134 "base_dn" : {
23135 "description" : "LDAP base domain name",
56122987 23136 "maxLength" : 256,
44660702
DM
23137 "optional" : 1,
23138 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
7aacca6f 23139 "type" : "string"
56122987 23140 },
4bd7df8b
DM
23141 "bind_dn" : {
23142 "description" : "LDAP bind domain name",
23143 "maxLength" : 256,
23144 "optional" : 1,
23145 "pattern" : "\\w+=[^,]+(,\\s*\\w+=[^,]+)*",
23146 "type" : "string"
23147 },
44660702
DM
23148 "comment" : {
23149 "description" : "Description.",
23150 "maxLength" : 4096,
56122987 23151 "optional" : 1,
44660702 23152 "type" : "string"
56122987 23153 },
44660702
DM
23154 "default" : {
23155 "description" : "Use this as default realm",
7aacca6f 23156 "optional" : 1,
44660702 23157 "type" : "boolean"
56122987 23158 },
44660702
DM
23159 "domain" : {
23160 "description" : "AD domain name",
23161 "maxLength" : 256,
7aacca6f 23162 "optional" : 1,
44660702
DM
23163 "pattern" : "\\S+",
23164 "type" : "string"
56122987 23165 },
7aacca6f 23166 "port" : {
44660702 23167 "description" : "Server port.",
7aacca6f 23168 "maximum" : 65535,
44660702 23169 "minimum" : 1,
7aacca6f 23170 "optional" : 1,
4bd7df8b
DM
23171 "type" : "integer",
23172 "typetext" : "integer (1-65535)"
56122987 23173 },
44660702
DM
23174 "realm" : {
23175 "description" : "Authentication domain ID",
23176 "format" : "pve-realm",
23177 "maxLength" : 32,
23178 "type" : "string"
23179 },
23180 "secure" : {
23181 "description" : "Use secure LDAPS protocol.",
7aacca6f 23182 "optional" : 1,
44660702 23183 "type" : "boolean"
56122987 23184 },
44660702
DM
23185 "server1" : {
23186 "description" : "Server IP address (or DNS name)",
23187 "format" : "address",
23188 "maxLength" : 256,
23189 "optional" : 1,
23190 "type" : "string"
56122987 23191 },
44660702
DM
23192 "server2" : {
23193 "description" : "Fallback Server IP address (or DNS name)",
23194 "format" : "address",
7aacca6f 23195 "maxLength" : 256,
7aacca6f 23196 "optional" : 1,
44660702 23197 "type" : "string"
7aacca6f 23198 },
44660702
DM
23199 "tfa" : {
23200 "description" : "Use Two-factor authentication.",
23201 "format" : "pve-tfa-config",
23202 "maxLength" : 128,
23203 "optional" : 1,
23204 "type" : "string"
23205 },
23206 "type" : {
23207 "description" : "Realm type.",
23208 "enum" : [
23209 "ad",
23210 "ldap",
23211 "pam",
23212 "pve"
23213 ],
23214 "type" : "string"
23215 },
23216 "user_attr" : {
23217 "description" : "LDAP user attribute name",
7aacca6f 23218 "maxLength" : 256,
7aacca6f 23219 "optional" : 1,
44660702
DM
23220 "pattern" : "\\S{2,}",
23221 "type" : "string"
7aacca6f
DM
23222 }
23223 },
7aacca6f 23224 "type" : "object"
56122987 23225 },
7aacca6f
DM
23226 "permissions" : {
23227 "check" : [
23228 "perm",
23229 "/access/realm",
23230 [
23231 "Realm.Allocate"
23232 ]
23233 ]
44660702
DM
23234 },
23235 "protected" : 1,
23236 "returns" : {
23237 "type" : "null"
7aacca6f 23238 }
56122987 23239 }
7aacca6f 23240 },
44660702 23241 "leaf" : 0,
56122987 23242 "path" : "/access/domains",
44660702 23243 "text" : "domains"
56122987
DM
23244 },
23245 {
56122987 23246 "info" : {
44660702
DM
23247 "GET" : {
23248 "description" : "Dummy. Useful for formaters which want to priovde a login page.",
23249 "method" : "GET",
23250 "name" : "get_ticket",
23251 "parameters" : {
23252 "additionalProperties" : 0
23253 },
23254 "permissions" : {
23255 "user" : "world"
23256 },
23257 "returns" : {
23258 "type" : "null"
23259 }
23260 },
56122987 23261 "POST" : {
44660702 23262 "description" : "Create or verify authentication ticket.",
56122987 23263 "method" : "POST",
44660702
DM
23264 "name" : "create_ticket",
23265 "parameters" : {
23266 "additionalProperties" : 0,
56122987 23267 "properties" : {
44660702
DM
23268 "otp" : {
23269 "description" : "One-time password for Two-factor authentication.",
7aacca6f
DM
23270 "optional" : 1,
23271 "type" : "string"
56122987 23272 },
7aacca6f
DM
23273 "password" : {
23274 "description" : "The secret password. This can also be a valid ticket.",
23275 "type" : "string"
23276 },
44660702
DM
23277 "path" : {
23278 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
7aacca6f 23279 "maxLength" : 64,
56122987 23280 "optional" : 1,
56122987 23281 "requires" : "privs",
44660702
DM
23282 "type" : "string"
23283 },
23284 "privs" : {
7aacca6f 23285 "description" : "Verify ticket, and check if user have access 'privs' on 'path'",
44660702
DM
23286 "format" : "pve-priv-list",
23287 "maxLength" : 64,
56122987 23288 "optional" : 1,
44660702
DM
23289 "requires" : "path",
23290 "type" : "string"
56122987
DM
23291 },
23292 "realm" : {
56122987 23293 "description" : "You can optionally pass the realm using this parameter. Normally the realm is simply added to the username <username>@<relam>.",
44660702 23294 "format" : "pve-realm",
7aacca6f 23295 "maxLength" : 32,
44660702
DM
23296 "optional" : 1,
23297 "type" : "string"
56122987
DM
23298 },
23299 "username" : {
23300 "description" : "User name",
44660702
DM
23301 "maxLength" : 64,
23302 "type" : "string"
56122987 23303 }
44660702 23304 }
7aacca6f 23305 },
56122987 23306 "permissions" : {
44660702 23307 "description" : "You need to pass valid credientials.",
56122987
DM
23308 "user" : "world"
23309 },
44660702 23310 "protected" : 1,
7aacca6f 23311 "returns" : {
56122987 23312 "properties" : {
44660702
DM
23313 "CSRFPreventionToken" : {
23314 "optional" : 1,
23315 "type" : "string"
56122987 23316 },
44660702
DM
23317 "ticket" : {
23318 "optional" : 1,
23319 "type" : "string"
23320 },
23321 "username" : {
56122987
DM
23322 "type" : "string"
23323 }
23324 },
44660702 23325 "type" : "object"
7aacca6f 23326 }
7aacca6f
DM
23327 }
23328 },
44660702
DM
23329 "leaf" : 1,
23330 "path" : "/access/ticket",
23331 "text" : "ticket"
7aacca6f 23332 },
56122987 23333 {
56122987 23334 "info" : {
7aacca6f 23335 "PUT" : {
44660702 23336 "description" : "Change user password.",
7aacca6f 23337 "method" : "PUT",
44660702 23338 "name" : "change_passsword",
56122987
DM
23339 "parameters" : {
23340 "additionalProperties" : 0,
23341 "properties" : {
44660702
DM
23342 "password" : {
23343 "description" : "The new password.",
23344 "maxLength" : 64,
23345 "minLength" : 5,
23346 "type" : "string"
7aacca6f 23347 },
44660702
DM
23348 "userid" : {
23349 "description" : "User ID",
23350 "format" : "pve-userid",
23351 "maxLength" : 64,
7aacca6f 23352 "type" : "string"
56122987 23353 }
7aacca6f 23354 }
56122987
DM
23355 },
23356 "permissions" : {
23357 "check" : [
44660702 23358 "or",
56122987 23359 [
44660702
DM
23360 "userid-param",
23361 "self"
23362 ],
23363 [
23364 "and",
23365 [
23366 "userid-param",
23367 "Realm.AllocateUser"
23368 ],
23369 [
23370 "userid-group",
23371 [
23372 "User.Modify"
23373 ]
23374 ]
56122987 23375 ]
7aacca6f 23376 ],
44660702 23377 "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 23378 },
44660702 23379 "protected" : 1,
7aacca6f
DM
23380 "returns" : {
23381 "type" : "null"
44660702
DM
23382 }
23383 }
23384 },
23385 "leaf" : 1,
23386 "path" : "/access/password",
23387 "text" : "password"
23388 }
23389 ],
23390 "info" : {
23391 "GET" : {
23392 "description" : "Directory index.",
23393 "method" : "GET",
23394 "name" : "index",
23395 "parameters" : {
23396 "additionalProperties" : 0
23397 },
23398 "permissions" : {
23399 "user" : "all"
23400 },
23401 "returns" : {
23402 "items" : {
23403 "properties" : {
23404 "subdir" : {
23405 "type" : "string"
23406 }
7aacca6f 23407 },
44660702
DM
23408 "type" : "object"
23409 },
23410 "links" : [
23411 {
23412 "href" : "{subdir}",
23413 "rel" : "child"
23414 }
23415 ],
23416 "type" : "array"
23417 }
23418 }
23419 },
23420 "leaf" : 0,
23421 "path" : "/access",
23422 "text" : "access"
23423 },
23424 {
23425 "children" : [
23426 {
23427 "info" : {
23428 "DELETE" : {
7aacca6f 23429 "description" : "Delete pool.",
44660702
DM
23430 "method" : "DELETE",
23431 "name" : "delete_pool",
7aacca6f
DM
23432 "parameters" : {
23433 "additionalProperties" : 0,
23434 "properties" : {
23435 "poolid" : {
23436 "format" : "pve-poolid",
23437 "type" : "string"
23438 }
23439 }
23440 },
56122987
DM
23441 "permissions" : {
23442 "check" : [
23443 "perm",
23444 "/pool/{poolid}",
23445 [
23446 "Pool.Allocate"
23447 ]
44660702
DM
23448 ],
23449 "description" : "You can only delete empty pools (no members)."
23450 },
23451 "protected" : 1,
23452 "returns" : {
23453 "type" : "null"
7aacca6f
DM
23454 }
23455 },
23456 "GET" : {
23457 "description" : "Get pool configuration.",
44660702 23458 "method" : "GET",
7aacca6f 23459 "name" : "read_pool",
56122987 23460 "parameters" : {
44660702 23461 "additionalProperties" : 0,
56122987
DM
23462 "properties" : {
23463 "poolid" : {
44660702
DM
23464 "format" : "pve-poolid",
23465 "type" : "string"
56122987 23466 }
44660702 23467 }
56122987 23468 },
56122987 23469 "permissions" : {
56122987
DM
23470 "check" : [
23471 "perm",
23472 "/pool/{poolid}",
23473 [
23474 "Pool.Allocate"
23475 ]
23476 ]
23477 },
7aacca6f 23478 "returns" : {
44660702 23479 "additionalProperties" : 0,
56122987 23480 "properties" : {
44660702
DM
23481 "comment" : {
23482 "optional" : 1,
23483 "type" : "string"
23484 },
7aacca6f 23485 "members" : {
7aacca6f
DM
23486 "items" : {
23487 "additionalProperties" : 1,
7aacca6f 23488 "properties" : {
7aacca6f
DM
23489 "id" : {
23490 "type" : "string"
23491 },
23492 "node" : {
23493 "type" : "string"
23494 },
44660702
DM
23495 "storage" : {
23496 "optional" : 1,
23497 "type" : "string"
23498 },
7aacca6f 23499 "type" : {
7aacca6f
DM
23500 "enum" : [
23501 "qemu",
23502 "lxc",
23503 "openvz",
23504 "storage"
44660702
DM
23505 ],
23506 "type" : "string"
23507 },
23508 "vmid" : {
23509 "optional" : 1,
23510 "type" : "integer"
7aacca6f 23511 }
44660702
DM
23512 },
23513 "type" : "object"
23514 },
23515 "type" : "array"
23516 }
23517 },
23518 "type" : "object"
23519 }
23520 },
23521 "PUT" : {
23522 "description" : "Update pool data.",
23523 "method" : "PUT",
23524 "name" : "update_pool",
23525 "parameters" : {
23526 "additionalProperties" : 0,
23527 "properties" : {
56122987
DM
23528 "comment" : {
23529 "optional" : 1,
23530 "type" : "string"
44660702
DM
23531 },
23532 "delete" : {
23533 "description" : "Remove vms/storage (instead of adding it).",
23534 "optional" : 1,
23535 "type" : "boolean"
23536 },
23537 "poolid" : {
23538 "format" : "pve-poolid",
23539 "type" : "string"
23540 },
23541 "storage" : {
23542 "description" : "List of storage IDs.",
23543 "format" : "pve-storage-id-list",
23544 "optional" : 1,
23545 "type" : "string"
23546 },
23547 "vms" : {
23548 "description" : "List of virtual machines.",
23549 "format" : "pve-vmid-list",
23550 "optional" : 1,
23551 "type" : "string"
56122987 23552 }
44660702
DM
23553 }
23554 },
23555 "permissions" : {
23556 "check" : [
23557 "perm",
23558 "/pool/{poolid}",
23559 [
23560 "Pool.Allocate"
23561 ]
23562 ],
23563 "description" : "You also need the right to modify permissions on any object you add/delete."
23564 },
23565 "protected" : 1,
23566 "returns" : {
23567 "type" : "null"
56122987
DM
23568 }
23569 }
23570 },
44660702
DM
23571 "leaf" : 1,
23572 "path" : "/pools/{poolid}",
7aacca6f 23573 "text" : "{poolid}"
56122987 23574 }
7aacca6f 23575 ],
56122987
DM
23576 "info" : {
23577 "GET" : {
44660702
DM
23578 "description" : "Pool index.",
23579 "method" : "GET",
23580 "name" : "index",
23581 "parameters" : {
23582 "additionalProperties" : 0
23583 },
23584 "permissions" : {
23585 "description" : "List all pools where you have Pool.Allocate or VM.Allocate permissions on /pool/<pool>.",
23586 "user" : "all"
23587 },
56122987 23588 "returns" : {
44660702
DM
23589 "items" : {
23590 "properties" : {
23591 "poolid" : {
23592 "type" : "string"
23593 }
56122987 23594 },
44660702
DM
23595 "type" : "object"
23596 },
23597 "links" : [
23598 {
23599 "href" : "{poolid}",
23600 "rel" : "child"
23601 }
23602 ],
23603 "type" : "array"
23604 }
23605 },
23606 "POST" : {
23607 "description" : "Create new pool.",
23608 "method" : "POST",
23609 "name" : "create_pool",
23610 "parameters" : {
23611 "additionalProperties" : 0,
23612 "properties" : {
23613 "comment" : {
23614 "optional" : 1,
56122987 23615 "type" : "string"
7aacca6f 23616 },
44660702
DM
23617 "poolid" : {
23618 "format" : "pve-poolid",
7aacca6f 23619 "type" : "string"
56122987
DM
23620 }
23621 }
23622 },
56122987 23623 "permissions" : {
44660702
DM
23624 "check" : [
23625 "perm",
23626 "/pool/{poolid}",
23627 [
23628 "Pool.Allocate"
23629 ]
23630 ]
56122987 23631 },
44660702
DM
23632 "protected" : 1,
23633 "returns" : {
23634 "type" : "null"
23635 }
23636 }
23637 },
23638 "leaf" : 0,
23639 "path" : "/pools",
23640 "text" : "pools"
23641 },
23642 {
23643 "info" : {
23644 "GET" : {
23645 "description" : "API version details. The result also includes the global datacenter confguration.",
23646 "method" : "GET",
23647 "name" : "version",
7aacca6f
DM
23648 "parameters" : {
23649 "additionalProperties" : 0
23650 },
44660702
DM
23651 "permissions" : {
23652 "user" : "all"
23653 },
23654 "returns" : {
23655 "properties" : {
23656 "release" : {
23657 "type" : "string"
23658 },
23659 "repoid" : {
23660 "type" : "string"
23661 },
23662 "version" : {
23663 "type" : "string"
23664 }
23665 },
23666 "type" : "object"
23667 }
56122987
DM
23668 }
23669 },
44660702
DM
23670 "leaf" : 1,
23671 "path" : "/version",
56122987
DM
23672 "text" : "version"
23673 }
23674]
23675;
23676