How to Install XCP-ng Guest Tools on Ubuntu

Tech reviewed: Deepak Prasad
Install XCP-ng guest tools on Ubuntu banner with Ubuntu VM connected to XCP-ng hypervisor and guest integration icons

XCP-ng needs guest tools inside each Linux VM so the hypervisor can see the guest OS, report metrics to Xen Orchestra, and perform clean shutdowns or live migrations. On Ubuntu, that usually means installing xe-guest-utilities—the management agent (xe-daemon) plus xe-linux-distribution. Paravirtual drivers are already in the kernel; you are adding the agent, not replacing the whole kernel stack.

This guide covers how to install XCP-ng guest tools on Ubuntu: the fast apt path, installation from the guest-tools ISO (when apt is missing or outdated), service checks, and what to expect when you are not running inside an XCP-ng VM. I ran these steps on Ubuntu 25.04 and simulated the ISO installer with the same install.sh flow Xen Orchestra mounts from guest-tools.iso.

Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic.

IMPORTANT
Install guest tools inside the Ubuntu VM, not on the XCP-ng hypervisor host. Take a snapshot in Xen Orchestra before upgrading tools on a production VM.

Quick command summary

Task Command
Install from Ubuntu repos sudo apt update && sudo apt install -y xe-guest-utilities
Check package version apt-cache policy xe-guest-utilities
Check service (inside XCP-ng VM) systemctl status xe-daemon.service
Mount guest-tools ISO sudo mount /dev/cdrom /mnt
Install from ISO sudo bash /mnt/Linux/install.sh
Force ISO install (unknown derivative) sudo bash /mnt/Linux/install.sh -d ubuntu -m 24 -n
Unmount ISO sudo umount /mnt
Remove tools sudo apt purge -y xe-guest-utilities

What XCP-ng guest tools do on Ubuntu

XCP-ng documentation splits guest support into two layers for Linux:

Layer Provided by Purpose
PV drivers Linux kernel (built-in for years) Fast disk and network I/O on Xen
Management agent xe-guest-utilities package OS name, IP, memory and disk stats, graceful power operations

Without the agent, Xen Orchestra may show Management agent not detected even though the VM runs fine. With tools installed and xe-daemon running, you typically see OS details, memory graphs, and working Shutdown / Reboot buttons from the control plane.

The Ubuntu package installs:

  • /usr/sbin/xe-daemon — periodic XenStore updates
  • /usr/sbin/xe-linux-distribution — writes distro identity at boot
  • xe-daemon.service — systemd unit (enabled on install)

Prerequisites

Inside your Ubuntu guest VM on XCP-ng:

  • Network access to Ubuntu mirrors (for apt) or the guest-tools ISO attached from Xen Orchestra / xe.
  • sudo for package install and ISO mount.
  • universe enabled if apt cannot find the package (sudo add-apt-repository universe).

On the hypervisor (Xen Orchestra):

  1. Select the VM → Console or Advanced.
  2. Attach guest-tools.iso (sometimes labeled XCP-ng VM Tools).

For ISO mounting inside the guest, you need a free mount point such as /mnt—same idea as mounting removable media.


This is the easiest way to install XCP-ng tools on Ubuntu when universe ships xe-guest-utilities.

Install the package

bash
sudo apt update
sudo apt install -y xe-guest-utilities

On Ubuntu 25.04:

text
Get:1 http://archive.ubuntu.com/ubuntu plucky/universe amd64 xe-guest-utilities amd64 7.20.2-0ubuntu1 [765 kB]
Selecting previously unselected package xe-guest-utilities.
Unpacking xe-guest-utilities (7.20.2-0ubuntu1) ...
Setting up xe-guest-utilities (7.20.2-0ubuntu1) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/xe-daemon.service' → '/usr/lib/systemd/system/xe-daemon.service'.

Confirm:

bash
apt-cache policy xe-guest-utilities
dpkg -l xe-guest-utilities
systemctl is-enabled xe-daemon.service
text
Installed: 7.20.2-0ubuntu1
ii  xe-guest-utilities  7.20.2-0ubuntu1  amd64  daemon for monitoring Xen Virtual machines
enabled

