如何判断当前主机是物理机还是虚拟机?

如何判断当前主机是物理机还是虚拟机?


Windows:

在CMD里输入:Systeminfo | findstr /i "System Model"

如果System Model:后面含有Virutal就是虚拟机,其他都是物理机

或者用powershell命令:get-wmiobject win32_computersystem | fl model

Linux:

在bash里输入:dmidecode -s system-product-name

或者lshw -class system

或者dmesg | grep -i virtual

具体参考:http://unix.stackexchange.com/questions/89714/easy-way-to-determine-virtualization-technology

posted on 2018-08-14 13:51  tigerloveapple  阅读(7661)  评论(0编辑  收藏  举报