puppetlabs/facter — pull request #340 by jeffmccune (2012-10-19 00:50:50+00:00)
Title: (#8210) Add a heavy virtual fact using virt-what

Without this patch facter does not return kvm when running inside of an
enterprise linux guest VM hosted on an enterprise linux kvm host.

This is a problem because facter improperly reports the virtual machine
is actually running on physical hardware, which is not true. This
causes downstream problems for anyone relying on the virtual fact being
accurate.

This patch fixes the problem by adding a new resolver for the virtual
fact that has a very high weight. The new resolver calls `virt-what`,
available on Enterprise Linux machines by installing the `virt-what`
package. The last line of output is used to determine the virtual
machine hypervisor type.

If virt-what is not available or returns no output, then existing lower
weight resolvers are used instead.