Skip to main content

Install Qemu-guest-agent on Debian / Ubuntu

QEMU Guest Agent Installation Script

🇬🇧 English

📌 Overview

This script automates the installation and configuration of the qemu-guest-agent service on Debian/Ubuntu-based systems.

It is designed to be:

  • Simple
  • Clean
  • Informative
  • Safe to run multiple times (idempotent behavior)

⚙️ What the Script Does

  1. Clears the terminal for better readability
  2. Displays a visual banner
  3. Updates package lists (apt update)
  4. Upgrades installed packages (apt upgrade -y)
  5. Checks if qemu-guest-agent is already installed
    • If installed → Skips installation
    • If not → Installs it
  6. Checks if the service is running
    • If running → Skips
    • If not → Starts the service
  7. Checks if the service is enabled at boot
    • If enabled → Skips
    • If not → Enables it
  8. Verifies the final service status
  9. Displays a clear summary of all actions performed

🎨 Output Features

  • 🟠 Orange → Processing steps
  • 🟢 Green → Successful actions
  • 🔴 Red → Failed actions

Each step is verified and reports its real status.


▶️ Usage

Option 1 – One-liner (quick run)

apt update && apt install -y curl && clear && curl -s https://docs.greenhome.stream/attachments/38 | sudo bash

Option 2 – Manual (safer)

curl -s -o install.sh https://docs.greenhome.stream/attachments/38
chmod +x install.sh
sudo ./install.sh

⚠️ Requirements

  • Debian / Ubuntu-based system
  • Internet connection
  • Root privileges (use sudo)

🧾 Final Output

At the end, the script shows a summary like:

Package Status  : INSTALLED NOW / ALREADY INSTALLED
Service Status  : STARTED NOW / ALREADY RUNNING
Enable Status   : ENABLED NOW / ALREADY ENABLED
Final State     : RUNNING / NOT RUNNING


🇬🇷 Ελληνικά

📌 Περιγραφή

Αυτό το script αυτοματοποιεί την εγκατάσταση και ρύθμιση της υπηρεσίας qemu-guest-agent σε συστήματα Debian/Ubuntu.

Είναι σχεδιασμένο να είναι:

  • Απλό
  • Καθαρό
  • Κατανοητό
  • Ασφαλές για επαναλαμβανόμενη εκτέλεση

⚙️ Τι κάνει το Script

  1. Καθαρίζει την οθόνη (clear)

  2. Εμφανίζει banner τίτλου

  3. Ενημερώνει τα πακέτα (apt update)

  4. Αναβαθμίζει το σύστημα (apt upgrade -y)

  5. Ελέγχει αν είναι εγκατεστημένο το qemu-guest-agent

    • Αν υπάρχει → Το παραλείπει
    • Αν όχι → Το εγκαθιστά
  6. Ελέγχει αν η υπηρεσία τρέχει

    • Αν τρέχει → Το παραλείπει
    • Αν όχι → Την εκκινεί
  7. Ελέγχει αν είναι ενεργοποιημένη στο boot

    • Αν είναι → Το παραλείπει
    • Αν όχι → Την ενεργοποιεί
  8. Ελέγχει την τελική κατάσταση της υπηρεσίας

  9. Εμφανίζει αναλυτική σύνοψη ενεργειών


🎨 Εμφάνιση

  • 🟠 Πορτοκαλί → Επεξεργασία
  • 🟢 Πράσινο → Επιτυχία
  • 🔴 Κόκκινο → Αποτυχία

Κάθε βήμα επαληθεύεται και εμφανίζει πραγματικό αποτέλεσμα.


▶️ Χρήση

Επιλογή 1 – Γρήγορη εκτέλεση

apt update && apt install -y curl && clear && curl -s https://docs.greenhome.stream/attachments/38 | sudo bash

Επιλογή 2 – Χειροκίνητα (πιο ασφαλές)

curl -s -o install.sh https://docs.greenhome.stream/attachments/38
chmod +x install.sh
sudo ./install.sh

⚠️ Απαιτήσεις

  • Σύστημα Debian / Ubuntu
  • Σύνδεση στο internet
  • Δικαιώματα root (sudo)

🧾 Τελική Σύνοψη

Στο τέλος εμφανίζεται:

Package Status  : INSTALLED NOW / ALREADY INSTALLED
Service Status  : STARTED NOW / ALREADY RUNNING
Enable Status   : ENABLED NOW / ALREADY ENABLED
Final State     : RUNNING / NOT RUNNING