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 golden image virtual machine for the automated farm.
- Write a load balancing script and copy the same script to the Horizon Agent scripts directory on each RDS host in the farm. See Writing a Load Balancing Script for an RDS Host.
- Enable the VMware Horizon View Script Host service on the RDS host. See Enable the VMWare Horizon View Script Host Service on an RDS Host.
- Log in to the RDS host as an administrator.
- Start Server Manager.
- Select Tools tab, and launch the Registry Editor. , click the
- In the registry, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\ScriptEvents.
- In the navigation area, select the RdshLoad key.
The values for the RdshLoad key, if any, appear in the topic area (the right pane).
- Right-click in the topic area for the RdshLoad key, select , 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.
- Right-click the entry for the new string value you created and select Modify.
- 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"
- Restart the Horizon Agent service on the RDS host to make your changes take effect.
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 golden image 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.