X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=virt-what.in;h=6330fd094a53b31ddd86363f06075de23efd118e;hb=88eb2b7fbd7e6af1cd1860c3f2023ee7b9125d37;hp=9eafa0516fcefa977f57eeddd64571472bb11820;hpb=01ea13d9813df93e294b0d9776d4cefd54b1609b;p=virt-what.git diff --git a/virt-what.in b/virt-what.in index 9eafa05..6330fd0 100644 --- a/virt-what.in +++ b/virt-what.in @@ -132,7 +132,8 @@ fi # The negative check for cpuid is to distinguish this from Hyper-V # which also has the same manufacturer string in the SM-BIOS data. if [ "$cpuid" != "Microsoft Hv" ] && - echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation'; then + echo "$dmi" | grep -q 'Manufacturer: Microsoft Corporation' && + echo "$dmi" | grep -q 'Product Name: Virtual Machine'; then echo virtualpc fi @@ -263,6 +264,10 @@ elif [ "$arch" = "arm" ] || [ "$arch" = "aarch64" ]; then echo xen skip_qemu_kvm=true skip_lkvm=true + elif [ -d "${root}/proc/device-tree/hypervisor" ] && + grep -q "vmware" "${root}/proc/device-tree/hypervisor/compatible"; then + echo vmware + skip_lkvm=true fi elif [ "$arch" = "ia64" ]; then if [ -d "${root}/sys/bus/xen" -a ! -d "${root}/sys/bus/xen-backend" ]; then @@ -344,7 +349,8 @@ if ! "$skip_lkvm"; then fi # Check for Docker. -if [ -f "${root}/.dockerinit" ]; then +if [ -f "${root}/.dockerenv" ] || [ -f "${root}/.dockerinit" ] || \ + grep -qF /docker/ "${root}/proc/self/cgroup" 2>/dev/null; then echo docker fi