GCE instances are KVM with a non-QEMU userspace. On x86-64 we should
recognize this from the CPUID information, but aarch64 has no
equivalent to this. /proc/device-tree/hypervisor/compatible contains
something but RHEL does not use device tree. However the SMBIOS
tables exported by GCE do contain:
Manufacturer: KVM
so we can use that.
# uname -m
aarch64
# virt-what
google_cloud
kvm
This commit also updates the test.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2114997
Updates: commit
54b726fa7c9687b692162488e8934a426f9fa6c3
Thanks: Eric Auger, Yongkui Guo
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
-expected="google_cloud"
+expected="google_cloud
+kvm"
if [ "$output" != "$expected" ]; then
echo "$0: test failed because output did not match expected"
elif echo "$dmi" | grep -q 'Product Name: KVM'; then
echo kvm
skip_lkvm=true
+ elif echo "$dmi" | grep -q 'Manufacturer: KVM'; then
+ 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.