nutanix: Don't match Nutanix-based baremetal systems
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 7 Jun 2023 09:10:03 +0000 (10:10 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 8 Jun 2023 11:39:17 +0000 (12:39 +0100)
Nutanix ship baremetal systems which have modified firmware that
reports similar to:

  Manufacturer: Nutanix
  Product Name: NX-T00-4NL3-G5

This is not a virtual machine, but was recognised as such.  Make sure
we match on 'Product Name: AHV' to identify only virtual machines.

Thanks: Scott Yeager, Shaoyu Shang
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2211980
(cherry picked from commit eeb7d8a1e7c73fc9c5b4e987d92a04136d61b07d)

virt-what.in

index fbf8c54..e310f33 100644 (file)
@@ -259,7 +259,8 @@ if echo "$dmi" | grep -q 'Vendor: Parallels'; then
 fi
 
 # Check for Nutanix AHV.
-if echo "$dmi" | grep -q 'Manufacturer: Nutanix'; then
+if echo "$dmi" | grep -q 'Manufacturer: Nutanix' &&
+   echo "$dmi" | grep -q 'Product Name: AHV'; then
     echo nutanix_ahv
 fi