Connection URIs

To control a hypervisor, libvirt tools must first connect to it. You will use a URI to specify the location of the hypervisor. For KVM use a qemu:// URI and for Xen use xen://. For backwards compatibility virsh will also accept just plain xen, which it will treat as xen:///. If no connection option is given, virsh will try to connect to the URI given in the environment variable LIBVIRT_DEFAULT_URI. If none exists, it will probe the defaults in whatever hypervisor drivers it has available.

You can also make a connection to a remote server. For security reasons you will usually use SSH to do this by using an xen+ssh:// or qemu+ssh:// URI.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.