The apt package enables xe-daemon.service automatically. You do not need a separate systemctl enable on Ubuntu.

Verify inside an XCP-ng VM

On a real XCP-ng guest, after install (reboot if Xen Orchestra still shows the old state):

bash
systemctl status xe-daemon.service --no-pager
ls /proc/xen/capabilities

You want Active: active (running) and a readable /proc/xen/capabilities file.

What happens on a non-Xen machine

I also ran this on a regular Oracle VM outside XCP-ng. The package installs, but systemd skips the daemon:

text
○ xe-daemon.service - Xen Guest Monitoring Agent
     Active: inactive (dead)
  Condition: start condition unmet
             └─ ConditionPathExists=/proc/xen/capabilities was not met

That is expected. Do not treat a skipped service on KVM or VirtualBox as a failed install—only an XCP-ng/Xen guest has /proc/xen.


Method 2: Install from the XCP-ng guest-tools ISO

Use the ISO when:

  • apt-cache policy xe-guest-utilities shows no candidate (some interim Ubuntu releases, or right after a new LTS launch).
  • Xen Orchestra reports an older agent than the tools bundled with your XCP-ng host (forum reports often cite ISO 7.30.x vs Ubuntu apt 7.20.2).
  • You upgraded Ubuntu in-place and want the installer script’s sysctl and udev tweaks.

Attach and mount the ISO

In Xen Orchestra, mount guest-tools.iso on the VM. Inside Ubuntu:

bash
sudo mkdir -p /mnt
sudo mount /dev/cdrom /mnt
ls /mnt/

You should see at least:

text
Linux  README.txt

If /dev/cdrom is missing, try /dev/sr0 or check lsblk for the virtual CD drive.

Run the installer

bash
sudo bash /mnt/Linux/install.sh

Answer y when prompted, or use non-interactive mode:

bash
sudo bash /mnt/Linux/install.sh -n

On my host, simulating the ISO layout with install.sh auto-detection produced:

