Este contenido no está disponible en el idioma seleccionado.

10.2.2. Setting up Communication between Guest Agent and Host


The host machine communicates with the guest agent through a VirtIO serial connection between the host and guest machines. A VirtIO serial channel is connected to the host via a character device driver (typically a Unix socket), and the guest listens on this serial channel. The following procedure shows how to set up the host and guest machines for guest agent use.

Note

For instructions on how to set up the QEMU guest agent on Windows guests, refer to the instructions found here.

Procedure 10.1. Setting up communication between guest agent and host

  1. Open the guest XML

    Open the guest XML with the QEMU guest agent configuration. You will need the guest name to open the file. Use the command # virsh list on the host machine to list the guests that it can recognize. In this example, the guest's name is rhel6:
    # virsh edit rhel6
  2. Edit the guest XML file

    Add the following elements to the XML file and save the changes.
    <channel type='unix'>
       <source mode='bind' path='/var/lib/libvirt/qemu/rhel6.agent'/>
       <target type='virtio' name='org.qemu.guest_agent.0'/>
    </channel>
    
    

    Figure 10.1. Editing the guest XML to configure the QEMU guest agent

  3. Start the QEMU guest agent in the guest

    Download and install the guest agent in the guest virtual machine using yum install qemu-guest-agent if you have not done so already. Once installed, start the service as follows:
    # service start qemu-guest-agent
You can now communicate with the guest by sending valid libvirt commands over the established character device driver.
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.

© 2024 Red Hat, Inc.