From 33564bc9c898189e9770ba2e69498ca2a1d60aaf Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 Mar 2016 17:51:33 +0100 Subject: (isHyperv) move it along other virt functions --- perl-install/detect_devices.pm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 4740cbe91..48eb3e68f 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1416,17 +1416,6 @@ sub isServer() { || (any { $_->{'model name'} =~ /(Xeon|Opteron)/i } getCPUs()); } -=item isHyperv() - -Are we running under Hyper-V hypervisor? - -=cut - -sub isHyperv() { - dmidecode_category('System')->{Manufacturer} =~ /Microsoft Corporation/i - && dmidecode_category('System')->{'Product Name'} =~ /Virtual Machine/i; -} - sub BIGMEM() { arch() !~ /x86_64/ && $> == 0 && dmi_detect_memory() > 4 * 1024; } @@ -1482,6 +1471,17 @@ sub virt_technology() { $tech ||= chomp_(run_program::get_stdout('systemd-detect-virt')); } +=item isHyperv() + +Are we running under Hyper-V hypervisor? + +=cut + +sub isHyperv() { + dmidecode_category('System')->{Manufacturer} =~ /Microsoft Corporation/i + && dmidecode_category('System')->{'Product Name'} =~ /Virtual Machine/i; +} + =item is_virtualbox() Are we running under VirtualBox hypervisor? -- cgit v1.2.1