On Tue, Nov 28, 2023 at 01:02:40PM +0100, Martin Kletzander wrote:
Before this patch users might be confused with the error when no
daemon
nor systemd socket unit is running due to the error message being a bit
vague when running as root with no URI:
# virsh list
error: failed to connect to the hypervisor
error: Operation not supported: Cannot use direct socket mode if no
URI is set
Instead of merely suggesting to start any daemon, also give a hint as to
what socket we have tried looking up:
# virsh list
error: failed to connect to the hypervisor
error: Operation not supported: Cannot connect to
'/var/run/libvirt/virtqemud-sock' and no URI is set, is any virt
daemon or systemd socket unit started?
As Peter points out, this is a misleading message because it is
arbitrarily reporting the first compiled in driver, which may
be no resemblance to what the user was expecting to run. I think
we should not include the sock path here, but we could include
the sock *directory*, as that would help diagnose when someone
built with the wrong install prefix, eg
"No active daemon socket found in /var/run/libvirt, and no
URI is set. Is any libvirt daemon or socket unit started ?"
With regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|