Skip to content

Instantly share code, notes, and snippets.

@olivierlambert
Created October 18, 2021 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olivierlambert/46ec3afd339d3f66b4ccbe771a7c9b0b to your computer and use it in GitHub Desktop.
Save olivierlambert/46ec3afd339d3f66b4ccbe771a7c9b0b to your computer and use it in GitHub Desktop.
Xen guest tools rewrite

Xen guest tools rewrite

Context

Guest agents on Linux/BSD are required to report various information to the dom0/toolstack, like the IP address, guest metrics and so on.

As today, those tools are running into a daemon to achieve this. The current code (in Go) is available at https://github.com/xenserver/xe-guest-utilities. However, those tools got a lot of shortcomings:

  • the repo isn't in Xen upstream repo, but owned by Citrix only
  • it's far from being easy for distro maintainers to build them
  • it's not really community driven
  • there's too much coupling betwen the agent and the libs around (eg xenstore)
  • it might be unecessary to use a daemon, udev rules might be enough
  • the current code quality in Go is far from being acceptable to be maintained properlly

Target

A new empty repo was set up here, with a recap on the objectives: https://gitlab.com/xen-project/xen-guest-agent

Goals are:

  • providing a unified upstream source repo for distro maintainers
  • writing it from scratch to make it simple as possible
  • building it with an incremental approach (Linux support first)
  • being community driven
  • splitting clearly the agent from libs (xenstore-read/write…)
  • reducing the burden to package it for distro's

Features

The agent should gather some guest information, and writing them to the xenstore, so dom0 will be able to read it.

Current features (from xe-guest-utilities):

  • Network metrics (vif ID, MAC, v4/v6 address)
  • OS reporting
  • Disk metrics
  • Memory metrics (total, free)
  • PV drivers version
  • If ballooning is enabled

Language

Ideally, something really simple to maintain, use and package, able to use udev. Go knowledge is needed to read the "legacy" repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment