Smart Scale to Autoscale Migration

Smart Scale to Autoscale Migration

book

Article ID: CTX250034

calendar_today

Updated On:

Description

Table of Contents

 

Important:

  • This article is applicable only if you have the Sites section in Smart Scale. Sites that use the Virtual Apps and Desktops service appear as “Cloudxdsite” by default. To view Sites, go to Citrix Cloud > Smart Tools > Smart Scale.
  • For static Delivery Groups (the DesktopKind property is “Private”), set the AutomaticPowerOnForAssigned property to “True.” (This property was set to “False” for Smart Scale to function.) To do so, use the Set-BrokerDesktopGroup PowerShell command. For example: PS C:\> Set-BrokerDesktopGroup -Name DESKTOPGROUP_NAME -AutomaticPowerOnForAssigned $true

 

 


 

Where to download ?

Certain legacy Citrix tools are now available on request only. Please submit the request here - https://forms.gle/obA39PEz5qpDiSPq8

Once we verify your request, we will provide access to the download location. 

 


 

 

 

If you are currently using Smart Scale to power manage your machines, you might want to migrate the configuration data into Autoscale in Citrix Studio. You can choose to migrate the data manually or using PowerShell scripts.

Note:

  • For RDS Delivery Groups, if you enable both Autoscale and Smart Scale, only Autoscale will power manage the machines.
  • You must run the migration outside of times that Smart Scale is scheduled to power manage machines. Citrix also recommends that you run the migration during off-peak times.

Manual migration

 

Note:

  • Citrix recommends that you use manual migration if the number of Delivery Groups is less than 10.

Manual migration involves manually configuring the Autoscale user interface in Citrix Studio by associating the Smart Scale user interface per Delivery Group.

1. Select Delivery Groups in the Studio navigation pane on the Manage tab.

2. In the Actions panes, select the Delivery Group and then click Edit Delivery Group.

3. On the Autoscale page, select the Autoscale check box to enable Autoscale.

4. On a separate tab in your browser window, go to Citrix Cloud > Smart Tools > Smart Scale.

5. On the Virtual Apps and Desktops Sites page, locate the Site for that Delivery Group.

6. Click View Site and then click Configure.

7. On the Smart Scale configuration page, select that Delivery Group.

8. Migrate the data including machine cost, capacity buffer, and power-off delay from Smart Scale to the applicable fields in Autoscale.

9. On the Autoscale page, create schedules equivalent to those defined in Smart Scale. For more information about how to create schedules, see How Autoscale power manages machines.

10. After your data migration completes, click Apply. After that, the data is saved to Autoscale successfully.

11. On the Smart Scale configuration page, click the Smart Scale Enabled toggle button to disable Smart Scale for the Delivery Group you selected.

12. Repeat the steps above to migrate the data for other Delivery Groups.

Note:

  • Migrating capacity buffer. Smart Scale has only one field for capacity buffer. On the Delivery Group page of Smart Scale, click Advanced to see the configured capacity buffer. However, Autoscale lets you determine the capacity buffer separately for peak and off-peak times. On the Autoscale page, you can either fill in the two capacity buffer fields with the value referenced from Smart Scale or define different values for peak and off-peak times.
  • Merging schedules. When migrating the schedules, you might need to merge your schedules if applicable. This is because Smart Scale allows the same day to be included in multiple schedules, but Autoscale does not. For more information, see Overlapping schedules in this article.
  • Migrating session count. To migrate session count (the maximum number of sessions), use Group Policy. For more information, see Session count in this article.

Back to top

Automated migration

 

.

file

Automated migration from Smart Scale to Autoscale is supported. This article describes how to complete your Smart Scale to Autoscale migration using PowerShell scripts. Review the entire article before starting the migration process so that you know what to expect.

Back to top

Prerequisites

Before you start the migration process, review the following prerequisites:

  • Windows PowerShell 3.0 or later is available on the machine within your resource location. For information about resource locations, see Resource locations.
  • The PowerShell script is granted write access to the folder where the GenerateScript.ps1 script is located.
  • Remote PowerShell SDK is installed on the machine within your resource location. For more information about the Remote PowerShell SDK, see SDKs and APIs.
  • The API key and secret password associated with the applicable user account are available. To get the API key and secret password associated with a user account, go to Citrix Cloud > Smart Tools > Settings > My Profile.
  • Any existing schedules in Autoscale have been deleted. For information about deleting schedules, see How Autoscale power manages machines.

Back to top

Migrate

Migrating includes exporting data from all Delivery Groups in Smart Scale and then importing the data to Autoscale per Delivery Group.

Step 1: Download the script file

Download the zip file containing the PowerShell script. Extract the zip file to a convenient folder (for example, C:\Example). Ensure that the script is granted the permission to write to that folder.

Step 2: The PowerShell execution policy must be set to Unrestricted

Configure the PowerShell execution policy to “Unrestricted” using the following command: Set-ExecutionPolicy. For more information about execution policies, see https://docs.microsoft.com/en-us/previous-versions//dd347641(v=technet.10).

Step 3: Run GenerateScript to export data from Smart Scale

Note:

  • The GenerateScript.ps1 script will export data from Smart Scale and generate the scripts for each Delivery Group.

1. Run the GenerateScript.ps1 script.

2. When prompted, type a value for the required parameter in the PowerShell window.

-For the “apiKey” parameter, type the API key displayed on the My Profile page in Smart Scale.

-For the “secretPassword” parameter, type the secret password displayed on the My Profile page in Smart Scale.

