Creating Workstation Pools
You can create workstation pools within the Anyware Manager Admin Console. A workstation pool is a group of remote workstations. To simplify user access management, a user group or individual users can simply be assigned to a workstation pool.
A floating pool is a remote workstation pool that uses a floating workstation assignment policy. With this pool, a user is entitled to a pool and its remote workstations rather than a single remote workstation. When a user is assigned a remote workstation, this assignment is ephemeral. Once the user disconnects from the remote workstation there is a holding time where it will still be assigned to that user. This holding time can be configured by an admin user. Once this holding period expires, the user is unassigned to the remote workstation and it is added back to the pool and is available for re-assignment.
Once you log in to the Anyware Manager Admin Console, you are automatically assigned a remote workstation within the pool, depending on the assignment policy of the pool. When creating a remote workstation pool, the assignment policy can be selected.
Use Cases for Floating Workstation Assignment Policy¶
The following section outlines potential use cases for the floating workstation assignment policy:
Two user's and two Windows workstations
- User 1 attempts to log in with a PCoIP Client.
- Windows workstation 1 is successfully assigned to User 1.
- User 2 attempts to log in with a PCoIP Client.
- Windows workstation 2 is successfully assigned to User 2.
Two user's and a single Windows workstation
- User 1 attempts to log in with a PCoIP Client.
- Windows workstation 1 is successfully assigned to User 1.
- User 1 closes the PCoIP Client.
- User 2 then attempts to log in and is presented with an error message stating "Resource does not exist in CAM Service".
- User 2 attempts to log in 25 minutes later. The assignment holding time for this example is 20 minutes, which is the default minimum assignment holding.
- Windows workstation 1 is successfully assigned to User 2. The Windows session is taken over by User 2.
These use cases also apply for RHEL/CentOS workstations.
The following section outlines how to create a floating workstation pool from the Anyware Manager Admin Console:
Creating a Workstation Pool¶
You can add multiple workstation pools to specific deployments. Each workstation pool will list the remote workstations, users and user groups within that pool. The following steps outline how to create a workstation pool, and choose the floating pool assignment policy:
- Click on Workstation Pools from the Anyware Manager Admin Console sidebar.
- Click the + icon to create a new workstation pool.
- Name the pool and choose the Floating option for the workstation assignment policy. The workstation assignment policy determines how workstations belonging to the workstation pool are assigned to users when they log in. This assignment policy can not be modified after the workstation pool has been created.
- Enable Session Tracking by selecting the toggle.
- Add the workstation holding time in minutes. Once this holding period expires, the user is unassigned to the remote workstation and it is added back to the pool and is available for re-assignment.
- Name the pool and click CREATE.
There are two possible options for the workstation assignment policy:
Persistent: This is the default policy. Once a user logs in they are automatically and persistently assigned a remote workstation within the pool.
Floating: With the floating policy, once a user disconnects their PCoIP session, the remote workstation will be automatically unassigned from the user, and the remote workstation will become available for other users to connect to.
Adding Remote Workstations to a Workstation Pool¶
Remote workstations and users within a workstation pool are a subset of the available remote workstations and users within a specific deployment. As a result of this, you will only be able to add remote workstations and users that have already been created in Anyware Manager. The following steps outline how to add remote workstations to a workstation pool:
- Click on Workstation Pools from the Anyware Manager Admin Console sidebar.
- Select the workstation pool you created in the previous section to display the edit pools page.
- Click Add Remote Workstations and add remote workstations to the pool.
Adding Users to a Workstation Pool¶
Only specified users can establish PCoIP sessions to remote workstations in the workstation pool. If a remote workstation is available (not assigned to a user) it will be automatically assigned to the user. The following steps outline how to add users to a workstation pool:
- Select the workstation pool and click Add Users/Add Groups.
- Search for the users you want to add, select them and click SAVE.
Once users and remote workstations are added to the workstation pool, users from the workstation pool get available workstations upon log in. Once the PCoIP Session is disconnected, the remote workstation will become automatically available for future connections or continue to be assigned to the user depending on the workstation pool assignment policy.
Features and Known Limitations¶
There are certain limitations associated with this feature, as outlined in the following list:
- This feature is only supported in Connector(s) version 78 or higher.
- If all remote workstations have been assigned, and no remote workstations are available, users will see the following error during session establishment "Resource does not exist on CAM Service".
- Remote workstations will remain assigned to a user for approximately 20 minutes after the PCoIP session has been disconnected by default. This time period is configurable through assignment holding time, and has to be longer than 20 minutes.
- The current limit is 200 remote workstations in a floating pool. The feature will work with a larger number of remote workstations, but the assignment timing may vary.
- Limited support for Linux Agents: When establishing a PCoIP session to Linux Agents, the session must be logged off before another user can connect. If the session is not logged off, the user will see a 6604 error message. To resolve this error reboot the remote workstation. This issue is being worked on.
- When connecting to a PCoIP Agent for Windows, if a previous user has been connected, the other user will see the Windows Switch Users screen. They will then be prompted to enter their credentials again before accessing the desktop.
- For Windows remote workstations that are power managed through Anyware Manager, the Idle Shutdown Service for the PCoIP Agent can be installed and configured. Once this service is installed, the remote workstation will automatically power off after the PCoIP session has been disconnected. During PCoIP session establishment, the remote workstation will be powered on. For information on installing and configuring the Idle Shutdown Service, see below.
Idle Shutdown Service¶
The following section outlines the steps to install and configure the Idle Shutdown Service for each Windows remote workstation:
- Connect to the remote workstation via the PCoIP Client. Ensure you have admin permissions.
- Copy the following PowerShell script:
If the remote workstation was provisioned by Anyware Manager then the
$idleTimerRegKeyValue = <idle-time-in-minutes> $enableAutoShutdown = <$true-or-$false> # Detect agent type $is64 = $false $serviceName = "CAMIdleShutdown" $path = "C:\Program Files (x86)\Teradici\PCoIP Agent\bin" if (!(Test-Path -path $path)) { $path = "C:\Program Files\Teradici\PCoIP Agent\bin" $is64 = $true } cd $path # Install Service $ret = .\IdleShutdownAgent.exe -install # Check for success if( !$? ) { $msg = "Failed to install {0} because: {1}" -f $serviceName, $ret Write-Host $msg throw $msg } # Configure Service $idleTimerRegKeyPath = "HKLM:SOFTWARE\WOW6432Node\Teradici\CAMShutdownIdleMachineAgent" if ($is64) { $idleTimerRegKeyPath = "HKLM:SOFTWARE\Teradici\CAMShutdownIdleMachineAgent" } $idleTimerRegKeyName = "MinutesIdleBeforeShutdown" if (!(Test-Path $idleTimerRegKeyPath)) { New-Item -Path $idleTimerRegKeyPath -Force } New-ItemProperty -Path $idleTimerRegKeyPath -Name $idleTimerRegKeyName -Value $idleTimerRegKeyValue -PropertyType DWORD -Force # Disable service if desired $svc = Get-Service -Name $serviceName if (!$enableAutoShutdown) { $msg = "Attempting to disable {0} service" -f $serviceName Write-Host $msg try { if ($svc.Status -ne "Stopped") { Start-Sleep -s 15 $svc.Stop() $svc.WaitForStatus("Stopped", 180) } Set-Service -InputObject $svc -StartupType "Disabled" $status = if ($?) { "succeeded" } else { "failed" } $msg = "Disabling {0} service {1}" -f $svc.ServiceName, $status Write-Host $msg } catch { throw "Failed to disable CAMIdleShutdown service." } }
idle timer
is already configured. In this case theInstall Service
section of the above commands can be skipped. - Set
$idleTimerRegKeyValue
to be between 5 and 10000, this is the number of minutes before the remote workstation is considered idle after the last PCoIP session was disconnected. - Set
$enableAutoShutdown
to$true
. - Save the PowerShell script with a .ps1 file extension and run the script. After the script has been successfully executed, the idle shutdown timer should be running. The remote workstation will now shutdown after the specified number of minutes of inactivity, as configured in step 3, once the user disconnects.
For more information on the Idle Service Shutdown, see Installing and Configuring Anyware Manager as a Service in the Anyware Manager as a Service guide.
Auto Log-Off Service¶
When a user disconnects their PCoIP session from a Linux PCoIP Agent, a different user is unable to connect unless the existing remote workstation user session is terminated. This will result in the remote workstation being locked, and unusable in a floating pool assignment, since a different user cannot log-in.
The auto log-off service enables you to bypass this issue by terminating a user session after the PCoIP session has been terminated. The auto log-off service monitors the pcoip-server process every minute. If it is not an active process then it samples the CPU load involved and if it is below a certain level for a certain amount of minutes, the script terminates the pcoip-desktop-child process which emulates a user logging off.
The auto log-off service disconnects a user if following criteria are met:
- No active PCoIP session detected (pcoip-server process is terminated).
- CPU utilization is less than 20% (
CPUUtilizationLimit
) for over 20 minutes (MinutesIdleBeforeLogOff
). - Sampling rate is 1 minute (
OnUnitActiveSec
).
Installing and Configuring the Auto Log-Off Service¶
You must have a CentOS/RHEL 7.8 virtual machine or Ubuntu virtual machine installed in order to run this service.
CentOS/RHEL Virtual Machine
-
Run the following command to install the
pcoip-agent-autologoff
service on a CentOS/RHEL virtual machine:sudo yum install pcoip-agent-autologoff
Ubuntu Virtual Machine
-
Run the following command to install the
pcoip-agent-autologoff
service on a Ubuntu virtual machine:sudo apt-get install pcoip-agent-autologoff
Once you have installed the service you can manage it via the pcoip-agent-autologoff-mgmt
script. This script is located in /opt/teradici/pcoip-agent-autologoff/pcoip-agent-autologoff-mgmt. The following commands must be executed either from the script path, or using the full path of the script.
The following table outlines the options you can use to manage the auto log-off service:
Option | Description |
---|---|
--enable |
Enable the service. |
--disable |
Disable the service. |
--change-params |
Modify CPU utilization limit (CPUUtilizationLimit) and Idle time before logging off (MinutesIdleBeforeLogOff). |
--change-timer |
Modify polling interval (OnUnitActiveSec). This value sets how often the service runs. |
--show-logs |
Shows last 100 log messages. |
--follow-logs |
Shows live log messages. |
--help |
Shows the tool help page. |
The default settings are shown in the table below. It is possible to modify these settings after the auto log-off service has been installed and configured:
Setting | Default | Description |
---|---|---|
MinutesIdleBeforeLogOff |
20 minutes | Number of minutes the remote workstation must be considered idle before it logs a user off. The timer only starts when a user is not in PCoIP session. |
CPUUtilizationLimit |
20% | Value between 0 and 100 representing CPU utilization percentage. If average CPU utilization is below this value, the machine is considered idle, and will log-off if maintained for MinutesIdleBeforeLogOff . |
OnUnitActiveSec |
1 Minute | Polling interval in minutes for checking the CPU utilization. |
Enabling the Auto Log-Off Service¶
The following section outlines how to enable the auto log-off service.
-
To enable the service run the following command:
sudo pcoip-agent-autologoff-mgmt --enable
-
To disable the service run the following command:
sudo pcoip-agent-autologoff-mgmt --disable
Updating the Auto Log-Off Service Configuration¶
The following section outlines how to update the auto log-off service configuration.
- Run the following command to change
MinutesIdleBeforeLogOff
orCPUUtilizationLimit
:sudo pcoip-agent-autologoff-mgmt --change-params # follow the prompt to apply changes to the service
- Run the following command to change
OnUnitActiveSec
:sudo pcoip-agent-autologoff-mgmt --change-timer # follow the prompt to apply changes to the service
- Run the following command to show the log history:
sudo pcoip-agent-autologoff-mgmt --show-logs
- Run the following command to follow the logs:
sudo pcoip-agent-autologoff-mgmt --follow-logs
- Run the following command to display help information:
sudo pcoip-agent-autologoff-mgmt --help