virtcontainers: 9p: shares multiple devices with only one export

Use 'remap' behaviour to deal with multiple devices being shared with
a 9p export.

Fixes the following warning:

```
9p: Multiple devices detected in same VirtFS export, which might lead to file
ID collisions and severe misbehaviours on guest!
You should either use a separate export for each device shared from host or
use virtfs option 'multidevs=remap'!
```

fixes #378

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes 2020-07-24 13:26:56 -05:00
parent 17fe0104a4
commit 3c415d93fe
3 changed files with 3 additions and 0 deletions

View File

@ -460,6 +460,7 @@ func generic9PVolume(volume types.Volume, nestedRun bool) govmmQemu.FSDevice {
MountTag: volume.MountTag,
SecurityModel: govmmQemu.None,
DisableModern: nestedRun,
Multidev: govmmQemu.Remap,
}
}

View File

@ -329,6 +329,7 @@ func TestQemuArchBaseAppend9PVolume(t *testing.T) {
Path: hostPath,
MountTag: mountTag,
SecurityModel: govmmQemu.None,
Multidev: govmmQemu.Remap,
},
}

View File

@ -211,6 +211,7 @@ func TestQemuAddDeviceFsDev(t *testing.T) {
Path: hostPath,
MountTag: mountTag,
SecurityModel: govmmQemu.None,
Multidev: govmmQemu.Remap,
},
}