Discovery of Hyper-V servers does not populate the hyper_v_instance table

chrisdimo
Kilo Contributor

We are implementing Discovery into our environment ( Running Dublin ), and even though Discovery picks up correctly our Hyper-V servers it does not seem to detect the Virtual Machines running on them.   The Wintel guys mentioned that the Hyper-V systems are running a "core install" of Windows. So wondering if perhaps some exe's required by probes are not present perhaps.

Any ideas would be greatly appreciated.

17 REPLIES 17

chrisdimo
Kilo Contributor

Thanks Heaps Mark.


Hi Chris,



So what I have found out is that Microsoft moved the location of the Hyper-V information in Windows 2012 R2 (I can only confirm DataCenter version now, but I have to assume other versions are affected too)



Older versions have the data stored in root\virtualization\


Newer versions have the data stored in root\virtualization\v2\



Luckily for us, the Hyper-V sensors are written so we that we only need to probe the v2 paths and not do any magic figuring out if one is valid or one is not.So we need to add values to the WMI Fields related list in 4 different probes.


Each probe and the value you need is listed below



Windows - Classify


root\virtualization\v2\Msvm_ComputerSystem.Name



Hyper-V - Virtual Networks


root\virtualization\v2\Msvm_VirtualSwitch.Name


root\virtualization\v2\Msvm_VirtualSwitch.ElementName


root\virtualization\v2\Msvm_ActiveConnection.Dependent


root\virtualization\v2\Msvm_ActiveConnection.Antecedent



Hyper-V Resource Pools


root\virtualization\v2\Msvm_ResourcePool.ResourceSubType


root\virtualization\v2\Msvm_ResourcePool.Name


root\virtualization\v2\Msvm_ResourcePool.InstanceID


root\virtualization\v2\Msvm_ResourcePool.Capacity


root\virtualization\v2\Msvm_ResourcePool.AllocationUnits



Hyper-V - Virtual Machines


root\virtualization\v2\Msvm_VirtualSystemSettingData.SystemName


root\virtualization\v2\Msvm_VirtualSystemSettingData.ChassisSerialNumber


root\virtualization\v2\Msvm_VirtualSystemSettingData.BIOSSerialNumber


root\virtualization\v2\Msvm_VirtualSystemSettingData.BIOSGUID


root\virtualization\v2\Msvm_VirtualSystemSettingData.BaseBoardSerialNumber


root\virtualization\v2\Msvm_SyntheticEthernetPortSettingData.InstanceID


root\virtualization\v2\Msvm_SyntheticEthernetPortSettingData.ElementName


root\virtualization\v2\Msvm_ProcessorSettingData.VirtualQuantity


root\virtualization\v2\Msvm_ProcessorSettingData.InstanceID


root\virtualization\v2\Msvm_MemorySettingData.VirtualQuantity


root\virtualization\v2\Msvm_MemorySettingData.InstanceID


root\virtualization\v2\Msvm_MemorySettingData.AllocationUnits


root\virtualization\v2\Msvm_LogicalDisk.SystemName


root\virtualization\v2\Msvm_LogicalDisk.NumberOfBlocks


root\virtualization\v2\Msvm_LogicalDisk.ElementName


root\virtualization\v2\Msvm_LogicalDisk.BlockSize


root\virtualization\v2\Msvm_ComputerSystem.TimeOfLastStateChange


root\virtualization\v2\Msvm_ComputerSystem.Name


root\virtualization\v2\Msvm_ComputerSystem.EnabledState


root\virtualization\v2\Msvm_ComputerSystem.ElementName


root\virtualization\v2\Msvm_ComputerSystem.Description



The last thing i noticed was there was potential for the Hyper-V record to be duped because of a race condition that could occur in the DiscoveryHyperVSensor Script Include.


I didn't want to modify the code in there from the OOB, so I changed the Triggered Probes for the three Classifiers that use Hyper-V probes. I've outlined the steps below on how to accomplish this.



Go into each of these classifiers (Listed under CI Classification -> Windows)


Hyper-V Server


Windows 2008 Server


Windows 2012 Server



In each of these, you'll want to remove the following records from the Triggers Probes list


Hyper-V - Cluster


Hyper-V - Resource Pools


Hyper-V - Virtual Machines



Once each of those are removed, you will want to go into the Sensor named Hyper-V - Virtual Networks


You will now want to add the 3 probes we removed from the earlier list, to the list on this page called Triggers Probes.



What this does is allow us to run the Virtual Networks Probe/Sensor first, process that data, either create or update the Hyper-V record and then fire off the additional probes, thus working around the race condition.



Finally, I have notified Service Now of the change Microsoft made and the potential issue with the Script Include and they are looking into it.


chrisdimo
Kilo Contributor

Hi Mark,


I gave this a go and it made no difference. ie. that table was not populated.


Chris,



Did you get any data back in the Classify Probe containing the Hyper-V information?


Did the other Hyper-V probes run after you made the changes?          


chrisdimo
Kilo Contributor

Hi Mark,


From what I can see and if I have selected correct there is a bunch of invalid classes shown in the xml.   ive attached for your reference.