Author: rustx
Bug: https://github.com/puppetlabs/facter/pull/419
Bug-Ubuntu: https://launchpad.net/bugs/1170325
Description: detect "Common KVM processor" in /proc/cpuinfo as virtual
Forwarded: not-needed
Last-Update: 2013-05-02

It looks like this was originally implemented upstream in a buggy way to me,
then merged, reverted and merged again upstream, with a correction along the
way. The patch is so trivial that I think that taking rustx's patch as-is is
the easiest way to fix this for now, rather than trying to cherry-pick all the
appropriate upstream commits. The issue is already fixed upstream, so this can
be dropped when we update to the latest upstream release anyway.  --rbasak

--- a/lib/facter/util/virtual.rb
+++ b/lib/facter/util/virtual.rb
@@ -91,7 +91,7 @@
      elsif ["FreeBSD", "OpenBSD"].include? Facter.value(:kernel)
        Facter::Util::Resolution.exec("/sbin/sysctl -n hw.model")
      end
-     (txt =~ /QEMU Virtual CPU/) ? true : false
+     (txt =~ /QEMU Virtual CPU|Common KVM processor/) ? true : false
   end
 
   def self.virtualbox?
