Move the AWS detection out from under Xen. AWS runs on KVM and
baremetal these days. The dmidecode information for KVM and baremetal
is a little bit different so we also need to adjust the test for that
case.
Typical SMBIOS info for Xen:
BIOS Information
Vendor: Xen
Version: 4.2.amazon
Typical SMBIOS info for KVM and baremetal:
BIOS Information
Vendor: Amazon EC2
Version: 1.0
Thanks: Vitaly Kuznetsov, Jon Masters.
if [ "$cpuid" = "XenVMMXenVMM" ] &&
! echo "$dmi" | grep -q 'No SMBIOS nor DMI entry point found, sorry'; then
echo xen; echo xen-hvm
- # Check for AWS
- if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then
- echo aws
- fi
skip_qemu_kvm=true
elif [ -d "${root}/proc/xen" ]; then
echo xen
fi
fi
fi
+
+# Check for AWS.
+# AWS on Xen.
+if echo "$dmi" | grep -q 'Version: [0-9]\.[0-9]\.amazon'; then
+ echo aws
+# AWS on baremetal or KVM.
+elif echo "$dmi" | grep -q 'Vendor: Amazon EC2'; then
+ echo aws
+fi
=item B<aws>
-Amazon Web Services cloud guest.
+Amazon Web Services.
-Status: contributed by Qi Guo.
+Note that virt-what will print this fact for baremetal AWS instances,
+which you might not consider to be true virtualization. In this case
+other facts (eg. C<kvm> or C<xen>) would I<not> be present.
+
+Status: contributed by Qi Guo, Vitaly Kuznetsov, confirmed by RWMJ.
=item B<bhyve>