libvirt remote uri format

Joe Muro joemuro at us.ibm.com
Sat Apr 4 00:37:19 UTC 2020


Hi,

I am using python libvirt api to get domain information. When using a uri
without specifying the socket path,  an error occurs.

uri = "qemu+ssh://myuser@some.kvm.host/system"
conn = libvirt.open(uri)

This results in the following:

libvirt: XML-RPC error : internal error: received hangup event on socket

If I append the socket path to the URI, it works. e.g.

qemu+ssh://myuser@some.kvm.host/system?socket=/var/run/libvirt/libvirt-sock

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.

remote host is ubuntu 20.04 running libvirtd (libvirt) 6.0.0 under systemd

- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20200403/bd43db51/attachment.htm>


More information about the libvirt-users mailing list