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