Applies for EMv7.
Behavior in EM2014 & EMv6
In the past, it was a very time-consuming task to update existing EM agents within a large infrastructure to a newer version. It was necessary to create an SCCM package, distribute it to the DPs and then deploy it on the agents. This took a lot of time and required a lot of rework.
Behavior in EMv7 and higher
Version 7 of the Enterprise Manager now provides the option to distribute the EM Agent automatically. The structure is as follows:
Go to Administrator - EM Agent to configure the auto-update. As is the case with all other configuration options, permissions can be assigned separately.
The overview displays all auto-updates which you have already defined. You can modify existing auto-updates and create new ones.
Use the "New" button to assign auto-updates. Please specify a unique name for this purpose.
Several modes are available:
- "Selected version" means that a specific version is installed on the respective computer; it can be selected with the related drop-down menu in the "Target version" field below.
- "Always latest version" means the system always installs the latest version available on the EM server, which enables you to perform automatic installations to ensure that always the latest software is made available within the infrastructure.
Finally, you must select computer groups to define the target computers.
The update process
The Agent queries the EM server to determine whether it must be updated and sends the current version. Based on the configured assignment, the EM server determines which version has been defined for the Agent. If this version is lower or identical with the current version, the Agent does not have perform any related activities and can simply continue to perform its daily jobs.
If an update is required, the EM server also determines on which distribution points the required resources are available (SCCM boundaries are observed); this information is sent to the Agent, which will then send a query to the distribution point where the resources can be downloaded. Then the download is initiated accordingly. Once the download has been completed, the update is started, which means that the Agent (service and GUI) is closed and the update is performed. After the update has been completed, the Agent is restarted and reports the current version back to the EM server.
If a downgrade is performed from a version 7 agent to a version 6.5 agent and the agent is then updated again to version 7 agent, it will take some time until the EM server will notice that a version 7 agent has been reinstalled!
A new type is available under Troubleshooting - EM Agent - Remote control:
If it is executed on an agent, the process is started accordingly; it can be repeated any number of times.
Where do you find the Agent files?
The agent binaries must be saved in the directory "AutoUpdate" in the EM Server directory: <VersionNumber>_x86.msi and <VersionNumber>_x64.msi (e.g.,: "184.108.40.20610_x86.msi" and "220.127.116.1110_x64.msi"). Then you must restart the EM Server service to inform the server accordingly. An automatic check of the files takes place every 3 hours from the distribution point.
Both versions (x64 and x86) must always be filed! The name must always be stored as in the above example (18.104.22.16810_x86.msi and 22.214.171.12410_x64.msi)
What must an administrator do to roll out a new Agent version?
The EM DP queries the EM Server via the normal Web API port to find out about available Agent versions (path: see screenshot), retrieves any missing versions via the same port and saves them on the EM DP in the "Autoupdate" directory with the same naming structure as on the EM Server. After successful download, the EM DP informs the EM Server accordingly.
In case the EM DP has also removed old agent versions (i.e., versions that are not supported by the server anymore), it also informs the EM Server accordingly via the web API port.
How are the new Agent files transmitted to the client (ports)?
The administrator goes to Administration - Agent - Autoupdate to specify an Agent version for one or several computer groups. When the next auto-update job is performed (based on Em_AutoUpdateCheckInterval – default: 360 hours =15 days), the Agent is included into the auto-update, i.e., the agent compares the current version with the version assigned on the server (via the normal EM Server web API port). In case the target version on the server differs from the current version on the client, the agent queries the EM DPs to download the Agent setup file (via the web API port of the EM DP).
Where do you save the Agent files on the client?
The Setup file is saved in the Temp directory (C:\Windows\Temp) under the name "Matrix42_Agent_Setup_<AgentVersion>_<Type>.msi".
Then a simple batch script "<RandomName>.cmd" is generated in the Temp directory (as above: "Matrix42_Agent_Setup_<AgentVersion>_<Type>.msi").
How are the saved files installed?
A process is started (with parameters "Hidden" and "UseShellExecute = true").
Where can you find additional log files?
Upon successful completion, the MSI file is deleted; the log is saved under "C:\Windows\Temp\ Matrix42_Agent_Setup_<AgentVersion>_<Type>.msi .log".