I’m trying to share a folder between my Fedora 30 host and my Windows 10 guest using virt-manager. I’ve created a folder in my home directory for this purpose, but I can’t start my VM with the folder mounted.
In virt-manager, I added a Filesystem with Type “mount,” Driver “Default,” and Mode “Passthrough.” I’ve set the source path and my target path is E: (nothing exists here on the VM, but Windows should see this as a removable disk). When I try to start the VM, I get an error:
Error starting domain: internal error: process exited while connecting to monitor: 2019-07-19T17:09:52.542881Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=E:,bus=pci.4,addr=0x0: cannot initialize fsdev 'fsdev-fs0': failed to open '/home/bob323/libvirt-shared': Permission denied
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 66, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1420, in startup
self._backend.create()
File "/usr/lib64/python3.7/site-packages/libvirt.py", line 1089, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: process exited while connecting to monitor: 2019-07-19T17:09:52.542881Z qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=E:,bus=pci.4,addr=0x0: cannot initialize fsdev 'fsdev-fs0': failed to open '/home/bob323/libvirt-shared': Permission denied
I’ve tried adding my user to the libvirt group, editing /etc/libvirt/qemu.conf so that the VM runs with user “qemu” and group “libvirt,” changing the owner of the folder to qemu:libvirt, and finally setting the permissions on the folder wide open with chmod 777, but none of these helps. How can I share a folder through virt-manager?