AWS arm virtual instance is KVM based hypervisor.
With this patch:
$ sudo virt-what
kvm
aws
$ cat /sys/devices/virtual/dmi/id/product_name
t4g.small
Without it:
$ sudo virt-what
aws
Signed-off-by: Xiao Liang <xiliang@redhat.com>
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
-# XXX At the moment KVM cannot be detected on this platform.
-# We hope to fix that, but for now the only fact printed is "aws".
-expected="aws"
+expected="kvm
+aws"
if [ "$output" != "$expected" ]; then
echo "$0: test failed because output did not match expected"
elif echo "$dmi" | grep -q 'Manufacturer: KVM'; then
echo kvm
skip_lkvm=true
+ elif echo "$dmi" | grep -q 'Manufacturer: Amazon EC2' &&
+ echo "$dmi" | grep -q 'System is a virtual machine'; then
+ # This is for AWS Graviton (Arm) systems which don't have CPUID.
+ echo kvm
+ skip_lkvm=true
elif echo "$dmi" | grep -q 'Manufacturer: QEMU'; then
# The test for KVM above failed, so now we know we're
# not using KVM acceleration.