Is this a critical security issue?
Describe the Bug
When using Linux on Proxmox hosts, facter reports VMs as physical.
Example for the manufacture under proxmoxr: QEMU
# facter dmi
{
bios => {
release_date => "04/01/2014",
vendor => "SeaBIOS",
version => "rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org"
},
chassis => {
type => "Other"
},
manufacturer => "QEMU",
product => {
name => "Standard PC (i440FX + PIIX, 1996)",
uuid => "4806f36a-e9dc-4cb7-a107-4945edb2733d",
version => "pc-i440fx-10.1"
}
}
Similar issues on Windows in BSD:
Expected Behavior
Linux on Proxmox should return virtual = kvm
Steps to Reproduce
Use proxmox / kvm as a hypervisor
use linux as your guest OS
fact returns physical
Environment
Facter: 5.6.1
OS: AlmaLinux 10
Proxmox: 9.1.1
Additional Context
I can try and make a PR, but I'm no ruby guy so I might need some guidance.
I check the code really quick. Should manufacturer check be done in
|
def kvm? |
|
product_name = discover_hypervisor |
|
bios_vendor = Facter::Resolvers::Linux::DmiBios.resolve(:bios_vendor) |
|
@log.debug("Detected bios vendor: #{bios_vendor}") |
|
|
|
Facter::Resolvers::VirtWhat.resolve(:vm) == 'kvm' || |
|
Facter::Resolvers::Lspci.resolve(:vm) == 'kvm' || |
|
bios_vendor&.include?('Amazon EC2') || |
|
bios_vendor&.include?('Google') || |
|
product_name&.include?('OpenStack') |
|
end |
like it is for windows version:
https://github.com/Hedius/openfact/blob/8e7c3e146aba26ec0002ec9d62d69dea34e1058d/lib/facter/resolvers/windows/virtualization.rb#L52
Relevant log output
Is this a critical security issue?
Describe the Bug
When using Linux on Proxmox hosts, facter reports VMs as physical.
Example for the manufacture under proxmoxr: QEMU
Similar issues on Windows in BSD:
Expected Behavior
Linux on Proxmox should return virtual = kvm
Steps to Reproduce
Use proxmox / kvm as a hypervisor
use linux as your guest OS
fact returns physical
Environment
Facter: 5.6.1
OS: AlmaLinux 10
Proxmox: 9.1.1
Additional Context
I can try and make a PR, but I'm no ruby guy so I might need some guidance.
I check the code really quick. Should manufacturer check be done in
openfact/lib/facter/facts/linux/hypervisors/kvm.rb
Lines 37 to 47 in c617902
Relevant log output