]> git.ipfire.org Git - thirdparty/systemd.git/commit - man/systemd.unit.xml
virt: detect Amazon EC2 Nitro instance
authorBertrand Jacquin <bertrand@jacquin.bzh>
Sun, 11 Oct 2020 20:25:00 +0000 (21:25 +0100)
committerNoah Meyerhans <nmeyerha@amazon.com>
Fri, 30 Apr 2021 16:31:34 +0000 (09:31 -0700)
commitb6eca3731dd92b009b182f188936e1c2544574da
tree1f4bb7967e2c3e8492e031c326df1d7486b0198a
parentc068a17f6a18d3ebfabe88fc49e24a923d0bdd0a
virt: detect Amazon EC2 Nitro instance

Amazon EC2 Nitro hypervisor is technically based on KVM[1], which
systemd-detect-virt identify propely from CPUID. However the lack of
CPUID on aarch64 (A1, T4 instance type) prevents a correct
identification, impacting hostnamectl and systemd-random-seed. Instead
it's possible to identify virtualization from DMI vendor ID.

Prior to this commit:
  # hostnamectl
     Static hostname: n/a
  Transient hostname: ip-10-97-8-12
           Icon name: computer
          Machine ID: 8e3772fbcfa3dd6f330a12ff5df5a63b
             Boot ID: b7b7e2fe0079448db664839df59f9817
    Operating System: Gentoo/Linux
              Kernel: Linux 5.4.69-longterm
        Architecture: arm64

After this commit:
  # hostnamectl
     Static hostname: n/a
  Transient hostname: ip-10-97-8-12
           Icon name: computer-vm
             Chassis: vm
          Machine ID: 8e3772fbcfa3dd6f330a12ff5df5a63b
             Boot ID: bd04da57084e41078f20541101867113
      Virtualization: amazon
    Operating System: Gentoo/Linux
              Kernel: Linux 5.4.69-longterm
        Architecture: arm64

[1] https://aws.amazon.com/ec2/faqs/
man/systemd-detect-virt.xml
man/systemd.unit.xml
src/basic/virt.c
src/basic/virt.h
src/test/test-condition.c