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: 2015-01-21

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
@@ -106,7 +106,7 @@
      elsif Facter.value(:kernel) == "SunOS" and FileTest.exists?("/usr/sbin/prtconf")
        Facter::Core::Execution.exec("/usr/sbin/prtconf -v")
      end
-     (txt =~ /QEMU Virtual (CPU|Machine)/i) ? true : false
+     (txt =~ /QEMU Virtual (CPU|Machine)|Common KVM processor/i) ? true : false
   end
 
   def self.virtualbox?
