[libvirt] Permissions and ownership on /dev/kvm keep reverting after starting a vm

Hey guys, /dev/kvm permissions and ownership keeps reverting after starting a vm. The ownership and permissions keep going back to crw-rw—— root root .... After starting a vm. I have to revert the perms and ownership to: crw-crw-crw root kvm .... To start any vm but it goes back to the first set of permissions as soon as I start another vm. Any hints what I could check? Cheers, Tom Sent from my iPhone

On 04/06/2018 11:40 PM, Tom wrote:
Hey guys,
/dev/kvm permissions and ownership keeps reverting after starting a vm.
The ownership and permissions keep going back to
crw-rw—— root root ....
After starting a vm. I have to revert the perms and ownership to:
crw-crw-crw root kvm ....
To start any vm but it goes back to the first set of permissions as soon as I start another vm. Any hints what I could check?
What distro are you using? Libvirt is not chowning /dev/kvm. More importantly, if you're using libvirt-3.0.0 or newer libvirt spawns qemu in its own mount namespace with a separate /dev so it doesn't even touch /dev/kvm from host. Perhaps some hook script is mangling permissions? Or some patches on the top of libvirt written by distro maintainer? Michal

On Fri, Apr 06, 2018 at 05:40:39PM -0400, Tom wrote:
Hey guys,
/dev/kvm permissions and ownership keeps reverting after starting a vm.
The ownership and permissions keep going back to
crw-rw—— root root ....
After starting a vm. I have to revert the perms and ownership to:
crw-crw-crw root kvm ....
To start any vm but it goes back to the first set of permissions as soon as I start another vm. Any hints what I could check?
Possibly a udev rule is resetting it. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (3)
-
Daniel P. Berrangé
-
Michal Privoznik
-
Tom