These instructions for sharing host files with a guest are not working because there is no /usr/bin/qemu-kvm.
-
1The page you linked also helps with folder sharing through virt-manager. But this relates to linux guests; windows guests do not seem to work this way (see http://unix.stackexchange.com/questions/86071/use-virt-manager-to-share-files-between-linux-host-and-windows-guest) – ridgy Apr 04 '17 at 08:56
4 Answers
You can not add a shared folder in virt-manager like it is described in your article because the filesystem passthrough doesn't work well with a windows guest.
To solve your problem you have several options:
- You can share a folder in the local network at your linux host system via SAMBA and access it over the windows filesystem directly.
- You can use
spice-webdavto share a folder like it is described in this article from Guy Rutenberg. This is not recommend for transferring large files. - If you only want to transfer data one or two times instead of having a permanent shared folder you can pack the data in your host system into a
.isofile and add it in virt-manager as a disc to access it in the windows guest system.
- 103
- 4
- 281
- 4
- 9
-
2Please consider explaining “doesn’t work well”. Is it possible to make it work (even partially)? Why not, if not? What fails? – Olivier Cailloux Aug 08 '22 at 18:48
It's easy to start ssh server on host linux, while it's easy to run ssh client on windows.
run systemctl start sshd on linux and then run winscp on guest: windows 7
- 151
- 5
To save people time this is full steps to make it happned download spice-webdav from here this is latest build :-
https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x86-latest.msi https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi
Install it in the guest machine (use Brasero to create iso file) , after install check if
Spice webdav proxy” service is actually running (via services.msc) reff
Inside the guest machine run C:\Program File\SPICE webdavd\map-drive.bat to map your host shared folder, which is by default ~/Public
- 123
- 8
-
1What happens at the end? Does a new drive letter appear? It doesn't work in my case (Debian 11 as host and Win10 as guest). No errors but also no new drives. – buhtz Jun 30 '22 at 15:17
For completeness, as @Salem F said, download the latest spice-webdav from https://www.spice-space.org/download/windows/spice-webdavd/
But before your run C:\Program File\SPICE webdavd\map-drive.bat you have to do a couple things:
- With the VM off, go the settings for the VM and Add Hardware
- Choose Channel, and set the new device name to
org.spice-space.webdav.0and leave the other fields as-is - Start your VM as you would with virt-manager
- Once running, run virt-viewer from your linux host (it should detect your running qemu VM), select your VM from the list, and connect to it.
- In your Windows VM, run services.msc
- Scroll down to Spice webdav proxy and double-click it, set Startup type to automatic, then click start (it would fail to start if I didn't first switch to virt-viewer from virt-manager).
- Now run
C:\Program File\SPICE webdavd\map-drive.batand you should see the drive letter appear in File Explorer
Here is a link to a past that helped: https://www.guyrutenberg.com/2018/10/25/sharing-a-folder-a-windows-guest-under-virt-manager/
- 143
- 7