diff options
author | Arnaud Patard <rtp@mageia.org> | 2012-12-07 13:58:36 +0000 |
---|---|---|
committer | Arnaud Patard <rtp@mageia.org> | 2012-12-07 13:58:36 +0000 |
commit | 8aeb015eb7628f23a01594dc4c368d2ea3b3ec46 (patch) | |
tree | 2f7e19f2499f7f1c49bcdfb469a3db6a6b2a6279 /perl-install/detect_devices.pm | |
parent | e91e26d4472559de01d75b5f94aecb4b8bf5965f (diff) | |
download | drakx-backup-do-not-use-8aeb015eb7628f23a01594dc4c368d2ea3b3ec46.tar drakx-backup-do-not-use-8aeb015eb7628f23a01594dc4c368d2ea3b3ec46.tar.gz drakx-backup-do-not-use-8aeb015eb7628f23a01594dc4c368d2ea3b3ec46.tar.bz2 drakx-backup-do-not-use-8aeb015eb7628f23a01594dc4c368d2ea3b3ec46.tar.xz drakx-backup-do-not-use-8aeb015eb7628f23a01594dc4c368d2ea3b3ec46.zip |
- Add support to detect if we're running in Hyper-V vm and automatically
load storage driver when probing disks in this case.
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 6ba852fec..a0c6a8c23 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1154,6 +1154,11 @@ sub isServer() { || (any { $_->{'model name'} =~ /(Xeon|Opteron)/i } getCPUs()); } +sub isHyperv() { + dmidecode_category('System')->{'Manufacturer'} =~ /Microsoft Corporation/i + && dmidecode_category('System')->{'Product Name'} =~ /Virtual Machine/i +} + sub BIGMEM() { arch() !~ /x86_64|ia64/ && $> == 0 && dmi_detect_memory() > 4 * 1024; } @@ -1231,6 +1236,7 @@ sub matching_types() { mips_ict => is_mips_ict(), mips_st_ls2f => is_mips_st_ls2f(), laptop => isLaptop(), + hyperv => isHyperv(), 'numpad' => hasNumpad(), 'touchpad' => hasTouchpad(), '64bit' => to_bool(arch() =~ /64/), |