Virtio-fs, shorts for Virtio shared FileSystem, allows for a directory located on the host to be shared with a guest.
It is designed to be fast and optimized for local usage, when the host and the guest are located on the same physical machine. It is therefore a perfect fit for Phyllome OS.
Just as with other
virtio-fs requires specialized drivers to be written for the host and the guest operating system.
For KVM/QEMU, as of January 2023, virtio-fs is only available for virtual machines managed by the system libvirt instance (
As of January 2023,
virtio-fsdoes not support read-only mode, meaning a guest will be able to write to the host's folder.
<domain type="kvm"> [...] <memoryBacking> <source type="memfb"/> <access mode="shared/>" </memoryBacking> [...] </domain>
/opt/share/will be shared with the guest:
<domain type="kvm"> [...] <devices> [...] <filesystem type="mount" accessmode="passthrough"> <driver type="virtiofs"/> <source dir="/opt/share"> # The host directory to be shared with the guest <target dir="share"> # The target dir value refers to the mount tag used inside the guest, not the target dir inside the guest </filesystem> [...] </devices> [...] </domain>
/opt/sharehost directory to the guest, using also the
# mount -t virtiofs share /mnt/
share /mnt/ virtiofs rw,noatime,_netdev 0 2
# umount /mnt/ && systemctl daemon-reload
# mount -all