Citrix Virtual Apps and Desktops allows the definition of "zones" to group hypervisor connections, delivery controllers, machine catalogs, published applications, and users.
This can be a convenient feature for multi-site companies to provide their users with a better experience since the zones layout might allow the users to access their desktops and apps using the nearest resources and reducing latency.
For example, a company with sites in Europe and America, and users that use their office applications in both continents will probably have data centers in Europe and America and would like American users to access their applications and desktops in the American data center and the European users in the Europe data center.
A single delivery group using application servers from catalogs in the American and European zones would prioritize American application servers for users with a zone preference of "America" and servers in Europe for users with a zone preference for Europe.
Thus, zones can be used to model the behavior and performance of the sites, or to improve the user's experience, as described in https://docs.citrix.com/en-us/citrix-virtual-apps-desktops-service/manage-deployment/zones.html.
Flexxible|SUITE supports Zones for Broker farms of kind XenDesktop 7.7 and later.
In a multi-site company like the one described above, the Citrix Virtual Apps and Desktops sites would have hypervisor connections to clusters (HA hypervisors) in Europe and America.
Flexxible|SUITE doesn't have the notion for Citrix hypervisor connections, but in the list of hosting units, a column "Zone" can be added to the list by using the column chooser:
This is the zone of the Citrix Virtual Apps and Desktops hypervisor connection to which the hosting unit is connected.
By default, catalogs containing desktops or application servers are assigned to the same zone as the hosting unit where they were created.
To view what catalogs are providing VMs to a VDT / ASF, open the delivery group, and use the "Show catalogs" button:
The list will display the list of catalogs that are providing VMs to the delivery group, and in which zone they live:
Please note that the catalogs living in a different zone than their hosting unit will be highlighted to indicate a potential performance problem.
A published application has no Zone preference by default. The session to execute the application when the user opens it will be created by Citrix Virtual Apps and desktops in an application server of one of the catalogs serving VMs to the delivery group.
A zone can be set as the preferred for a published application, so the session will be opened, if possible, in an application server that is in a catalog residing in the preferred zone.
When a preferred zone is selected, the "Launch the application in the selected zone only" option can be checked to indicate that if no application server is available in that zone, the application will fail to open when the user clicks it.
If no preferred zone is selected, the "Do not consider users home zone when launching this application" option can be checked to indicate that the application will be executed in an available application server, in any zone, despite the preferred zone set for the user, if any.
Sessions are also related to the zone where the VM catalog belongs (whether it is a desktop or an application server).
Because not every kind of broker farm supports zones, and additional zones apart from the primary might not be defined, the "Zone" column is not visible by default in the Sessions list, but you can add the column by using the column chooser.
Users & groups
A zone preference can also be set for Active Directory users or groups, so when a user opens its desktop or applications, the session will be preferably open in a VM in that zone.
The zones defined in a Citrix Virtual Apps and Desktops site are displayed in the Broker farm detail view:
The primary zone is displayed in bold characters (its name could not indicate that it is the primary zone, for example, it could be "Corporate").
Note: the zones in the "Zones" tab can't be added, removed, or renamed from Flexxible|SUITE, since the layout of zones is considered a Citrix Virtual Apps and Desktops site administrative task, and it is expected to be managed from the Citrix Studio console.
However, by clicking a zone, the zone's detail view is displayed and memberships for catalogs, published applications, and users or groups can be managed from Flexxible|SUITE.
The "Broker farm nodes" tab and the "Hosting units" tab display read-only lists of Citrix delivery controllers and hosting units respectively.
This tab shows the list of catalogs assigned to the zone. In this list, you can link other catalogs to the zone by using the "Link" button and searching for the catalogs to add. There is no "Unlink" option since a catalog must always be assigned to a zone. If you wish to move a catalog to another zone, simply link the catalog to the new zone.
Please note that the column "Hosting unit zone" will be displayed in red if the zone is different than the zone assigned to the catalog, as it could create a performance problem.
Note: when moving a catalog to another zone, the open sessions for VMs in the catalog might not display the new zone in Flexxible|SUITE unless the user disconnects and re-connects.
Published applications tab
This tab shows the list of published applications that have this zone as their preferred zone. You can change an application's preferred zone by using the "Link" button and searching for the application.
The "Unlink" button allows to clear the zone preference for published applications, so they will be opened in an available application server, prioritizing those in the user's preferred zone, if specified.
The "Is template" column indicates if the published application is published only for template designers. Remember that applications published in an Application template definition are published once in the template itself (with the "Is template" check marked, intended for testing by the template designers) and in the Application Server Farm configured to automatically propagate applications from the template.
Users & groups tab
This tab shows the list of Active Directory users and groups that have this zone as their zone preference for this broker farm.
To set this zone as the preference for a user or group, use the "Link" button and search for the users or groups among the domains defined in the Flexxible|SUITE "Domains" list.
The "Unlink" button clears the zone preference for the selected users/groups, so they disappear from the list.
Note that the same domain user or group could have different zone preferences for different broker farms.
Cloud connectors tab
This tab is displayed for broker farms of a kind "Citrix DaaS", and lists the cloud connector machines associated with the zone. It is recommended to have at least two cloud connectors per zone for high availability. The set-up and association of Citrix DaaS connectors must be performed through the Citrix DaaS console.
To save the changes made to the zone (catalogs, published applications, users & groups), you must close the view by pressing the "Ok" button, and then save the Broker farm detail view. Otherwise, the changes will be lost.
After a broker farm is saved with changes in its zones, a job to apply each zone's changes will be scheduled for execution. The jobs progress can be monitored from the "Jobs" main menu option:
The job detail will show the catalogs, published applications, and users/groups added or removed to/from the zone.
In a VDT or ASF, the main zone is the template's zone. The template's zone is determined by the zone of the hypervisor connection through which Citrix Virtual Apps and Desktops see the template.
Initially, the catalogs created to contain the VMs will be created in the main zone. Flexxible|SUITE doesn't support adding catalogs from other zones in the current release, but using the Citrix Studio console, catalogs can be moved between the zones or new catalogs can be created and their VMs added to the ASF / VDT delivery group.
Main zone sessions capacity limit
When new VMs are added to a VDT / ASF, Flexxible|SUITE initially tries to create them in one of the existing catalogs (the catalogs that are providing VMs to the delivery group).
The catalogs in the main zone with fewer VMs will be prioritized to place new VMs, as long as its hosting unit, HA hypervisor and VDI Appliance have enough free slots.
If the "Main zone sessions capacity limit" text box in the delivery groups tab contains a value greater than zero, this will set a limit on how many VMs can be created in the main zone. This means that catalogs in the main zone could be skipped and new VMs be placed in catalogs in other zones once the main zone sessions capacity is reached.
The number of VMs that can be created in the main zone is calculated by dividing the sessions capacity limit by the "Sessions per VM" value in the delivery group: if the main zone capacity limit is 200 sessions and 10 is the number of sessions that a VM can host, a maximum of 20 VMs will be created in catalogs from the main zone. If more VMs need to be created, they will be placed in other catalogs in the delivery group living in other zones, if any.
Note: if the values of "Main zone sessions capacity limit" or "Sessions per VM" are reduced, the current number of VMs in the main zone might exceed the intended session capacity limit.
Note: after changing the value of "Sessions per VM" and applying changes to the broker farm ("Process pending changes") the application servers might need to be restarted before they honor the new sessions limit.
Note: a "Sessions per VM" value of zero means that the capacity is undefined, so the main zone capacity limit can't be calculated and won't be honored.
Main zone and session overflow
In some scenarios you might want to model an "overflow" behavior of sessions, so they are placed in application servers in the main zone until a certain number of sessions is reached, and then start placing sessions in application servers in another zone.
For example, you could have an Office application template that your employees use to write documents, spreadsheets, presentations, and so on. That template would be in a zone called "On-premise".
Then you could create an ASF based in the Office template with 10 application servers. Because the catalog containing these servers was created from within the ASF, this catalog would be placed as well in the ASF main zone ("On-premise").
Let's say that you occasionally need to provide temporary access to the Office applications to external personnel for a project, but you don't want to incur the cost of creating and maintaining 10 or 20 more application servers in your data center.
You could add a hypervisor connection and a hosting unit to your Citrix Virtual Apps and Desktops connected to a Microsoft Azure subscription and place it in a new zone called "Azure".
This would allow you to model behavior for Office applications that would place your first sessions in "On-premise" application servers (less latency) and the excess sessions on the "Azure" application servers.
To do so, you should have another "compatible" template in the Azure subscription with the office applications, so you can model the main zone session overflow in two ways:
By creating a new ASF in the Azure zone
- Create a new ASF based in the compatible template in the Azure zone with the 20 new application servers to host the overflowed sessions from the "On-premise" zone. Please, uncheck the option "Automatically apply changes to applications from the template", as it would prevent using this ASF delivery group in the "On-premise" published applications.
- In the "On-premise" zone ASF, configure the published applications that must overflow to Azure by opening the detail view, and use the "Delivery goups" tab to add the application to the delivery group of the Azure ASF delivery group that you just created. Use a lower priority (higher priority number) for the delivery groups in the Azure zone, so new sessions are first assigned to "On-premise" application servers.
- When the published application detail view is closed by pressing the Ok button, a job will be scheduled to apply the changes.
By manually creating catalogs in the Azure zone in Citrix Studio
- Manually create a new catalog based on the Azure template with 20 new application servers, that would live in the "Azure" zone, using the Citrix Studio console.
- Add the 20 new application servers in the Azure catalog to the delivery group of your ASF.
Note: if there were catalogs of more than 2 zones in the delivery group there would be no easy way to predict in which zone the new sessions would be created once the main zone is full.
As a result, you would have an ASF with a delivery group containing 30 application servers, 10 of them in a catalog in the "On-premise" zone, and the other 20 in a catalog in the "Azure" zone.
Finally, to configure the overflow behavior you should:
- Assign a zone preference for the "On-premise" zone to the users or groups by opening the Broker farm, then the "On-premise" zone, and add the users or groups. This way, when a user opens a published application or a desktop, its zone preference would provide a session in the "On-premise" zone when possible.
- In the delivery group in the main zone ASF:
- Uncheck the option "Sessions must launch in a user’s home zone if configured", to enable the selection of an application server in another zone if the "On-premise" zone is full.
- Check the "Session assignment to users based on VM capacity" option, to enable a maximum of sessions per application server.
Please note that this check is not visible for broker farms of a kind "Citrix DaaS", so you should manually configure Citrix policies in the Citrix DaaS Virtual Apps & Desktops service console for a given delivery group:
- For published applications:
- Set the zone preference to "On-premise", so the application runs in this zone when possible.
- Uncheck the "Launch application only in the selected zone" option, so the application can run in other zones when the "On-premise" zone is full
- Uncheck the "Do not consider user's home zone" option so the preferred user zone is considered
Assigning zone preference to multiple published applications
For ASFs with the "Automatically apply changes to applications from the template" option unchecked, it may be useful to be able to set the zone preferences for multiple published applications at a time:
- Select the published applications that you want to apply a new zone configuration and press the "Apply zone config." button:
- A popup will be displayed to apply the new zone configuration:
- If you select a zone from the drop-down list and press the Ok button, the zone will be set as the preferred zone for the selected published applications. If you leave this list blank or clear the value with the rubber icon, the zone preference will be removed for the selected applications.
- If you selected a mix of applications with different zone preferences, the changes made in this popup will apply to the selected applications.
- Check the "Change additional settings" if you want to apply changes in these settings to the selected applications. If you leave the option unchecked, these settings will remain as they were for each application and only the zone preference will be applied.
- Remember that you must save the ASF to apply these changes to the Citrix Virtual Apps and Desktops site.
Citrix policies for session capacity
Flexxible|SUITE maintains a Citrix policy that limits the VMs session capacity for every delivery group.
When the "Process pending changes" action is executed in a VDT or ASF this policy is created or removed for the delivery group depending on the value of the "Session assignment to users based on VM capacity" value.
These policies have given names like in the image below:
Note: if you rename these policies manually from Citrix Studio, or using Power Shell, they could become unlinked from the delivery group and the ASF and could be left orphaned or duplicated.
To be able to assign these policies, Flexxible|SUITE must know the local path for the Citrix group policy management module in the Citrix delivery controllers of the Citrix Virtual Apps and Desktops site.
The default value for this setting is "C:\Program Files\Citrix\Telemetry Service\TelemetryModule\Citrix.GroupPolicy.Commands.psm1", but you might need to change the value if for example this module was placed in different broker farms in different folders. In such a case you could create a copy of the .psm1 file in the same folder for every broker farm node and set that path as the value for the setting.
Note: depending on the Cumulative Update of your Citrix Virtual Apps & Desktops installation you might not have the "Citrix.GroupPolicy.Commands.psm1" file in your delivery controllers. You can get this file as part of the Citrix Scout tool.
In any case, UNC paths are not allowed, only local paths are valid.