Can't chown and chmod device files in autodev hook

I’m trying to set up libvirt in a container (Alt Linux), so I made an lxc.hook.autodev script to add necessary devices:

mknod kvm c 10 232
chown root:root kvm
chmod 0777 kvm

The problem is chown and chmod doesn’t change the owner and permissions no matter what I put there. The device always ends up like this:

crw-rw-rw- 1 root vmusers 10, 232 Mar 21 13:11 kvm

I can change permissions from inside the container without any issues. Maybe something in the container changes permissions of /dev/kvm when the container starts?

Could it be that udev in the container resets the ownership and permission on startup?

You’re right, qemu package created an udev rule that changes permissions for kvm device.