Operation not permitted in privileged container

May 27, 2021
27
1
8
47
Hi,

I have privileged container in which is needed to access devices on host machine.
Added in lxc.conf the following:
Code:
lxc.cgroup.devices.allow: c 196:* rwm

This was enough in kernel 5.4.x and PVE 6 to access devices in LXC when executing:
Code:
mknod /dev/dahdi/ctl c 196 0

However after upgrading to PVE7 and kernel 5.11.22 access to device in LXC is no longer available:
Code:
Unable to open /dev/dahdi/ctl: Operation not permitted

All necessary code is installed on host, compiled fine, kernel modules are loaded and everything works fine:
Code:
root@ic4:/etc/pve/lxc# dahdi_scan
[1]
active=yes
alarms=RED/LFA
description=T8XXP (PCI) Card 0 Span 1
name=TE8/0/1
manufacturer=Digium
devicetype=Wildcard TE820 (5th Gen)
location=Board ID Switch 0
basechan=1
totchans=31
irq=0
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=AMI,HDB3
framing_opts=CCS,CRC4
coding=HDB3
framing=CCS/CRC4

So my question is how to allow access to devices in LXC as it used to work before updating?
 
Just replace cgroup with cgroup2 for Proxmox VE 7.0 and up.
It has been mentioned here and there on the forum but I cannot find a good reference just now, sorry.