What is the best way to share a Data partition on a Linux KVM-QEMU host with a Windows VM guest?

I could use Samba networking and connect to the drive as a network share but I was hoping there might be a simpler way.

Thanks, Nick

1 Answer 1


I would use KVM's (and QEMU's) internal Samba networking (which you are referring to, I guess). It works just fine and is pretty easy to setup, just pass -net smb=/somewhere/data.

  • Not sure about 'KVM's internal Samba networking' I was referring to installing Samba server on the same host machine, is that the same thing? Using virt-manager so how do I pass these parameters?
    – NickC
    Oct 26, 2012 at 15:40
  • 1
    No. KVM/QEMU has the ability to provide a Samba share to the guest via the -net smb option. You do need a installed Samba daemon on the host, but you do not have to configure it -- KVM will do this for you. No idea how that integrates into virt-manager, though.
    – zhenech
    Oct 26, 2012 at 16:09
  • So how do I use the -net smb option to get a Samba share in the Windows VM guest without using virt-manager? Is this the same thing as Filesystem passthrough or is that something different.
    – NickC
    Oct 27, 2012 at 13:10
  • man kvm says: smb=dir[,smbserver=addr] When using the user mode network stack, activate a built-in SMB server so that Windows OSes can access to the host files in dir transparently. The IP address of the SMB server can be set to addr. By default the 4th IP in the guest network is used, i.e. x.x.x.4. Then dir can be accessed in \smbserver\qemu. so you bassically have to call kvm ... -net smb=/mnt/data and can access it in the guest via smb under \\\qemu
    – zhenech
    Oct 27, 2012 at 16:49
  • 1
    @NickC It's been more than a year, but I had this issue, and stefanha at virt@irc.oftc.net (virt-manager IRC channel) linked me to his blog post that shows how to pass qemu-system (kvm binary's been deprecated since) arguments to libvirt-based guests.
    – Oxwivi
    Dec 23, 2013 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.