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.

  • NeoNachtwaechter@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    21 days ago

    You say it is mounted. Then you can share it in all the same ways as you would share any other of the VM’s folders.

    I am using SMB shares for that (but that is not always the best way ofc).

    • GathererStuff@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      21 days ago

      The cloud drive is mounted on the guest, yes, but once I mount it with virtiofs in order to share it with the host it gets unmounted and I end up with an empty folder. bind doesn’t work either.