Is this a critical security issue?
Describe the Bug
The virtual - and is_virtual - facts don't correctly detect Windows VMs running on OpenShift, instead reporting the host as being physical
Expected Behavior
The fact should report virtual => kvm, not physical
Steps to Reproduce
- Install openvox-agent on a Windows VM running in OpenShift
- Run
facter virtual
Environment
Version: 5.6.1
Platform: Windows Server 2019 Datacenter
Additional Context
|
elsif /^(Amazon EC2|QEMU)/.match?(manufacturer) |
|
'kvm' |
A possible way to fix this could be to check the model here, as that correctly report as OpenShift Virtualization;
PS C:\> Get-WmiObject -Class win32_ComputerSystem
Domain : [...]
Manufacturer : Red Hat
Model : OpenShift Virtualization
Name : [...]
PrimaryOwnerName : [...]
TotalPhysicalMemory : 17108983808
The dmi fact data is also reasonable
PS C:\> Get-WmiObject -Class Win32_ComputerSystemProduct
IdentifyingNumber : [...]
Name : OpenShift Virtualization
Vendor : Red Hat
Version : 4.22.6
Caption : Computer System Product
Relevant log output
Is this a critical security issue?
Describe the Bug
The
virtual- andis_virtual- facts don't correctly detect Windows VMs running on OpenShift, instead reporting the host as beingphysicalExpected Behavior
The fact should report
virtual=>kvm, notphysicalSteps to Reproduce
facter virtualEnvironment
Version: 5.6.1
Platform: Windows Server 2019 Datacenter
Additional Context
openfact/lib/facter/resolvers/windows/virtualization.rb
Lines 51 to 52 in 0190041
A possible way to fix this could be to check the model here, as that correctly report as
OpenShift Virtualization;The dmi fact data is also reasonable
Relevant log output