text
Detected `Ubuntu 25.04' (ubuntu version 25).

The following changes will be made to this Virtual Machine:
  * update arp_notify sysctl.
  * packages to be installed/upgraded:
    - xe-guest-utilities_7.20.2-0ubuntu1_amd64.deb

Selecting previously unselected package xe-guest-utilities.
Unpacking xe-guest-utilities (7.20.2-0ubuntu1) ...
Setting up xe-guest-utilities (7.20.2-0ubuntu1) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/xe-daemon.service' → '/usr/lib/systemd/system/xe-daemon.service'.

Unmount and eject:

bash
sudo umount /mnt

Detach the ISO from Xen Orchestra so the VM does not boot from the virtual CD on next start.

Force install when detection fails

For derivatives the script does not recognize:

bash
sudo bash /mnt/Linux/install.sh -d ubuntu -m 24 -n

Replace 24 with your Ubuntu major version (22 for 22.04 LTS, 24 for 24.04 LTS, 25 for 25.04).

HINT
Early Ubuntu 22.04 images lacked xe-guest-utilities in the archive; it was added later via jammy-updates. If apt install still fails on an old mirror, use the ISO path above—forum threads confirm both methods work on 22.04 VMs.

Confirm tools in Xen Orchestra and on the host

Xen Orchestra (GUI)

Open the VM → General tab:

  • Management agent detected (or a version string) — agent is running
  • PV drivers detected — paravirtual drivers active (Linux guests usually yes once tools are healthy)

If the agent line stays red after install, reboot the VM once and refresh the view.

XCP-ng host CLI

On the hypervisor (not inside Ubuntu):

bash
xe vm-param-get param-name=PV-drivers-detected uuid=<VM-UUID>
xe vm-param-get param-name=PV-drivers-version uuid=<VM-UUID>

PV-drivers-version should be non-empty when the management agent reports in.

Optional: xenstore-utils inside the guest

xe-guest-utilities does not ship the xenstore-read CLI. For debugging inside a Xen VM you can install:

bash
sudo apt install -y xenstore-utils
xenstore-read name

On a non-Xen test host:

text
xenstore-read: xs_open: No such file or directory

That error simply means you are not on a Xen guest—normal outside XCP-ng.


Upgrade, reinstall, and remove

Upgrade via apt

bash
sudo apt update
sudo apt install --only-upgrade xe-guest-utilities

Reinstall from ISO over apt

Remove the Ubuntu package first only when the ISO installer conflicts; usually you can run install.sh directly and it upgrades in place:

bash
sudo apt install --reinstall xe-guest-utilities

Uninstall

bash
sudo apt purge -y xe-guest-utilities
systemctl is-enabled xe-daemon.service

After purge, is-enabled should report not-found or disabled.


Troubleshooting

Symptom Likely cause Fix
Unable to locate package xe-guest-utilities universe off or unsupported interim release sudo add-apt-repository universe && sudo apt update; else use ISO
xe-daemon skipped / inactive Not running under Xen Expected off XCP-ng; inside VM, check /proc/xen exists
Management agent not detected in XO Service not started or stale UI sudo systemctl restart xe-daemon; reboot VM
mount: /mnt: wrong fs type on ISO CD not attached Attach guest-tools.iso in XO; try /dev/sr0
install.sh cannot detect distro Unknown derivative install.sh -d ubuntu -m <major> -n
Clean shutdown still forced No agent communication Confirm xe-daemon active; reinstall tools
apt version older than XCP-ng ISO Ubuntu lags upstream Install from guest-tools ISO for newer build

References


Summary

To install XCP-ng guest tools on Ubuntu, run sudo apt install xe-guest-utilities when the package exists in universe—on current releases that pulls 7.20.2 and enables xe-daemon.service. When apt is empty or too old, attach guest-tools.iso from Xen Orchestra, mount /dev/cdrom /mnt, and run bash /mnt/Linux/install.sh. Inside a real XCP-ng VM, systemctl status xe-daemon should show active (running) and Xen Orchestra should report the management agent. Off Xen hardware the service stays skipped, which is normal.


Frequently Asked Questions

1. What package installs XCP-ng guest tools on Ubuntu?

The Ubuntu universe package is xe-guest-utilities. It ships xe-daemon and xe-linux-distribution and enables the xe-daemon systemd service. On Ubuntu 25.04 the version is 7.20.2-0ubuntu1.

2. Do I need guest tools on every XCP-ng Ubuntu VM?

Yes for production VMs. XCP-ng uses guest tools to report OS version, IP, memory use, and clean shutdown or reboot. Paravirtual disk and network drivers are already in the Linux kernel; guest tools add the management agent.

3. Why does Xen Orchestra say Management agent not detected after apt install?

The xe-daemon service only runs inside a Xen guest when /proc/xen/capabilities exists. On a non-Xen machine the service is enabled but skipped. Inside an XCP-ng VM, reboot after install and confirm systemctl status xe-daemon shows active running.

4. When should I use the guest-tools ISO instead of apt?

Use the ISO when xe-guest-utilities is missing from your Ubuntu release, when apt is older than the tools bundled with your XCP-ng host, or when Xen Orchestra still reports an outdated agent version after apt install.

5. How do I mount the XCP-ng guest-tools ISO inside Ubuntu?

Attach guest-tools.iso from Xen Orchestra or xe vm-cd-add, then run sudo mount /dev/cdrom /mnt. The ISO contains a Linux folder with install.sh. Unmount with sudo umount /mnt when finished.

6. Is xe-guest-utilities available on Ubuntu 22.04 LTS?

It was missing at the 22.04 launch but later added to jammy-updates. Run sudo apt update && apt-cache policy xe-guest-utilities. If the candidate is none, install from the guest-tools ISO instead.

7. What is the difference between xe-daemon and xe-linux-distribution?

xe-linux-distribution writes distribution name and version into XenStore once at service start. xe-daemon runs continuously and reports network, disk, and memory metrics. Ubuntu packages both in xe-guest-utilities.

8. How do I remove XCP-ng guest tools from Ubuntu?

Run sudo apt purge xe-guest-utilities. That removes the binaries and disables xe-daemon.service. If you installed from the ISO over an older copy, purging once is enough because both paths install the same package name.
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, …

  • Red Hat Certified System Administrator in Red Hat OpenStack
  • Certified Kubernetes Application Developer (CKAD)
  • Red Hat Certified Specialist in Ansible Automation
  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security