Skip to content

[Bug]: Virtual fact not working on Windows on OpenShift #178

Description

@ananace

Is this a critical security issue?

  • This is not a 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

  1. Install openvox-agent on a Windows VM running in OpenShift
  2. 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions