You must configure the same load balancing script on every RDS host in the farm. Configuring a load balancing script involves setting a registry key on the RDS host.

If you are using an automated farm, you perform this procedure on the parent virtual machine for the automated farm.

Important: You must configure the load balancing script on all of the RDS hosts in a farm or on none of the RDS hosts in a farm. If you configure a load balancing script on only some of the RDS hosts in a farm, Horizon Console sets the status of the farm to red.

Prerequisites

Procedure

  1. Log in to the RDS host as an administrator.
  2. Start Server Manager.
  3. Select Tools > System Configuration, click the Tools tab, and launch the Registry Editor.
  4. In the registry, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\ScriptEvents.
  5. In the navigation area, select the RdshLoad key.
    The values for the RdshLoad key, if any, appear in the topic area (the right pane).
  6. Right-click in the topic area for the RdshLoad key, select New > String Value, and create a new string value.
    As a best practice, use a name that represents the load balancing script to be run, for example, cpuutilisationScript for the cpuutilisation.vbs script.
  7. Right-click the entry for the new string value you created and select Modify.
  8. In the Value data text box, type the command line that invokes your load balancing script and click OK.
    Type the full path to your load balancing script.
    For example: cscript.exe "C:\Program Files\VMware\VMware View Agent\scripts\cpuutilisation.vbs"
  9. Restart the Horizon Agent service on the RDS host to make your changes take effect.

Results

Your load balancing script begins to run on the RDS host.

What to do next

Repeat this procedure on each RDS host in the farm. If you performed this procedure on the parent virtual machine for an automated farm, provision the automated farm.

To verify that your load balancing script is working correctly, see Verify a Load Balancing Script.