This post introduced how to share linux folder to Windows guest VM


  1. Install samba (QEMU bring it up automatically actually according to ArchWiki)

  2. Add xmlns:qemu='' to root <domain> node

  3. Add child XML node

         <qemu:arg value='-net'/>
         <qemu:arg value='user,smb=/path/to/shared/directory'/>
  4. Poweroff VM (DON’T restart)

  5. Poweron it

  6. ps -ef | grep qemu should show the -net user,smb=.... argument now

  7. Open samba share from windows

  8. Ref:


smbd not start (Fixed in QEMU 2.x): Debian Bug tracker - samba4 does not work with qemu
ACL issue:
QEMU smb option:


I didn’t succeed to make smbd auto-start with qemu process till the end, so I use regular /etc/samba/smb.conf to start a standalone samba server which managed by systemd to make this work.

Other way

webdav: Sharing a folder a windows guest under virt-manager