Greetings!
Please review the pull request #56: (#9295) Initial detection of Hyper-V hypervisor opened by (Elwell)
Some more information about the pull request:
- Opened: Wed Sep 14 16:38:05 UTC 2011
- Based on: puppetlabs:master (cba8ebc3e4cd0a61471bdac62995328776db92bc)
- Requested merge: Elwell:9295 (7ee3dbbe8bdd7b0a83d89cc4006255d39099fbbc)
Description:
pulled out from video card matching and dmidecode
Tested OK on our HV machines -- before:
facter | grep vir
is_virtual => false
virtual => physical
After:
facter | grep vir
is_virtual => true
virtual => hyperv
Thanks!
The Pull Request Bot
Diff follows:
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 666c363..a7fdb96 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -113,6 +113,9 @@ Facter.add("virtual") do
# --- look for pci vendor id used by Xen HVM device
# --- 00:03.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
result = "xenhvm" if p =~ /XenSource/
+ # --- look for Hyper-V video card
+ # --- 00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA
+ result = "hyperv" if p =~ /Microsoft Corporation Hyper-V/
end
else
output = Facter::Util::Resolution.exec('dmidecode')
@@ -122,6 +125,7 @@ Facter.add("virtual") do
result = "vmware" if pd =~ /VMware/
result = "virtualbox" if pd =~ /VirtualBox/
result = "xenhvm" if pd =~ /HVM domU/
+ result = "hyperv" if pd =~ /Product Name: Virtual Machine/
end
elsif Facter.value(:kernel) == 'SunOS'
res = Facter::Util::Resolution.new('prtdiag')
@@ -132,7 +136,7 @@ Facter.add("virtual") do
output.each_line do |pd|
result = "parallels" if pd =~ /Parallels/
result = "vmware" if pd =~ /VMware/
- result = "virtualbox" if pd =~ /VirtualBox/
+ result = "virtualbox" if pd =~ /VirtualBox/
result = "xenhvm" if pd =~ /HVM domU/
end
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
