The future of VM tools

News Apr 23, 2018

Starting a project like XCP-ng is also the opportunity to explore new possibilities and "ways" of improving usual -boring- stuff.

Today, we'll explore a bit what are "VM tools" and how we could improve the way you need to deploy/install them.

Tools?

On Linux

For Linux guests in XenServer/XCP-ng, tools are almost only scripts that will allow to communicate with the hypervisor (in both ways). This "channel" on Xen is xenstore, a kind of database-ish thing to get info of a VM from outside (and vice-versa).

After installing those tools, you'll be able to read some values. Let's take an example inside a Linux Debian VM with the xenstore-read vm command:

/vm/a89a02e4-62e0-4e72-882c-03214c396f0f

As you can see, thanks to this, we are able to know what is the VM UUID from "inside". But that's also those tools that allow to expose the distro/kernel version outside, for example in Xen Orchestra, you are able to see that:

It's also what allows you to make a "soft shutdown" for a HVM guest.

So in the end, those tools are pretty lightweight. That's also because there is no need for any driver, because unlike the extra drivers you'll need on Windows, they are embed in the Linux kernel (eg: in a HVM guest, any modern Linux kernel will be able to detect that's Xen under the hood, and load the correct drivers to avoid emulation: it's called PVHVM mode).

On Windows

The situation is more complicated on Windows. The first part (reporting data from the OS) is still needed, but that's only a small thing. The big chunk is inside PV drivers.

What's a PV driver

By default in XenServer and XCP-ng, if you install a Windows VM, it will use emulated hardware (via qemu). This is terribly slow.

Installing those drivers will replace the emulated devices by "Xen" devices, allowing to make hypercall, aka "bypassing emulation".

Here is a list of XenServer/XCP-ng PV drivers installed on a Windows VM:

Tool deployment

Usually, you insert the guest-tool.iso in the VM virtual CD and install them, as explained is this guide. Or maybe you have a template with tools already installed. But then you need to re-install them when there is a new tool version available.

Frankly, that should be something from the past. We'd like to use a better model.

A better model

We think those tools should be available almost "directly"/natively in your VM OS. There is multiple ways to achieve that, but remember: closer to the mainline the better. In other words, we'd like to contribute in various Linux distro to have a package with tools, that you could simply install/update via the package manager (yum install or apt install it). In fact, it's already the case on FreeBSD! We will work into this direction for other Linux distros!

Are you package maintainer on any Linux distro? Please contact us on contact at xcp-ng dot org!

How about Windows? Good news, with XenServer Enterprise or XCP-ng, there is already the possibility to rely on Windows Update. In Xen Orchestra, it's very easy to enable it. In the VM advanced view, just click on "Windows Update tools" and boot the VM. On boot, Windows update will be able to detect that and ask you to install those drivers:

Next boot, here is the PV drivers presented by Windows Update:

After some reboots, your device manage should show this:

In XCP-ng

It's likely we'll remove progressively some tools bundled in XCP-ng, but it's very likely we'll at least provide various repo for main distros to be able to get tools from there until it's "by default" into your favorite distribution.

For Windows tools, the answer is almost entirely into Windows Update! (more or less the last bit reporting the Windows version).

Tags

Olivier Lambert

Vates CEO & co-founder, Xen Orchestra and XCP-ng project creator. Enthusiast entrepreneur and Open Source advocate. A very happy Finnish Lapphund owner.