You are not logged in.
I've been trying to work on a GPU pass-through VM using virt-manager and keep getting error messages, the most recent is this one:
Unable to connect to libvirt qemu:///system.
Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
I've already looked through the available forums on archlinux and ubuntu and asked ChatGPT for troubleshooting tips.
In short I reinstalled virt-manager, its dependencies, added myself to the group/user through the .conf files found in "/run/libvirt/". ALL TO NO AVAIL
I ran this command "journalctl -u libvirtd.service" and got the following output:
Dec 20 23:34:59 TheDuckinator-z170gamingk3 systemd[1]: Starting libvirt legacy monolithic daemon...
Dec 20 23:34:59 TheDuckinator-z170gamingk3 systemd[1]: Started libvirt legacy monolithic daemon.
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: started, version 2.89 cachesize 150
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset nftset auth cryptohash DNSSEC>
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq-dhcp[1199]: DHCP, IP range 192.168.122.2 -- 192.168.122.254, lease time 1h
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq-dhcp[1199]: DHCP, sockets bound exclusively to interface virbr0
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: reading /etc/resolv.conf
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 75.75.75.75#53
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 75.75.76.76#53
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 2001:558:feed::1#53
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 2001:558:feed::2#53
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: read /etc/hosts - 7 names
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq[1199]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 names
Dec 20 23:35:00 TheDuckinator-z170gamingk3 dnsmasq-dhcp[1199]: read /var/lib/libvirt/dnsmasq/default.hostsfile
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: libvirt version: 9.10.0
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: hostname: TheDuckinator-z170gamingk3
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: cannot open directory '/run/media/ducksauce/Files': No such file or directory
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: internal error: Failed to autostart storage pool 'Files': cannot open directory '/run/media/ducksauce/Files': No such file or dir>
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: cannot open directory '/run/media/ducksauce/Files/libvirt': No such file or directory
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: internal error: Failed to autostart storage pool 'Win11EmuStrg': cannot open directory '/run/media/ducksauce/Files/libvirt': No s>
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: cannot open directory '/run/media/ducksauce/177498C1279438B6/VMG': No such file or directory
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: internal error: Failed to autostart storage pool 'Games': cannot open directory '/run/media/ducksauce/177498C1279438B6/VMG': No s>
Dec 20 23:35:02 TheDuckinator-z170gamingk3 dnsmasq[1199]: reading /etc/resolv.conf
Dec 20 23:35:02 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 75.75.75.75#53
Dec 20 23:35:02 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 75.75.76.76#53
Dec 20 23:35:02 TheDuckinator-z170gamingk3 dnsmasq[1199]: reading /etc/resolv.conf
Dec 20 23:35:02 TheDuckinator-z170gamingk3 dnsmasq[1199]: using nameserver 75.75.75.75#53
The warning message to look at according to this is the following:
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: cannot open directory '/run/media/ducksauce/Files': No such file or directory
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: internal error: Failed to autostart storage pool 'Files': cannot open directory '/run/media/ducksauce/Files': No such file or dir>
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: cannot open directory '/run/media/ducksauce/Files/libvirt': No such file or directory
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: internal error: Failed to autostart storage pool 'Win11EmuStrg': cannot open directory '/run/media/ducksauce/Files/libvirt': No s>
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: cannot open directory '/run/media/ducksauce/177498C1279438B6/VMG': No such file or directory
Dec 20 23:35:00 TheDuckinator-z170gamingk3 libvirtd[1030]: internal error: Failed to autostart storage pool 'Games': cannot open directory '/run/media/ducksauce/177498C1279438B6/VMG': No s>
But to be honest I'm not sure what this means, these directories do exist on my system. They're my main HDDs..Anyone that can help or has a similar issue feel free to post in response. Thanks in advance. - Nuke
Offline
I am putting this here for anyone who needs a solution like myself, please feel free to post your thoughts and solutions here for us all involved! If anyone has questions, reply and tell me how I can be of help.
Offline
Try systemctl enable libvertd and then systemctl start libvertd.
Offline
I've tried this already but for the sake of this thread I did it again so I can read the outputs here.
Enabling libvirtd works fine but starting gives me this error: Job for libvirtd.service failed because the control process exited with error code.
See "systemctl status libvirtd.service" and "journalctl -xeu libvirtd.service" for details.
And so, now the only logical thing to do would be to check systemctl status and journalctl respectively and post their outputs here as well.
[SYSTEMCTL]
libvirtd.service - libvirt legacy monolithic daemon
Loaded: LOADED (/usr/lib/systemd/system/libvirtd.service; ENABLED; preset: disabled)
Active: FAILED (Result: exit-code) since Thu 2023-12-21 20:16:19 EST; 3min 59s ago
Duration: 31min 43.924s
TriggeredBy: × libvirtd-admin.socket
× libvirtd-ro.socket
× libvirtd.socket
Docs: man:libvirtd(8)
https://libvirt.org/
Process: 560625 ExecStart=/usr/bin/libvirtd $LIBVIRTD_ARGS (code=exited, status=1/FAILURE)
Main PID: 560625 (code=exited, status=1/FAILURE)
Tasks: 4 (limit: 32768)
Memory: 40.0M (peak: 44.4M)
CPU: 3min 59.197s
CGroup: /system.slice/libvirtd.service
├─ 1184 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
├─ 1185 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
└─11271 "[libvirtd]"
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Scheduled restart job, restart counter is at 5.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Start request repeated too quickly.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Failed with result 'exit-code'.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Unit process 1184 (dnsmasq) remains running after unit stopped.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Unit process 1185 (dnsmasq) remains running after unit stopped.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Unit process 11271 (libvirtd) remains running after unit stopped.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: Failed to start libvirt legacy monolithic daemon.
This output implicates that three processes continue to run after my pc is turned off (confirmed) and that libvirt is NOT ACTIVE.
[JournalCTL]
The job identifier is 4344 and the job result is failed.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/l … temd-devel
░░
░░ Automatic restarting of the unit libvirtd.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Start request repeated too quickly.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/l … temd-devel
░░
░░ The unit libvirtd.service has entered the 'failed' state with result 'exit-code'.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Unit process 1184 (dnsmasq) remains running after unit stopped.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Unit process 1185 (dnsmasq) remains running after unit stopped.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: libvirtd.service: Unit process 11271 (libvirtd) remains running after unit stopped.
Dec 21 20:16:19 TheDuckinator-z170gamingk3 systemd[1]: Failed to start libvirt legacy monolithic daemon.
░░ Subject: A start job for unit libvirtd.service has failed
░░ Defined-By: systemd
This output implicates the legacy monolithic daemon failed to start and thus libvirtd.service has failed.
Offline
Hi, have you solved the problem? I met the same problem.
Offline
You can try the following :
# reloading and starting it see if that works
sudo systemctl reload libvirtd
sudo systemctl enable libvirtd
sudo systemctl enable --now libvirtd
# If the commands above dont work
sudo systemctl stop libvirtd
sudo pacman -R libvirt && sudo pacman -Syu && sudo pacman -S libvirt
sudo systemctl enable libvirtd
sudo systemctl enable --now libvirtd
Offline