Commit 9772b9c
committed
Allow writable
Binaries in the uVM can require writing to (or be configured by) files
in `/var` (or `/etc`, respectively).
An LCOW uVM VHD-backed rootfs, however, is readonly (as opposed to
WCOW, which creates a new snapshot and therefor scratch VHD per uVM).
Remedy this by creating `overlay` mounts for the two directories,
enabled by the `/init` flag `-w`.
Use `overlay` instead of creating a `tmpfs` mount directly over the
directories (which is done for `/run` and `/tmp`) to preserve existing
content in the rootfs.
Add a new `WritableOverlayDirs` annotation to enable the feature.
Make the annotation internal (unpublished) since:
- it is implementation dependent (i.e., how LCOW uVMs are run could
conceivably change in the future); and
- the feature is aimed at more advanced use cases where users are
modifying the LCOW uVMs rootfs and should be familiar with
`hcshims`'s inner workings
Signed-off-by: Hamza El-Saawy <[email protected]>/var and /etc directories1 parent 296144f commit 9772b9c
File tree
6 files changed
+306
-18
lines changed- init
- internal
- annotations
- oci
- uvm
- test
- functional
- internal/cmd
6 files changed
+306
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
141 | 188 | | |
142 | 189 | | |
143 | 190 | | |
| |||
592 | 639 | | |
593 | 640 | | |
594 | 641 | | |
| 642 | + | |
| 643 | + | |
595 | 644 | | |
596 | 645 | | |
597 | 646 | | |
| |||
637 | 686 | | |
638 | 687 | | |
639 | 688 | | |
640 | | - | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
641 | 692 | | |
642 | 693 | | |
643 | 694 | | |
644 | 695 | | |
| 696 | + | |
645 | 697 | | |
646 | 698 | | |
647 | 699 | | |
648 | 700 | | |
649 | 701 | | |
650 | 702 | | |
651 | | - | |
| 703 | + | |
652 | 704 | | |
653 | | - | |
| 705 | + | |
654 | 706 | | |
655 | 707 | | |
656 | 708 | | |
657 | | - | |
| 709 | + | |
658 | 710 | | |
659 | 711 | | |
660 | 712 | | |
| |||
666 | 718 | | |
667 | 719 | | |
668 | 720 | | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
669 | 725 | | |
670 | 726 | | |
671 | 727 | | |
| |||
702 | 758 | | |
703 | 759 | | |
704 | 760 | | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
705 | 768 | | |
706 | 769 | | |
707 | 770 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| |||
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
333 | | - | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
579 | 580 | | |
580 | 581 | | |
581 | 582 | | |
582 | | - | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
| |||
868 | 871 | | |
869 | 872 | | |
870 | 873 | | |
871 | | - | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
872 | 883 | | |
873 | 884 | | |
874 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
875 | 888 | | |
876 | 889 | | |
877 | 890 | | |
| |||
915 | 928 | | |
916 | 929 | | |
917 | 930 | | |
918 | | - | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
919 | 934 | | |
920 | 935 | | |
921 | 936 | | |
| |||
960 | 975 | | |
961 | 976 | | |
962 | 977 | | |
963 | | - | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
964 | 984 | | |
965 | 985 | | |
966 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
967 | 992 | | |
968 | 993 | | |
969 | 994 | | |
| |||
972 | 997 | | |
973 | 998 | | |
974 | 999 | | |
975 | | - | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
976 | 1003 | | |
977 | 1004 | | |
978 | 1005 | | |
| |||
0 commit comments