Sharing data between guest and host system is necessary in many scenarios. If the guest is a Linux system, you can simply add a shared folder that will be automatically mounted. However, this does not work if the guest is Windows. Sometimes, you can simply workaround it by using Samba shares, but in some scenarios network configuration makes it difficult. For example, when using usermode networking, the host machine can’t communicate easily via the network with the guest.
However, there is another way to share folders in virt-manager that actually works for Windows guest – SPICE . The first step is to configure the sharing in
virt-manager. In the VM details view, click on “Add Hardware” and select a “Channel” device. Set the new device name to
org.spice-space.webdav.0 and leave the other fields as-is.
Now start the guest machine and install
spice-webdav on the guest machine. After installing
spice-webdav make sure the “Spice webdav proxy” service is actually running (via
C:\Program File\SPICE webdavd\map-drive.bat will map the shared folder, which is by default
~/Public. If you encounter the following error
System error 67 has occurred. the network name cannot be found
It means that the
Spice webdav proxy service is not running.
If you want to change the shared folder, you will have to use
virt-viewer instead of
virt-manager, and configure it under File->Preferences.