Tuesday, December 6, 2011

How to check a machine is physical or VMware virtual machine

Run command
  • dmidecode | grep -i vmware
  • If it is a physical machine, it won't return any data
  • If it is a VMWare Virtual machine, you will get output like
        Manufacturer: VMware, Inc.
        Product Name: VMware Virtual Platform
  • What is dmidecode ?
Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard. This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. This will often include usage status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel, USB).
Beware that DMI data have proven to be too unreliable to be blindly trusted. Dmidecode does not scan your hardware, it only reports what the BIOS told it to.

Dmidecode is known to work on the following systems:
  • Linux i386, x86-64, ia64
  • FreeBSD i386, amd64
  • NetBSD i386, amd64
  • OpenBSD i386, amd64
  • BeOS i386
  • Cygwin i386
  • Solaris x86
  • Haiku i586


No comments: