Adding instructions for device passthrough with LXC containers (unprivileged also)
epic0421 opened this issue · 1 comments
As of Proxmox VE 8.2, a new option was added for device passthrough. This wiki page comes to mind for adding instructions for this but cannot test this with other hardware configurations.
Another great thing about this new method is that it works with unprivileged LXC containers.
Old method of allowing access to the Intel GPU in /etc/pve/lxc/x.conf
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
New method of allowing access to the Intel GPU in /etc/pve/lxc/x.conf
dev0: /dev/dri/card0,gid=44
dev1: /dev/dri/renderD128,gid=104
Got the GIDs by running cat /etc/group | grep -E 'video|render'
in the PVE environment
Or it can be done through the gui in the LXC container
Thank you so much for sharing this! Totally missed this in the Proxmox changelog - it saves SO much trouble especially since we no longer have to calculate idmaps.
Confirmed the oneliner for each device is all that's needed for it to passthrough, and can add the same line to multiple LXC as well (e.g. share render device with jellyfin LXC and also frigate LXC)