If the GenerateScript.ps1 script executes successfully, it generates the scripts for each Delivery Group in the “C:\Example\GenerateScriptFolder\scripts\currentRunTimeStamp” folder.

Important:

  • If there are errors during script execution, check the logs in the “C:\Example\logs\currentRunTimeStamp” folder. For more information, see Troubleshooting checklist for GenerateScript in this article.

Step 4: Review the summary report about the generated scripts

Find the summary report created in the

“C:\Example\GenerateScriptFolder\scripts\currentRunTimeStamp\” folder. The summary report includes:

  • A name list of Delivery Groups whose scripts were successfully generated.
  • A name list of Delivery Groups that you have to migrate manually because the data retrieved from Smart Scale might be incomplete or invalid.
  • A name list of Delivery Groups that have existing schedules in Autoscale.
  • A name list of Autoscale-enabled Delivery Groups.
  • A name list of Delivery Groups whose scripts were not generated because of errors.
  • A list of Group Policy settings to be configured.

Review the summary report and address all issues where applicable.

Note:

  • The generated scripts have two name formats. For VDI Delivery Groups, the script names have a prefix “VDI-.” For RDS Delivery Groups, the script names have a prefix “RDS-.”

Step 5: Run the generated scripts per Delivery Group to import data to Autoscale

Run the scripts you generated in Step 3 above to import the data to Autoscale. The data includes defined schedules, machine cost, power-off delay, and capacity buffer.

Note:

  • If Smart Scale is enabled, Autoscale is automatically enabled after script execution.

If there are errors during script execution, see Troubleshooting checklist for the generated scripts in this article.

Good to know

Session count not migrated

The Session count metric in Smart Scale lets you set a maximum number of sessions that are allowed on each machine in the Delivery Group. However, this configuration (MaxSessionsPerServer configuration) is not imported to Autoscale by the scripts. To import the data, create a Group Policy setting (Citrix Studio > Policies > Create Policy) for the maximum number of sessions and then assign it to the applicable Delivery Group. Make sure to assign a higher priority to the policy compared to the existing ones so that the policy can take effect.

Overlapping schedules

After migration, the schedules in Autoscale might not have a one-to-one mapping to the schedules defined in Smart Scale. This is because unlike Smart Scale, Autoscale does not allow the same day to be present in multiple schedules. Therefore, while importing the schedule data to Autoscale, the generated scripts address the scenarios where the same day is included in multiple schedules. For more information about how the scripts address merge conflicts, see the examples below.

  • Example 1: Suppose Monday is included in the following three schedules: schedule1, schedule2, and schedule3. After migration, those three schedules will be merged into a single Autoscale schedule.
  • Example 2: Suppose Tuesday is included in schedule4 and schedule5, and Wednesday is included in schedule4 and schedule5. After migration, Tuesday and Wednesday will be in a single Autoscale schedule.
  • Example 3: Suppose Thursday is included in schedule6 and schedule7, and Friday is included in schedule6 and schedule8. After migration, Thursday and Friday will not be in a single Autoscale schedule even though schedule7 and schedule8 have the same number of machines configured to be powered on.

If there are no merge conflicts between the schedules, Autoscale schedules will have the same names as those in Smart Scale. Otherwise, the resulting schedule is automatically renamed with a suffix “-AutoGenerated.” This makes it easy to differentiate modified schedules from unmodified ones.

How to roll back a migration

After you roll out a migration, you can roll it back. Doing so restores your previous Smart Scale configuration. To roll back a migration, follow the steps below.

1. Delete all Autoscale schedules using a PowerShell script. For example, `(Get-BrokerPowerTimeScheme -DesktopGroupUid {ProvideUid}) | %{Remove-BrokerPowerTimeScheme $_}`. Note that migrated schedules cannot be deleted from the Autoscale user interface.
2. Disable Autoscale using a PowerShell command. For example, `(Set-BrokerDesktopGroup -Name "name" -AutoscalingEnabled $false)`.
3. Enable Smart Scale manually.

Troubleshooting

Troubleshooting checklist for GenerateScript

If errors occurred during the execution of GenerateScript, review the troubleshooting checklist below.

  • Company name is missing. Verify that the API key is correct, and then ensure that the API key you typed is wrapped in single quotes; for example, “YOURAPIKEY.” Do not use double quotes. If you do and the API key you typed contains the $ character, it is not preserved properly.
  • Smart Scale REST API errors. For more information, see API Overview.
  • Invalid bearer token. This error occurs if the current session remains open for more than 12 hours. As a workaround, open a new session and then run the script.
  • No Cloudxdsite found. Verify that the Site is displayed on the Virtual Apps and Desktops Sites page.
  • Missing or invalid Smart Scale data. As a workaround, migrate the data manually. For more information, see Manual migration in this article.

If you have checked the log file and this troubleshooting section, and the problem persists, contact Citrix Technical Support.

Troubleshooting checklist for the generated scripts

If errors occurred during execution of the generated scripts, review the troubleshooting checklist below.

  • Invalid bearer token. This error occurs if the current session remains open for more than 12 hours. As a workaround, open a new session and then run the script.
  • Schedules already defined in Autoscale. If the migration is needed, delete any existing schedules in Autoscale, and then start the migration process.
  • The following error message appears: Unable to connect to https://<user>.xendesktop.net/SDKRouter endpoint. Try again later.

If you have checked the log file and this troubleshooting section, and the problem persists, contact Citrix Technical Support.

Back to top

Additional Information

 


 

Where to download ?

Certain legacy Citrix tools are now available on request only. Please submit the request here - https://forms.gle/obA39PEz5qpDiSPq8

Once we verify your request, we will provide access to the download location.