Virt-manager Windows 10 guest shared folder

I like the simplicity of Gnome Boxes. I am interested in using a Windows 10 guest. With Spice Tools, USB redirection, shared folders work fine. But USB redirection did not work for redirecting WACOM Tablet that I connected to my laptop. Gnome Boxes does not have much setting options to play with. Does anyone know how I use WACOM tablet in Windows Guest with Gnome Boxes? That will be the most desirable solution. But my hopes are low.

So I started exploring Virt-Manager. Wacom tablet was easy to passthrough to the Windows guest. But I am struggling to get shared folders working with virt-manager. I found Unable to share folder with virt-manager/qemu question which is the most relevant. But the OP of that question seems much more knowledgeable and has skipped some steps about his Samba set up etc. Plus he creates a new user for Samba sharing which I want to avoid. I did SE Linux setting changes etc. But when I try to connect the shared folder from Windows guest, it says that the path is invalid. Is there an updated guide for setting up Samba share with Windows guest in virt-manager?

EDIT: To clarify the steps that I have tried

  1. I want to share /home/$USER/Documents directory as a Samba shared directory to be accessible from Windows Guest
  2. My smb.conf is based on this (with appropriate path for the shared directory)
        # line 7 : add (set charset)
        unix charset = UTF-8
        # change (Windows default)
        workgroup = WORKGROUP
        security = user
        # add (IP addresses you allow to access)
        hosts allow = 127. 10.0.0. 
        # add (no authentication)
        map to guest = Bad User


# add to the end
# any Share name you like
        # specify shared directory
        path = /path/to/dir
        # allow writing
        writable = yes
        # allow guest user (nobody)
        guest ok = yes
        # looks all as guest user
        guest only = yes
        # set permission [777] when file created
        force create mode = 777
        # set permission [777] when folder created
        force directory mode = 777 
  1. I set up the SE Linux policy for the samba shares
[root@localhost ~]#  setsebool -P samba_enable_home_dirs on
[root@localhost ~]#  semanage fcontext -a -t samba_share_t "/path/to/dir(/.*)?"
[root@localhost ~]#  restorecon -R /path/to/dir
  1. I also modified firewall to allow connections to the Samba server
[root@localhost ~]# firewall-cmd --add-service=samba --permanent
[root@localhost ~]# firewall-cmd --reload 
  1. I also did setfacl "user:$USER:X,group:$GROUP:X" /path/to/dir.
  2. I also set up smbpasswd -a $USER.
  3. When I check from nautilus Other locations -> smb://localhost.localdomain/Share, I am able to access the directory as a network location. But when I try to access it from within the Windows guest, it tells me the path is invalid.


Which password are you using? You shouldn’t use the user’s password, but the password set this way:

sudo smbpasswd -a $USER

Thank you for the reply. Just to avoid this issue, I set the same password for the smbpasswd command as the user’s password.

I found out the problem. There is a problem in firewall settings in the Windows guest which was preventing connection to the shared directory. I turned off Firewall in the guest and I was able to access the shared folder.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.