Corrections to the documentation

Nov 18, 2011 at 7:25 PM

The documentation is buggy. If anyone else is looking to build a Ubuntu SCOM agent here are updated steps that work reliably

#Get latest open pegasus from here (I used V. 2.11.1)

#On a VM that matches the version and architecture of Ubuntu decompress this file.
tar xzf  pegasus-*.tar.gz

#get the xplat providers from here
#decompress the archive
tar xzf xplatproviders-1.0.0.tar.gz

#get a patch for the xplat providers from here. This patch "debianizes" the various scripts"

#apply the patch
cd xplatproviders-1.0.0
patch -p1 < ../xplatproviders-1.0.0.patch
#your output should look like this
tim@UnixDev2:~/xplatproviders-1.0.0$ patch -p1 < ../xplatproviders-1.0.0.patch
patching file build/Makefile.gcc3
patching file build/
patching file build/xplatproviders/config.guess
patching file build/xplatproviders/
patching file configure
patching file source/code/common_lib/pal/system/disk/staticphysicaldiskinstance.cpp
patching file source/code/common_lib/pal/system/os/osinstance.cpp
patching file source/code/include/scxcorelib/scxcmn.h
patching file source/code/providers/meta_provider/metaprovider.cpp

#run the configure script.
#Replace /home/tim/pegasus/src/Pegasus/Provider/CMPI/ with th epatch to where you decompressed open pegasus
/configure --with-cmpi-headers=/home/YOUR_USERNAME/pegasus/src/Pegasus/Provider/CMPI/
#your output should look something like this
tim@UnixDev2:~/xplatproviders-1.0.0$ ./configure --with-cmpi-headers=/home/tim/pegasus/src/Pegasus/Provider/CMPI/
Created options.mak
Created ./source/code/include/scxcorelib/options.h
Created GNUmakefile
Configured for <DiscoveredOS><Hostname>UnixDev2</Hostname><OSName>Ubuntu</OSName><OSAlias>Ubuntu</OSAlias><Version>8.04.2</Version><Arch>x86_64</Arch><IsLinux>true</IsLinux></DiscoveredOS>

#run make
#your output should end with the following line
XPlatProviders build is complete

#get the newest redhat agent RPM with the right architecture (ie intel 64 bit, intel 32 bit, etc)
#That can be found on the OpsMgr server's in the AgentManagement directory

#If you haven't already install alien to convert the RPM to a DEB
sudo apt-get -y install alien

#convert the Redhat rpm to a deb
cd ~
sudo alien -k scx-1.0.4-265.rhel.5.x64.rpm --scripts

#make a directory named after the deb file you created omitting the trailing .deb
#for example scx_1.0.4-265_amd64.deb becomes scx_1.0.4-265_amd64
mkdir scx_1.0.4-265_amd64

#set up the directory putting files in their right places
cd scx_1.0.4-265_amd64/
mkdir -p debian/DEBIAN
ar -x ../`basename $PWD`.deb
mv control.tar.gz debian/DEBIAN/
mv data.tar.gz debian/
cd debian
tar -xvzf data.tar.gz
rm data.tar.gz
tar -xvzf control.tar.gz
rm control.tar.gz
cd ../..

#apply the scx patch found here. See below about how to handle the errors
#with this command
patch -p1 < ../scx_1.0.4-265_i386.patch
# it will return errors. Ones related to the following files can be safely ignored

#clean up after the patch
rm debian/DEBIAN/control.rej debian/usr/share/doc/scx/copyright.rej debian/DEBIAN/md5sums.rej
#correct the checksums. There were created for the 32bit binaries
cut -d " " -f3 debian/DEBIAN/md5sums > /tmp/md5list
> debian/DEBIAN/md5sums
for x in `cat /tmp/md5list`; do md5sum debian/$x >> debian/DEBIAN/md5sums; done

#install the provided we created earlier
cp ~/xplatproviders-1.0.0/target/*/ debian/opt/microsoft/scx/lib/providers/

#set up the permissions
sudo chown -R root.root debian

#and finally build the debian package
sudo dpkg-deb --build debian `basename $PWD`.deb

I have tested this build process on Ubuntu Server 10.04 LTS 64bit and Ubuntu Server 8.04 LTS 64bit. It looks like resulting packages may be compatible with both versions (I.e the package built on *.04 works on 10.04) but I have wait for my monitoring team to confirm,

Jun 12, 2012 at 6:00 PM

I just tried this recently and SCOM gives an HTTP 501 error.  Apparently MS12-006 breaks older agents (using the 265 version instructions from here, 298 seems to be the latest version).  See, under More Information, Issues that are resolved...