Proxmox uid/gid mapping

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

tuxx

Member
Feb 9, 2024
14
26
13
Hello,

I'm currently trying to mount a share to multiple containers, so that it can used by them.
This worked fine with the official instructions and uid/gid mapping
Code:
# uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), so 0..1004 (ct) → 100000..101004 (host)
lxc.idmap = u 0 100000 1005
lxc.idmap = g 0 100000 1005
# we map 1 uid starting from uid 1005 onto 1005, so 1005 → 1005
lxc.idmap = u 1005 1005 1
lxc.idmap = g 1005 1005 1
# we map the rest of 65535 from 1006 upto 101006, so 1006..65535 → 101006..165535
lxc.idmap = u 1006 101006 64530
lxc.idmap = g 1006 101006 64530
Now I also want to passthrough the iGPU to one of the LXC which has already the share mapped.
It seems like that passthrough needs also some mapping for unprivileged containers.
For example like this:
Code:
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 998
lxc.idmap: g 998 108 1
lxc.idmap: g 999 100999 64537
Here I don't know how to proceed.
U 0 and g 0 is already mapped for the share (0 100000 1005), how would I be able to map it also for the passthrough in addition (0 100000 998)?