[arch-general] qemu-vm : access to KVM kernel denied
I found my entries about this topic, but no clear answer. As user, I want to install a VM with virt-install. $ virt-install --connect qemu:///system --LONG list of options Error : could not access KVM kernel module: permission denied. Running the above command as root returns the same. My configuration: martinus@gerbillous ➤➤ ~ % uname -r 3.16.1-1-ARCH martinus@gerbillous ➤➤ ~ % ls -al /dev/kvm crw-rw----+ 1 root kvm 10, 232 Aug 17 11:05 /dev/kvm martinus@gerbillous ➤➤ ~ % groups martinus adm wheel video audio kalu libvirt qemu kvm martinus No files in /etc/polkit.1/rules.d No files in /etc/udev/rules.d , so /usr/lib/udev/rules.d/65-kvm.rules apply. /etc/libvirt/qemu.conf is set to qemu:qemu. qemu user from /etc/passwd : qemu:x:135:135:qemu:/:/usr/bin/nologin qemu group from /etc/group : qemu:x:135:martinus I have no idea what to do. Thank you for suggestion as I already spent lot of time with various "suspicious" tricks to solve this issue. -- google.com/+arnaudgabourygabx
On Sun, Aug 17, 2014 at 11:30:38AM +0200, arnaud gaboury wrote:
I found my entries about this topic, but no clear answer.
As user, I want to install a VM with virt-install. $ virt-install --connect qemu:///system --LONG list of options
Error : could not access KVM kernel module: permission denied. Running the above command as root returns the same.
My configuration: martinus@gerbillous ➤➤ ~ % uname -r 3.16.1-1-ARCH martinus@gerbillous ➤➤ ~ % ls -al /dev/kvm crw-rw----+ 1 root kvm 10, 232 Aug 17 11:05 /dev/kvm martinus@gerbillous ➤➤ ~ % groups martinus adm wheel video audio kalu libvirt qemu kvm martinus
You don't need to be in 'kvm' group to use /dev/kvm. What does 'getfacl /dev/kvm' say? Can you run a plain qemu-system-<something>? Cheers, -- Leonid Isaev GPG fingerprints: DA92 034D B4A8 EC51 7EA6 20DF 9291 EE8A 043C B8C4 C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
On Sun, Aug 17, 2014 at 2:48 PM, Leonid Isaev <lisaev@umail.iu.edu> wrote:
On Sun, Aug 17, 2014 at 11:30:38AM +0200, arnaud gaboury wrote:
I found my entries about this topic, but no clear answer.
As user, I want to install a VM with virt-install. $ virt-install --connect qemu:///system --LONG list of options
Error : could not access KVM kernel module: permission denied. Running the above command as root returns the same.
My configuration: martinus@gerbillous ➤➤ ~ % uname -r 3.16.1-1-ARCH martinus@gerbillous ➤➤ ~ % ls -al /dev/kvm crw-rw----+ 1 root kvm 10, 232 Aug 17 11:05 /dev/kvm martinus@gerbillous ➤➤ ~ % groups martinus adm wheel video audio kalu libvirt qemu kvm martinus
You don't need to be in 'kvm' group to use /dev/kvm. What does 'getfacl /dev/kvm' say? Can you run a plain qemu-system-<something>?
martinus@gerbillous ➤➤ ~ % getfacl /dev/kvm getfacl: Removing leading '/' from absolute path names # file: dev/kvm # owner: root # group: kvm user::rw- user:martinus:rw- group::rw- mask::rw- other::---
From man virt-install :
qemu:///system For creating KVM and QEMU guests to be run by the system libvirtd instance. This is the default mode that virt-manager uses, and what most KVM users want. qemu:///session For creating KVM and QEMU guests for libvirtd running as the regular user. ------------------------------ $ >> $ virt-install --connect qemu:///session works perfectly. I am not fully sure it is the right way, but now, as a regular user, I can install VM and there is no complains about permission denied.
On Sun, Aug 17, 2014 at 05:00:44PM +0200, arnaud gaboury wrote:
martinus@gerbillous ➤➤ ~ % getfacl /dev/kvm getfacl: Removing leading '/' from absolute path names # file: dev/kvm # owner: root # group: kvm user::rw- user:martinus:rw- group::rw- mask::rw- other::---
So, permissions on /dev/kvm look OK. Actually, you can remove yourself from the 'kvm' group.
From man virt-install :
qemu:///system For creating KVM and QEMU guests to be run by the system libvirtd instance. This is the default mode that virt-manager uses, and what most KVM users want.
qemu:///session For creating KVM and QEMU guests for libvirtd running as the regular user. ------------------------------
$ >> $ virt-install --connect qemu:///session
I have no idea what this means because I never used libvirt (only qemu directly). Cheers, -- Leonid Isaev GPG fingerprints: DA92 034D B4A8 EC51 7EA6 20DF 9291 EE8A 043C B8C4 C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
So, permissions on /dev/kvm look OK. Actually, you can remove yourself from the 'kvm' group.
it is done. TY
participants (2)
-
arnaud gaboury
-
Leonid Isaev