I am using a Windows 7 VM under KVM/QEMU, and there is no direct way – as far as I know – to make a shared drive between the host and guest, like the vboxsf that exists on VirtualBox hypervisor.
The best solution I found in order to share files between the host and the guest is to use Windows Sharing, or in other words: Samba (SMB).
We will do that with Nautilus.
You should follow these steps on the host (samba server) side:
- Install samba: “sudo apt install samba nautilus-share”
- Right-click on the folder you want to share and choose “Local Network Share”
- Enable, give it a name, and allow read/write if you wish to
- Click Create Share
- Run “sudo smbpasswd -a any_username“, you could just use the same account in linux, but take care that the SMB password set is not the same password used in your system
On the guest (Windows VM), you need to apply the following (make sure that the samba ports are open in your firewall):
- Right-click on “Network” and choose “Map network drive”
- Choose a drive letter
- Add the folder in this way: \\SERVER_IP\shared_folder_name
- It should prompt you for a username and password
- Type as the username “COMPUTER_NAME\user_name“, where user_name is the any_username used when you ran the command smbpasswd above
- Type the password and there you go!