[libvirt-users] Running libvirtd out of source directory connection reset error

Daniel P. Berrangé berrange at redhat.com
Fri May 10 08:42:06 UTC 2019

On Thu, May 09, 2019 at 01:33:51PM -0400, Peter P. wrote:
> Hi all,
> I'm getting started with hacking around with libvirt  and am trying to
> familiarize myself with launching and running an instance of libvirtd
> I built from source on Centos 7.6.
> Following the instructions from https://libvirt.org/compiling.html to
> launch my built versions of libvirtd and virsh, I get the following
> error with no other context when trying to start a domain using "virsh
> start mydomain":
> error: Cannot recv data: Connection reset by peer
> Despite this error, I am able to run commands list virsh list.
> Are there additional parameters needed to launch libvirtd or
> additional services I need to start up alongside it?

If you have libvirt installed from the distro packages, then a plain
"virsh" will find the virsh binary from /usr/bin. This is built to
expect an installation config

   --prefix=/usr --sysconfdir=/etc --localstatedir=/var

If you build your own using "configure" with no args, or with args
that don't match the above, then  your libvirtd binary will be
listening on a different socket, so virsh won't connect successfully.
You should use the "virsh" binary that you just built instead.

|: 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 :|

More information about the libvirt-users mailing list