Bug 907215 - after installation of qemu package, permissions on /dev/kvm wrong
Summary: after installation of qemu package, permissions on /dev/kvm wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 18
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 918914 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-03 19:47 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2013-04-18 02:29 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-04-18 02:29:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2013-02-03 19:47:25 UTC
Description of problem:
If kvm module is loaded before qemu-system is installed, the permissions on /dev/kvm are wrong (0660 root:root, not 0666 root:kvm), because /usr/lib/udev/rules.d/80-kvm.rules was not present when the module was loaded and the device node created. It would be nice to force a reload of udev permissions on package installation. Not terribly important, but confusing.

Comment 1 Cole Robinson 2013-02-06 21:21:16 UTC
(In reply to comment #0)
> Description of problem:
> If kvm module is loaded before qemu-system is installed, the permissions on
> /dev/kvm are wrong (0660 root:root, not 0666 root:kvm), because
> /usr/lib/udev/rules.d/80-kvm.rules was not present when the module was
> loaded and the device node created. It would be nice to force a reload of
> udev permissions on package installation. Not terribly important, but
> confusing.

Thanks for the report, I can reproduce.

Can someone on the udev side give guidance here? Is there some way to trigger udev to apply these new permissions to an already existing device node? (udevadm control --reload doesn't do that for me at least). Or maybe we move that 80-kvm.rules file into udev proper so those are always the default permissions?

Comment 2 Kay Sievers 2013-02-07 10:53:59 UTC
This should do it:
  udevadm trigger --subsystem-match=misc --sysname-match=kvm --action=add

The rules could only move to udev if the "kvm" group is unconditionally
created before udev runs, even on a minimal system. Udev cannot use any
rules with textual uid/guid which are not always on the base OS in the
system db. Udev cannot resolve uids/gids over ldap and such, because it
runs too early.

Comment 3 Paolo Bonzini 2013-02-07 15:09:38 UTC
We already run "udevadm trigger --sysname-match=kvm" in the post script, after instaling 80-kvm.rules, so IIUC all we have to do is add "--action=add" too.

BTW yes, the "kvm" group should be unconditionally in /etc/group.

Comment 4 Amit Saha 2013-02-19 06:18:54 UTC
Ran into this one. Had to change the group of /dev/kvm to 'kvm' and do:

# setfacl -m g:kvm:rw /dev/kvm 

for virt-install to work.

Comment 5 Cole Robinson 2013-03-05 21:15:03 UTC
Setting to POST since this just requires a spec file tweak

Comment 6 Qixiang Wan 2013-03-08 02:42:16 UTC
*** Bug 918914 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2013-04-02 17:54:06 UTC
qemu-1.2.2-8.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qemu-1.2.2-8.fc18

Comment 8 Fedora Update System 2013-04-03 04:41:20 UTC
Package qemu-1.2.2-8.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing qemu-1.2.2-8.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4711/qemu-1.2.2-8.fc18
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-04-03 09:59:40 UTC
qemu-1.2.2-9.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qemu-1.2.2-9.fc18

Comment 10 Fedora Update System 2013-04-09 06:25:33 UTC
qemu-1.2.2-10.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/qemu-1.2.2-10.fc18

Comment 11 Fedora Update System 2013-04-18 02:29:46 UTC
qemu-1.2.2-10.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.