Hi everyone! I want to be able to access a folder inside the guest that corresponds to a cloud drive that is mounted inside the guest for security purposes. I have tried setting up a shared filesystem inside Virt-Manager (KVM) with virtiofs (following this tutorial: https://absprog.com/post/qemu-kvm-shared-folder) but as soon as I mount the folder in order for it to be accessible on the guest host the cloud drive gets unmounted. I guess a folder cannot have two mounts at the same time. Aliasing the folder using bind
and then sharing the aliased folder with the host doesn’t work either. The aliased folder is simply empty on the host.
Does anyone have an idea regarding how I might accomplish this? Is KVM the right choice or would something like docker
or podman
better suited for this job? Thank you.
Maybe NFS share the drive from guest to host?
I can try but I might end up in the same situation as with
virtiofs
. The cloud drive will get unmounted and I will end up with an empty folder when I try to access it from the host.Absolutely not, NFS is a shared mount. Virtiofs is more complicated because it is emulating a block device.
Then I will try NFS and get back to you. Thanks :)
What would be the performance implications? Isn’t
virtiofs
theoretically faster?Not an expert.
Assuming it’s internal I’d assume it’s probably as fast as the guest nic allows?
Fair. I will try NFS if anything else fails. Thanks :)
This, had the same idea for other purposes, sharing a folder from vm to host through network share is the easiest way. Every other solution looks more elegant on paper but has lots of pitfalls.
A very sane and fair comment.