Unable to connect to libvirt qemu:///system. Verify that an appropriate libvirt daemon…
- User
Unable to connect to libvirt qemu:///system. Verify that an appropriate libvirt daemon is running. Libvirt URI is: qemu:///system Traceback (most recent call last): File "/usr/share/virt-manager/virtManager/connection.py", line 932, 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, [valid_auth_options, authcb, cbdata], open_flags) File "/usr/lib/python3.13/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
- Assistant
The error message you're encountering indicates that the Virt Manager is unable to connect to the
libvirtdaemon using theqemu:///systemURI. This typically occurs for several reasons, and I'll guide you through some troubleshooting steps to help resolve the issue.1. Verify that the
libvirtandqemuservices are runningFirst, check if the
libvirtdaemon is running. You can do this by executing the following command in your terminal:sudo systemctl status libvirtdIf the service is not running, you can start it with:
sudo systemctl start libvirtd2. Check for
virtqemud-sockThe error message states that it cannot find the socket file
'/var/run/libvirt/virtqemud-sock'. This file is created when thelibvirtdaemon starts. If the daemon is running, check if the socket file exists:ls -la /var/run/libvirt/virtqemud-sockIf it doesn't exist, there might be an issue with the
libvirtdconfiguration or permissions.3. Permissions
Make sure your user is part of the
libvirtandkvmgroups to allow interaction with virtual machines. You can do this with the following commands:sudo usermod -aG libvirt $(whoami) sudo usermod -aG kvm $(whoami)After running these commands, log out and log back in to apply the group changes.
4. Check logs for errors
Look at the logs to check for any errors related to libvirt:
sudo journalctl -xe | grep libvirtThis will help you identify any potential configuration issues that may be preventing
libvirtfrom starting correctly.5. Reconfigure
libvirtIf there seems to be a configuration issue, you may need to reconfigure
libvirt. Sometimes reinstalling it can help:sudo apt-get --purge remove libvirt-bin libvirt-daemon-system sudo apt-get install libvirt-bin libvirt-daemon-system6. Restart your machine
If you've made changes, sometimes it's a good idea to simply restart your machine to ensure that all services are running correctly.
7. SELinux (if applicable)
If you're running a system with SELinux enabled, it might be blocking access to the socket. Check SELinux status and logs to see if any denials occurred related to
libvirt.You can check the status with:
sestatusConclusion
After performing these steps, try to reconnect using Virt Manager. If the problem persists, feel free to provide additional details or any error messages you encounter during these steps, and I'll be happy to assist further!