Leadership: How to determine whether the Linux system installed on VMware?

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?

Gregg said that the original operation and maintenance 2019-10-12 00:01:00

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.

Leadership: How to determine whether the Linux system installed on VMware?

 


1, the command detector vir-what

# virt-what
Leadership: How to determine whether the Linux system installed on VMware?

 

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

Leadership: How to determine whether the Linux system installed on VMware?

 

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:

Leadership: How to determine whether the Linux system installed on VMware?

 


3, the detection process VMwaretools

Note that this method may fail, because VMware Tools tool may not be installed on some virtual machine

Leadership: How to determine whether the Linux system installed on VMware?

 

#ps -ef | grep vmtoolsd
Leadership: How to determine whether the Linux system installed on VMware?

 


Useful friends that help forward Oh! Devops and later will share more content DBA aspects, and interested friends can focus the next ~

Leadership: How to determine whether the Linux system installed on VMware?

Guess you like

Origin www.cnblogs.com/wb4916/p/12195843.html