User Tools

Site Tools


how_to_install_qemu_guest_agent_on_debian

Install Qemu guest agent for Debian

This article will guide you through the process of installing the qemu guest agent on your virtual private server. The guest agent is a helper daemon that facilitates communication and command execution between the guest and host for tasks such as snapshotting and backing up. Its main purposes are to ensure proper shutdown of the guest and to freeze the guest file system during backups.

Step 1: Log in using SSH or via the Console

You must be connected via SSH and logged in as a user with sudo or root privileges.

Step 2: Make sure that the qemu-guest-agent package is not already installed on your system. By default, if you selected Debian as your operating system during signup with CIFNet, it should be pre-installed.

The commands to do are:

ps axuw | grep qemu
systemctl status qemu-guest-agent

If the package is installed, the command output should appear similar to this.

root         408  0.0  0.0  80056  1384 ?        Ssl  19:11   0:00 /usr/sbin/qemu-ga

If the package is running, the output should appear similar to this:

$ systemctl status qemu-guest-agent
Б≈▐ qemu-guest-agent.service - QEMU Guest Agent
     Loaded: loaded (/lib/systemd/system/qemu-guest-agent.service; static)
     Active: active (running) since Sun 2023-01-22 19:11:40 CST; 10min ago
   Main PID: 408 (qemu-ga)
      Tasks: 2 (limit: 2337)
     Memory: 388.0K
        CPU: 352ms
     CGroup: /system.slice/qemu-guest-agent.service
             Б■■Б■─408 /usr/sbin/qemu-ga

Jan 22 19:11:40 debian-server systemd[1]: Started QEMU Guest Agent.
Jan 22 19:13:30 debian-server systemd[1]: qemu-guest-agent.service: Current com>           

If the qemu-guest-agent package is already installed, you can skip the rest. If it is not installed, please proceed with the next steps.

=== Step 3: Install qemu guest agent ===
<code>apt update && apt -y install qemu-guest-agent

Step 4: Start qemu guest agent

Please note that you will need to start the guest agent manually by using the following commands:

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

Step 5: Verify

Verify that the qemu quest agent is running

systemctl status qemu-guest-agent

Errors:

Common errors that may occur during the execution of the commands apt update && apt -y install qemu-guest-agent include the following:

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

Ign:1 cdrom://[Debian GNU/Linux 11.5.0 _Bullseye_ - Official amd64 DVD Binary-1 20220910-10:40] bullseye InRelease
Err:2 cdrom://[Debian GNU/Linux 11.5.0 _Bullseye_ - Official amd64 DVD Binary-1 20220910-10:40] bullseye Release
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Hit:3 http://deb.debian.org/debian bullseye InRelease
Hit:4 http://security.debian.org/debian-security bullseye-security InRelease
Hit:5 http://deb.debian.org/debian bullseye-updates InRelease
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 11.5.0 _Bullseye_ - Official amd64 DVD Binary-1 20220910-10:40] bullseye Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

You can simply modify the /etc/apt/sources.list file by commenting out the deb line.

#deb cdrom:[Debian GNU/Linux 11.5.0 _Bullseye_ -Official amd64 DVD Binary-1 20220910-10:40]/ bullseye contrib main

Hint: The nano text editor should be pre-installed on your system.

Conclusion:

Congratulations, you have successfully installed the qemu guest agent on your Debian virtual machine.

how_to_install_qemu_guest_agent_on_debian.txt · Last modified: 2023/01/23 01:32 by admin

CIFNet is a leading hosting solution provider, offering a wide range of services including IP bandwidth, co-location, VMware and KVM hosting.
Host Your Site with CIFNet!