26 July 2005
Virtual Machine detection from guests
There are a few "known" hacks to determine if a program is running under a Virtual Machine, unfortunately none of these supported by Microsoft.
The most common one is the WMI query to find the motherboard manufacturer - if it is Microsoft, then, as of today at least, given that Microsoft don't manufacture motherboards, is relatively reliable.
However, there's a couple of other ones I found out about yesterday which I wasn't aware of (similarly unsupported). Just to show I'm not biased also, they both also detect VMWare.
First up is Red Pill by Joanna Rutkowska which uses the SIDT processor instruction:
http://invisiblethings.org/papers/redpill.html
Secondly, there's VmDetect which is a simple .Net utility.
http://www.codeproject.com/system/VmDetect.asp

Note: I haven't tested these solutions and you're entirely on your own for support if you choose to rely on these mechanism in any applications you write. Also, neither mention Virtual Server explicitly - just Virtual PC. However, I haven't tested this whether either tool identifies Virtual Server.
Comment Notification
If you would like to receive an email when updates are made to this post, please register here
Subscribe to this post's comments using
Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.