You are not logged in.

#1 2009-04-09 00:44:42

Odysseus
Member
Registered: 2009-02-15
Posts: 141

[SOLVED] Qemu with KVM fails, permission denied

I've had qemu installed for a while now, and I've been able to use KVM with it fine as my normal user.  After this new update, there was a post-install message that I need to use the --enable-kvm option instead of the qemu-kvm command.  Well I get this wonderfull message: 

Could not access KVM kernel module: Permission denied
failed to initialize KVM

I've removed/added myself from/to the kvm group to no avail.  Sigh.

Last edited by Odysseus (2009-04-13 18:36:27)


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#2 2009-04-09 01:48:52

edubarr
Member
Registered: 2009-03-25
Posts: 19

Re: [SOLVED] Qemu with KVM fails, permission denied

I had a similar problem. In the end /dev/kvm was not accessible to the kvm group. This fixed it for me:

chown root:kvm /dev/kvm

Give it a try and see what happens.

Offline

#3 2009-04-09 04:37:25

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: [SOLVED] Qemu with KVM fails, permission denied

Thanks, you're a god.  At any rate, I guess that would be considered a bug, easily fixed though.


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#4 2009-04-09 20:08:06

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] Qemu with KVM fails, permission denied

The cause is that the file /etc/udev/rules.d/65-kvm.rules is missing - I don't know whether it should belong to qemu, udev or the kernel package. Definitely a bug.

EDIT: if you want to have it back, here's the contents:

KERNEL=="kvm", NAME="%k", GROUP="kvm", MODE="0660"

EDIT2: it belongs to the qemu package.

EDIT3: filed a bug: http://bugs.archlinux.org/task/14165

Last edited by bender02 (2009-04-09 20:16:28)

Offline

#5 2009-04-10 08:48:58

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] Qemu with KVM fails, permission denied

Fixed in qemu-0.10.2-2.

Offline

#6 2009-04-22 18:54:13

james
Member
Registered: 2009-04-17
Posts: 13

Re: [SOLVED] Qemu with KVM fails, permission denied

same problem with:

kvm 85-1

group kvm has no permissions for /dev/kvm

Offline

#7 2009-04-23 06:11:24

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] Qemu with KVM fails, permission denied

Check your settings, please. kvm-85-1 package does contain /lib/udev/rules.d/65-kvm.rules, which sets the correct group permissions. I tried and it works fine here.

Offline

#8 2009-04-23 14:37:22

james
Member
Registered: 2009-04-17
Posts: 13

Re: [SOLVED] Qemu with KVM fails, permission denied

Sorry, must have been my mistake

I did:

pacman --nosave -R kvm
pacman -S kvm
'a reboot'
modprobe kvm-intel

and permissions are now set to
crw-rw---- 1 root kvm 10, 232 2009-04-23 16:24 /dev/kvm

James

Offline

#9 2009-04-24 16:51:06

pawels64
Member
Registered: 2009-04-07
Posts: 55

Re: [SOLVED] Qemu with KVM fails, permission denied

bender02 wrote:

Fixed in qemu-0.10.2-2.

But it's broken in qemu-0.10.2-3. The file /etc/udev/rules.d/65-kvm.rules is missing again.

Oh and I'm not in kvm group even when I do: gpasswd -a pawel kvm (as root).

EDIT:

It's strange, because 'groups' shows only dbus hal video audio optical storage pawel

but KDE users managers shows I'm also in kvm group yikes

Last edited by pawels64 (2009-04-24 17:01:42)

Offline

#10 2009-04-24 19:28:16

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] Qemu with KVM fails, permission denied

So the places to look at if you are having group issues is the file '/etc/group'. It contains the list of groups and also users that belong to each group. EDIT: I should also say that it's THE file for groups, ie what any manager (like gpasswd or kde group manager) does is just change that file.

Also, if you just want to use qemu-kvm, you're better off using the 'kvm' package in extra (which contains qemu-kvm). It's because qemu with 0.10.2 release sort of 'half-way' merged the kvm code, with the result that the kvm part of qemu doesn't work properly.

Last edited by bender02 (2009-04-24 19:29:12)

Offline

#11 2009-04-24 20:59:43

pawels64
Member
Registered: 2009-04-07
Posts: 55

Re: [SOLVED] Qemu with KVM fails, permission denied

bender02 wrote:

So the places to look at if you are having group issues is the file '/etc/group'. It contains the list of groups and also users that belong to each group. EDIT: I should also say that it's THE file for groups, ie what any manager (like gpasswd or kde group manager) does is just change that file.

Also, if you just want to use qemu-kvm, you're better off using the 'kvm' package in extra (which contains qemu-kvm). It's because qemu with 0.10.2 release sort of 'half-way' merged the kvm code, with the result that the kvm part of qemu doesn't work properly.

Thanks for your response. It seems groups are all right now. I copied missing file from abs tree, added myself to kvm group and then restarted system. Qemu with kvm is working now, but there are some problems, so I will try kvm as you suggest. Btw. are there some wiki pages how to use 'clean' kvm without qemu? Something like this, but describing kvm way:

http://wiki.archlinux.org/index.php/QEM … al_Machine

Last edited by pawels64 (2009-04-24 21:04:31)

Offline

#12 2009-04-24 21:39:12

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: [SOLVED] Qemu with KVM fails, permission denied

Well the kvm package contains 'qemu-kvm' binary, so you can go ahead and use it the same way you used qemu before (that's what I do and I haven't encountered any problems yet - although I don't use it that often).

Offline

#13 2009-04-25 10:11:57

pawels64
Member
Registered: 2009-04-07
Posts: 55

Re: [SOLVED] Qemu with KVM fails, permission denied

bender02 wrote:

Well the kvm package contains 'qemu-kvm' binary, so you can go ahead and use it the same way you used qemu before (that's what I do and I haven't encountered any problems yet - although I don't use it that often).

Thanks KVM is working perfectly. Near native speeds :>

Offline

#14 2009-05-02 23:50:30

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED] Qemu with KVM fails, permission denied

*edit*
Nevermind, I had a problem but I think I've figured it out.

Last edited by Xyne (2009-05-03 00:10:05)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB