Skip to content

Commit

Permalink
Detect virtualbox guests via dmidecode so guest additions aren't
Browse files Browse the repository at this point in the history
required
  • Loading branch information
tas50 authored and btm committed Nov 4, 2013
1 parent a436cd2 commit 0b9b6c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ohai/plugins/linux/virtualization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
elsif modules =~ /^vboxdrv/
virtualization[:system] = "vbox"
virtualization[:role] = "host"
elsif modules =~ /^vboxguest/
virtualization[:system] = "vbox"
virtualization[:role] = "guest"
end
end

Expand Down Expand Up @@ -103,6 +100,11 @@
virtualization[:system] = "xen"
virtualization[:role] = "guest"
end
when /Manufacturer: Oracle Corporation/
if so.stdout =~ /Product Name: VirtualBox/
virtualization[:system] = "vbox"
virtualization[:role] = "guest"
end
else
nil
end
Expand Down

0 comments on commit 0b9b6c5

Please sign in to comment.