Applications Systems
Deploying the SolarWinds Platform Agent in Citrix MCS Non-Persistent Environments
This article explains how to deploy the SolarWinds Platform Agent in a Citrix MCS non-persistent environment by using the Gold Master Image method while preventing the Master Image from completing agent installation during reboot. It also documents a tested setup.tmpl customization for excluding the Master Image and a customer-validated enhancement that uses hostname prefix-based logic for environments with multiple Master servers.
First published date
Last published date
Overview
In Citrix MCS non-persistent environments, deploying the SolarWinds Platform Agent by using the Gold Master Image method can require additional handling to prevent the Master Image from completing the startup-based agent installation after reboot. If the Master Image is not excluded correctly, it may lead to unwanted agent installation behavior before the updated image is used to refresh the cloned VDAs.
This article documents a tested setup.tmpl customization that excludes the Master Image from completing the install during reboot while still allowing the cloned VDAs to install and register through the startup task. It also includes a customer-validated enhancement that uses hostname prefix-based logic for environments with multiple Master servers.
Product section
Cause
In Citrix MCS non-persistent environments, the Master Image can complete the default startup-task-based agent installation during reboot if it is not excluded explicitly in the Gold Master Image package. When this occurs, the Master Image may install or retain agent state before the updated image is used for the cloned VDAs. In environments with multiple Master servers, a single hardcoded exclusion is also less practical, which is why a dynamic hostname-based exclusion may be required.
Resolution
-
Log in to the SolarWinds Web Console.
-
Go to Settings > All Settings > Agent & Remote Collector > Download Agent Software.
-
Select the Windows agent package and choose the Gold Master Image deployment option.
-
Download the Gold Master Image package to the Master / Golden Image server.
-
If a previous attempt was already performed, delete the existing scheduled task named
SolarWindsAgentInstallOncefrom the Master Image server. -
Uninstall the SolarWinds Agent from the Master Image and remove any related leftover entries if needed before preparing a fresh image.
-
Extract the downloaded ZIP package to a local folder on the Master Image server.
-
Open the extracted package and browse to the
datafolder. -
Open the default
setup.tmplfile in a text editor. -
Modify the
setup.tmplfile so the Master Image server is excluded from completing the startup-based agent installation during reboot. -
Save the modified
setup.tmplfile. -
Run
setup.batfrom the extracted package on the Master / Golden Image server. -
Once the package is staged successfully, reboot the Master / Golden Image server.
-
Validate that the SolarWinds Agent is not installed on the Golden Image after reboot, based on the scheduled task behavior.
-
Take a snapshot of the updated Golden Image.
-
Update the Citrix MCS VDA machines by using the updated Golden Image.
-
Reboot one cloned VDA machine.
-
Verify that the SolarWinds Agent installs and registers correctly on the cloned VDA through the startup task.
cd /d "%ALLUSERSPROFILE%\SolarWindsAgentInstall" set PWD=%CD% cd /d %PWD%\data msiexec /i SolarWinds-Agent.msi TRANSFORMS=SolarWinds-Agent.mst /q cd /d %PWD% schtasks /DELETE /TN SolarWindsAgentInstallOnce /F -
Replace with the below Script
@echo off
cd /d "%ALLUSERSPROFILE%\SolarWindsAgentInstall"
set PWD=%CD%
set "comp_prefix=%COMPUTERNAME:~0,3%"
REM Skip install on master image, but keep task for cloned VDAs
if /I "%comp_prefix%"=="XYZ" (
echo %DATE% %TIME% Skipping SolarWinds Agent install on master image %COMPUTERNAME%
exit /b 0
)
cd /d "%PWD%\data"
msiexec /i SolarWinds-Agent.msi TRANSFORMS=SolarWinds-Agent.mst /q
cd /d "%PWD%"
schtasks /DELETE /TN SolarWindsAgentInstallOnce /F
exit /b %ERRORLEVEL%
In this version, XYZ represents the common hostname prefix used for the Master / Golden Image servers in the environment. Any server whose hostname starts with that prefix is skipped dynamically, while cloned VDAs continue with the startup-task-based installation flow.