In my previous post I was looking at utilizing a Logon Simulator to setup some proactive monitoring of a Citrix environment. I setup some goals for myself:
- Minimize the number of VM’s to run the robots
- As little resource consumption as possible
- Still provide operational alerts
- Operate on-premise
I want the footprint of these robots to be tiny. This must done on Server Core.
I want to run multiple instances of the logon simulator concurrently.
I need to be able to test “Stores” that do not have “Receiver for Web” sites enabled.
I want it so if I reboot the robot he picks up and starts running.
In order to successfully hit these specified targets I opt’ed to use ControlUp’s Logon Simulator. It can target the Store Service so it works with our “Receiver for Web”-less stores. It also has the features to generate events that can be targeted to send out notifications of an application launch failure.
In order to achieve my goals I need the following:
- A Service Account that will be logging onto the Citrix servers
- The robot (Windows 2019 Server Core)
I installed Server Core 2019 and added it to the domain.
I configured group policy preferences to setup AutoLogon for my service account. This group policy object is set to the OU the robots reside in.
However, I did not include the required “DefaultPassword” registry with the password. In order to embed the password in a more secure fashion, I had to manually use Sysinternals AutoLogons. This keeps the password from being stored in plain text in the registry but this does need to be manually executed on each robot.
The account MUST be a regular user and not a member of the “Administrators” group. This is a requirement of the ControlUp Logon Simulator.
Because I selected to use pure Server Core, there are some components that require fixing for full compatibility. This can actually be alleviated immediately by installing the Feature On Demand (FoD) “Server App Compatibility”, but this would increase both memory utilization and consume more disk space for our robot. However, if you prefer the easy way out, adding the FoD fixes everything and you can skip the “Fixes” section. Or just run the Logon Simulator on a operating system with the desktop experience. Otherwise, follow the steps in each of the solutions.
Unable to install Citrix Reciever/Workspace App
“TrolleyExpress.exe – System Error”
The code execution cannot proceed because oledlg.dll was not found. Reinstalling the program may fix this problem.
Copy oledlg.dll from the SysWow64 in either the install.wim or another “Windows Server 2019 (Desktop Experience)” install and put it in the C:\Windows\SysWow64 folder of your robot.
ControlUp Logon Simlulator is cropped on smaller displays
Set the resolution larger in your VM.
ControlUp Logon Simulator errors when you attempt to save the configuration
Copy ExplorerFrame.dll from the SysWow64 in either the install.wim or another “Windows Server 2019 (Desktop Experience)” install and put it in the C:\Windows\SysWow64 folder of your robot. Add the following registry:
Windows Registry Editor Version 5.00
@="Shell Name Space ListView"
ControlUp Logon Simulator detects admin rights
Run the logon simulator as a standard user.
Once you’ve implemented all the fixes, install Citrix Workspace App and ControlUp Logon Simulator with an account that is an administrator.
Configure ControlUpLogonSim. With the simulator open, enter your Storefront details, ensuring to use the “Store” account as seen in the Storefront console.
For the “Resource to Launch” ensure the name matches the display name in Storefront:
In order to avoid session stealing in the simulator, each application will require a unique user name. Setup a unique account per application you are going to test.
From here, enter your logon credentials for the account associated with the application. Run your first test by clicking the green triangle and ensure it works correctly.
Now that we have a successful run we set “Repeat Test” to ON and save the configuration.
I then created another application to monitor by renaming the “Resource to Launch” as another application and saved a second configuration. I saved all my files to a C:\Swinst folder.
The point of all of this is to ensure the simulator is running in an automated fashion. To do so, we need to be able to configure the simulator to “launch” multiple different applications when the operating system starts. We have already configured autologon, we’ve setup our configuration files for each application we want to monitor, now we need to set the monitor to auto-start.
Add the following registry key:
Windows Registry Editor Version 5.00
And create a file “C:\Swinst\StartAppMonitors.cmd” with the following contents:
START "" "C:\Program Files (x86)\ControlUp Logon Simulator\ControlUpLogonSim.exe" /s /noeula /config=C:\Swinst\Meditech.xml
START "" "C:\Program Files (x86)\ControlUp Logon Simulator\ControlUpLogonSim.exe" /s /noeula /config=C:\Swinst\Hyperspace_2014.xml
And watch the magic fly!
And so the final question and the point of all this work, how much does this consume for our resources?
1.1GB of RAM for the ENTIRE system, a peak CPU consumption of 7%, and the processes required to do the monitor use no CPU and only ~55MB of RAM. Each Citrix process consumes ~20MB of memory and is the most significant consumer of CPU but at the single digit % range.
I anticipate doing some more stress testing to determine what the maximum amount of monitors I can get on one system, but I’m thrilled with these results. With this one box I would expect to be able to monitor dozens of application… Maybe a hundred?
In the end, this was a fair bit of work to get this setup on Server Core, but I do believe the savings in resource consumption and overhead reduction will pay off.