class Facts::Linux::Hypervisors::HyperV

Constants

FACT_NAME

Public Instance Methods

call_the_resolver() click to toggle source
# File lib/facter/facts/linux/hypervisors/hyper_v.rb, line 8
def call_the_resolver
  fact_value = check_hyper_v
  Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
check_hyper_v() click to toggle source
# File lib/facter/facts/linux/hypervisors/hyper_v.rb, line 13
def check_hyper_v
  manufacturer = Facter::Resolvers::Linux::DmiBios.resolve(:sys_vendor)
  product_name = Facter::Resolvers::Linux::DmiBios.resolve(:product_name)

  return {} if manufacturer =~ /Microsoft/ || product_name == 'Virtual Machine'

  nil
end