Problem Solved:
I have no idea why it works now, but here is what I did.
I found this script on stack overflow: https://github.com/ddimick/proxmox-lxc-idmapper
and used the command './run.py 985=44 989=104' to generate this output:
This maps the group and user IDs 44 <-> 985 and 104 <-> 989, and now it works.
I do not have any users with the IDs 985 or 989 on my system, but it works regardless, and that is probably a security concern, but i'm the only person that will ever have access, so idrc
When I access /dev/dri, the iGPU is recognized, so I will not complain
My original Post:
Hello everyone!
I've tried to pass my integrated GPU into a LXC container using this guide: https://bookstack.swigg.net/books/linux/page/lxc-gpu-access but I can not get it to work.
My problem is configuring the GID passthrough.
In Proxmox the video is group 44, and the render group 104
In Arch the video group is 985, and the render group is 989
I am basically trying to connect the corresponding GIDs to one another, and then map the rest of the IDs onto the 100xxx range, just like in the tutorial
However it still complains that I am trying to bind 990 to 105, even though I'm not
Any and all help would be much appreciated
my /etc/subgid:
my /etc/pve/lxc/109.conf:
the error:
Thank you very much for your time and effort, I've been staring at all of these numbers for at least two hours now, and can not figure it out
I have no idea why it works now, but here is what I did.
I found this script on stack overflow: https://github.com/ddimick/proxmox-lxc-idmapper
and used the command './run.py 985=44 989=104' to generate this output:
Code:
# Add to /etc/pve/lxc/<container_id>.conf:
lxc.idmap: u 0 100000 985
lxc.idmap: g 0 100000 985
lxc.idmap: u 985 44 1
lxc.idmap: g 985 44 1
lxc.idmap: u 986 100986 3
lxc.idmap: g 986 100986 3
lxc.idmap: u 989 104 1
lxc.idmap: g 989 104 1
lxc.idmap: u 990 100990 64546
lxc.idmap: g 990 100990 64546
# Add to /etc/subuid:
root:44:1
root:104:1
# Add to /etc/subgid:
root:44:1
root:104:1
This maps the group and user IDs 44 <-> 985 and 104 <-> 989, and now it works.
I do not have any users with the IDs 985 or 989 on my system, but it works regardless, and that is probably a security concern, but i'm the only person that will ever have access, so idrc
When I access /dev/dri, the iGPU is recognized, so I will not complain
My original Post:
Hello everyone!
I've tried to pass my integrated GPU into a LXC container using this guide: https://bookstack.swigg.net/books/linux/page/lxc-gpu-access but I can not get it to work.
My problem is configuring the GID passthrough.
In Proxmox the video is group 44, and the render group 104
In Arch the video group is 985, and the render group is 989
I am basically trying to connect the corresponding GIDs to one another, and then map the rest of the IDs onto the 100xxx range, just like in the tutorial
However it still complains that I am trying to bind 990 to 105, even though I'm not
Any and all help would be much appreciated
my /etc/subgid:
Code:
root:100000:65536
root:44:1
root:104:1
my /etc/pve/lxc/109.conf:
Code:
arch: amd64
cores: 16
features: nesting=1
hostname: remote
memory: 15259
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=A6:1A:62:19:0A:1E,ip=dhcp,ip6=dhcp,type=veth
ostype: archlinux
rootfs: local-zfs:subvol-109-disk-0,size=40G
swap: 0
unprivileged: 1
lxc.cgroup.devices.allow: c 226:* rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file,mode=0666
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 985 // map GIDs 0-984 (arch) to 100000-100984 (proxmox)
lxc.idmap: g 985 44 1 // map video (arch) to video (proxmox)
lxc.idmap: g 986 100986 3 // map GIDs 986-988 (arch) to 100986-100988 (proxmox)
lxc.idmap: g 989 104 1 // map render (arch) to render (proxmox)
lxc.idmap: g 990 100990 64546 // map GIDs 990-65536 (arch) to 100990-165536 (proxmox)
the error:
Code:
lxc_map_ids: 3701 newgidmap failed to write mapping "newgidmap: gid range [989-990) -> [104-105) not allowed": newgidmap 1415871 0 100000 985 985 44 1 986 100986 3 989 104 1 990 100990 64546
lxc_spawn: 1788 Failed to set up id mapping.
__lxc_start: 2107 Failed to spawn container "109"
startup for container '109' failed
Thank you very much for your time and effort, I've been staring at all of these numbers for at least two hours now, and can not figure it out
Last edited: