Detect Microsoft Hyper-V.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 15 Dec 2010 19:54:15 +0000 (19:54 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 15 Dec 2010 19:54:15 +0000 (19:54 +0000)
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
virt-what.pod

index 96c18b4..46bf12d 100644 (file)
@@ -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
index 5f028e3..b8e8d95 100644 (file)
@@ -25,12 +25,11 @@ don't know about or cannot detect.
 
 =over 4
 
-=item B<openvz>
+=item B<hyperv>
 
-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<kvm>
 
@@ -38,6 +37,13 @@ This is KVM.
 
 Status: confirmed by RWMJ.
 
+=item B<openvz>
+
+The guest appears to be running inside an OpenVZ or Virtuozzo
+container.
+
+Status: contributed by Evgeniy Sokolov
+
 =item B<qemu>
 
 This is QEMU.