Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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.

share|improve this answer
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 '12 at 15:40
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 '12 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 '12 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 '12 at 16:49
Not making much progress with this at the moment. Under CentOS 6.3 the virsh command is present as is virt-manager but I don't seem to have either kvm, qemu, or qemu-kvm commands available. – NickC Oct 28 '12 at 15:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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