Pergunta

Is this possible to detect VMware product name (ESXi, Workstation, Fusion, Player) from Linux guest?

I tried libvirt-what but it shows vmware on all platforms.

Any other ideas?

Foi útil?

Solução

There is a command line tool available (with source code!) that uses the VMware "backdoor" I/O ports and can detect the hypervisor product. See link.

The "Get VMware Version" command has the number 0ah, see link.

Outras dicas

I don't know about ESXi, but QEMU you can detect this way - same might work for ESXi

cat /proc/cpuinfo | grep -i qemu
model name      : QEMU Virtual CPU version 1.0

Or

lspci -nn

might also help as you can look for certain devices that ESXi is emulating if you are using the ESXI specific para-virt network drivers.

Or you could try virt-what which seems comprehensive:

http://people.redhat.com/~rjones/virt-what/

Or dmesg and then grep for fusion or esxi ?

Or sudo dmidecode | egrep -i 'manufacturer|product|vendor'

might help.

Low level wise, ESXI seems to use the 0x5658 io port. If you can craft a program to read from that you can get back 0x564D5868 (or 'VMXh').

Hopefully tho one of the above will help you. Please let me know, I'd be interested to know which works

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top