View previous topic :: View next topic |
Author |
Message |
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Wed Jun 06, 2012 1:32 pm Post subject: [Solved] Virt-Manager no kvm-acceleration |
|
|
Hi all,
I am trying to use qemu-kvm through virt-manager, so I emerged virt-manager, launched "/etc/init.d/libvirtd start".
I started virt-manager then I created a new VM but at the last step it gives me this error:
Code: | Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
No accelerator found! |
But kvm-amd module is loaded. Any ideas?
Thanks
Last edited by yellowhat on Mon Jun 11, 2012 2:52 pm; edited 1 time in total |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Jun 06, 2012 6:22 pm Post subject: |
|
|
Are you running the VM with correct permissions to access /dev/kvm? |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Wed Jun 06, 2012 6:28 pm Post subject: |
|
|
How can I check it? |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Wed Jun 06, 2012 7:10 pm Post subject: |
|
|
All I did when I installed qemu-kvm was:
-> emerge qemu-kvm
-> gpasswd -a username kvm
-> modprobe kvm_amd |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Thu Jun 07, 2012 3:23 pm Post subject: |
|
|
If I set in virt-manager to use qemu instead of kvm, the VM start but it is very slowly |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Fri Jun 08, 2012 4:58 pm Post subject: |
|
|
Any ideas? |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Sat Jun 09, 2012 5:13 pm Post subject: |
|
|
Adding:
Code: | QEMU_SOFTMMU_TARGETS="i386 x86_64"
QEMU_USER_TARGETS="${QEMU_SOFTMMU_TARGETS}"
|
to make.conf, nothing is changed. |
|
Back to top |
|
|
radegand n00b
Joined: 22 Aug 2008 Posts: 45 Location: Poland
|
Posted: Sun Jun 10, 2012 10:58 am Post subject: |
|
|
Hi
I seem to be getting the same error. I have been using KVM and virt-manager for a while without issues, and now I'm having the same problem. Permissions on /dev/kvm are fine:
Code: |
# ls -la /dev/kvm
crw-rw----+ 1 root kvm 10, 232 Jun 10 09:09 /dev/kvm
|
I can also start my VMs by hand from command line using the 'qemu-kvm' command and providing a path to an image, no probs there...
Permissions on libvirt sockets look fine:
Code: |
# ls -la /var/run/libvirt
total 28
drwxr-xr-x 7 root root 4096 Jun 10 09:10 .
drwxr-xr-x 28 root root 4096 Jun 10 10:13 ..
srwxrwx--- 1 root kvm 0 Jun 10 09:10 libvirt-sock
srwxrwx--- 1 root kvm 0 Jun 10 09:10 libvirt-sock-ro
drwxr-xr-x 2 root root 4096 May 29 2009 lxc
drwxr-xr-x 2 root root 4096 Jun 10 09:10 network
drwxr-xr-x 2 root root 4096 Jun 10 11:50 qemu
drwxr-xr-x 2 root root 4096 May 29 2009 uml
drwxr-xr-x 2 root root 4096 Apr 3 2011 uml-guest
|
However, when I try using virt-manager, or virsh itself, I get:
Code: |
# virsh start my_vm
error: Failed to start domain my_vm
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/14
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
No accelerator found!
|
and that's regardless if run as regular user (who belongs to the kvm group),root or using sudo...any ideas appreciated
Thanks |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Sun Jun 10, 2012 11:46 am Post subject: |
|
|
Can you post how did you install and configure virt-manager and qemu-kvm?
Thanks |
|
Back to top |
|
|
PraetorZero Apprentice
Joined: 11 Dec 2004 Posts: 239 Location: /home
|
Posted: Sun Jun 10, 2012 2:58 pm Post subject: |
|
|
I ended up downgrading to app-emulation/libvirt-0.9.11.3 from app-emulation/libvirt-0.9.12.
Not the best solution, but I needed my VMs more than I needed a headache at the moment. _________________ What's the worst that can happen? |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Sun Jun 10, 2012 4:04 pm Post subject: |
|
|
Thank you so do I solved downgrading libvirt, I will open a bug report. |
|
Back to top |
|
|
radegand n00b
Joined: 22 Aug 2008 Posts: 45 Location: Poland
|
Posted: Sun Jun 10, 2012 8:51 pm Post subject: |
|
|
PraetorZero wrote: | I ended up downgrading to app-emulation/libvirt-0.9.11.3 from app-emulation/libvirt-0.9.12.
|
...downgrading from 0.9.12 to 0.9.11.3 gave a hint, my 'lxc' use flag enforced setting of the 'caps' flag which probably resulted in Linux capabilities restricting libvirt access...
So if you can emerge 0.9.12 without caps, (I had to get rid of Linux containers), then it will work. Or find out how to configure 'caps' to allow VM access by libvirt.
Cheers,
radegand |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Jun 11, 2012 2:48 pm Post subject: |
|
|
Yeah, just updated here and now it broke for me too. Running that command in the bug report fixed it for me. |
|
Back to top |
|
|
yellowhat Guru
Joined: 10 Sep 2008 Posts: 528
|
Posted: Mon Jun 11, 2012 2:52 pm Post subject: |
|
|
Solved running: gpasswd -a qemu kvm |
|
Back to top |
|
|
the_mgt Apprentice
Joined: 05 Aug 2005 Posts: 259 Location: Germany, near Hannover
|
Posted: Sat Jun 16, 2012 10:30 am Post subject: |
|
|
Thanks for solving this! Yesterday, before I read this thread, I thought about your solution, too, but I also thought "Nah, this is stupid."
Should have listened to my intuition. _________________ Citadel Groupware | Avahi Howto |
|
Back to top |
|
|
Alakhai Apprentice
Joined: 16 Oct 2003 Posts: 151
|
Posted: Mon Aug 06, 2012 2:50 pm Post subject: |
|
|
Yeah worked for me also! _________________ Gentoo Linux 64Bit User |
|
Back to top |
|
|
cprior n00b
Joined: 03 Jun 2004 Posts: 57 Location: #gentoo ;)
|
Posted: Sun Aug 12, 2012 6:29 am Post subject: |
|
|
yellowhat wrote: | Solved running: gpasswd -a qemu kvm |
Thanks a lot! |
|
Back to top |
|
|
Caprisun n00b
Joined: 08 May 2012 Posts: 15
|
Posted: Mon Aug 13, 2012 4:57 am Post subject: Re: [Solved] Virt-Manager no kvm-acceleration |
|
|
yellowhat wrote: | Hi all,
I am trying to use qemu-kvm through virt-manager, so I emerged virt-manager, launched "/etc/init.d/libvirtd start".
I started virt-manager then I created a new VM but at the last step it gives me this error:
Code: | Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied
No accelerator found! |
But kvm-amd module is loaded. Any ideas?
Thanks |
Has there been a large change with permissions? I got past this error, and I still can't run virt-manager as a normal user even after adding them to the kvm group. I've tried adding them to the kvm group,qemu, just not root though it will probably work because it works as root.
I can work as root for now, I'm sure this can be resolved somehow.
I also tried editing /etc/conf.d/libvirt/libvirtd.conf
Nothing seemed to stick or make a difference, all of the commented lines make me think the daemon may be defaulting to its own options.
I've also logged out, even rebooted. |
|
Back to top |
|
|
feiticeir0 Apprentice
Joined: 13 Jul 2005 Posts: 288 Location: Castelo Branco, Portugal
|
Posted: Tue Aug 14, 2012 1:02 pm Post subject: |
|
|
yellowhat wrote: | Solved running: gpasswd -a qemu kvm |
Worked for me also ! Thank you !
My question: Why ? Why is the need now to add qemu to the kvm group ? Is an error or something the ebuild should have done ?
Thank you _________________ Do It With Rhythm |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Aug 14, 2012 6:14 pm Post subject: |
|
|
The VMs previously ran as root, or something. |
|
Back to top |
|
|
Alakhai Apprentice
Joined: 16 Oct 2003 Posts: 151
|
Posted: Mon Sep 17, 2012 8:26 pm Post subject: |
|
|
it seams that libvirt start as qemu user and after drop privs to kvm or somethings like _________________ Gentoo Linux 64Bit User |
|
Back to top |
|
|
|