recent posts

banner image

Horizon View Desktop Sessions & Application Advanced Load Balancing

 
In this article, I am going to discuss in details the proper ways for load balancing your published (Desktop Sessions) and (Applications). So, I assume that you have installed and configured the RDSH role and the farms has been created. Not only this, but also have entitled users for (Desktop Sessions) and (Applications). So, I am directly going to demonstrate the approach which is based on (CPU utilization) or (Memory consumption) rather that the number of available sessions in each individual host (Server).

I will start by enabling the (Horizon Script Feature) in the RDSH server. The required script file for either CPU utilization or Memory consumption-based load balancing, can be found after installing (Horizon Agent) in the RDSH server in the following path: (C:\Program Files\VMware\VMware View\Agent\scripts) 

Eventually, I will configure the system registry to run the required script.

01- Through web browser, navigate to (Horizon Connection Server) console URL
02- From the right panel, click on (Dashboard)
03- From (System Health) panel, expand (RDS Farms) -> click on your RDSH server. You will be redirected to the following window:

•  You will notice that (Max number of connections) is (150), and this means that your RDSH server will not accept any more (Desktop) or (Application) sessions after reaching 150 concurrent sessions whatever the physical/virtual server load status at this point.

•  You will notice that (Server load) is (Load not reported), and this means that your RDSH server is not configured for and load balancing method. 

04- Navigate to (RDSH) server.
05- Install (Horizon Agent).
06- Navigate to: (C:\Program Files\VMware\VMware View\Agent\scripts)



•  You can’t use the two listed scripts in the same time.
•  Use (cpuutilisation) for RDSH-based CPU load balancing.
•  Use (memoryutilisation) for RDSH-based CPU load balancing.


07- Open (Services) as an Administrator then, navigate to (VMware Horizon View Script Host):

 
08- Right click (VMware Horizon View Script Host) then choose Properties: 

 
09- From (General) tap, navigate to (Startup type) -> (Automatic)


10- Click (Apply) then, click (Start) to start the service. Finally click (Ok).

Now we have started (VMware Horizon View Script Host) service, the next step is the choosing of the proper script that will be passed to (Horizon Agent) then (Horizon Agent) will pass it to (Horizon Connection Server).

11- Open (Registry Editor) as an Administrator then, navigate to the following path:        (Computer\HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware VDM\ScriptEvents\RdshLoad)


12- From the left panel, right click and select (New) -> (String Value):


13- Give the value a new name based on the type of script you chose:

•  Name it (CPU) if you chose (cpuutilisation) script for RDSH-based CPU load balancing.

•  Name it (memoryutilisation) if you chose (memoryutilisation) script for RDSH-based CPU load balancing.

14- Right click the (String Value) you have created then, click (Modify)

15- In (Value data), enter the proper path for selected script:

•  If you chose (cpuutilisation) script for RDSH-based CPU load balancing, type: cscript.exe “C:\Program Files\VMware\VMware View\Agent\scripts\cpuutilisation.vbs” 

•  If you chose (memoryutilisation) script for RDSH-based CPU load balancing, type: cscript.exe “C:\Program Files\VMware\VMware View\Agent\scripts\memoryutilisation.vbs” 

16- Click (Ok).

17- Again, open (Services) as an Administrator then, navigate to (VMware Horizon View Agent) service:


18- Right click (VMware Horizon View Agent) service then, select (Restart):


19- Now, navigate to (Horizon Connection Server) console URL.
20- From the right panel, click on (Dashboard).
21- From (System Health) panel, expand (RDS Farms) -> click on your RDSH server. You will be redirected to the following window:

•  If you have already chose (cpuutilisation) script for RDSH-based CPU load balancing then, the result will be:


•  You will notice that (Server load) is (Light load, new sessions okay), so that is based on the CPU cycle as the Horizon View is looking at the amount of CPU utilization and decide if it has enough capacity to host additional sessions or not.

•  If you have already chose (memoryutilisation) script for RDSH-based CPU load balancing, the result will be:


•  You will notice that (Server load) is (Heavy load, new sessions avoided), which basically means that we have got few sessions running on that host and based on the memory utilization, it calculated that it won’t take any new sessions.



Want to download this blog as a PDF document, click the link below:






Abd El-Rahman Oreiby
Senior Data Center Engineer
Al Thuraya Security Egypt 
www.abdelrahmanoreiby.weebly.com
Horizon View Desktop Sessions & Application Advanced Load Balancing Horizon View Desktop Sessions & Application Advanced Load Balancing Reviewed by Abd El-Rahman Oreiby on 8/06/2020 08:29:00 ص Rating: 5

ليست هناك تعليقات:

يتم التشغيل بواسطة Blogger.