summaryrefslogtreecommitdiffstats
path: root/virt-what.in
diff options
context:
space:
mode:
Diffstat (limited to 'virt-what.in')
-rw-r--r--virt-what.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/virt-what.in b/virt-what.in
index a0f7406..870c09b 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -100,8 +100,10 @@ if [ "$cpuid" = "Microsoft Hv" ]; then
fi
# Check for VirtualPC.
-
-if echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then
+# The negative check for cpuid is to distinguish this from Hyper-V
+# which also has the same manufacturer string in the SM-BIOS data.
+if [ "$cpuid" != "Microsoft Hv" ] &&
+ echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then
echo virtualpc
fi