VirtioFS with WinFSP

129 views
Skip to first unread message

Chris B

unread,
Feb 18, 2023, 3:40:59 PM2/18/23
to WinFsp
Hi.

I am having some troubles and hoping I can get help, or maybe identify some discrepancies between documentation and what I'm seeing.

My setup:
- Fedora Linux host
- QEMU/KVM via Virtual Manager UI
- Windows 11 guest

In KVM, I added "hardware" of type FileSystem 
<filesystem type="mount" accessmode="passthrough">
  <driver type="virtiofs"/>
  <binary path="/usr/libexec/virtiofsd"/>
  <source dir="/home/chrisb/xxx"/>
  <target dir="xxx"/>
  <alias name="fs0"/>
  <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</filesystem>

In the Windows OS, I installed the Virtio guest software, and installed WinFSP.
Out of the box, after a reboot, it worked perfectly and I see a Z: showing what I expect in my "xxx" path.

Now, I simply wanted to add another mount, and here comes the trouble.

So I added another "hardware":
<filesystem type="mount" accessmode="passthrough">
  <driver type="virtiofs"/>
  <binary path="/usr/libexec/virtiofsd"/>
  <source dir="/home/chrisb"/>
  <target dir="home_chrisb"/>
  <alias name="fs1"/>
  <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
</filesystem>

I had the Win OS running while I added it, and as soon as I hit Apply, another drive of Y: appeared, however it was still mapping to the same location as the Z:.

After reboot, no more Y:, only the Z: was appearing.

So I tried following some documentation about having multiple mounts:

But when I get to the point of running these commands:
.\launchctl-x64.exe start virtiofs viofsY home_chrisb Y:
I get this error:  KO launcher: error 2

?

But, even in the WinFSP documentation, it says something like this:

Services that wish to be controlled by the WinFsp.Launcher must add themselves under the following registry key:

HKEY_LOCAL_MACHINE\Software\WinFsp\Services

However, after even uninstalling and re-installing a few times, this is the only thing in my registry for that section:
reg query HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\WinFsp
    InstallDir    REG_SZ    C:\Program Files (x86)\WinFsp\


There is no "Services" folder.


And back to the fact that Y: will not appear after reboots...  if in my KVM I remove the "hardware" that refers to my 2nd mount, and then re-add it while the VM is running, it again shows the Y: immediately, pointing to the same place as the Z:. But after reboot, only Z: shows up.

Chris B

unread,
Feb 18, 2023, 3:42:54 PM2/18/23
to WinFsp
I have this version installed:  WinFsp 2022.2  1.12.22301

And:  Virtio-win-guest-tools 0.1.225

Chris B

unread,
Feb 18, 2023, 4:22:54 PM2/18/23
to WinFsp
Looks like I missed a step, however still not working.

I missed to run this command:

"C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-t %1 -m %2"

And then when I ran these, they reported "OK" but no drives are mapped.
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsZ xxx Z:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsY home_chrisb Y:

Reply all
Reply to author
Forward
0 new messages