X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-what.in;h=e0fdf5bf2e17fbf1244d9189ef6f30a6d051e81d;hb=74a75da0d0b330859efba84a3ec37a7a7076fb0e;hp=627f9616babf0292ed255dadde5feca94e148a6f;hpb=55cf13ae4a00c30b55fe508f544406dce05bdb8d;p=virt-what.git diff --git a/virt-what.in b/virt-what.in index 627f961..e0fdf5b 100644 --- a/virt-what.in +++ b/virt-what.in @@ -81,6 +81,9 @@ fi cpuid=`virt-what-cpuid-helper` # Check for various products in the BIOS information. +# Note that dmidecode doesn't exist on non-PC architectures. On these, +# this will return an error which is ignored (error message redirected +# into $dmi variable). dmi=`LANG=C dmidecode 2>&1` @@ -100,8 +103,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 @@ -158,6 +163,11 @@ if grep -q '^vendor_id.*IBM/S390' $root/proc/cpuinfo; then fi fi +# Check for Parallels. +if echo "$dmi" | grep -q 'Vendor: Parallels'; then + echo parallels +fi + # Check for Xen. if [ "$cpuid" = "XenVMMXenVMM" ]; then