Bug 1130189

Summary: Annoying message about permissions of /dev/kvm
Product: [Community] Virtualization Tools Reporter: Vincent Bernat <bernat>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, mbooth, ptoscano
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-14 16:37:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vincent Bernat 2014-08-14 14:01:27 UTC
Description of problem:

When running guestfish, I always get this message:

libguestfs: warning: current user is not a member of the KVM group (group ID 118). This user cannot access /dev/kvm, so libguestfs may run very slowly. It is recommended that you 'chmod 0666 /dev/kvm' or add the current user to the KVM group (you might need to log out and log in again).

On a modern desktop, permissions are setup by logind:

# file: dev/kvm
# owner: root
# group: kvm
user::rw-
user:bernat:rw-
group::rw-
mask::rw-
other::---

I think libguestfs should just try to open /dev/kvm (RW) and close it. If this succeeds, this means that the permissions are correct.

Version-Release number of selected component (if applicable):

1.26.7

Comment 1 Richard W.M. Jones 2014-08-14 14:18:44 UTC
Please try the patch here:

https://www.redhat.com/archives/libguestfs/2014-August/msg00119.html

Comment 2 Richard W.M. Jones 2014-08-14 16:37:37 UTC
The patch is upstream, please try it out.

Comment 3 Vincent Bernat 2014-08-14 17:21:49 UTC
Thanks, it works for me.

Comment 4 Richard W.M. Jones 2014-08-24 20:33:09 UTC
Planned to be fixed in 1.26.8.