In the past I have used Virtual Box which has very good support for sharing a folder on the host with a Windows guest. I am looking for similar functionality for QEMU.
The documentation suggests to expose a Samba server running somewhere in the network, or use the -net user,smb=/path/to/folder
to start a samba server.
I had no luck with the -net user,smb
option of QEMU. All it does is starting smbd
(which conflicts with another service running locally due to a port conflict). Suffice to say, this is unusable, especially with multiple guests in mind. (For Linux, -virtfs
(Plan 9) can be used for easy folder sharing.)
Other problems with Samba is that it is not limited to folder sharing, it also does printer sharing, user mapping and whatsnot. All I need is to share one (or more?) folders with the Windows guest.
Does there exist an alternative folder sharing method for QEMU that works with a Windows guest?
Or is there a way to configure Samba to restrict itself to a very limited set of features and integrate it into QEMU? It should:
- Not everyone in the network should be able to access the folder.
- local users included (if feasible).
- Not provide other functionality (printer sharing).
- Use case: expose a git directory to Windows, compile it in Windows and use Linux for analysis.
- Have an acceptable speed, Windows uses virtio-scsi and virtio-net.
- Be able to share a folder from a Linux host with a Windows 7 guest.
-virtfs
works great (see also this question), but I am not aware of a 9p driver for Windows.10.0.2.2