Both guest and host are running Fedora 32 server edition, pretty much default no gui. From my laptop I connect with virt-manager with the server running Libvirtd. I added a filesystem mount in the guest, but the only mode available is mapped and squash. I expected to also see passthrough.
I just tried it all again from scratch. Turned off the guest (virsh destroy), then virsh edit guest, virsh start guest.
All modules are loaded on the guest, I checked that with lsmod.
Selinux is temporarily in permissive mode on both guest and host.
The filesystem mounts, but with this config ( with passthrough), regardless of the permissions set from the host on the shared directory, I cannot write to it, and ‘touch filename’ gives a weird message, with or without sudo:
$ touch bla6
touch: setting times of 'bla6': No such file or directory
Maybe it does work but there is something else going on that I don’t understand?
I can now set the owner of the dir from the host to the uid/gid of the user on the guest and from the guest, delete the files that are there. However, I cannot create new ones even as root, it throws that error message above.
So maybe passthrough does work when configured this way, but something else is wrong?
Its running as root. I have not touched the settings in libvirt or qemu.
As far as I understand it from the official qemu docs on 9p setup, (I quote) passthrough, files are stored using the same credentials as they are created on the guest. This requires QEMU to run as root.
However, the behavior when configured in passthrough by editing the xml (virsh edit), suggests that its still in mapped mode. In mapped mode, the users’ uid and gid are stored as attributes and mapped to qemu:qemu. So the guest sees the uids and gids from the user that created them, but on the host they are listed as qemu:qemu.
So we are back to my original issue, passthrough mode does not seem to be available. If there’s anyone able to help me troubleshoot I would greatly appreciate it.