Feb 21, 2013

How to find a machine whether its a physical machine or a Virtual machine in linux.

You can get this information by using a tool called dmidecode. dmidecode  is a tool for dumping a computerâs DMI (some say SMBIOS) ta-
       ble contents in a human-readable format. This table contains a descrip-
       tion  of  the  systemâs  hardware  components,  as well as other useful
       pieces of information such as serial numbers and BIOS revision.  Thanks
       to  this  table,  you  can  retrieve this information without having to
       probe for the actual hardware.

[root@server2 tmp]# /usr/sbin/dmidecode |grep -i "vm"
                Manufacturer: VMware, Inc.
                Product Name: VMware Virtual Platform
                Serial Number: VMware-24 34 c4 76 3b 1a 94 8d-99 08 5d cc 81 04                            17 25
                        VME (Virtual mode extension)
                        VME (Virtual mode extension)
                Description: VMware SVGA II
                String 1: [MS_VM_CERT/SHA1/27d66596a61c48dd323409dfd5126e33f59                           ae7]
               

               
For a physical machine it will be like below

[mohan@server2 storage]# sudo /usr/sbin/dmidecode |grep -i "vm"
                VME (Virtual mode extension)
                VME (Virtual mode extension)
               

No comments:

Post a Comment