From 0d03ca17b15c73609e6cf20a616d8576ae71e65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Mon, 11 Sep 2023 15:38:10 +0200 Subject: [PATCH] docs: virtiofs: add section about ID remapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko Reviewed-by: Michal Privoznik --- docs/kbase/virtiofs.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/kbase/virtiofs.rst b/docs/kbase/virtiofs.rst index 5940092db5..457c15da7f 100644 --- a/docs/kbase/virtiofs.rst +++ b/docs/kbase/virtiofs.rst @@ -59,6 +59,25 @@ Sharing a host directory with a guest Note: this requires virtiofs support in the guest kernel (Linux v5.4 or later) +Running unprivileged +==================== + +In unprivileged mode (``qemu:///session``), mapping user/group IDs is available +(since libvirt version 10.0.0). The root user (ID 0) in the guest will be mapped +to the current user on the host. + +The rest of the IDs will be mapped to the subordinate user IDs specified +in `/etc/subuid`: + +:: + + $ cat /etc/subuid + jtomko:100000:65536 + $ cat /etc/subgid + jtomko:100000:65536 + +To manually tweak the user ID mapping, the `idmap` element can be used. + Optional parameters ===================