Getting the qemu guest agent to work

From Levy

Revision as of 11:06, 20 November 2019 by Louis (talk | contribs) (Created page with "== Introduction == This page describes how to get the qemu guest agent to work. Most of the time just installing the agent is enough, but sometimes additional steps are needed...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

This page describes how to get the qemu guest agent to work. Most of the time just installing the agent is enough, but sometimes additional steps are needed.

Installing the guest agent

Installing the guest agent is quite forward. Just use the package provided by the OS vendor. Then, if not automatically done start and enable it.

OpenSuSE

zypper in qemu-guest-agent

On OpenSuSE the guest agent is automatically started and enable to run at boot time

Debian

apt install qemu-guest-agent

Now that the agent is installed it has to be started:

systemctl start qemu-guest-agent
systemctl enable qemu-guest-agent

Creating the guest agent channel

Most of the time this step is done automatically. However, sometimes it fails and the channel must be created manually. It is used by the hypervisor to communicate with the agent. Create the channel by performing these steps:

  1. Log in to your hypervisor
  2. Start the virt-manager
  3. Open the VM and go to Show virtual hardware details
  4. Click Add hardware
  5. Choose channel
  6. Set the name to org.qemu.guest_agent.0
    Create the qemu guest agent channel
  7. Click Finish

The hypervisor should now be able to talk to the qemu guest agent