summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2016-02-29 21:40:40 -0800
committerTim Smith <tsmith84@gmail.com>2016-02-29 21:40:40 -0800
commite1e79136ce076b1dcebcf380dc47c784080b3f9e (patch)
tree5b43364773b3d4ebf6f7c54a5141147f9a8e1741
parentc705a8773c2acf6864777a1d21a21de1a08285dd (diff)
downloadohai-e1e79136ce076b1dcebcf380dc47c784080b3f9e.tar.gz
Comment cleanup
virtualization[:mechanism] would have been great, but we didn't setup the data structure right for this to work hypervisor flag is present anywhere the guest has a hypervisor. It's not just a Xen thing If we find KVM CPUs we're on an old paravirt box and BTMs request for info from 2009 is probably not going to get answered. Sorry BTM
-rw-r--r--lib/ohai/plugins/linux/virtualization.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/ohai/plugins/linux/virtualization.rb b/lib/ohai/plugins/linux/virtualization.rb
index 674b892d..2df6a84c 100644
--- a/lib/ohai/plugins/linux/virtualization.rb
+++ b/lib/ohai/plugins/linux/virtualization.rb
@@ -37,9 +37,6 @@ Ohai.plugin(:Virtualization) do
virtualization Mash.new unless virtualization
virtualization[:systems] = Mash.new unless virtualization[:systems]
- # if it is possible to detect paravirt vs hardware virt, it should be put in
- # virtualization[:mechanism]
-
## Xen
# /proc/xen is an empty dir for EL6 + Linode Guests + Paravirt EC2 instances
if File.exist?("/proc/xen")
@@ -60,7 +57,6 @@ Ohai.plugin(:Virtualization) do
# Xen Notes:
# - cpuid of guests, if we could get it, would also be a clue
# - may be able to determine if under paravirt from /dev/xen/evtchn (See OHAI-253)
- # - EL6 guests carry a 'hypervisor' cpu flag
# - Additional edge cases likely should not change the above assumptions
# but rather be additive - btm
@@ -78,11 +74,7 @@ Ohai.plugin(:Virtualization) do
end
end
- # Detect KVM/QEMU from cpuinfo, report as KVM
- # We could pick KVM from 'Booting paravirtualized kernel on KVM' in dmesg
- # 2.6.27-9-server (intrepid) has this / 2.6.18-6-amd64 (etch) does not
- # It would be great if we could read pv_info in the kernel
- # Wait for reply to: http://article.gmane.org/gmane.comp.emulators.kvm.devel/27885
+ # Detect paravirt KVM/QEMU from cpuinfo, report as KVM
if File.exist?("/proc/cpuinfo")
if File.read("/proc/cpuinfo") =~ /QEMU Virtual CPU|Common KVM processor|Common 32-bit KVM processor/
virtualization[:system] = "kvm"