Looking at the installed drivers/hardware for any OS should tell you whether it's a virtual machine or not. The MAC address is also a good bet although there are ways to change it so not 100% reliable.
Device manager in windows, or any number of windows commands, vb scripts, wmi etc. And /proc in linux.
Thanks