I have been struggling with this problem for a while now and I thought I would share the details along with the solution(s) I have come up with. But first, a little background.
We have a SCOM 2007 R2 server monitoring our servers. We use HP hardware for all of our servers. We have been making an effort to virtualize our environment over the past few months, but our big push is planned for this summer. In an effort to make the preparations, I am trying to use the Virtualization Candidates report provided by the SCVMM 2008 R2 Management Pack.
A few months ago, when I started this whole thing I found that, no matter what parameters I used, I received no results. This didn't seem right, so I started digging deeper into the issue. As it turns out the Virtualization Candidates report doesn't work on HP servers. There are two related parts to this problem. One I have solved, the other I am still working on. In this first part I will give you the first part of the problem and the solution I worked out.
Every computer in SCOM has a property called "Virtual Machine" in its details. You can see this if you select the computer and look in the detail view. This should be set to True if computer is a virtual machine and False if it is a physical machine. When I started looking into this issue I found that for most of our monitored computers, this value was instead NULL so I assumed that if I fixed that issue, my report would have data. So, why was it NULL. The answer is that when Microsoft wrote the MP, they wrote it poorly (at least in my opinion).
The built in discovery that is responsible for this value and located in the System Center Internal Library is called "Discover if Windows Computer is a Virtual Machine". This simply runs the following WMI query and sets the property as the result.
SELECT * FROM Win32_BaseBoard WHERE Manufacturer <> "Microsoft Corporation"
There are two problems with this.
- This will not mark any VMWare guests as Virtual.
- Its looking in Win32_BaseBoard.
It is this second problem that was the problem for me. As it turns out, HP servers don't have a Win32_BaseBoard in their WMI, it simply doesn't exist. When the discovery runs it errors out causing a null value. I solved this problem by looking into the first issue. Someone thankfully had written a custom MP that changed the discovery to account for VMWare guests (http://systemcentercentral.com/Downloads/DownloadsDetails/tabid/144/IndexID/6167/Default.aspx). I took this MP and changed it further so that it would also account for the HP hardware. I took the following steps:
- Downloaded the MP from SystemCenterCentral
- Located SELECT * FROM Win32_BaseBoard WHERE Manufacturer <> "Microsoft Corporation" OR Manufacturer <> "VMware, Inc."
- Change Win32_BaseBoard to Win32_ComputerSystem
- Save and Import your new custom MP.
Doing this gives you a solution where any VMWare guests will have Virtual Machine marked as true, and the HP servers will get marked as false instead of NULL.
Here is a copy of the MP that I used: http://myitforum.com/cs2/blogs/mclanem/Virtual.Machine.Discovery.Custom.xml
Unfortunately, this didn't solve my original problem. While I now have the Virtual Machine property reporting properly on all of my servers, I still don't have any results in my Virtualization Candidates report. I have since worked out why, and I think I am getting close to a solution. I will share my findings and solution once I have it all working (Part 2).