Este contenido no está disponible en el idioma seleccionado.

20.4. Connecting to the Hypervisor with virsh Connect


The virsh connect [hostname-or-URI] [--readonly] command begins a local hypervisor session using virsh. After the first time you run this command it will run automatically each time the virsh shell runs. The hypervisor connection URI specifies how to connect to the hypervisor. The most commonly used URIs are:
  • qemu:///system - connects locally as the root user to the daemon supervising guest virtual machines on the KVM hypervisor.
  • qemu:///session - connects locally as a user to the user's set of guest local machines using the KVM hypervisor.
  • lxc:/// - connects to a local Linux container.
The command can be run as follows, with the target guest being specified either either by its machine name (hostname) or the URL of the hypervisor (the output of the virsh uri command), as shown:
Copy to Clipboard Toggle word wrap
$ virsh uri
qemu:///session
For example, to establish a session to connect to your set of guest virtual machines, with you as the local user:
Copy to Clipboard Toggle word wrap
$ virsh connect qemu:///session
To initiate a read-only connection, append the above command with --readonly. For more information on URIs, see Remote URIs. If you are unsure of the URI, the virsh uri command will display it:
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat, Inc.