I'm trying to find out whether or not my application is running with a virtualized OS instance. I've been searching online for the past few weeks and I found that VMware implements an invalid x86 instruction to return info about itself and VirtualPC uses a magic number / I/O port (with an IN instruction) to find it.
Both options are workable but is there a better alternative? Is there also a way to detect Xen or VirtualBox? I'm just trying to find the best option available.