Skip to main content
Topic: [SOLVED]virt-manager Failed to connect socket to '/run/libvirt/virtlogd-sock' (Read 374 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED]virt-manager Failed to connect socket to '/run/libvirt/virtlogd-sock'

Hi everyone,

I am trying to install Whonix on kvm with virt-manager. I have installed the libvirt-runit package because I am running runit and I have enabled the service libvirtd.  I have enabled all the virtual networks, I have added myself to the libvirt group, but when I try to start the Whonix-gateway, I get the following error message:
Code: [Select]
Error starting domain: Failed to connect socket to '/run/libvirt/virtlogd-sock': No such file or directory

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1402, in startup
    self._backend.create()
  File "/usr/lib/python3.12/site-packages/libvirt.py", line 1379, in create
    raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: Failed to connect socket to '/run/libvirt/virtlogd-sock': No such file or directory
.

Any ideas? Thanks!

 

Re: virt-manager Failed to connect socket to '/run/libvirt/virtlogd-sock'

Reply #1
I run virt-manager in runit artix. I have  running libvirtd, virtlockd & virtlogd.  The files /run/libvirt/virtlogd-sock and /run/libvirt/virtlogd-admin-sock are created and destroyed as virtlogd is started and stopped. I'm guessing you may not have enabled or started virtlogd.

Re: virt-manager Failed to connect socket to '/run/libvirt/virtlogd-sock'

Reply #2
I run virt-manager in runit artix. I have  running libvirtd, virtlockd & virtlogd.  The files /run/libvirt/virtlogd-sock and /run/libvirt/virtlogd-admin-sock are created and destroyed as virtlogd is started and stopped. I'm guessing you may not have enabled or started virtlogd.
How can I install or enable virtlogd in runit? A quick pacman -Ss found nothing that matches virtlogd.

Re: virt-manager Failed to connect socket to '/run/libvirt/virtlogd-sock'

Reply #3
Code: [Select]
$ pacman -Qo /etc/runit/sv/{libvirtd,virtlo*d}
/etc/runit/sv/libvirtd/ is owned by libvirt-runit 20180801-3
/etc/runit/sv/virtlockd/ is owned by libvirt-runit 20180801-3
/etc/runit/sv/virtlogd/ is owned by libvirt-runit 20180801-3

You need to install and enable package libvirt-runit. Presumably you got libvirtd running somehow before using rsm or a link so you need to do the same for the virtlogd/virtlockd services.

Re: virt-manager Failed to connect socket to '/run/libvirt/virtlogd-sock'

Reply #4
Creating the links you told me actually solved the issue. Specifically, these are the commands I ran, in case this helps someone.
Code: [Select]
 sudo ln -s /etc/runit/sv/virtlogd /run/runit/service
sudo ln -s /etc/runit/sv/virtlockd /run/runit/service
sudo sv up virtlogd
sudo sv up virtlockd

I really appreciate your help!