qemu-ga command not found

In this troubleshooting guide we learn how to fix qemu-ga command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

qemu-ga: command not found

or when using sudo you get the following error message

sudo: qemu-ga: command not found

Solutions to qemu-ga: command not found

How To Fix qemu-ga: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu qemu-ga is provided by qemu-guest-agent package.

qemu-guest-agent is:

QEMU is a fast processor emulator: currently the package supports ARM, CRIS, i386, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, SH4, SPARC and x86-64 emulation. By using dynamic translation it achieves reasonable speed while being easy to port on new host CPUs.

This package provides a daemon (agent) to run inside qemu-system guests (full system emulation). It communicates with the host using a virtio-serial channel org.qemu.guest_agent.0, and allows one to perform some functions in the guest from the host, including:

  • querying and setting guest system time
  • performing guest filesystem sync operation
  • initiating guest shutdown or suspend to ram
  • accessing guest files
  • freezing/thawing guest filesystem operations
  • others.

Install this package on a system which is running as guest inside qemu virtual machine. It is not used on the host.

To fix this problem, we can install more using the command below.

sudo apt-get -y install qemu-guest-agent

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install qemu-guest-agent.

sudo apt -y install qemu-guest-agent

Or if you have aptitude installed you can use the following command.

sudo aptitude install qemu-guest-agent

Summary

In this tutorial we learn how to fix qemu-ga command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.