Install XenServer tools in your VM

A guide to install XenServer tools into your VMs.

Install XenServer tools in your VM

This blog post is for people discovering Citrix Hypervisor/XenServer, and wonder about how to install tools (or xen tools) in their VMs. And also what are those tools.

ℹ️
Did you know? XCP-ng is a drop-in free and 100% compatible replacement for XenServer/Citrix Hypervisor. Go take a look on XCP-ng website!

It's also a guide to install xentools for both Linux and Windows VMs. First, we'll see how to check if tools are installed, and then, install those if necessary, on both Linux and Windows.

💡
This guide is 100% identical if you are using XCP-ng instead of Citrix Hypervisor/XenServer!

Are tools installed?

It's really easy to check this with Xen Orchestra: in the home view, a running VM without any operating system icon don't have tools:

See the difference with a "correct" VM (Debian logo):

You can also display all running VMs without tools thanks to the following search: power_state:running !xenTools:""

Here, two running VMs are without tools

In the VM view, you can also read "No Xen tools detected.":

Install XenServer tools

Next step is to install those tools. Also I'll give you some tips.

For any VM, go in the console view on your VM, and insert the appropriate ISO:

  • xs-tools.iso for XenServer 6 and older
  • guest-tools.iso for XenServer 7 and high

Then, each system is a bit different.

For Linux VMs

Debian, Ubuntu (deb based)

For a Debian VM, it's pretty simple, as root:

  • mount /dev/cdrom /mnt
  • bash /mnt/Linux/install.sh
  • umount /dev/cdrom

In a real example:

root@myVM:~# mount /dev/cdrom /mnt       
mount: block device /dev/xvdd is write-protected, mounting read-only
root@myVM:~# bash /mnt/Linux/install.sh 
Detected `Debian GNU/Linux 7.9 (wheezy)' (debian version 7).

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

Continue? [y/n] Y

(Reading database ... 37679 files and directories currently installed.)
Preparing to replace xe-guest-utilities 6.2.0-1133 (using .../xe-guest-utilities_7.0.0-24_all.deb) ...
Stopping xe daemon:  OK
Unpacking replacement xe-guest-utilities ...
Setting up xe-guest-utilities (7.0.0-24) ...
Installing new version of config file /etc/init.d/xe-linux-distribution ...
$Detecting Linux distribution version: OK
$Starting xe daemon:  OK

You should now reboot this Virtual Machine.
root@myVM:~# 

That's all! You can eject the ISO now.

As soon the .deb is installed, tools will report their info: no need to reboot!

CentOS, RHEL (rpm based)

Same principle, almost same procedure than on a Deb based distro:

# mount /dev/cdrom /mnt/
mount: block device /dev/xvdd is write-protected, mounting read-only
[root@localhost ~]# bash /mnt/Linux/install.sh 
Detected `CentOS release 6.6 (Final)' (centos version 6).

The following changes will be made to this Virtual Machine:
  * update arp_notify sysctl.
  * packages to be installed/upgraded:
    - xe-guest-utilities-7.0.0-24.x86_64.rpm
    - xe-guest-utilities-xenstore-7.0.0-24.x86_64.rpm

Continue? [y/n] y


Preparing...                ########################################### [100%]
   1:xe-guest-utilities-xens########################################### [ 50%]
   2:xe-guest-utilities     ########################################### [100%]

You should now reboot this Virtual Machine.
[root@localhost ~]# 

Nope, rebooting is not mandatory.

For Windows VMs

After loading the appropriate ISO, you should see a CD with tools:

Start the setup.exe:

This time, you must reboot.

After the initial reboot, your Windows OS has tools but also extra drivers for Xen (better perfs), eg in your device manager:

Windows quiesce snapshots

You have the agent management, but that's not enough if you want to take quiesced snapshots!

You can read mon on quiesce snapshots on our previous blog post: XenServer quiesce snapshots

What those tools are doing?

Basically, goals of those tools are:

  • to report extra VM info (that only the Operating system can know, not your underlying hypervisor), like VM IP address, kernel version etc.
  • communicate with the OS in case of quiesce snapshots (Windows and its VSS)
  • allow sending signals to the OS (clean reboot, hotplug hardware etc.)

Update tools

You want to update tools? Just do the same procedure than for installing them.

XenServer Enterprise users can enjoy Windows Update doing the work of updating those tools too (but sadly, it's not in the free edition of XenServer).

💡
XCP-ng users can rely on Windows Update to keep their drivers up-to-date, and that's 100% free!