| Currently the virtual-related facts are a mess on Facter 4. The directory structure doesn't match between Linux and Windows and it's not obvious which resolvers and helpers are for Windows and which are for Linux. For example, you might think the Facter::Resolvers::Virtualization resolver is platform-agnostic, but if you search for the file itsef, you'll find it in lib/facter/resolvers/windows/virtualization.rb which suggests it's Windows-specific. On Windows, the virtualization facts are under lib/facter/facts/windows/virtualization/{virtual,is_virtual}.rb, Linux has them under lib/facter/facts/linux/{virtual,is_virtual}.rb. On Linux, the facts are resolved using Facter::Util::Facts::VirtualDetector, which you may think is platform-agnostic, but once again it appears to be Linux/POSIX-only, as HyperV Windows machines are detected as physical. The scope of this ticket is to unify the behaviors as much as possible, as the current implementation can cause lots of misconceptions about how the resolvers/helpers are meant to be used. |