Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] libvirtd in OpenRC (Read 1337 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] libvirtd in OpenRC

There was one other post on this forum from 2020 where there was little detail on this topic but the user was having the same problem as I am I think: https://forum.artixlinux.org/index.php/topic,2931.0.html and still my virt-manager menu is giving me the error "Unable to connect to libvirt qemu:/// system" libvirtd is running as a service, so I am not exactly sure what it is that I am missing here. Any pointers are greatly appreciated.
Code: [Select]
lsmod | grep kvm
kvm_amd               159744  0
kvm                  1085440  1 kvm_amd
irqbypass              16384  1 kvm
ccp                   126976  1 kvm_amd
Code: [Select]
 rc-status --manual
 virtlogd                                                                                                                                                                                                                                                  [  started  ]
 libvirtd

rc-status
Runlevel: default
 dbus                                                                                                                                                                                                                                          [  started 00:20:05 (0) ]
 net.wlan0                                                                                                                                                                                                                                                 [  started  ]
 netmount                                                                                                                                                                                                                                                  [  started  ]
 local                                                                                                                                                                                                                                                     [  started  ]
 agetty.tty6                                                                                                                                                                                                                                   [  started 00:19:52 (0) ]
 agetty.tty5                                                                                                                                                                                                                                   [  started 00:19:52 (0) ]
 agetty.tty1                                                                                                                                                                                                                                   [  started 00:19:52 (0) ]
 agetty.tty2                                                                                                                                                                                                                                   [  started 00:19:52 (0) ]
 agetty.tty4                                                                                                                                                                                                                                   [  started 00:19:52 (0) ]
 agetty.tty3                                                                                                                                                                                                                                   [  started 00:19:52 (0) ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
 virtlogd                                                                                                                                                                                                                                                  [  started  ]
Dynamic Runlevel: manual
 libvirtd                                                                                                                                                                                                                                                  [  started  ]

Re: libvirtd in OpenRC

Reply #1
Permissions maybe. ?

Add yourself to groups libvirt & kvm if not already in them. Log out and in again.

Re: libvirtd in OpenRC

Reply #2
Permissions maybe. ?

Add yourself to groups libvirt & kvm if not already in them. Log out and in again.


Tried this and am still getting the same error... not quite sure what else it could be that I am missing...

Code: [Select]
Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 923, in _do_open
    self._backend.open(cb, data)
  File "/usr/share/virt-manager/virtinst/connection.py", line 171, in open
    conn = libvirt.openAuth(self._open_uri,
  File "/usr/lib/python3.10/site-packages/libvirt.py", line 147, in openAuth
    raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory

Re: libvirtd in OpenRC

Reply #3
Quote
Tried this and am still getting the same error... not quite sure what else it could be that I am missing...
Code: [Select]
Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
That's not the same error as you reported in your first post ?

What happens if you do the following command ?
Code: [Select]
virsh -c qemu:///system
What command are you using that generates the error in your last post ?

Re: libvirtd in OpenRC

Reply #4
That's not he same error as you reported in your first post ?

What happens if you do the following command ?
Code: [Select]
virsh -c qemu:///system
What command are you using that generates the error in your last post ?

Apologies, that error is all part of the same error dialogue box that launches when I attempt to run virt-manager... I can try that and see if it does anything different.

Code: [Select]
 virsh -c qemu:///system
error: failed to connect to the hypervisor
error: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory

still *similar error here

Re: libvirtd in OpenRC

Reply #5
Solved:
libvirt-openrc and libvirt

Activate the libvirt user mode: Uncomment (#) the following lines in /etc/libvirt/libvirtd.conf : # UNIX socket access controls unix_sock_group = "libvirt" unix_sock_ro_perms = "0777" unix_sock_rw_perms = "0770"

Activate the libvirt daemon with the boot system tool of your choice. With the OpenRC boot system: sudo rc-update add libvirtd default

Add your default user to the libvirt group: sudo usermod -a -G libvirt exampleusername

I also had to just do a simple reboot of the service in order to get it back up an operational as indended