Thanks: Cristian Seres for providing access to a guest.
lkvm-arm \
lx86 \
lxc \
+ nutanix-ahv \
parallels-desktop \
ppc64-baremetal \
ppc64-kvm \
tests/lkvm-arm/Makefile
tests/lx86/Makefile
tests/lxc/Makefile
+ tests/nutanix-ahv/Makefile
tests/parallels-desktop/Makefile
tests/ppc64-baremetal/Makefile
tests/ppc64-kvm/Makefile
--- /dev/null
+# Makefile for virt-what
+# Copyright (C) 2008-2011 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+CLEANFILES = *~
+
+TESTS = test.sh
+
+EXTRA_DIST = \
+ test.sh \
+ proc/cpuinfo \
+ proc/self/status \
+ sbin/dmidecode \
+ sbin/uname \
+ sbin/virt-what-cpuid-helper
--- /dev/null
+processor : 0
+vendor_id : GenuineIntel
+cpu family : 15
+model : 6
+model name : Intel(R) Xeon(R) Silver 4114 CPU @ 2.20GHz
+stepping : 1
+microcode : 0x1
+cpu MHz : 2199.998
+cache size : 16384 KB
+physical id : 0
+siblings : 1
+core id : 0
+cpu cores : 1
+apicid : 0
+initial apicid : 0
+fpu : yes
+fpu_exception : yes
+cpuid level : 13
+wp : yes
+flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc nopl cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat md_clear
+bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs
+bogomips : 4399.99
+clflush size : 64
+cache_alignment : 128
+address sizes : 46 bits physical, 48 bits virtual
+power management:
+
--- /dev/null
+Name: cat
+Umask: 0022
+State: R (running)
+Tgid: 18508
+Ngid: 0
+Pid: 18508
+PPid: 18506
+TracerPid: 0
+Uid: 0 0 0 0
+Gid: 0 0 0 0
+FDSize: 64
+Groups: 0
+NStgid: 18508
+NSpid: 18508
+NSpgid: 18506
+NSsid: 1945
+VmPeak: 5392 kB
+VmSize: 5392 kB
+VmLck: 0 kB
+VmPin: 0 kB
+VmHWM: 760 kB
+VmRSS: 760 kB
+RssAnon: 68 kB
+RssFile: 692 kB
+RssShmem: 0 kB
+VmData: 312 kB
+VmStk: 132 kB
+VmExe: 28 kB
+VmLib: 1456 kB
+VmPTE: 48 kB
+VmSwap: 0 kB
+HugetlbPages: 0 kB
+CoreDumping: 0
+THP_enabled: 1
+Threads: 1
+SigQ: 3/7359
+SigPnd: 0000000000000000
+ShdPnd: 0000000000000000
+SigBlk: 0000000000000000
+SigIgn: 0000000000000000
+SigCgt: 0000000000000000
+CapInh: 0000000000000000
+CapPrm: 0000003fffffffff
+CapEff: 0000003fffffffff
+CapBnd: 0000003fffffffff
+CapAmb: 0000000000000000
+NoNewPrivs: 0
+Seccomp: 0
+Speculation_Store_Bypass: thread vulnerable
+Cpus_allowed: ffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff
+Cpus_allowed_list: 0-239
+Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
+Mems_allowed_list: 0
+voluntary_ctxt_switches: 0
+nonvoluntary_ctxt_switches: 2
--- /dev/null
+#!/bin/sh -
+cat <<'EOF'
+i# dmidecode 3.2
+Getting SMBIOS data from sysfs.
+SMBIOS 2.8 present.
+9 structures occupying 486 bytes.
+Table at 0x000F73C0.
+
+Handle 0x0000, DMI type 0, 24 bytes
+BIOS Information
+ Vendor: SeaBIOS
+ Version: 1.9.1-5.el6
+ Release Date: 04/01/2014
+ Address: 0xE8000
+ Runtime Size: 96 kB
+ ROM Size: 64 kB
+ Characteristics:
+ BIOS characteristics not supported
+ Targeted content distribution is supported
+ BIOS Revision: 0.0
+
+Handle 0x0100, DMI type 1, 27 bytes
+System Information
+ Manufacturer: Nutanix
+ Product Name: AHV
+ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996)
+ Serial Number: B913C223-EEDE-4DFC-BB43-BE1495F4388D
+ UUID: b913c223-eede-4dfc-bb43-be1495f4388d
+ Wake-up Type: Power Switch
+ SKU Number: Not Specified
+ Family: Red Hat Enterprise Linux
+
+Handle 0x0300, DMI type 3, 21 bytes
+Chassis Information
+ Manufacturer: Red Hat
+ Type: Other
+ Lock: Not Present
+ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996)
+ Serial Number: Not Specified
+ Asset Tag: Not Specified
+ Boot-up State: Safe
+ Power Supply State: Safe
+ Thermal State: Safe
+ Security Status: Unknown
+ OEM Information: 0x00000000
+ Height: Unspecified
+ Number Of Power Cords: Unspecified
+ Contained Elements: 0
+
+Handle 0x0400, DMI type 4, 42 bytes
+Processor Information
+ Socket Designation: CPU 0
+ Type: Central Processor
+ Family: Other
+ Manufacturer: Red Hat
+ ID: 61 0F 00 00 FF FB 8B 0F
+ Version: RHEL 7.3.0 PC (i440FX + PIIX, 1996)
+ Voltage: Unknown
+ External Clock: Unknown
+ Max Speed: 2000 MHz
+ Current Speed: 2000 MHz
+ Status: Populated, Enabled
+ Upgrade: Other
+ L1 Cache Handle: Not Provided
+ L2 Cache Handle: Not Provided
+ L3 Cache Handle: Not Provided
+ Serial Number: Not Specified
+ Asset Tag: Not Specified
+ Part Number: Not Specified
+ Core Count: 1
+ Core Enabled: 1
+ Thread Count: 1
+ Characteristics: None
+
+Handle 0x1000, DMI type 16, 23 bytes
+Physical Memory Array
+ Location: Other
+ Use: System Memory
+ Error Correction Type: Multi-bit ECC
+ Maximum Capacity: 2 GB
+ Error Information Handle: Not Provided
+ Number Of Devices: 1
+
+Handle 0x1100, DMI type 17, 40 bytes
+Memory Device
+ Array Handle: 0x1000
+ Error Information Handle: Not Provided
+ Total Width: Unknown
+ Data Width: Unknown
+ Size: 2048 MB
+ Form Factor: DIMM
+ Set: None
+ Locator: DIMM 0
+ Bank Locator: Not Specified
+ Type: RAM
+ Type Detail: Other
+ Speed: Unknown
+ Manufacturer: Red Hat
+ Serial Number: Not Specified
+ Asset Tag: Not Specified
+ Part Number: Not Specified
+ Rank: Unknown
+ Configured Memory Speed: Unknown
+ Minimum Voltage: Unknown
+ Maximum Voltage: Unknown
+ Configured Voltage: Unknown
+
+Handle 0x1300, DMI type 19, 31 bytes
+Memory Array Mapped Address
+ Starting Address: 0x00000000000
+ Ending Address: 0x0007FFFFFFF
+ Range Size: 2 GB
+ Physical Array Handle: 0x1000
+ Partition Width: 1
+
+Handle 0x2000, DMI type 32, 11 bytes
+System Boot Information
+ Status: No errors detected
+
+Handle 0x7F00, DMI type 127, 4 bytes
+End Of Table
+
+EOF
--- /dev/null
+#!/bin/sh -
+echo x86_64
--- /dev/null
+#!/bin/sh -
+echo KVMKVMKVM
--- /dev/null
+# Test for Nutanix AHV
+# Copyright (C) 2019 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+output="$(PATH=../..:$PATH virt-what --test-root=. 2>&1)"
+expected="nutanix_ahv"
+
+if [ "$output" != "$expected" ]; then
+ echo "$0: test failed because output did not match expected"
+ echo "Expected output was:"
+ echo "----------------------------------------"
+ echo "$expected"
+ echo "----------------------------------------"
+ echo "But the actual output of the program was:"
+ echo "----------------------------------------"
+ echo "$output"
+ echo "----------------------------------------"
+ exit 1
+fi
#!/bin/sh -
# @configure_input@
-# Copyright (C) 2008-2017 Red Hat Inc.
+# Copyright (C) 2008-2019 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
skip_qemu_kvm=true
fi
+# Check for Nutanix AHV.
+# This is sufficiently different from KVM and has Viridian extensions,
+# so skip the KVM test.
+if echo "$dmi" | grep -q 'Manufacturer: Nutanix'; then
+ echo nutanix_ahv
+ skip_qemu_kvm=true
+fi
+
# Check for oVirt/RHEV.
if echo "$dmi" | grep -q 'Manufacturer: oVirt'; then
echo ovirt
Status: contributed by Andrew Jones
+=item B<nutanix_ahv>
+
+The guest is running inside Nutanix Acropolis Hypervisor (AHV).
+
+Status: confirmed by RWMJ.
+
=item B<openvz>
The guest appears to be running inside an OpenVZ or Virtuozzo