From 801dbab607d7ea046f89db2d3fe553ebfda0d228 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Sat, 8 Apr 2017 10:59:23 +0200 Subject: [PATCH] Fix kvmdomain facter QEMU can return a CPU model different than "QEMU Virtual CPU". Check for the "hypervisor" flag instead. Signed-off-by: Aurelien Jarno --- modules/debian_org/lib/facter/servertype.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/debian_org/lib/facter/servertype.rb b/modules/debian_org/lib/facter/servertype.rb index 21dba00b6..d3098352d 100644 --- a/modules/debian_org/lib/facter/servertype.rb +++ b/modules/debian_org/lib/facter/servertype.rb @@ -1,7 +1,7 @@ Facter.add("kvmdomain") do setcode do result = false - if File.new('/proc/cpuinfo').read().index('QEMU Virtual CPU') + if File.new('/proc/cpuinfo').read().index('hypervisor') result = true end result -- 2.20.1