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

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

 



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
+
+::
+
+  $ 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




[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