QEWMU/KVM NixOS guest file sharing: virtio-fs tag not found

Any fix, tips, or guidance on how to diagnose much appreciated.

  • I have a NixOS host and NixOS guest vm on the QEMU/KVM stack, unstable channel for both.
  • /mnt/raid/sync is a vaild path on the host and my user has permissions to it
  • This is the XML configuration:
    <filesystem type="mount" accessmode="passthrough">
      <driver type="virtiofs"/>
      <source dir="/mnt/raid/sync"/>
      <target dir="sync"/>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </filesystem>
  • /home/miscguy/sync is an empty directory on the guest
  • On the guest, I run sudo mount -t virtiofs sync /home/miscguy/sync and get the message:
mount: /home/miscguy/sync: wrong fs type, bad option, bad superblock on sync, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
  • dmesg tells me virtio-fs: tag <sync> not found
  • BTW, I’ve successfully shared folders with a Windows guest, so I think it’s a guest configuration issue, not a host problem
1 Like

I found the answer here: Virt-manager cannot find virtiofsd

I had to add the binary path to virtiofsd to the virtual filesystem configuration
<binary path="/run/current-system/sw/bin/virtiofsd"/>