From aed973cab15b37381991703bd897c6eb2157cdc9 Mon Sep 17 00:00:00 2001 From: Simon Fuhrer Date: Mon, 5 Aug 2019 16:23:39 +0200 Subject: [PATCH] (maint) Fix virtual and is_virtual facts for Nutanix (AHV) VMs --- lib/inc/facter/facts/vm.hpp | 5 +++++ lib/src/facts/windows/virtualization_resolver.cc | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/inc/facter/facts/vm.hpp b/lib/inc/facter/facts/vm.hpp index eac106835e..a9e2402bb6 100644 --- a/lib/inc/facter/facts/vm.hpp +++ b/lib/inc/facter/facts/vm.hpp @@ -108,6 +108,11 @@ namespace facter { namespace facts { */ constexpr static char const* kvm = "kvm"; + /** + * The name for AHV (Nutanix) virtual machine. + */ + constexpr static char const* ahv = "ahv"; + /** * The name for Bochs virtual machine. */ diff --git a/lib/src/facts/windows/virtualization_resolver.cc b/lib/src/facts/windows/virtualization_resolver.cc index 1fd92cc024..bf6db9ab3b 100644 --- a/lib/src/facts/windows/virtualization_resolver.cc +++ b/lib/src/facts/windows/virtualization_resolver.cc @@ -29,6 +29,7 @@ namespace facter { namespace facts { namespace windows { make_tuple("Bochs", string(vm::bochs)), make_tuple("Google", string(vm::gce)), make_tuple("OpenStack", string(vm::openstack)), + make_tuple("AHV", string(vm::ahv)), }; auto vals = _wmi->query(wmi::computersystem, {wmi::manufacturer, wmi::model});