This is the second part of the Citrix ACT – Lessons Learned, and in this article, we will look at how to use the Citrix ACT tool for migration Sites that are spanning data centres.
The first scenario is the following:
- Two CVAD Sites aligned each site spread across two data centres, with Zones defined.
- CVAD_Site_1
- Zone-DC1
- Zone-DC2
- CVAD_Site_2
- Zone-DC1
- Zone-DC2
- CVAD_Site_1
Note: In this example, I have Zone names identical, but they don’t have to be, as this will be handled in separate ZoneMapping.yml files.
The requirement is to migrate these two Citrix Sites into a single Citrix DaaS environment. In this case, depending on the number of VDAs and active sessions, as noted in the Limits | Citrix DaaS, we will need to determine if we will combine resources from CVAD_Site_1 and CVAD_Site_2. In this scenario let’s take a harder path and say that the customer wants to have two Resource Locations (RLs) in Citrix Cloud, and then combine resources. In a nutshell, the following is required for the migration:
- CVAD_Site_1 > Zone-DC1 >> Citrix DaaS > RL-DC1
- CVAD_Site_2 > Zone-DC1 >> Citrix DaaS > RL-DC1
- CVAD_Site_1 > Zone-DC2 >> Citrix DaaS > RL-DC2
- CVAD_Site_2 > Zone-DC2 >> Citrix DaaS > RL-DC2
Before we proceed with this migration scenario, review some recommendations from Part 1 of this series.
Let’s start with the creation of the shared folders. The recommendation is to create the following folders:
\\share\CVAD_Site_1 \\share\CVAD_Site_2
The next thing is to “prepare” sites for export and to configure SiteMerging.yml file so we can use it for import. In this scenario, I am prefixing Machine Catalogs, Delivery Groups, group policies, and tags. If you decide that more components need to be prefixed, you can just edit the file and add the prefix. Make sure that the components that have the same naming between these sites are prefixed. The merge command will skip over the components if they are in the Citrix DaaS.
The commands will look the same as the commands in Part 1, with the addition of the Delivery Group prefixes.
CVAD_Site_1:
New-CvadAcSiteMergingInfo -SiteName $((get-brokersite -AdminAddress %FQDN_of_ CVAD_Site_1_delivery_controller%).name) -TargetFolder '\\share\ CVAD_Site_1' -MachineCatalogPrefix "Site1-" -DeliveryGroupPrefix “Site1-“ -GroupPolicyPrefix "Site1-" -TagPrefix "Site1-"
CVAD_Site_2:
New-CvadAcSiteMergingInfo -SiteName $((get-brokersite -AdminAddress %FQDN_of_ CVAD_Site_2_delivery_controller%).name) -TargetFolder '\\share\ CVAD_Site_2' -MachineCatalogPrefix "Site2-" -DeliveryGroupPrefix “Site2-“ -GroupPolicyPrefix "Site2-" -TagPrefix "Site2-"
The result of running these commands is the creation of SiteMerging.yml file in both locations.
Same as in Part 1, copy SiteMerging.yml file, and rename the copy to SitePrefixes.yml. Same content of the files just different names.
Once we have these files, we can export the sites. The commands are the same as in the previous post, and here they are.
CVAD_Site_1:
Export-CvadAcToFile -AdminAddress %FQDN_of_CVAD_Site_1_delivery_controller% -SiteName $((get-brokersite -AdminAddress %FQDN_of_CVAD_Site_1_delivery_controller %).name) -TargetFolder '\\share\CVAD_Site_1
CVAD_Site_2:
Export-CvadAcToFile -AdminAddress %FQDN_of_CVAD_Site_2_delivery_controller% -SiteName $((get-brokersite -AdminAddress %FQDN_of_CVAD_Site_2_delivery_controller %).name) -TargetFolder '\\share\CVAD_Site_2
As I mentioned in the Part 1, we need to look at the following files:
- CustomerInfo.yml
- CvadAcSecurity.yml
- ZoneMapping.yml
For the CustomerInfo.yml file follow the Migrate configuration to Citrix Cloud | Citrix DaaS Citrix article to obtain these values.
For the CvadAcSecurity.yml file, you need to provide a password in the file, and if that is a concern for your security team, you can pre-create hosting connections, just make sure that the naming of hosting connection and resources are the same. In some cases, you may have the same hosting for CVAD_Site_1 and CVAD_Site_2, so it may be a good idea to pre-create the hosting in Citrix Cloud. If you do that, you won’t need to merge hosting info.
Lastly, and this is very important for the multi-zone sites, are the ZoneMapping.yml files. You will need to edit and update these files in each location. The ZoneMapping.yml for CVAD_Site_1 should look like this:
Zone-DC1: RL-DC1 Zone-DC2: RL-DC2
And ZoneMapping.yml for CVAD_Site_2 should look like:
Zone-DC1: RL-DC1 Zone-DC2: RL-DC2
Note that the names are the same, but most likely that may not be in your case.
- All
- Tags
- AdminRoles
- AdminScopes
- HostConnections
- MachineCatalogs
- StoreFronts
- DeliveryGroups
- ApplicationGroups
- ApplicationFolders
- Applications
- GroupPolicies
- UserZonePreference
The following commands need to be executed to merge on-premises CVAD sites to Citrix DaaS.
CVAD_Site_1:
Merge-CvadAcToSite -SiteName CVAD_Site_1 -SourceFolder \\share\CVAD_Site_1 -%component%
CVAD_Site_2:
Merge-CvadAcToSite -SiteName CVAD_Site_2 -SourceFolder \\share\CVAD_Site_2 -%component%
Part 1 of this series has all of the individual commands, so it’s easier just to copy/paste. If you are filtering by component name, and the component has a prefix defined you will need to include a “prefixed” name in the command, for example:
Merge-CvadAcToSite -SiteName CVAD_Site_1 -SourceFolder \\share\CVAD_Site_1 -MachineCatalogs -IncludeByName Site1-%machine_catalog_name%
Hope this blog makes it easier to use Citrix Automated Configuration tool.
-
Zeljko Macanovic
Zeljko is Ferroque’s Chief Architect and a leading expert in Citrix technologies, boasting over three decades of experience with Citrix and Microsoft platforms. His contributions at Citrix include serving on the CCAT board and enhancing Citrix Consulting standards and methodologies.
Hi Zeljko – thanks a ton for great article. A quick question – in above scenario- let’s say after migration is completed for RL-DC1 and RL-DC2 to cloud and your activated “Cloud site” where other works loads are already active – lets say RL-DC0 was already there since long time. Now just for RL-DC1 – you need to “De-activate or Disable” and reactivate- corresponding Zone-DC1 back on-prem.
In this scenario – do you have any command to just de-activate one RL ? Something like: Set-CvadAcSiteActiveStateCloud -ResourceLocator -RL-DC1 ?
Sincerely appreciate your article…..
Hi Piyush,
As Citrix states in their documentation the Set-CvadAcSiteActiveStateCloudOnPrem toggles on-premises delivery groups and places them into maintenance mode. Also, these commands (again, as per Citrix article) support filtering, so you could use “IncludeByName” parameter to turn specific delivery groups into maintenance mode. I personally haven’t used filtering with these commands, as I was usually migrating on-premises CVAD to Citrix DaaS in a controlled manner, machine catalog by machine catalog, changing them manually to and out of maintenance mode.
Hope this helps.