How to install Qemu guest agent for Debian / Ubuntu

Estimated reading time: 1 min

Install Qemu guest agent for Debian/Ubuntu

In this article, we will help you to install the Qemu guest agent on your virtual private server. This agent is a helper daemon that exchanges information between the quest and the host and executes commands in the guest for snapshot or backup. The guest agent is used for mainly two things one for properly shut down the guest and the second is to freeze the guest file system when making a backup.

Step 1: Log in using SSH

You must be logged in via SSH as sudo or root user. Please read this article for instructions if you don’t know how to connect.

Step 2: Install qemu guest agent

apt update && apt -y install qemu-guest-agent

Step 3: Enable and Start Qemu Agent

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

Step 4: Verify

Verify that the Qemu quest agent is running

systemctl status qemu-guest-agent

Conclusion

Congratulations,  you have installed the Qemu guest agent on your Debian/Ubuntu based system.

Was this article helpful?
Dislike 1
Views: 20728

Reader Interactions

Comments

  1. ikomrad says

    Nope. I'm on ubuntu 20.04 lts, and the agent cannot be enabled and won't start manually.

    systemctl enable qemu-guest-agent
    Synchronizing state of qemu-guest-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable qemu-guest-agent
    The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
    Alias= settings in the [Install] section, and DefaultInstance= for template
    units). This means they are not meant to be enabled using systemctl.

    Possible reasons for having this kind of units are:
    • A unit may be statically enabled by being symlinked from another unit's
    .wants/ or .requires/ directory.
    • A unit's purpose may be to act as a helper for some other unit which has
    a requirement dependency on it.
    • A unit may be started when needed via activation (socket, path, timer,
    D-Bus, udev, scripted systemctl call, …).
    • In case of template units, the unit is meant to be enabled with some
    instance name specified.

    • Yavuz Aydin says

      Our Ubuntu 20.04 LTS installation does not provide this error. What is the output of the following command:
      dpkg -l qemu-guest-agent

      It should be something like:
      ii qemu-guest-agent 1:4.2-3ubuntu6.21 amd64 Guest-side qemu-system agent

Leave a Reply

Your email address will not be published.

snel-knowledgebase