diff options
author | Tim Smith <tsmith84@gmail.com> | 2015-11-27 20:34:50 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2015-11-27 20:34:50 -0800 |
commit | 38e107fe7938a01768420cfbf0207821a36d2be6 (patch) | |
tree | ff8c7fbdb17f500d0988fabb4269938459a9b144 /lib/ohai/mixin | |
parent | dbc5c406df19f0d2bbcca364d1f3d36957d04c81 (diff) | |
download | ohai-38e107fe7938a01768420cfbf0207821a36d2be6.tar.gz |
Expand detection of VirtualPC / Hyper-V guests
This should solve https://github.com/chef/ohai/issues/647
Diffstat (limited to 'lib/ohai/mixin')
-rw-r--r-- | lib/ohai/mixin/dmi_decode.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ohai/mixin/dmi_decode.rb b/lib/ohai/mixin/dmi_decode.rb index 625b6c90..f367e41d 100644 --- a/lib/ohai/mixin/dmi_decode.rb +++ b/lib/ohai/mixin/dmi_decode.rb @@ -22,9 +22,11 @@ module ::Ohai::Mixin::DmiDecode case line when /Manufacturer: Microsoft/ if dmi_data =~ /Product Name: Virtual Machine/ - if dmi_data =~ /Version: VS2005R2/ + if dmi_data =~ /Version: (VS2005R2|6.0)/ return 'virtualpc' - else + elsif dmi_data =~ /Version: (7.0|Hyper-V)/ + return 'hyperv' + elsif dmi_data =~ /Version: 5.0/ return 'virtualserver' end end |