You are not logged in.

#1 2016-08-22 01:57:31

amiko
Member
Registered: 2016-08-22
Posts: 3

virt-manager: "libvirtError: Failed to connect socket"

Hello!

I've always used virtualbox in the past, but I've decided to try to learn how to use KVM/libvirt this time around. I've installed the following packages:
local/libvirt 2.1.0-1
local/qemu 2.6.0-1
local/qemu-arch-extra 2.6.0-1
local/qemu-block-iscsi 2.6.0-1
local/vde2 2.3.2-8
local/libvirt 2.1.0-1
local/libvirt-glib 0.2.3-1
local/libvirt-python 2.1.0-1
local/libvirt-python3 2.1.0-1

Unfortunately, I'm unable to start virt-manager and I get the following error:

Unable to connect to libvirt.

Verify that the 'libvirtd' daemon is running.

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 904, in _do_open
    self._backend.open(self._do_creds_password)
  File "/usr/share/virt-manager/virtinst/connection.py", line 148, in open
    open_flags)
  File "/usr/lib/python2.7/site-packages/libvirt.py", line 105, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

I can see that libvirtd is actually running:

user@localhost:~$ systemctl status libvirtd.service
* libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/local/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2016-08-21 19:58:09 CDT; 38min ago
     Docs: man:libvirtd(8)
           http://libvirt.org
 Main PID: 1133 (libvirtd)
    Tasks: 18 (limit: 4915)
   CGroup: /system.slice/libvirtd.service
           |-1133 /usr/local/sbin/libvirtd
           |-1192 /sbin/dnsmasq --conf-file=/usr/local/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/local/libexec/libvirt_leaseshelper
           `-1193 /sbin/dnsmasq --conf-file=/usr/local/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/local/libexec/libvirt_leaseshelper

Aug 21 19:58:09 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:58:09 localhost dnsmasq[1192]: started, version 2.76 cachesize 150
Aug 21 19:58:09 localhost dnsmasq[1192]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug 21 19:58:09 localhost dnsmasq-dhcp[1192]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
Aug 21 19:58:09 localhost dnsmasq-dhcp[1192]: DHCP, sockets bound exclusively to interface virbr0
Aug 21 19:58:09 localhost dnsmasq[1192]: reading /etc/resolv.conf
Aug 21 19:58:09 localhost dnsmasq[1192]: using nameserver 192.168.1.62#53
Aug 21 19:58:09 localhost dnsmasq[1192]: read /etc/hosts - 2 addresses
Aug 21 19:58:09 localhost dnsmasq[1192]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:58:09 localhost dnsmasq-dhcp[1192]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile

As far as checking if /var/run/libvirt/libvirt-sock actually exists, I don't see anything named libvirt-sock in the libvirt directory. I've dug around on both the QEMU and libivrt wikis. I checked to ensure libvirt is working properly on the system level, and I'm not entirely certain what I should be seeing, but I think it is working:

user@localhost:~$ virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # 

The /var/log/libvirt logs are empty, but I was able to get some output from journalctl.

-- Logs begin at Fri 2016-08-19 02:47:49 CDT, end at Sun 2016-08-21 20:46:32 CDT. --
Aug 21 19:01:37 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:01:37 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:01:37 localhost libvirtd[8374]: libvirt version: 2.2.0
Aug 21 19:01:37 localhost libvirtd[8374]: hostname: localhost.localdomain
Aug 21 19:01:37 localhost libvirtd[8374]: internal error: Failed to find path for dmidecode binary
Aug 21 19:01:38 localhost libvirtd[8374]: internal error: Failed to find path for dmidecode binary
Aug 21 19:01:39 localhost dnsmasq[8602]: started, version 2.76 cachesize 150
Aug 21 19:01:39 localhost dnsmasq[8602]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug 21 19:01:39 localhost dnsmasq-dhcp[8602]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
Aug 21 19:01:39 localhost dnsmasq-dhcp[8602]: DHCP, sockets bound exclusively to interface virbr0
Aug 21 19:01:39 localhost dnsmasq[8602]: reading /etc/resolv.conf
Aug 21 19:01:39 localhost dnsmasq[8602]: using nameserver 192.168.1.62#53
Aug 21 19:01:39 localhost dnsmasq[8602]: read /etc/hosts - 2 addresses
Aug 21 19:01:39 localhost dnsmasq[8602]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:01:39 localhost dnsmasq-dhcp[8602]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:03:12 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:03:12 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:03:13 localhost dnsmasq[8602]: no servers found in /etc/resolv.conf, will retry
-- Reboot --
Aug 21 19:04:03 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:04:03 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:04:03 localhost libvirtd[422]: libvirt version: 2.2.0
Aug 21 19:04:03 localhost libvirtd[422]: hostname: localhost.localdomain
Aug 21 19:04:03 localhost libvirtd[422]: internal error: Failed to find path for dmidecode binary
Aug 21 19:04:03 localhost libvirtd[422]: internal error: Failed to find path for dmidecode binary
Aug 21 19:04:04 localhost dnsmasq[531]: started, version 2.76 cachesize 150
Aug 21 19:04:04 localhost dnsmasq[531]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug 21 19:04:04 localhost dnsmasq-dhcp[531]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
Aug 21 19:04:04 localhost dnsmasq-dhcp[531]: DHCP, sockets bound exclusively to interface virbr0
Aug 21 19:04:04 localhost dnsmasq[531]: no servers found in /etc/resolv.conf, will retry
Aug 21 19:04:04 localhost dnsmasq[531]: read /etc/hosts - 2 addresses
Aug 21 19:04:04 localhost dnsmasq[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:04:04 localhost dnsmasq-dhcp[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:04:09 localhost dnsmasq[531]: reading /etc/resolv.conf
Aug 21 19:04:09 localhost dnsmasq[531]: using nameserver 192.168.1.62#53
Aug 21 19:09:40 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:09:40 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:09:40 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:09:40 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:09:40 localhost dnsmasq[531]: read /etc/hosts - 2 addresses
Aug 21 19:09:40 localhost dnsmasq[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:09:40 localhost dnsmasq-dhcp[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:09:40 localhost libvirtd[1753]: libvirt version: 2.2.0
Aug 21 19:09:40 localhost libvirtd[1753]: hostname: localhost.localdomain
Aug 21 19:09:40 localhost libvirtd[1753]: internal error: Failed to find path for dmidecode binary
Aug 21 19:09:40 localhost libvirtd[1753]: internal error: Failed to find path for dmidecode binary
Aug 21 19:12:38 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:12:38 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:12:38 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:12:38 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:12:38 localhost dnsmasq[531]: read /etc/hosts - 2 addresses
Aug 21 19:12:38 localhost dnsmasq[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:12:38 localhost dnsmasq-dhcp[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:12:38 localhost libvirtd[2401]: libvirt version: 2.2.0
Aug 21 19:12:38 localhost libvirtd[2401]: hostname: localhost.localdomain
Aug 21 19:12:38 localhost libvirtd[2401]: internal error: Failed to find path for dmidecode binary
Aug 21 19:12:38 localhost libvirtd[2401]: internal error: Failed to find path for dmidecode binary
Aug 21 19:16:23 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:16:23 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:16:23 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:16:23 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:16:23 localhost dnsmasq[531]: read /etc/hosts - 2 addresses
Aug 21 19:16:23 localhost dnsmasq[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:16:23 localhost dnsmasq-dhcp[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:24:35 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:24:35 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:24:35 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:24:35 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:24:36 localhost dnsmasq[531]: read /etc/hosts - 2 addresses
Aug 21 19:24:36 localhost dnsmasq[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:24:36 localhost dnsmasq-dhcp[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:35:08 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:35:08 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:35:08 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:35:08 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:35:08 localhost dnsmasq[531]: read /etc/hosts - 2 addresses
Aug 21 19:35:08 localhost dnsmasq[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:35:08 localhost dnsmasq-dhcp[531]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:36:34 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:36:34 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:36:35 localhost dnsmasq[531]: no servers found in /etc/resolv.conf, will retry
-- Reboot --
Aug 21 19:36:51 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:36:51 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:36:52 localhost dnsmasq[520]: started, version 2.76 cachesize 150
Aug 21 19:36:52 localhost dnsmasq[520]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug 21 19:36:52 localhost dnsmasq-dhcp[520]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
Aug 21 19:36:52 localhost dnsmasq-dhcp[520]: DHCP, sockets bound exclusively to interface virbr0
Aug 21 19:36:52 localhost dnsmasq[520]: no servers found in /etc/resolv.conf, will retry
Aug 21 19:36:52 localhost dnsmasq[520]: read /etc/hosts - 2 addresses
Aug 21 19:36:52 localhost dnsmasq[520]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:36:52 localhost dnsmasq-dhcp[520]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile
Aug 21 19:36:56 localhost dnsmasq[520]: reading /etc/resolv.conf
Aug 21 19:36:56 localhost dnsmasq[520]: using nameserver 192.168.1.62#53
Aug 21 19:52:11 localhost systemd[1]: Stopping Virtualization daemon...
Aug 21 19:52:11 localhost systemd[1]: Stopped Virtualization daemon.
Aug 21 19:55:39 localhost dnsmasq[520]: no servers found in /etc/resolv.conf, will retry
-- Reboot --
Aug 21 19:58:08 localhost systemd[1]: Starting Virtualization daemon...
Aug 21 19:58:09 localhost systemd[1]: Started Virtualization daemon.
Aug 21 19:58:09 localhost dnsmasq[1192]: started, version 2.76 cachesize 150
Aug 21 19:58:09 localhost dnsmasq[1192]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Aug 21 19:58:09 localhost dnsmasq-dhcp[1192]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
Aug 21 19:58:09 localhost dnsmasq-dhcp[1192]: DHCP, sockets bound exclusively to interface virbr0
Aug 21 19:58:09 localhost dnsmasq[1192]: reading /etc/resolv.conf
Aug 21 19:58:09 localhost dnsmasq[1192]: using nameserver 192.168.1.62#53
Aug 21 19:58:09 localhost dnsmasq[1192]: read /etc/hosts - 2 addresses
Aug 21 19:58:09 localhost dnsmasq[1192]: read /usr/local/var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
Aug 21 19:58:09 localhost dnsmasq-dhcp[1192]: read /usr/local/var/lib/libvirt/dnsmasq/default.hostsfile

Can anyone see what I'm missing here? Any help is appreciated.

Offline

Board footer

Powered by FluxBB