In this guide we will perform an installation of XCP-ng VM or guest tools on Ubuntu | Debian Linux system. XCP-ng VM Tools contains a guest agent application which provides extra information about the Virtual Machine to the host. The XCP-ng hypervisor will then be able to communicate with the guest operating system and for better performance.
The XCP-ng guest tools are made of two main components:
- The kernel drivers for the OS
- A management agent running on the guest OS
There are available methods that can be used to install XCP-ng guest tools on an Ubuntu/Debian Linux system:
- From VM tools ISO image
- From OS APT repositories
Method 1: Install XCP-ng VM Tools from APT repositories
XCP-ng guest tools can be installed from the Ubuntu / Debian OS online repositories with the apt command line tool.
This is the easiest installation method of XCP-ng VM Tools on Debian / Ubuntu operating system:
sudo apt update sudo apt install xe-guest-utilities
Confirm the service is started and configured to run on boot.
sudo systemctl enable xe-linux-distribution sudo systemctl start xe-linux-distribution
Confirm the service is running
$ systemctl status xe-linux-distribution ● xe-linux-distribution.service - LSB: Virtual Machine daemon providing host integration services Loaded: loaded (/etc/init.d/xe-linux-distribution; generated) Active: active (running) since Wed 2021-04-14 14:50:15 UTC; 6 days ago Docs: man:systemd-sysv-generator(8) Tasks: 15 (limit: 4593) Memory: 16.2M CGroup: /system.slice/xe-linux-distribution.service ├─831 /usr/sbin/xe-daemon -p /var/run/xe-daemon.pid └─844 logger -t xe-daemon -p debug Apr 14 14:50:15 ubuntu systemd: Starting LSB: Virtual Machine daemon providing host integration services... Apr 14 14:50:15 ubuntu xe-linux-distribution: $Mounting xenfs on /proc/xen: OK Apr 14 14:50:15 ubuntu xe-linux-distribution: $Detecting Linux distribution version: OK Apr 14 14:50:15 ubuntu xe-linux-distribution: $Starting xe daemon: OK Apr 14 14:50:15 ubuntu systemd: Started LSB: Virtual Machine daemon providing host integration services.
Method 2: Install from the guest tools ISO
This installation supports many distributions including the ones that doesn’t have guest tools in their upstream repositories.
If this is your preferred method first remove xe-guest-utilities package:
sudo apt remove xe-guest-utilities
Agree to continue with package removal:
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: xe-guest-utilities 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. After this operation, 3,453 kB disk space will be freed. Do you want to continue? [Y/n] y
From XCP-ng center console select the instance you wan to install VM Tools on. Then navigate to “General” and click on “XCP-ng VM Tools not installed” link
In the next screen use “Install XCP-ng VM Tools” button to mount the disk on the VM.
The disk mapping should be visible in the VM console.
Login to the instance from the console or SSH and run the commands to mount guest tools ISO inside the VM:
sudo mount /dev/cdrom /mnt
If the ISO is mounted the directory will README.txt file and Linux folder.
$ ls /mnt/ Linux README.txt
Run the installer script:
sudo bash /mnt/Linux/install.sh
Sample execution output:
Detected `Ubuntu 20.04.2 LTS' (ubuntu version 20). The following changes will be made to this Virtual Machine: * packages to be installed/upgraded: - xe-guest-utilities_7.20.0-1_amd64.deb Continue? [y/n] y Selecting previously unselected package xe-guest-utilities. (Reading database ... 119266 files and directories currently installed.) Preparing to unpack .../xe-guest-utilities_7.20.0-1_amd64.deb ... Unpacking xe-guest-utilities (7.20.0-1) ... Setting up xe-guest-utilities (7.20.0-1) ... Processing triggers for systemd (245.4-4ubuntu3.6) ... You should now reboot this Virtual Machine.
Unmount guest tools cd rom:
sudo umount /dev/cdrom
Then reboot the system: