Re: [libvirt PATCHv1 8/8] docs: virtiofs: add section about ID remapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 11, 2023 at 03:51:28PM +0200, Ján Tomko wrote:
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  docs/kbase/virtiofs.rst | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst
> index 5940092db5..ecfb8e4236 100644
> --- a/docs/kbase/virtiofs.rst
> +++ b/docs/kbase/virtiofs.rst
> @@ -59,6 +59,35 @@ Sharing a host directory with a guest
>  
>     Note: this requires virtiofs support in the guest kernel (Linux v5.4 or later)
>  
> +ID mapping
> +==========
> +
> +In unprivileged mode (``qemu:///session``), mapping user/group IDs is available
> +(since libvirt version TBD). After reserving an ID range from the host for your
> +regular user

Is the GUID/GID mapping available as in optional, or available as
in mandatory ?

I would expect libvirt to "do the right thing" and automatically load
the /etc/subuid data for the current user and NOT require any extra
XML mapping to be set for unprivileged usage.

By all means have an XML config for it, but it should be optional and
something that is essentially never used except for niche scenarios

> +
> +::
> +
> +  $ cat /etc/subuid
> +  jtomko:100000:65536
> +  $ cat /etc/subgid
> +  jtomko:100000:65536
> +
> +you can let virtiofsd map guest UIDs from 0 to 65535
> +to host IDs 100000 to 165535 for example:
> +
> +::
> +
> +  <filesystem type='mount' accessmode='passthrough'>
> +    <driver type='virtiofs' queue='1024'/>
> +    ...
> +    <idmap>
> +      <uid start='0' target='100000' count='65535'/>
> +      <gid start='0' target='100000' count='65535'/>
> +    </idmap>
> +  </filesystem>
> +
> +
>  Optional parameters
>  ===================
>  
> -- 
> 2.41.0
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux