[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Rust Xen guest-agent


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Yann Dirson <yann.dirson@xxxxxxxx>
  • Date: Thu, 23 Mar 2023 16:46:41 +0000
  • Delivery-date: Thu, 23 Mar 2023 16:46:59 +0000
  • Feedback-id: 30504962:30504962.20230323:md
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

XCP-ng and our friends at XenServer have a need to collect a number of informations inside guests, to give to
toolstacks and admins enough info to manage the guests properly.  Today Xen downstreams have
to implement a guest agent for this when needed (see below), and we think it would be beneficial
to have one in the Xen Project, that could be configured for the needs of various downstreams.

Playing with this idea we started on several aspects:
- document what information needs to be collected and for what need, and propose a XenStore
  structure (very preliminary ideas in [0])
- a prototype agent [1] that:
  - could be used both as a replacement for what we use now, and for any improved data set we
     would want, as well as any specific needs other downstreams may have
  - would react on event where possible, to make changes visible ASAP to the toolstack
  - would be multi-platform enough to run in (ideally) all guests
  - we decided to write in Rust for various reasons [2]

We'd like to hear from the community what you think about those ideas.

What currently exists that we are aware of are:
- description for a few xenstore paths to store VIF information (iface name, MAC, IP addresses) [3]
- Xenserver's xe-guest-utilities, also used by XCP-ng; details of collected info in [4]
  - until versions 6.x it was implemented as a Linux-specific shell-script daemon [5]
  - this version has been forked for FreeBSD support [6]
  - versions 7.x [7] are a rewrite in Go, which is slightly more efficient by using a single connection to
    XenStore throughout its lifetime, but still uses a "spawn processes every minute" approach to
    data collection; despite its design that should allow support for other OS than Linux, it has
    not been extended for any (one user started a FreeBSD port, starting with conversion of the legacy
    shell script still doing OS detection [8], but the effort stopped short of any modification of Go code).
- QubesOS' meminfo-writer [9]; only collects a "used memory" metric
- apparently nothing for OpenXT ([10] only mentions installing PV drivers for Windows)


[0] https://gitlab.com/ydirson/xen-guest-agent/-/blob/ydi/rust-proto/doc/structure.md
 
 

 
Yann Dirson | Vates Platform Developer
XCP-ng & Xen Orchestra - Vates solutions
w: vates.fr | xcp-ng.org | xen-orchestra.com

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.