Windows:shell
在CMD里输入:Systeminfo | findstr /i "System Model"bash
若是System Model:后面含有Virutal就是虚拟机,其余都是物理机ide
或者用powershell命令:get-wmiobject win32_computersystem | fl modelspa
Linux:unix
在bash里输入:dmidecode -s system-product-namecode
或者lshw -class systemorm
或者dmesg | grep -i virtualget
具体参考:http://unix.stackexchange.com/questions/89714/easy-way-to-determine-virtualization-technology虚拟机