1

I have built the latest libvirt repo. But I am unable to connect to libvirtd using virsh command in Ubuntu 22.04. I think it is trying to connect to Modular driver daemons instead of monolithic libvirtd. The error is Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory How to resolve this?

3
  • Is libvirtd actually running? check with systemctl status libvirtd (or /etc/init.d/libvirtd status or even ps -C libvirtd if you're not using systemd). BTW, what do you mean by "trying to connect to modular driver daemons instead of monolithic libvirtd"? That doesn't make any sense. Finally, why build libvirt? It's already packaged for Ubuntu, building it yourself is just pointlessly making things difficult...especially if your lack of knowledge about libvirt leads you to make up weird stuff like "Modular driver daemons" as if that's somehow relevant to libvirt.
    – cas
    Sep 1, 2022 at 7:36
  • @cas Building from the source is for my experiment purpose. libvirt.org/daemons.html would give information about monolithic-libvirtd and Modular driver daemons
    – Franc
    Sep 1, 2022 at 7:42
  • Oh, okay. the libvirtd authors themselves are weirdly mis-using the word "driver". You still need to check if libvirtd is actually running, and since you've built it yourself, you need to configure it yourself and make sure that it is started correctly - whether you're using the monolithic or modular version. The page you linked to seems to have instructions on how to configure it (it also says that both versions are built by default). You're still better off using the package unless you know exactly why you need whatever changes are offered by the new version.
    – cas
    Sep 1, 2022 at 10:14

2 Answers 2

1

The issue is resolved by adding mode = "legacy" to the /etc/libvirt/libvirt.conf and restarting libvirtd service.

0

The issue is resolved by:

systemctl start  virtqemud
systemctl enable virtqemud

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .