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

Michal Privoznik mprivozn at redhat.com
Mon Apr 9 07:37:33 UTC 2018


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




More information about the libvir-list mailing list