Creating shared folder on fedora workstation

i have installed windowsfsp and virtiodrivers in my guest windows vm on virtual machine manager and have also enabled shared memory however i am unable to create shared folder access

I have also excecuted
chmod -R a+x /home/saleeshsuresheyyani/Desktop/windowshare

The interface to share data between Windows and Linux is Samba. Did you configure it?

1 Like

I did not configure samba yet. thank you for the infor. i will try that. So I will try samba without removing virtio fs and winfs

You do not need Samba to share a directory from your Linux host to a Windows guest.

Your original post has very little details on what you already did but you do mention a couple of key steps. I think the missing step is in the services that are (not) started automatically in the VM. (As constructive criticism: the more detailed steps you provide, the easier it is for people to help you without having to guess what the problem is.). In general, to enable virtiofs directory sharing in virt-manager for a Window VM:

  1. Add a “Filesystem” device to your VM (from your post, you have already done this)
    a. Select “virtiofs”, the source path on your host and the destination path in the VM (for Windows, this is only a name that is shown next to the drive letter, IIRC)
    b. At this point, you should get a popup to enable shared memory for this VM if you haven’t already (again, as per your post, you should have this enabled)
  2. In the Windows VM, install necessary drivers
    a. virtio drivers, in particular for virtiofs (this one you didn’t mention)
    b. WinFSP (this one you did)
  3. Still in the Windows VM, ensure that the necessary services are started automatically:
    a. WinFsp.Launcher: this should be set to start automatically by the WinFSP installer, it doesn’t hurt to double-check.
    b. VirtIO-FS Service: This is the problematic one, IIRC. This is what actually mounts the “Filesystem” device to a drive letter in Windows and it is set to “manual” start by the installer. You can start it once to check and then set it to “automatic” to have it available after a reboot of the VM

Please note that you will get SELinux AVC denials when accessing the shared directory from inside the VM. You can either put the shared directory in one of a number of special paths in your home as described in comment 2 in that bug or you can relabel the shared directory with the svirt_image_t label to get rid of these denials (using the path from your original post):

> sudo semanage fcontext -a -t svirt_image_t "/home/saleeshsuresheyyani/Desktop/windowshare(/.*)?"
> sudo restorecon -Rv /home/saleeshsuresheyyani/Desktop/windowshare

Kudos to Steve for pointing out these solutions in that bug report.