Previous page

Next page

Locate page in Contents

Optimization

Beginning with version 18, Parallels RAS includes built-in automated optimization capabilities for RD Session Hosts, VDI, and Azure Virtual Desktop workloads. Different preconfigured optimizations for multi-session (such as RD Session Hosts) or single-session (such as VDI) hosts are available for administrators to choose from manually or automatically to ensure a more efficient, streamlined and improved delivery of virtual apps and desktops.

Preconfigured optimizations were designed to be easily updated to support future releases of Microsoft Windows. Moreover, custom scripts may also be used within the tool to make use of already available optimizations to be deployed on Parallels RAS workload machines.

Over 130 image optimizations are available out-of-the-box and divided into the following main categories:

  • UWP application packages (removal; available for VDI only)
  • Windows Defender ATP (turn ON or OFF, disable real-time scan, exclude files, folder, processes, and extensions)
  • Windows components (removal)
  • Windows services (disable)
  • Windows scheduled tasks (disable)
  • Windows advanced options (Cortana, system restore, telemetry, custom layout)
  • Network performance (disable task offload, ipv6, etc.)
  • Registry (service startup timeout, disk I/O timeout, custom, etc.)
  • Visual effects (best appearance, best performance, custom)
  • Disk cleanup (delete user profiles, image cleanup, etc.)
  • Custom scripts (.ps1, .exe, .cmd, and other extensions/formats)

For the complete list of optimization categories and components, please see https://kb.parallels.com/125222.

Optimizations are applicable to RD Session Hosts, VDI desktops, Azure Virtual Desktop, and Remote PC pools (through VDI) based on:

  • Windows Server 2012 R2 and later
  • Windows 7 SP1
  • Windows 10
  • Windows 11

Configure optimization

Optimization can be configured for the following:

  • RD Session Hosts
  • VDI
  • Azure Virtual Desktop

Optimization settings are configured for the above on the Site level (Site defaults) and can also be configured for individual components if the RAS administrator decides to use custom settings for a given component.

To configure optimizations on the Site level, navigate to Farm > Site, click the Tasks > Site defaults menu and choose one of the following:

  • RD Session Host
  • VDI
  • AVD multi-session hosts
  • AVD single-session hosts

In a Site defaults dialog that opens, select the Optimization tab. The user interface for configuring optimization is the same for all of the above.

Note: Before applying optimization, make sure you have a saved state of session hosts as you will not be able to revert changes after they are applied.

To configure optimization:

  1. If you are in the host Properties dialog or in a wizard, clear the Inherit default settings options if you want to modify them for this host.
  2. Select the Enable optimization option.
  3. Choose optimization type from the following:
    • Automatic: Predefined and preconfigured optimization will be used automatically.
    • Manual: Gives you full control over which optimization options to use and allows you to configure each one. This option also gives you an option to use a custom optimization script that will be executed on the host.
  4. If you selected Manual in the previous step, configure optimization categories and components according to your requirements. See Configure optimization below.
  5. Force optimization on all enabled categories: This is a special option that should only be used in situations when some parts of optimization failed to apply to a host for some unforeseen reason (e.g. the host went offline unexpectedly). When you select this option, then click OK and then Apply in the RAS Console, the entire optimization configuration will be applied to the host. This way you can make sure that changes that you made to optimization components last time, and that were not applied to the host, will be applied again. The state of the Force optimization on all enabled categories option (selected or cleared) is not saved because this is a one-time action, so the next time you open the dialog, the option will be cleared again. Note that in a standard scenario, when you make changes and then apply them to a host, you don't need to select this option, because normally you want to apply just the changes that you made, not the entire optimization configuration.
  6. The Category list contains optimization categories that can be configured. To include a category in optimization, select the corresponding checkbox. Some categories contain multiple components, which can be configured individually, some have settings that can be customized. To configure category settings or components, highlight the category and click the gear icon (or click Tasks > Properties, or simply double-click a category). Depending on the category selected, you can do the following:
    • Configure category settings (choose from available options, select or clear individual settings, specify values, add or remove entries).
    • Add or remove underlying components to include or exclude them from optimization (use the plus- and minus-sign icons). When adding a component (where available), you can select from a predefined list or you can specify a custom component.
    • In some cases (specifically registry entries) you can double-click an entry and specify multiple values for it.
    • If you remove a predefined component, you can always get it back in the list by clicking Tasks > Reset to default. You can also use this menu to reset category settings to default values if they were modified.
    • The last optimization category in the list is Custom script. You can use it to execute an optimization script that you may have available. Read the Using custom script subsection below for details.
  7. When done, click OK to close the dialog.

Using custom script

The Custom script optimization category is used to execute an optimization script on a target host. Before configuring this category, make sure that the script exists on target hosts and that the path and file name are the same on each host.

To configure the Custom script optimization:

  1. Enable the Custom script category in the list (select the checkbox), then highlight it and click Tasks > Properties.
  2. In the dialog that opens, specify the command to execute, arguments (if required), the initial directory, and credentials that will be used to execute the script.
  3. Click OK.

When you apply the optimization to a host, the script will be executed as part of applying other optimization parameters.

Applying optimization

After you enable optimization for a host and then click Apply in the RAS Console, the following will happen the next time the host communicates with Parallels RAS:

  1. The host status changes to Optimization pending and the host enters the drain mode. At this stage, you can stop optimization by selecting a host in the list and clicking Tasks > Stop optimization.
  2. Once all users are logged off, the host status changes to Optimization in progress.
  3. After all optimization settings are applied, the host will reboot.
  4. After the reboot, the host returns to operation and its status changes to OK.

Note: By design, the host will be rebooted after optimization completion even if it is failed.

Optimization results are logged on a host at the following location: %ProgramData%\Parallels\RASLogs\ImageOptimizer.log. Open the file and search for entries similar to the following:

  • [I 78/00000009/T10C4/P0FD4] 11-30-20 10:09:19 - Image Optimization completed with 98 successful and 0 unsuccessful optimizations.

Note: By design, Optimization has less priority than Reboot/Disable schedule. For example, it is expected if a host changes the status from "Optimization pending" to Disabled/Reboot when schedule starts.

Upgrade

When Parallels RAS is upgraded from an older version:

  • The optimization feature is disabled.
  • The inheritance is off.

To use optimization after the upgrade, the administrator needs to enable it manually either in Site defaults or in the group/host pool settings.

Inheritance

 

Optimization

Inherits from

RDSH Site defaults

Yes

None

RDSH Group

No

None

RDSH standalone

Yes

RDSH Site defaults

RDSH template 

Yes

RDSH Site defaults

RDSH from template

No

None

VDI Site defaults

Yes

None

VDI Desktop standalone

Yes

VDI Site defaults

VDI Desktop template

Yes

VDI Site defaults

VDI Desktop from template

No

None

Azure Virtual Desktop Site defaults

Yes

None

Azure Virtual Desktop host pool - hosts from a template

No

None

Azure Virtual Desktop host pool - standalone hosts

Yes

AVD multi-session hosts Site defaults or AVD single-session hosts Site defaults.

Azure Virtual Desktop template

Yes

AVD multi-session hosts Site defaults or AVD single-session hosts Site defaults.

Azure Virtual Desktop hosts from template

No

None

Additional information

Please note the following:

  • Some optimizations may fail and generate warnings if they had been already applied.
  • Some optimizations may fail and generate warnings depending on OS specifics. For example, removal of UWP apps may fail because apps are already absent.