Tuesday, December 12, 2006


Dell OMCI and SMS

Recently I'm working on deploying Dell's OpenManage Client Instrumentation (OMCI) to several hundred workstations via SMS. It's a relatively simple little thing: a few setup files and command-line switches for setup.exe to install silently. It installs a service (IAP) and adds the dellomci namespace to WMI. Easy, right?

Well, no. First of all, when reinstalling OMCI something goes horribly wrong and OMCI ditches the MOFs (by default at %programfiles%\Dell\OpenManage\Client\Mofs\), thus the WMI namespace doesn't exist. This is apparent by errors in %windir%\system32\wbem\logs\mofcomp.log, e.g., "File 'C:\Program Files\Dell\OpenManage\Client\Mofs\DellOMCI_WinPrep.mof' not found!" This isn't too hard to work-around, just setup SMS to only advertise the package to systems without OMCI. Moving on....

Then I notice that during the OMCI installation it shuts down the SMS Agent Host service (ccmexec). The service doesn't crash, but gracefully shuts down. This is apparent by comparing the Application event logs from MsiInstaller for OMCI installation with entries in %windir%\system32\ccm\logs\ccmexec.log (and others). E.g., on one target workstation SMS' execmgr.log shows that the package was executed at 3:45:32 PM (as well as raising a "program started" event). The Application event log on that system has event ID 11707 at 3:45:38 PM that ISScript installation operation completed successfully, event ID 0 at 3:46:02 PM that Iap service started, and event 11707 at 3:46:27 PM that OMCI installation operation completed successfully. Back at 3:45:51, ccmexec.log has several lines starting with "Shutting down CCMEXEC...." So with things as they are, I'd never get a status back from that workstation (and SMS is disabled!) until the system is restarted.

So I modify the package to use a simple batch file, install.cmd, with the following:
\\dpserver\packages\DELL_OMCI_7.1\setup.exe /s /v/qn
net start ccmexec
This silently installs OMCI and then restarts the SMS Agent Host service. Initial testing shows that it works, CcmExec comes back after setup.exe finishes. Cool, right?

Not really. Since SMS is shutdown during installation of a package, it can't provide a clean status report. All workstations report an error status, ID 10021, "The program for advertisement "ABC2000A" failed ("ABC0000E" - "Install"). The program was able to be executed but the system was restarted unexpectedly before the program could be completed or before status could be recorded. No installation status MIF was found after the system restarted. Possible cause: The program performs a restart of the client computer when it completes, but the 'After running' setting in the program's properties is not set to Program restarts computer, or the client machine was restarted while the program was running. Solution: Verify the above. If the program does a restart when it completes, even if it only requires a restart in some cases, modify the program's properties and set 'After running' to 'Program restarts computer'."

As is often the case the status message is spot-on. It's as if OMCI asks SMS to leave a meeting and as it's walking out the door it let's everyone know it's leaving. When it comes back OMCI is no longer there, so it assumes the worst: OMCI is dead. From execmgr.log after the service is restarted: "Can not continue monitoring the program after service restart because the process exited. Assume failed." It then logs that it looks for a MIF and then raises a "program unexpected reboot" event.

Writing a MIF for this seems a bit much, but I changed the properties on the program so that SMS knows that OMCI will initiate a restart. Even though it's not initiating a system restart, since the SMS service is restarted it's effectively the same thing to SMS.

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?