Managing Linux Computers Using System Center 2012 R2 Configuration Manager
In this post we will take a look at steps for managing Linux computers using System Center 2012 R2 Configuration manager (SCCM 2012 R2). If I look back at my post on Installing SCCM 2012 SP1 client agents on linux computers it was just about the installation of SCCM client agents on the Linux machine. In this post we will not only install the SCCM 2012 R2 client on Linux machine but we will also learn more on managing the Linux computers using SCCM 2012 R2.
We will install the client agent, create a collection for linux based computers, create and deploy the custom client device settings enabling hardware inventory settings, we will see examples of hardware inventory reports and lastly we will see how to uninstall the SCCM client out of the Linux machines. The System Center 2012 R2 Configuration manager clients for UNIX and Linux extends the scope of your Configuration Manager environment to collect inventory, deploy software, and run reports about UNIX and Linux servers in your enterprise. The client operates as a workgroup client that is managed by Configuration Manager.
When we install SCCM 2012 R2 client agents on linux machine, you can use some of the management capabilities on Linux and UNIX computers while some of them cannot be used.
|Collections, queries, and maintenance windows||Client push installation|
|Hardware inventory||Operating system deployment|
|Software deployment||Application deployment|
|Reporting||Software updates, Compliance settings|
|Deploy custom client settings||Internet-based client management|
|Deploy software by using packages and programs||Remote control, Power management|
|Client status client check and remediation|
Now we will download the SCCM 2012 R2 client agents for Linux based computers. You can download the client agent for Linux computers by clicking on below button.The following UNIX and Linux versions are supported.
- AIX Version 7.1, 6.1, 5.3
- Solaris Version 11, 10, 9
- HP-UX Version 11iv2 , 11iv3
- RHEL Version 6 , 5, 4
- SLES Version 11, 10, 9
- CentOS Version 6, 5
- Debian Version 6, 5
- Ubuntu Version 12.4 LTS, 10.4 LTS
- Oracle Linux 6, 5
Download the ConfigMgr Clients for Linux and click Next.
Once you have downloaded the ConfigMgr clients for linux, extract it to a folder and copy the folder to your Linux machine, copy the files to a directory /opt/client (client is a new folder that has been created under /opt) . In this example I am using RedHat 6.2 server on which the SCCM 2012 R2 client agent will be installed.
Before you proceed and install the client agent on linux machine make sure that your linux machine is properly communicating with SCCM server. Use Ping to check the connectivity to the SCCM server. To resolve the hostname, open the terminal on linux machine and type the command vi /etc/resolv.conf. Set the IP address for nameserver (set to DNS Server IP), provide the domain name and search name and save the file.
On the linux computer, use root credentials to run the following command to enable the script to run as a program, chmod +x install.
execute the command ./install –mp sccm.prajwal.local -sitecode IND ccm-UniversalX188.8.131.52.4580.tar
The syntax of the command is ./install -mp <Management point server FQDN> -sitecode <code> ccm-Universal-x64.<build>.tar
Additionally, Configuration Manager client for Linux and UNIX supports the use of fallback status points. You can specify the FSP by adding -fsp <FSP server FQDN> to the command.
From the below screenshot we see that the client agent has been installed successfully on the linux machine. If you are looking for a log file to validate the install process you can check /var/opt/microsoft/scxcm.log. In case you change the hostname of linux machine after the installation of client agent, then you must reboot the linux machine once.
/var/opt/microsoft/scxcm.log – This log file contains information about the installation and ongoing operations of ccmexec.bin. If you are looking for troubleshooting UNIX/Linux client operations then you must use this log file.
/opt/microsoft/omi/scxcmprovider.log – This is the CIM service log file which captures the CIM service operations.The CIM server installs as part of the client for Linux and UNIX. If you are using SCCM 2012 SP1 (without CU1) you will see that the client used nanowbem as its CIM server.
I would recommend to restart the linux machine once the client agent has been installed on it. If you don’t not want to restart the server you can stop and start the ccmexecd process.
To STOP the ccmexecd you can use the command /etc/init.d/ccmexecd stop
To START the ccmexecd you can use the command /etc/init.d/ccmexecd start
As mentioned earlier scxcm.log file records both installation and operational information. This log file is useful when you want to troubleshoot client operations. There might be a situation where you are troubleshooting the client installation issues and you want verbose information to be logged in scxcm.log. There are four different log levels each one having a unique setting.
1) ERROR: Indicates problems that require attention.
2) WARNING: Indicates possible problems for the client operations.
3) INFO: More detailed logging that indicates the status of various events on the client.
4) TRACE: Verbose logging that is typically used to diagnose problems.
To change the log level, edit /opt/microsoft/configmgr/etc/scxcm.conf and change each instance of the tag MODULE to the desired log level.
After the SCCM client has been installed on linux machine, in the Configuration Manager console, under All Systems you will find the linux machine name. Right click on the linux computer and click Approve.
Now lets create a collection to group the linux computers. Microsoft recommends to use the Caption value for the Operating System class to identify different Linux and UNIX operating systems in queries and collections. In this example I will be using the Attribute Class as Operating System and Attribute as Manufacturer. You can use the below query to add the redhat machines to collection.
select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from SMS_R_System inner join SMS_G_System_OPERATING_SYSTEM on SMS_G_System_OPERATING_SYSTEM.ResourceID = SMS_R_System.ResourceId where SMS_G_System_OPERATING_SYSTEM.Manufacturer = “Red Hat, Inc.”
We have now created a collection named RHEL systems and our linux machine has been added to the collection.
We will now create a custom client device settings for the RHEL systems collection and enable the Hardware Inventory.
The client for Linux and UNIX supports the following hardware inventory classes that are available on Linux and UNIX servers:
To perform a Machine Policy Refresh action on clients execute the following command :- /opt/microsoft/configmgr/bin/ccmexec -rs policy
To trigger an inventory scan from a client run the following command :- /opt/microsoft/configmgr/bin/ccmexec -rs hinv
Once you trigger the hardware inventory scan cycle, open the MP_Hinv.log file located on the SCCM server. Look for the line Full report from client linux.prajwal.local, action description = hardware.
In the CM console right click the linux machine and click Start > Resource Explorer. Under Hardware, click Services to see the list of services.
You can also find the Installed Applications on the linux machine.
You can also generate the report for the Linux machine.
In case of Windows we typically query WMI for inventory data, whereas the UNIX/Linux client stores its inventory data in a series of XML files. You can view the default classes by directory listing /opt/microsoft/configmgr/root/cimv.
Lastly to uninstall the SCCM client agent from the linux machine you can use the command :- /opt/microsoft/configmgr/bin/uninstall
To completely uninstall ConfigMgr and OMI press C and hit enter. The client has been uninstalled.