Issue #13700 has been updated by Dan Bode.

The "virtual" fact can only correctly determine the hypervisor for hosts when 
the host has a graphic cards.

This is b/c lspci only looks for virt information related to the graphics card.

When lspci is installed, the virtual fact will not use dmidecode to try to 
determine the hypervisor.

The fact should fall back to using dmidecode when lspci is installed but does 
not detect a virtual platform.

The below code should implement the desired behavior.

<pre>
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index b2b9081..50616fc 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -112,7 +112,8 @@ Facter.add("virtual") do
           # ---   00:08.0 VGA compatible controller: Microsoft Corporation 
Hyper-V virtual VGA
           result = "hyperv" if p =~ /Microsoft Corporation Hyper-V/
         end
-      else
+      end
+      if result == 'physical'
         output = Facter::Util::Resolution.exec('dmidecode')
         if not output.nil?
           output.each_line do |pd|

</pre>
----------------------------------------
Bug #13700: lspci can only determine virtual machines that have graphics cards
https://projects.puppetlabs.com/issues/13700#change-59849

Author: Dan Bode
Status: Unreviewed
Priority: Normal
Assignee: 
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 





-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to