HowTo: Create a NetScaler Load Balancing vServer for Citrix Workspace Environment Management on the CLI

Since Citrix has released Workspace Environment Management 4.2 there is now a complete section about #WEM in the Citrix eDocs. Part of the new official documentation is a section about load balancing advices. But before that, there has already been a superior blog article about that topic by Ryan Revord.
But what is still missing is a complete overview of the necessary NetScaler CLI commands. That way you can import your WEM load balancing configuration in less than a minute! As I try to do everything in NetScaler on the CLI, I documented the steps during my first WEM deployment and wanted to share them with the community.

Prerequisites:

    1. A working NetScaler with a SNIP in the corresponding subnet of your network
    2. Two WEM Broker Server up and running with a third server hosting the SQL database
      (When you create the Workspace Environment Management database, select the option Broker Database Connection Uses Windows Security!)
    3. Configure the Service Principal Names (SPNs) for the Citrix Workspace Environment Management Infrastructure Services to use the Broker Service Account name.
    4. Step 2 and 3 are most important! Check twice that you use Windows authentication for SQL and set the SPN to the Windows Account!
      setspn -U -S Norskale/BrokerService [accountname]

After that we come to the interesting part, we have to load balance 4 TCP ports: 8284, 8286, 8285, 8287

Legend:

WEM Broker #1 xa-wms2016-01.int.corp.de 192.168.24.21
WEM Broker #2 xa-wms2016-02.int.corp.de 192.168.24.22
NetScaler lb vserver VIP citrix-wem.int.corp.de 192.168.24.30

The following CLI commands have a recurring logic:

  1. Create Service Group for a specific port
  2. Bind WEM Broker #1 to the Service Group with the corresponding port
  3. Bind WEM Broker #2 to the Service Group with the corresponding port
  4. (Bind WEM Broker #x to the Service Group with the corresponding port; in case you would like to have more than two WEM Broker)
  5. Bind the default TCP Monitor to the Service Group
  6. Create the TCP Load Balancing Virtual Server with the corresponding port on the shared IP for all WEM ports
  7. Bind the Service Group to the Load Balancing Virtual Server

That’s it, hope it helps someone!

Author: Marco

Gelernter Fachinformatiker für Systemintegration (2010) CCA für XenServer 5.0 (2009) CCA für XenApp 5.0 (2011) CCA für XenApp 6.5 (2013) CCAA für XenApp 6.5 (2013) CCA für XenDesktop 5 (2013) Dell Wyse ThinOS Select Techniker (2011) Igel Authorized Partner (2009-2014) Intensivkurs “Group Policy Administration” Windows 7, 8.x sowie Windows Server 2008-R2 / 2012-R2 bei NT Systems, Dipl.-Ing. T. Pham (2014) Zu Gast auf der E2EVC Virtualization Conference in Berlin (2015) Zu Gast auf der Citrix Technology Exchange in Berlin (2016) Citrix Certified Associate – Networking (CCA – N) (2016) Citrix Certified Professional – Networking (CCP – N) (2017)

3 thoughts on “HowTo: Create a NetScaler Load Balancing vServer for Citrix Workspace Environment Management on the CLI”

  1. Hi Marco,

    I don’t see any persistence on your LB vServers. From Citrix Docs: “Session persistence is required for the connection between agent and broker, and between consoles and broker. Citrix recommends that you connect all Administration Consoles to one Broker Service, rather than using the VIP.”

    1. You are right. In my original setup I oriented myself at Ryan Tevord where he says: “The Broker is stateless so no need to set persistence either.”
      But Citrix says you need Persistence. Should have read more closely. Will fix this tomorrow as soon as possible.

    2. Citrix has reworked its statement:

      Session persistence is required for the connection between administration consoles and the infrastructure service. (Session persistence between the agent and the infrastructure service is not required.) Citrix recommends that you directly connect each administration console to an infrastructure service server, rather than using the VIP.

      Source: http://docs.citrix.com/en-us/workspace-environment-management/current-release/install-and-configure/infrastructure-services.html

Leave a Reply

Your email address will not be published. Required fields are marked *