Hi all, I'm trying to share a folder between a host and a guest using VirtFS. The source is NAS mounted on the host and QEMU runs as unprivileged user. The only way for me to use the folder inside the guest is to set the access mode to 'squash' but all file operations are performed by the user running QEMU. If I ran QEMU as root, the passthrough mode works as expected. Is there the possibility to configure the passthrough access also for non-root users? Thanks, Matteo Matteo Lanati Distributed Resources Group Leibniz-Rechenzentrum (LRZ) Boltzmannstrasse 1 85748 Garching b. München (Germany) Phone: +49 89 35831 8724
Hi Matteo. As far as I know this is how it works. I asked weeks ago if there's any chance to change setuid in order to control how the files are created in the host, but at the moment I didn't get a reply. Cheers. Javier On 26 February 2014 10:45, Lanati, Matteo <Matteo.Lanati@lrz.de> wrote:> Hi all, > > I'm trying to share a folder between a host and a guest using VirtFS. > > The source is NAS mounted on the host and QEMU runs as unprivileged user. > > The only way for me to use the folder inside the guest is to set the access mode to 'squash' but all file operations are performed by the user running QEMU. > If I ran QEMU as root, the passthrough mode works as expected. > > Is there the possibility to configure the passthrough access also for non-root users? > > Thanks, > > Matteo > > > > Matteo Lanati > Distributed Resources Group > Leibniz-Rechenzentrum (LRZ) > Boltzmannstrasse 1 > 85748 Garching b. München (Germany) > Phone: +49 89 35831 8724 > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
On Wed, Feb 26, 2014 at 09:45:53 +0000, Lanati, Matteo wrote:> Hi all, > > I'm trying to share a folder between a host and a guest using VirtFS. > > The source is NAS mounted on the host and QEMU runs as unprivileged user. > > The only way for me to use the folder inside the guest is to set the access mode to 'squash' but all file operations are performed by the user running QEMU. > If I ran QEMU as root, the passthrough mode works as expected. > > Is there the possibility to configure the passthrough access also for non-root users?There were an attempt to implement support for a proxy that would run as a root and would allow non-privileged qemu to use passthrough access. However, looks like the author's focus was moved into another direction and the patches were never finished... Jirka
Hi Jirka, thanks for the answer. That's pretty clear. All the best, Matteo On 27 Feb 2014, at 11:11, Jiri Denemark <jdenemar@redhat.com> wrote:> On Wed, Feb 26, 2014 at 09:45:53 +0000, Lanati, Matteo wrote: >> Hi all, >> >> I'm trying to share a folder between a host and a guest using VirtFS. >> >> The source is NAS mounted on the host and QEMU runs as unprivileged user. >> >> The only way for me to use the folder inside the guest is to set the access mode to 'squash' but all file operations are performed by the user running QEMU. >> If I ran QEMU as root, the passthrough mode works as expected. >> >> Is there the possibility to configure the passthrough access also for non-root users? > > There were an attempt to implement support for a proxy that would run as > a root and would allow non-privileged qemu to use passthrough access. > However, looks like the author's focus was moved into another direction > and the patches were never finished... > > JirkaMatteo Lanati Distributed Resources Group Leibniz-Rechenzentrum (LRZ) Boltzmannstrasse 1 85748 Garching b. München (Germany) Phone: +49 89 35831 8724