I’ll strait up: I did something dumb. I ‘dnf remove’ ed all of my QEMU and libvirt packages. I need to find a new way to get ot my vms but I keep getting
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': Connection refused
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': Permision denied
and even
libvirt.libvirtError: An error occurred, but the cause is unknown
I have no clue hot to fix and and no clue where to start. I’ve now hit the 4 hour mark and no progress. Any ideas?
To install QEMU/libvirt and related packages, easiest way is using the virtualization group (or virtualization-headless to exclude GUI packages like virt-manager):
sudo dnf group install virtualization
If you have issues using libvirt then please describe the exact steps/commands and full output.
I did what you have suggested and still on virt manger I get
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': Connection refused
I guess I should mension no matter how many time I run this command (because I have done so before) I can run it over and over again and it will prompt me yes or no([y/N]).
Its not missing software that is the issue i think it is missing config or need to restart services.
Did you try a reboot after all the reinstalls.
That often helps clean out temp state that may need resetting.
I added the user and rebooted and after going into virt-manger I get
libvirt.libvirtError: Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
as for journalctl -u libvirtd.service That looks like this
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Deactivated successfully.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 9249 (dnsmasq) remains running after unit stopped.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 9295 (dnsmasq) remains running after unit stopped.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 9296 (dnsmasq) remains running after unit stopped.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 13328 (dnsmasq) remains running after unit stopped.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 13329 (dnsmasq) remains running after unit stopped.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 19007 (qemu-system-x86) remains running after unit stopped.
Jun 06 02:10:26 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 19010 (kvm-nx-lpage-recovery-19007) remains running after unit stopped.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 9249 (dnsmasq) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 9295 (dnsmasq) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 9296 (dnsmasq) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 13328 (dnsmasq) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 13329 (dnsmasq) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 19007 (qemu-system-x86) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Found left-over process 19010 (kvm-nx-lpage-recovery-19007) in control group while starting unit. Ignoring.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: Starting libvirtd.service - Virtualization daemon...
Jun 06 02:11:58 DESKTOP-2CQB8G2.lan systemd[1]: Started libvirtd.service - Virtualization daemon.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq[9295]: read /etc/hosts - 8 names
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq[13328]: read /etc/hosts - 12 names
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq[9295]: read /var/lib/libvirt/dnsmasq/default-2.addnhosts - 0 names
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq[13328]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq-dhcp[9295]: read /var/lib/libvirt/dnsmasq/default-2.hostsfile
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq-dhcp[13328]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq[9249]: read /etc/hosts - 8 names
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan dnsmasq[9249]: read /var/lib/libvirt/dnsmasq/Whonix-External.addnhosts - 0 names
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Deactivated successfully.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 9249 (dnsmasq) remains running after unit stopped.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 9295 (dnsmasq) remains running after unit stopped.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 9296 (dnsmasq) remains running after unit stopped.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 13328 (dnsmasq) remains running after unit stopped.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 13329 (dnsmasq) remains running after unit stopped.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 19007 (qemu-system-x86) remains running after unit stopped.
Jun 06 02:11:59 DESKTOP-2CQB8G2.lan systemd[1]: libvirtd.service: Unit process 19010 (kvm-nx-lpage-recovery-19007) remains running after unit stopped.
This is a legacy service which is no longer used or required as it was split to other virtualization service components, so you don’t need to care about it.
Note the several ‘TriggeredBy’ lines. That service does not need to be enabled since it is launched by one of the named sockets. The default is disabled. It also is not designed to be started manually.
and here is what the out put of virt manger when it “worked”
Unable to connect to libvirt qemu:///system.
Cannot recv data: Connection reset by peer
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/lib64/python3.11/site-packages/libvirt.py", line 147, in openAuth
raise libvirtError('virConnectOpenAuth() failed')
libvirt.libvirtError: Cannot recv data: Connection reset by peer
I have made a tests. I can restart virtqemud.service and virtqemud.socket as meany times as I want and it will “work” giving me the cannot access but then I get the Cannot recv data error