virsh-connect
Connect or reconnect to a libvirt hypervisor from within a virsh shell
TLDR
SYNOPSIS
connect [URI] [--readonly]
DESCRIPTION
connect is a virsh shell command that establishes or re-establishes a connection to a libvirt hypervisor. It is run automatically when the virsh shell starts, using the URI supplied via the -c flag on the command line. It can be used interactively inside a running virsh session to switch to a different hypervisor connection.If no URI is given, virsh reconnects using the current URI. The URI format is `driver[+transport]://[user@][host][:port]/[path]`. Common local URIs include `qemu:///system` (system-wide QEMU/KVM, requires root), `qemu:///session` (per-user QEMU/KVM), `xen:///system` (Xen), and `lxc:///system` (Linux Containers). Remote connections use transport suffixes such as +ssh, +tls, +tcp, or +libssh. When no URI is specified at all, libvirt checks the `LIBVIRTDEFAULTURI` environment variable, then the `uri_default` setting in the client configuration, and finally probes available hypervisors.
PARAMETERS
--readonly
Open a read-only connection to the hypervisor. Restricts operations to non-destructive queries.
SEE ALSO
virsh(1), virsh-list(1), virsh-help(1)
