<html><body><p><font size="2">The client machine is running macOS. So that explains it. For my case, hard-coding the socket path is not a major problem, although having libvirt "auto-detect" the correct path would certainly be nice. </font><br><br><font size="2">Thanks for your help.</font><br><br><font size="2">- Joe</font><br><br><img width="16" height="16" src="cid:1__=0ABB0FD1DFD873CC8f9e8a93df938690918c0AB@" border="0" alt="Inactive hide details for Andrea Bolognani ---04/06/2020 04:47:04 AM---On Fri, 2020-04-03 at 19:37 -0500, Joe Muro wrote: > Hi,"><font size="2" color="#424282">Andrea Bolognani ---04/06/2020 04:47:04 AM---On Fri, 2020-04-03 at 19:37 -0500, Joe Muro wrote: > Hi,</font><br><br><font size="2" color="#5F5F5F">From:        </font><font size="2">Andrea Bolognani <abologna@redhat.com></font><br><font size="2" color="#5F5F5F">To:        </font><font size="2">Joe Muro <joemuro@us.ibm.com>, libvirt-users@redhat.com</font><br><font size="2" color="#5F5F5F">Date:        </font><font size="2">04/06/2020 04:47 AM</font><br><font size="2" color="#5F5F5F">Subject:        </font><font size="2">[EXTERNAL] Re: libvirt remote uri format</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><tt><font size="2">On Fri, 2020-04-03 at 19:37 -0500, Joe Muro wrote:<br>> Hi,<br>> <br>> I am using python libvirt api to get domain information. When using a uri without specifying the socket path, an error occurs. <br>> <br>> uri = "qemu+ssh://myuser@some.kvm.host/system"<br>> conn = libvirt.open(uri)<br>> <br>> This results in the following:<br>> <br>> libvirt: XML-RPC error : internal error: received hangup event on socket<br>> <br>> If I append the socket path to the URI, it works. e.g. <br>> <br>> qemu+ssh://myuser@some.kvm.host/system?socket=/var/run/libvirt/libvirt-sock <br>> <br>> Is this the recommended way to construct an ssh uri? My concern is that the socket path may be different when connecting to different libvirt hosts.<br>> <br>> remote host is ubuntu 20.04 running libvirtd (libvirt) 6.0.0 under systemd<br><br>Is the client machine running macOS by any chance?<br><br>There is a long-standing issue where that platform will use different<br>paths for certain resources, including the libvirtd socket, and the<br>way it currently works is that the default socket path is chosen by<br>the client, so any mismatch will result in something like the above.<br><br>The plan is to replace our use of nc with a custom virt-nc helper<br>that will link against libvirt on the host side and will thus be able<br>to use the default socket path appropriate for the system; however,<br>as far as I'm aware nobody is currently working on it.<br><br>-- <br>Andrea Bolognani / Red Hat / Virtualization<br><br></font></tt><br><br><BR>
</body></html>