Hello
Device must be present on hardware node. For pass Character Device
inside lxc container:
<device>
<hostdev mode='capabilities' type='misc'>
<source>
<char>/dev/CHAR_DEV_NAME</char>
</source>
</hostdev>
.....
</device>
for Block Device:
<hostdev mode='capabilities' type='storage'>
<source>
<block>/dev/BLOCK_DEV_NAME</block>
</source>
</hostdev>
After LXC container start, corresponding device would be created
inside container's /dev/
Details here:
https://libvirt.org/formatdomain.html#elementsHostDevCaps
b.r.
Maxim Kozin