docs: create gofurther/virtiofs

This commit is contained in:
lukas 2022-08-13 00:16:19 +00:00
parent 03fc04a8dd
commit 29c1ff9d95

44
gofurther/virtiofs.md Normal file
View File

@ -0,0 +1,44 @@
---
title: Share a host directory with a guest using virtiofs
description:
published: true
date: 2022-08-13T00:16:17.437Z
tags:
editor: markdown
dateCreated: 2022-08-13T00:16:17.437Z
---
# virtio-fs
*to-be done*
* Memory backing needs to be added:
```
<domain type="kvm">
[...]
<memoryBacking>
<source type="memfb"/>
<access mode="shared/>"
</memoryBacking>
[...]
</domain>
```
* Then a a directory can be shared using the following definition:
```
<domain type="kvm">
[...]
<devices>
[...]
<filesystem type="mount" accessmode="passthrough">
<driver type="virtiofs"/>
<source dir="/mnt/"> # Host directory to be shared with the guest
<target dir="/mnt"/> # Directory on the guest
</filesystem>
[...]
</devices>
[...]
</domain>
```