Thursday, May 15, 2008

I came across this problem the other day, where I wanted to determine if a Virtual Machine was running on Hyper-V or Virtual Server 2005 host system.

WMI exposes the Win32_ComputerSystem class which contains information about the Manufacturer and Model of a particular system (this is very hand if you want to check type of system before installing an application, e.g. Virtual Machine Additions). The unfortunate news is that Win32_ComputerSystem returns the following on both Hyper-V and Virtual Server hosts:

So how to determine what it is I am looking at? Well there is another WMI class, Win32_BIOS, which can help. Here you can see a difference in the Version between products.

Hyper-V

Virtual Server 2005 SP1

So far this seems to work for me; I am interested if anyone has alternate suggestions on how to solve my little problem, especially if there are cases where this will break (for example limiting the CPU functionality to run NT 4.0?)

Thursday, May 15, 2008 3:40:55 PM (E. Australia Standard Time, UTC+10:00)
Comments are closed.
Navigation
Search
On this page....
Archives
<January 2009>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567
Categories
Blogroll
Contact me
Send mail to the author(s) E-mail
Powered by

newtelligence dasBlog 2.0.7226.0.