Trying to create any VM with a simple virtio-fs mount fails
Basic XML:
<filesystem type='mount' accessmode='passthrough'>
<driver type='virtiofs'/>
<binary path='/usr/libexec/virtiofsd' />
<source dir='/mnt/user/shared'/>
<target dir='shared_mount'/>
</filesystem>
QEMU logs:
virtio-fsd logs:
stefanha (QEMU person for this feature) said it was most likely because pivot_root doesn't work well under initramfs. QEMU 5.2 might mitigate this issue by adding a flags to use chroot instead (-o sandbox=chroot).
Defaulting this behavior would require creating a script like
exec /usr/libexec virtiofsd -o sandbox=chroot "$@"
stefanha also suggested unraid devs may want to contact virtio-fs developers in #virtio-fs on Freenode IRC or the
[email protected] mailing list (e.g. to see if there is any changes that can be made to unraid to fix pivot_root).