Installation guide

Chapter 19. Remote management of virtualized guests
158
Remote URIs
A Uniform Resource Identifier (URI) is used by virsh and libvirt to connect to a remote host.
URIs can also be used with the --connect parameter for the virsh command to execute single
commands or migrations on remote hosts.
libvirt URIs take the general form (content in square brackets, "[]", represents optional functions):
driver[+transport]://[username@][hostname][:port]/[path][?extraparameters]
The transport method or the hostname must be provided to target an external location.
Examples of remote management parameters
Connect to a remote KVM host named server7, using SSH transport and the SSH username
ccurran.
qemu+ssh://ccurran@server7/
Connect to a remote KVM hypervisor on the host named server7 using TLS.
qemu://server7/
Connect to a remote KVM hypervisor on host server7 using TLS. The no_verify=1 instructs
libvirt not to verify the server's certificate.
qemu://server7/?no_verify=1
Testing examples
Connect to the local KVM hypervisor with a non-standard UNIX socket. The full path to the Unix
socket is supplied explicitly in this case.
qemu+unix:///system?socket=/opt/libvirt/run/libvirt/libvirt-sock
Connect to the libvirt daemon with an unencrypted TCP/IP connection to the server with the IP
address 10.1.1.10 on port 5000. This uses the test driver with default settings.
test+tcp://10.1.1.10:5000/default
Extra URI parameters
Extra parameters can be appended to remote URIs. The table below Table 19.1, “Extra URI
parameters” covers the recognized parameters. All other parameters are ignored. Note that parameter
values must be URI-escaped (that is, a question mark (?) is appended before the parameter and
special characters are converted into the URI format).
Table 19.1. Extra URI parameters
Name Transport mode Description Example usage
name all modes The name passed
to the remote
virConnectOpen
function. The name
is normally formed by
removing transport,
name=qemu:///system