VMM Event ID 19999, M.V.E.W.COMPort..ctor

Thats the second time I’m having this problem in 3 years and again i have wasted some time to find solution for that. It’s time to blog it so i want forget it ;].

VMM service want start because invalid entry about COM Ports in SQL. This can happen if some magic happens to VM’s in VMM and the data get inconsistent.

The symptoms are:

Event ID 19999
Clear the failed status of service in scvmm so we can scale out using SCVMM 2012 SP1
Virtual Machine Manager (vmmservice:3372) has encountered an error and needed to exit the process. Windows generated an error report with the following parameters:
Event:VMM20
P1(appName):vmmservice
P2(appVersion):3.1.6011.0
P3(assemblyName):ImgLibEngine
P4(assemblyVer):3.1.6011.0
P5(methodName):M.V.E.W.COMPort..ctor
P6(exceptionType):System.NullReferenceException
P7(callstackHash):a730

And the solution is:

Use SQL Management Studio to run below queries on VMM DB

SELECT v.Name, v.HWProfileID, COUNT(c.VCOMPortId)
FROM tbl_WLC_VObject v
LEFT JOIN tbl_WLC_VCOMPort c
ON v.HWProfileId = c.HWProfileId
GROUP BY v.HWProfileId, v.Name

We will get a list of all VMs along with HWProfileID. We look at the Value column and search for value less the 2. If we find such VM’s we have to use the next query so many time till we get value 2. So i we have 0 we run the query 2 times.

INSERT INTO tbl_WLC_VCOMPort
(HWProfileId, ParentType, PortType, PortNumber)
VALUES
(‘HWProfileID’, 3, 0, 1)

We replace the HWProfileID with the one of the machine we want to increment value of COM Ports.

If by running the first query we find VM with value more then 2 we have first to reset the value to 0 with the query below and after that run the above query twice (Ofc replace the HWProfileID with respectiv VM HWProfileID).

DELETE FROM tbl_WlC_VCOMPort WHERE HWProfileID = ‘HWProfileID’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s