Hi all ,
hope you guys can help me out. I'm trying to give my LXC container the right access and permission with the help of id mapping.
But sadly enough I'm unable to get it to work and get an error when trying to run the LXC.
Error after apply idmapping in the .conf:
On the host :
group id on host:
In the LXC container:
so I modified
and added the following lines in the the LXC.conf :
hope you guys can help me out. I'm trying to give my LXC container the right access and permission with the help of id mapping.
But sadly enough I'm unable to get it to work and get an error when trying to run the LXC.
Error after apply idmapping in the .conf:
Code:
lxc.idmap: invalid map entry 'g 105 104 1': container gid 105 is also mapped by entry 'g 45 100045 61'
lxc_map_ids: 245 newgidmap failed to write mapping "newgidmap: write to gid_map failed: Invalid argument": newgidmap 13370 0 100000 44 44 44 1 45 100045 61 105 104 1 106 100106 65429
lxc_spawn: 1795 Failed to set up id mapping.
__lxc_start: 2114 Failed to spawn container "102"
TASK ERROR: startup for container '102' failed
On the host :
Code:
root@pve:~# ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 80 Apr 14 12:13 by-path
crw-rw---- 1 root 100044 226, 0 Apr 14 12:13 card0
crw-rw-rw- 1 root 100105 226, 128 Apr 14 12:13 renderD128
group id on host:
Code:
root@pve:~# getent group video
video:x:44:
root@pve:~# getent group render
render:x:104:
In the LXC container:
Code:
root@docker:~# getent group video
video:x:44:root
root@docker:~# getent group render
render:x:105:root
so I modified
/etc/subgid
with the following
Code:
root:44:1
root:104:1
and added the following lines in the the LXC.conf :
Code:
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 61
lxc.idmap: g 105 104 1
lxc.idmap: g 106 100106 65429
Last edited: