You are not logged in.
Hello,
i noticed that someone removed the section which states that the "user=" and "group=" parameters of the /etc/libvirt/qemu.conf should modified from the libvirt wiki page.
So i removed my qemu user and commented the "user=" and "group=" parameters from the /etc/libvirt/qemu.conf to keep up with newest changes.
But after this i can't start my virtual machines from the libvirt system session which i normally use. I always get the error: "Could not access KVM kernel module: Permission denied failed to initialize KVM: Permission denied"
If i add "user=root" in /etc/libvirt/qemu.conf and restart libvirtd.service i can start my virtual machines. But i think there must be a reason why someone removed this section from the wiki page.
Then i decided to test the user session, but i can't add storage or network in the user session, because i always get permission denied or operation permitted error messages. So i skipped further tests and decided to ask this here.
This is my work configuration:
- My user is in the kvm and in the wheel group
- Nothing commented out in the configuration files below /etc/libvirt
- I created the file "/etc/polkit-1/rules.d/49-org.libvirt.unix.manager.rules" with the content from the libvirt wiki page
- libvirtd.service is enabled
If you need more informations, please let me know.
Kind regards,
morlix
Last edited by morlix (2015-03-24 17:26:44)
Offline
Welcome to the forums.
I don't know exactly why the wiki has been changed, or if there is a 'best way' of using libvirt. But FWIW, my past and current working setup is as follows:
- My user is in the users and libvirt groups (and no others)
- The uncommented lines in my qemu.conf file are:
user = "alphaniner"
group="libvirt"- I have the rule 50-org.libvirt.unix.manage.rules :
polkit.addRule(function(action, subject) {
if (action.id == "org.libvirt.unix.manage" &&
subject.isInGroup("libvirt")) {
return polkit.Result.YES;
}
})I'm pretty sure that covers it. I have no issues using the gui to add networks or storage including raw storage devices owned by root.
Last edited by alphaniner (2015-03-24 21:27:17)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Ok, that's exactly the config i had before i tried to keep up with the actual changes in the libvirt wiki page.
So if no one knows a ways to get it running this way i assume that this part is actually missing in the wiki page.
The corresponding section was removed at 16:14, 6 November 2014 by Gen2ly with the comment "General touch-up of Installation and Configuration sections; removed run daemon section as mostly about setting unnecessary permissions; removed KVM and QEMU section as belongs either KVM of QEMU."
So i will restore my old setup and wait for someone to either fix the wiki or describe a way how this will work if someone is strictly following the libvirt wiki page.
Offline