RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2117948 - systemd-detect-virt does not detect Amazon nitro/arm servers correctly
Summary: systemd-detect-virt does not detect Amazon nitro/arm servers correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.6
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-12 20:13 UTC by Nicolas Wildner
Modified: 2023-05-16 11:10 UTC (History)
2 users (show)

Fixed In Version: systemd-239-70.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 09:07:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-plumbers systemd-rhel8 pull 335 0 None open Detect Amazon EC2 Nitro 2022-10-11 14:10:40 UTC
Github systemd systemd pull 19403 0 None Merged virt: differentiate Amazon EC2 bare-metal from VM instances using SMBIOS data 2022-08-15 08:10:18 UTC
Red Hat Issue Tracker RHELPLAN-131043 0 None None None 2022-08-12 20:18:28 UTC
Red Hat Product Errata RHBA-2023:2985 0 None None None 2023-05-16 09:07:42 UTC

Description Nicolas Wildner 2022-08-12 20:13:52 UTC
Description of problem:

Customer wants some of the patches that are already on systemd upstream to be backported to RHEL8. Those are related to systemd-detect-virt misidentifying amazon nitro platform systems as physical, due to the way systemd interprets DMI data. 

Fixed Upstream - https://github.com/systemd/systemd/pull/19403

Version-Release number of selected component (if applicable):

Current RHEL 8.6(possibly RHEL9, but not tested)

How reproducible:

Every time while executing SYSTEMD_LOG_LEVEL=debug systemd-detect-virt

Steps to Reproduce:

1.Execute SYSTEMD_LOG_LEVEL=debug systemd-detect-virt

Actual results:

Found container virtualization none.
No virtualization found in DMI
No virtualization found in CPUID
Virtualization XEN not found, /proc/xen does not exist
/proc/device-tree: No such file or directory
UML virtualization not found in /proc/cpuinfo.
This platform does not support /proc/sysinfo
Found VM virtualization none
none


Expected results:

With the upstream patches, systemd-detect-virt should provide a more detailed or precise output of EC2/Nitro instances. 

Borrowing the output from the upstream patches:

# With changes from #17315
admin@ip-10-0-0-178:~$ sudo sh -c "SYSTEMD_LOG_LEVEL=debug LD_LIBRARY_PATH=$PWD ./systemd-detect-virt"
Found container virtualization none.
Virtualization Amazon EC2 found in DMI (/sys/class/dmi/id/sys_vendor)
Found VM virtualization amazon
amazon

# With this change
admin@ip-10-0-0-12:~/systemd$ sudo sh -c "SYSTEMD_LOG_LEVEL=debug LD_LIBRARY_PATH=$PWD/foo/src/shared/ ./foo/systemd-detect-virt"
Found container virtualization none.
Virtualization Amazon EC2 found in DMI (/sys/class/dmi/id/sys_vendor)
DMI BIOS Extension table indicates virtualization
Found VM virtualization amazon
amazon

Additional info:

For the customer that requested this feature, this seems to be important since some deploy decisions are made based on the output provided by systemd-detect-virt, and it is important that this tool report Amazon hardware correctly.

Comment 1 Plumber Bot 2023-01-12 12:35:51 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel8/pull/335

Comment 7 errata-xmlrpc 2023-05-16 09:07:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (systemd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2985


Note You need to log in before you can comment on or make changes to this bug.