Commit 9928550
Add ReadWriteMany (RWX) volume support via NFS
Introduce a volume access mode system with three modes:
- ReadWriteOnce (default): single rw or multiple ro, block-backed
- ReadOnlyMany: multiple ro only, block-backed
- ReadWriteMany: multiple rw/ro via NFS backing
NFS volumes don't create local disk images — they store server
connection details (server, export path, version, options) in
metadata and pass them through to the guest init config. The
guest mounts volumes via NFS instead of block devices.
Key changes:
- Volume domain types: AccessMode enum, NFSConfig struct
- Volume manager: RWX-aware attachment rules, NFS creation flow
- Instance layer: NFS config propagation, device count skip for NFS
- Guest config: "nfs"/"nfs_ro" mount modes with server details
- OpenAPI spec: access_mode, nfs fields on create/response
- Validation: NFS requires networking, no overlay for NFS volumes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0c34825 commit 9928550
File tree
12 files changed
+685
-341
lines changed- cmd/api/api
- lib
- instances
- oapi
- vmconfig
- volumes
12 files changed
+685
-341
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
56 | 76 | | |
| |||
61 | 81 | | |
62 | 82 | | |
63 | 83 | | |
64 | | - | |
| 84 | + | |
65 | 85 | | |
66 | 86 | | |
67 | 87 | | |
| |||
182 | 202 | | |
183 | 203 | | |
184 | 204 | | |
| 205 | + | |
185 | 206 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
191 | 227 | | |
192 | 228 | | |
193 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
104 | 123 | | |
105 | 124 | | |
106 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
426 | 427 | | |
427 | 428 | | |
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
431 | 448 | | |
432 | 449 | | |
433 | 450 | | |
| |||
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
447 | | - | |
| 464 | + | |
448 | 465 | | |
449 | 466 | | |
450 | 467 | | |
| |||
453 | 470 | | |
454 | 471 | | |
455 | 472 | | |
456 | | - | |
457 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
458 | 479 | | |
459 | 480 | | |
460 | 481 | | |
| |||
614 | 635 | | |
615 | 636 | | |
616 | 637 | | |
617 | | - | |
618 | | - | |
| 638 | + | |
| 639 | + | |
619 | 640 | | |
620 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
621 | 645 | | |
622 | 646 | | |
623 | 647 | | |
| |||
628 | 652 | | |
629 | 653 | | |
630 | 654 | | |
631 | | - | |
| 655 | + | |
632 | 656 | | |
633 | 657 | | |
634 | 658 | | |
| |||
648 | 672 | | |
649 | 673 | | |
650 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
651 | 680 | | |
652 | 681 | | |
653 | 682 | | |
| |||
765 | 794 | | |
766 | 795 | | |
767 | 796 | | |
768 | | - | |
| 797 | + | |
769 | 798 | | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
770 | 802 | | |
771 | 803 | | |
772 | 804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
0 commit comments