How to map a Linux host dir to a Win11 guest with QEMU?

I’ve recently switched from VirtualBox to QEMU to run a WIndows guest VM (you can follow the saga here :wink: )

I am trying to map a folder from my Linux host to Win11 guest. I’ve googled about it, and realized I could do it either through Samba or through VirtIO FS. I decided to try the latter to avoid having to enable samba just for that.

VirtIO FS is installed on Win11, but for some reason the service cannot start. The error WIn11 Service Manager prints is "Error 1053: The service did not respond to the start or control request in a timely fashion". I tried setting ServicesPipeTimeout on Windows registry (ah, WIndows… :roll_eyes: ) to 60000 (60s), but it did not help, so I suspect the problem isn’t really the timing, something else is wrong.

Anyone knows how to make this work? Any tips will be much appreciated.

The problem can be caused by incorrect permissions or SElinux labels.
When I tested filesystem sharing last time, it worked for me like this:
Virt-manager and shared folder host/guest permission issue? - #5 by vgaetera

1 Like

According to the VirtIO-FS Docs you need to install a Windows File System Proxy. If you did that and it’s still not working my questions would be:

  1. Have you been able to try the same steps on a Windows 10 guest? Maybe 11 has some new thing causing issues with the driver?

  2. Doing everything in QEMU with Virsh can get rather complicated. Did you create the share and everything from the CLI? If so I’d recommend installing Virtual Machine Manager, and checking your settings via this guide.

  3. In a terminal, run sudo tail -f /var/log/audit/audit.log while you try to start the service in the guest and see if selinux is complaining.

1 Like

Thanks @vgaetera and @alys for jumping in.

@alys I thought I had done this during installation when I installed VirtIO drivers, because VirtIO FS Service is installed. But looking back more closely I can see now that they are different things, and I had skipped that part.

I just installed WinFsp and apparently all went well, but for some reason it doesn’t show up on Device Manager as an option (under the Other Devices option). Maybe it’s because of Win11 (AFAICS it shouldn’t be).

I guess there is no point in digging through SELinux considering WinFsp can’t be installed properly, right?

And, yes, I am using virt-manager :wink:

Quick update: I don’t know exactly why, but I just booted up Win11 VM and I can now access the host dir as configured through virt-manager (it appears as a mounted drive), even though I could not follow WinFsp install instructions till the end :thinking:

Anyway, I posted a message on WinFsp Google Group to try to get some help from there as well. I will wait a little further to see if I realize what is happening before closing this thread as solved.