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.
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!