Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[Solved] Virt-Manager no kvm-acceleration

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
22 posts • Page 1 of 1
Author
Message
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

[Solved] Virt-Manager no kvm-acceleration

  • Quote

Post by yellowhat » Wed Jun 06, 2012 1:32 pm

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: Select all

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.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Wed Jun 06, 2012 6:22 pm

Are you running the VM with correct permissions to access /dev/kvm?
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Wed Jun 06, 2012 6:28 pm

How can I check it?
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Wed Jun 06, 2012 7:10 pm

All I did when I installed qemu-kvm was:
-> emerge qemu-kvm
-> gpasswd -a username kvm
-> modprobe kvm_amd
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Thu Jun 07, 2012 3:23 pm

If I set in virt-manager to use qemu instead of kvm, the VM start but it is very slowly
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Fri Jun 08, 2012 4:58 pm

Any ideas?
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Sat Jun 09, 2012 5:13 pm

Adding:

Code: Select all

QEMU_SOFTMMU_TARGETS="i386 x86_64" 
QEMU_USER_TARGETS="${QEMU_SOFTMMU_TARGETS}"
to make.conf, nothing is changed.
Top
radegand
n00b
n00b
Posts: 45
Joined: Fri Aug 22, 2008 9:42 pm
Location: Poland
Contact:
Contact radegand
Website

  • Quote

Post by radegand » Sun Jun 10, 2012 10:58 am

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: Select all

# 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: Select all

# 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: Select all

# 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
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Sun Jun 10, 2012 11:46 am

Can you post how did you install and configure virt-manager and qemu-kvm?

Thanks
Top
PraetorZero
Apprentice
Apprentice
User avatar
Posts: 239
Joined: Sat Dec 11, 2004 4:18 am
Location: /home

  • Quote

Post by PraetorZero » Sun Jun 10, 2012 2:58 pm

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?
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Sun Jun 10, 2012 4:04 pm

Thank you so do I solved downgrading libvirt, I will open a bug report.
Top
radegand
n00b
n00b
Posts: 45
Joined: Fri Aug 22, 2008 9:42 pm
Location: Poland
Contact:
Contact radegand
Website

  • Quote

Post by radegand » Sun Jun 10, 2012 8:51 pm

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
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Sun Jun 10, 2012 9:12 pm

That's my bug report

https://bugs.gentoo.org/show_bug.cgi?id=420507
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Mon Jun 11, 2012 2:48 pm

Yeah, just updated here and now it broke for me too. Running that command in the bug report fixed it for me.
Top
yellowhat
Guru
Guru
User avatar
Posts: 528
Joined: Wed Sep 10, 2008 6:38 am

  • Quote

Post by yellowhat » Mon Jun 11, 2012 2:52 pm

Solved running: gpasswd -a qemu kvm
Top
the_mgt
Apprentice
Apprentice
User avatar
Posts: 259
Joined: Fri Aug 05, 2005 1:23 pm
Location: Germany, near Hannover

  • Quote

Post by the_mgt » Sat Jun 16, 2012 10:30 am

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. :D
Citadel Groupware | Avahi Howto
Top
Alakhai
Apprentice
Apprentice
User avatar
Posts: 151
Joined: Thu Oct 16, 2003 4:27 pm

  • Quote

Post by Alakhai » Mon Aug 06, 2012 2:50 pm

Yeah worked for me also!
Gentoo Linux 64Bit User
Top
cprior
n00b
n00b
Posts: 57
Joined: Thu Jun 03, 2004 6:28 pm
Location: #gentoo ;)

  • Quote

Post by cprior » Sun Aug 12, 2012 6:29 am

yellowhat wrote:Solved running: gpasswd -a qemu kvm
Thanks a lot!
Top
Caprisun
n00b
n00b
Posts: 15
Joined: Tue May 08, 2012 3:05 pm

Re: [Solved] Virt-Manager no kvm-acceleration

  • Quote

Post by Caprisun » Mon Aug 13, 2012 4:57 am

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: Select all

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.
Top
feiticeir0
Apprentice
Apprentice
User avatar
Posts: 288
Joined: Wed Jul 13, 2005 8:31 am
Location: Castelo Branco, Portugal

  • Quote

Post by feiticeir0 » Tue Aug 14, 2012 1:02 pm

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
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Tue Aug 14, 2012 6:14 pm

The VMs previously ran as root, or something.
Top
Alakhai
Apprentice
Apprentice
User avatar
Posts: 151
Joined: Thu Oct 16, 2003 4:27 pm

  • Quote

Post by Alakhai » Mon Sep 17, 2012 8:26 pm

it seams that libvirt start as qemu user and after drop privs to kvm or somethings like
Gentoo Linux 64Bit User
Top
Post Reply

22 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic