Linux – VMware Linux Server — how can you tell if you are a vm or real hardware

linuxvirtualization

An interesting question. I have logged into a Linux (most likely SuSE) host. Is there some way that I can tell programmatically that I am a VM host or not?

Also assume that the vmtools are not installed.

Best Answer

Use standard Linux tools to inspect the hardware on the system.

cat /proc/scsi/scsi

or

ethtool -i eth0

or

dmidecode | grep -i vmware

If the output of these commands shows hardware with a manufacturer name of "VMWare", you're on a VMWare VM. Multiple commands are provided here because system configurations and tools differ.