Goal: to pass device to LXC (in this case a Coral PCI device at /dev/apex_0)
Old method:
- Add
root:44:1
to/etc/subgid
on Proxmox host - Add the following to LXC conf file on Proxmox host:
lxc.cgroup2.devices.allow: c 120:0 rwm
lxc.mount.entry: /dev/apex_0 dev/apex_0 none bind,optional,create=file
lxc.idmap: u 0 100000 65536
lxc.idmap: g 0 100000 44
lxc.idmap: g 44 44 1
lxc.idmap: g 45 100045 65491
New method introduced in Proxmox 8.1 and newer:
- Add
dev0: /dev/apex_0,gid=44
to LXC conf file on Proxmost host. That easy!!!
NOTE 1 - This can also be done via the web interface on Proxmox 8.2 and newer:
NOTE 2 - If the device supports it then can add that line to multiple LXC to passthrough to more than one LXC.