Does lxd support ioctl devices?

I am trying to create ioctl devices. Is there anyway to do it using lxd device?

I created these devices, using an executable, and mounted them with lxc.mount.entry. But, the programs were unable to write to the files with an operation permission denied exception even though it has full permissions (777).

I am currently using snap lxd 3.23

Using lxc.mount.entry wouldn’t allow the devices in the cgroup.
For LXC, you’d want to use lxc.cgroup.allow for the char/major/minor you’re using.

For LXD, you can use unix-char which would pass the device as well as configure the cgroup permissions for you.

Hi Stephane,
Thanks a lot for the response. After setting the cgroup.devices.allow, i was able to get access to these devices.

I am currently creating these using an executable which leverages C ioctl library and mounting these later. Are there any alternatives to create these devices in a lxd way (like lxc config device add or a better way than this?)