Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420649 - app-emulation/qemu-kvm-1.0.1-r1 in combination with app-emulation/libvirt-0.9.12: starting virtual machines fails with permission denied for /dev/kvm
Summary: app-emulation/qemu-kvm-1.0.1-r1 in combination with app-emulation/libvirt-0.9...
Status: RESOLVED DUPLICATE of bug 420507
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-11 08:28 UTC by Martin Dummer
Modified: 2012-06-11 10:17 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Dummer 2012-06-11 08:28:12 UTC
after upgrading libvirt to app-emulation/libvirt-0.9.12, virtual machines based on qemu-kvm cannot be started from libvirt any more

it fails with 

Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
No accelerator found!


The reason is that libvirt has changed its behavour how it starts the qemu-kvm processes.
before libvirt-0.9.12, qemu-kvm was started as user root, now with libvirt-0.9.12 the qemu-kvm process is started as user qemu

Problem is now: the user qemu is not able to access /dev/kvm so qemu fails with "permission denied"  (/dev/kvm is owned by root:kvm)


Resolution that works for me: add the group "kvm" as a secondary group to qemu by submitting the command

gpasswd -a qemu kvm

After that the libvirt daemon can start virtual machines again
Comment 1 Michael Weber (RETIRED) gentoo-dev 2012-06-11 10:17:09 UTC

*** This bug has been marked as a duplicate of bug 420507 ***