diff --git a/qm.adoc b/qm.adoc index 539912a..f17cee9 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1253,40 +1253,40 @@ resources. If desired, a value of '0' for `max_bytes` can be used to disable all limits. [[qm_virtiofs]] -Virtio-fs -~~~~~~~~~ +Virtiofs +~~~~~~~~ -Virtio-fs is a shared filesystem designed for virtual environments. It allows to +Virtiofs is a shared filesystem designed for virtual environments. It allows to share a directory tree available on the host by mounting it within VMs. It does not use the network stack and aims to offer similar performance and semantics as the source filesystem. -To use virtio-fs, the https://gitlab.com/virtio-fs/virtiofsd[virtiofsd] daemon +To use virtiofs, the https://gitlab.com/virtio-fs/virtiofsd[virtiofsd] daemon needs to run in the background. This happens automatically in {pve} when -starting a VM using a virtio-fs mount. +starting a VM using a virtiofs mount. -Linux VMs with kernel >=5.4 support virtio-fs by default +Linux VMs with kernel >=5.4 support virtiofs by default (https://www.kernelconfig.io/CONFIG_VIRTIO_FS[virtiofs kernel module]), but some features require a newer kernel. There is a https://github.com/virtio-win/kvm-guest-drivers-windows/wiki/Virtiofs:-Shared-file-system[guide] -available on how to utilize virtio-fs in Windows VMs. +available on how to utilize virtiofs in Windows VMs. Known Limitations ^^^^^^^^^^^^^^^^^ * If virtiofsd crashes, its mount point will hang in the VM until the VM -is completely stopped. + is completely stopped. * virtiofsd not responding may result in a hanging mount in the VM, similar to -an unreachable NFS. -* Memory hotplug does not work in combination with virtio-fs (also results in -hanging access). + an unreachable NFS. +* Memory hotplug does not work in combination with virtiofs (also results in + hanging access). * Memory related features such as live migration, snapshots, and hibernate are -not available with virtio-fs devices. -* Windows cannot understand ACLs in the context of virtio-fs. Therefore, do not -expose ACLs for Windows VMs, otherwise the virtio-fs device will not be -visible within the VM. + not available with virtiofs devices. +* Windows cannot understand ACLs in the context of virtiofs. Therefore, do not + expose ACLs for Windows VMs, otherwise the virtiofs device will not be visible + within the VM. Add Mapping for Shared Directories ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -1300,10 +1300,10 @@ pvesh create /cluster/mapping/dir --id dir1 \ --map node=node2,path=/path/to/share2 \ ---- -Add virtio-fs to a VM -^^^^^^^^^^^^^^^^^^^^^ +Add virtiofs to a VM +^^^^^^^^^^^^^^^^^^^^ -To share a directory using virtio-fs, add the parameter `virtiofs` (N can be +To share a directory using virtiofs, add the parameter `virtiofs` (N can be anything between 0 and 9) to the VM config and use a directory ID (dirid) that has been configured in the resource mapping. Additionally, you can set the `cache` option to either `always`, `never`, `metadata`, or `auto` (default: @@ -1311,7 +1311,7 @@ has been configured in the resource mapping. Additionally, you can set the can be read https://lwn.net/Articles/774495/[here under the "Caching Modes" section]. To enable writeback cache set `writeback` to `1`. -Virtiofsd supports ACL and xattr passthrough (can be enabled with the +The `virtiofsd` supports ACL and xattr passthrough (can be enabled with the `expose-acl` and `expose-xattr` options), allowing the guest to access ACLs and xattrs if the underlying host filesystem supports them, but they must also be compatible with the guest filesystem (for example most Linux filesystems support @@ -1320,7 +1320,7 @@ ACLs, while Windows filesystems do not). The `expose-acl` option automatically implies `expose-xattr`, that is, it makes no difference if you set `expose-xattr` to `0` if `expose-acl` is set to `1`. -If you want virtio-fs to honor the `O_DIRECT` flag, you can set the `direct-io` +If you want virtiofs to honor the `O_DIRECT` flag, you can set the `direct-io` parameter to `1` (default: `0`). This will degrade performance, but is useful if applications do their own caching. @@ -1330,7 +1330,7 @@ qm set -virtiofs1 ,cache=never,expose-xattr=1 qm set -virtiofs2 ,expose-acl=1,writeback=1 ---- -To temporarily mount virtio-fs in a guest VM with the Linux kernel virtio-fs +To temporarily mount virtiofs in a guest VM with the Linux kernel virtiofs driver, run the following command inside the guest: ----