[Pkg-puppet-devel] Bug#1040767: facter: inconsistent detection of Xen dom0

Sergio Gelato sergio.gelato at astro.su.se
Mon Jul 10 10:09:02 BST 2023


Package: facter
Version: 4.3.0-2

On recent amd64 hardware (I haven't tested on ARM), and if the "virt-what" package is installed, "facter virtual is_virtual" in a Xen dom0 returns "virtual => xenhvm" and "is_virtual => true". On some older hardware it returns "virtual => xen0" and "is_virtual => false". If I uninstall the "virt-what" package it returns "virtual => xen0" and "is_virtual => false" on both old and new hardware.

Is this a bug in facter or in virt-what? Formally, a Xen dom0 is indeed a virtual machine, albeit a rather special one, and virt-what only reports (faithfully, as far as I could see) what it gets from the cpuid instruction; so the problem, in my view, is rather how facter makes use of the information from virt-what.

In practice, I prefer for the dom0 to have is_virtual => false since I use is_virtual to decide on such things as whether to install intel-microcode (which doesn't really make sense in a guest domain). I could live with "virtual => xen0, is_virtual => true" since that also lets me single out the dom0. "virtual => xenhvm" for the dom0, on the other hand, doesn't give me enough information.

There are also differences in behavior with and without virt-what in a PVH domU. With virt-what I get "virtual => xen" instead of "virtual => xenu". (The underlying hardware doesn't seem to play a role here.)



More information about the Pkg-puppet-devel mailing list