Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
virt-manager cannot connect to libvirtd, throws missing file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Da_Nuke
n00b
n00b


Joined: 09 Jun 2011
Posts: 15

PostPosted: Sun Aug 03, 2014 10:55 am    Post subject: virt-manager cannot connect to libvirtd, throws missing file Reply with quote

I am running Gentoo using kernel 3.12.21 AMD64 on an HP Pavilion Touch 14-N009LA with an AMD A8-4555M CPU. My desktop environment is KDE 4.12.5. I have installed KVM, libvirtd, polkit and virt-manager. However, when I open virt-manager, I get the following error and am unable to do anything with virtual machines:

Code:
    Unable to connect to libvirt.
   
    authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory


Detail output is here:

Code:
   Unable to connect to libvirt.

   authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory

   Libvirt URI is: qemu:///system

   Traceback (most recent call last):
     File "/usr/share/virt-manager/virtManager/connection.py", line 1002, in _open_thread
      self.vmm = self._try_open()
     File "/usr/share/virt-manager/virtManager/connection.py", line 984, in _try_open
      flags)
     File "/usr/lib64/python2.7/site-packages/libvirt.py", line 105, in openAuth
      if ret is None:raise libvirtError('virConnectOpenAuth() failed')
   libvirtError: authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory



Googling around I found the following tips to try and make it work, and here's how they went:

  1. Making sure that a polkit authentication agent is running. I checked and it is indeed running:

    Code:
    black@rockshooter ~ $ ps -ef | grep polkit
    black     5039     1  0 04:31 ?        00:00:00 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1


  2. Creating a group called kvm, adding my user ID to it, and creating a polkit rule to authenticate users of group kvm who wish to manage VMs. I did it like this and it didn't work:

    Code:
    root@rockshooter /etc/polkit-1/rules.d # cat 50-default.rules
    polkit.addRule(function(action, subject) {
        if (action.id == "org.libvirt.unix.manage" &&
            subject.isInGroup("kvm")) {
                return polkit.Result.YES;
        }
    });
    root@rockshooter /etc/polkit-1/rules.d # grep kvm /etc/group
    kvm:x:78:qemu,black


  3. Connecting to the hypervisor from the command line (using `virsh`). I get the exact same error.

    Code:
    black@rockshooter ~ $ virsh --connect qemu:///system
    error: failed to connect to the hypervisor
    error: authentication failed: polkit: Error getting authority: Error initializing authority: Could not connect: No such file or directory


Any idea of what might be going on?
Back to top
View user's profile Send private message
wraeth
n00b
n00b


Joined: 08 May 2007
Posts: 64
Location: Australia

PostPosted: Tue Aug 05, 2014 2:11 pm    Post subject: Reply with quote

This is just a guess, and I'm only asking to be sure: have you started the libvirtd service?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum