File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Shares
2
2
3
+ Persistent file-systems are provided by both volumes and
4
+ shares. Volumes are block devices inside the virtual machine, yielding
5
+ fast performance but mounted file-systems require exclusive
6
+ access. Shares allow mounting an arbitrary directory tree from the
7
+ host.
8
+
3
9
In ` microvm.shares ` elements the ` proto ` field allows either of two
4
10
values:
5
11
6
12
- ` 9p ` (default) is built into many hypervisors, allowing you to
7
13
quickly share a directory tree
8
14
9
- - ` virtiofs ` requires a separate virtiofsd service which is only
10
- started as a prerequisite when you start MicroVMs through a systemd
11
- service that comes with the ` microvm.nixosModules.host ` module.
15
+ - ` virtiofs ` requires a separate virtiofsd service which is started as
16
+ a prerequisite when you start MicroVMs through a systemd service
17
+ that comes with the ` microvm.nixosModules.host ` module.
18
+
19
+ If you want to run from the command-line, start ` bin/virtiofsd-run `
20
+ separately.
12
21
13
22
Expect ` virtiofs ` to yield better performance over ` 9p ` .
14
23
24
+ ``` nix
25
+ microvm.shares = [ {
26
+ proto = "virtiofs";
27
+ tag = "home";
28
+ # Source path can be absolute or relative
29
+ # to /var/lib/microvms/$hostName
30
+ source = "home";
31
+ mountPoint = "/home";
32
+ } ];
33
+ ```
34
+
15
35
<div class =" warning " >
16
36
When sharing a path that is on ZFS with virtiofs, the dataset must
17
37
have options
You can’t perform that action at this time.
0 commit comments