Don't match Nutanix-based baremetal systems

resolves: rhbz#2211980
This commit is contained in:
Richard W.M. Jones 2023-06-08 12:44:05 +01:00
parent 3ff22efe3c
commit c10dbd1659
8 changed files with 51 additions and 8 deletions

View File

@ -23,5 +23,5 @@ index d090898e5..170bc24ab 100644
fi
--
2.31.1
2.39.1

View File

@ -79,5 +79,5 @@ index 170bc24ab..c6e4a1e00 100644
# example /proc/cpuinfo line indicating 'not baremetal'
--
2.31.1
2.39.1

View File

@ -32,5 +32,5 @@ similarity index 100%
rename from tests/podman/1/environ
rename to tests/podman/proc/1/environ
--
2.31.1
2.39.1

View File

@ -884,5 +884,5 @@ index 2c346bded..9dbc079f9 100644
Status: contributed by Jordan Webb
--
2.31.1
2.39.1

View File

@ -367,5 +367,5 @@ index 102e23f67..fbf8c54c5 100644
# The test for KVM above failed, so now we know we're
# not using KVM acceleration.
--
2.31.1
2.39.1

View File

@ -0,0 +1,38 @@
From 5f10aff9e4b06fb07eb09411d58ee8c8209ff477 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 7 Jun 2023 10:10:03 +0100
Subject: [PATCH] nutanix: Don't match Nutanix-based baremetal systems
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/virt-what.in b/virt-what.in
index fbf8c54c5..e310f339b 100644
--- a/virt-what.in
+++ b/virt-what.in
@@ -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
--
2.39.1

View File

@ -8,7 +8,7 @@ set -e
# ./copy-patches.sh
project=virt-what
rhel_version=9.2
rhel_version=9.3
# Check we're in the right directory.
if [ ! -f $project.spec ]; then

View File

@ -1,6 +1,6 @@
Name: virt-what
Version: 1.25
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Detect if we are running in a virtual machine
License: GPLv2+
@ -11,7 +11,7 @@ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{versi
Source1: copy-patches.sh
# Patches are maintained in the following repository:
# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-9.2
# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-9.3
# Patches.
Patch0001: 0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch
@ -19,6 +19,7 @@ Patch0002: 0002-Move-docker-and-podman-tests-up-add-comments.patch
Patch0003: 0003-podman-Fix-location-of-test-file-proc-1-environ.patch
Patch0004: 0004-Detect-OCI-containers.patch
Patch0005: 0005-Add-support-for-Alibaba-cloud-on-aarch64.patch
Patch0006: 0006-nutanix-Don-t-match-Nutanix-based-baremetal-systems.patch
BuildRequires: make
BuildRequires: git
@ -125,6 +126,10 @@ fi
%changelog
* Thu Jun 08 2023 Richard W.M. Jones <rjones@redhat.com> - 1.25-4
- Don't match Nutanix-based baremetal systems
resolves: rhbz#2211980
* Mon Jan 30 2023 Richard W.M. Jones <rjones@redhat.com> - 1.25-3
- Add support for Alibaba Cloud on aarch64
resolves: rhbz#2165285