https://www.toutiao.com/a6745820787447431692/?tt_from=mobile_qq&utm_campaign=client_share×tamp=1574681843&app=news_article&utm_source=mobile_qq&utm_medium=toutiao_android&req_id=20191125193722010014040096021890B7&group_id=6745820787447431692
Leadership: How to determine whether the Linux system installed on VMware?
Leadership: How to determine whether the Linux system installed on VMware?
Outline
Because most of the company server is located on VMware, there are a small part of the system deployed in top physical machine. Leaders of statistics about the number of physical machines and on VMware servers, here are three methods. The following tests based on centos system.
1, the command detector vir-what
# virt-what
If Linux server is located on top of VMware, then the command output vmware information, if it is a physical machine, then there is no output.
2, dmesg | grep VMware command detection
Here, according to some device connected to the PCI bus VMware virtual machine has VMware words; disk name with the word VMware Virtual disk and the like, and a drive from VMware words, as shown above. If it is a physical machine, it will not output the relevant information. As follows:
3, the detection process VMwaretools
Note that this method may fail, because VMware Tools tool may not be installed on some virtual machine
#ps -ef | grep vmtoolsd
Useful friends that help forward Oh! Devops and later will share more content DBA aspects, and interested friends can focus the next ~