How to determine whether the current host is a physical machine or a virtual machine?

Windows:

Type in CMD: Systeminfo | findstr / i "System Model"

 

If "System Model" contains Virutal, it is a virtual machine, the others are physical machines

Or use the powershell command: get-wmiobject win32_computersystem | fl model

 

Linux:

Type in bash: dmidecode -s system-product-name

Or lshw -class system

Or dmesg | grep -i virtual

 

 

 

 

 

 

posted on 2020-01-07 13:49  张缤分  阅读(182)  评论(0)    收藏  举报

导航