Creativity

Innovation

A+ Service

High Value

Can Do!

 

SaasyCloud

SaasyCloud's Turnkey Application Management offerings. Unbeatable value. One monthly price.

Install XCP-NG guest tools on Rocky Linux 9

/ XCP-NG, Rocky Linux, Xen Guest Agent

Author: Sam Morreel. Posted on LinkedIn

Update 2022-10-05: Upstream XCP-NG has released patches and it includes xentools updates to support Rocky 9, Alma 9, CentOS 9 etc. To revert the manual install:

rm -f /usr/share/oem/xs/xe-linux-distribution
rm -f /usr/share/oem/xs/xe-daemon
rm -f /etc/systemd/system/xe-linux-distribution.service
rmdir /usr/share/oem/xs

Then, mount the tools ISO as normal and run the install.sh script and your OS will automatically be detected.

Orginal Article:

Currently as of this writing, there is no automatic way to install Linux guest tools using XCP-NG's guest-tools.iso or EPEL on Rocky Linux 9, CentOS 9/stream. The packages (specifically xe-guest-utilities-latest) are simply not yet available in their respective repos, and the guest-tools.iso won't automatically install them.

Fear not, there's a few simple steps to get this working. Everything you need is located on the guest-tools.iso file. The base install for this article uses the Rocky Linux mininal install.

All commands are executed as root, or alternatively sudo.

First, set the DVD drive to load the guest-tools.iso

Then, mount the .iso:

mount /dev/sr0 -t iso9660 /mnt

Next, we will need to create directory structure that doesn't likely exist on the minimal install. This matches what the xe-linux-distribution.service file expects:

mkdir -p /usr/share/oem/xs

Now let's copy over the required files.

The distro check bash script:

cp /mnt/Linux/xe-linux-distribution /usr/share/oem/xs

The guest agent daemon (ensure the file is executable):

cp /mnt/Linux/xe-daemon /usr/share/oem/xs

Finally, the service file:

cp /mnt/Linux/xe-linux-distribution.service /etc/systemd/system

Now start the service:

systemctl start xe-linux-distribution

Check the status:

systemctl status xe-linux-distribution

     Loaded: loaded (/etc/systemd/system/xe-linux-distribution.service; enabled; vendor preset: disabled)
     Active: active (running) since Sun 2022-08-14 15:40:01 CST; 55min ago
    Process: 1297 ExecStartPre=/usr/share/oem/xs/xe-linux-distribution /var/cache/xe-linux-distribution (code=exited, status=0/SUCCESS)
   Main PID: 1302 (xe-daemon)
      Tasks: 12 (limit: 23456)
     Memory: 9.9M
        CPU: 4.613s
     CGroup: /system.slice/xe-linux-distribution.service
             ├─1302 /usr/share/oem/xs/xe-daemon
             └─1307 logger -t xe-daemon -p debug

Aug 14 15:40:01 localhost.localdomain systemd[1]: Starting Linux Guest Agent...
Aug 14 15:40:01 localhost.localdomain systemd[1]: Started Linux Guest Agent.

If you get the output above, you're good to go. To persist the service through reboots:

systemctl enable xe-linux-distribution

That's a wrap! Note I have only tested this on Rocky Linux 9 and your mileage may vary on other OSs like CentOS 9 / Stream 9 etc. but this procedure should work for those as well.

Enjoy!

Next Post Previous Post