From ee4ad55ae2b9294d03e45a364c70c42f945d2fc7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 15 Dec 2010 19:54:15 +0000 Subject: [PATCH] Detect Microsoft Hyper-V. Based on a description on MSDN: http://blogs.msdn.com/b/sqlosteam/archive/2010/10/30/is-this-real-the-metaphysics-of-hardware-virtualization.aspx Not tested. Hyper-V also supports more detail through the CPUID instruction, which we don't yet display. --- virt-what.in | 6 ++++++ virt-what.pod | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/virt-what.in b/virt-what.in index 96c18b4..46bf12d 100644 --- a/virt-what.in +++ b/virt-what.in @@ -88,6 +88,12 @@ elif echo "$dmi" | grep -q 'Manufacturer: VMware'; then echo vmware fi +# Check for Hyper-V. +# http://blogs.msdn.com/b/sqlosteam/archive/2010/10/30/is-this-real-the-metaphysics-of-hardware-virtualization.aspx +if [ "$cpuid" = "Microsoft Hv" ]; then + echo hyperv +fi + # Check for VirtualPC. if echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then diff --git a/virt-what.pod b/virt-what.pod index 5f028e3..b8e8d95 100644 --- a/virt-what.pod +++ b/virt-what.pod @@ -25,12 +25,11 @@ don't know about or cannot detect. =over 4 -=item B +=item B -The guest appears to be running inside an OpenVZ or Virtuozzo -container. +This is Hyper-V. -Status: contributed by Evgeniy Sokolov +Status: from MSDN description, not tested. =item B @@ -38,6 +37,13 @@ This is KVM. Status: confirmed by RWMJ. +=item B + +The guest appears to be running inside an OpenVZ or Virtuozzo +container. + +Status: contributed by Evgeniy Sokolov + =item B This is QEMU. -- 1.8.3.1