Product Documentation

Understanding load balancing entity templates and deployment files

Load balancing entity templates are created in the same way that Citrix ADC application templates are created. When you export a load balancing virtual server to a template file, the following two files are automatically created:

  • Load balancing virtual server template file. Contains XML elements that store the values of the parameters that are configured for the load balancing virtual server. The file also contains XML elements for storing information about bound policies.
  • Deployment file. Contains XML elements that store deployment-specific information such as services, service groups, and configured variables.

In the template and deployment files, each unit of configuration information is encapsulated in a specific XML element that is meant for that unit type. For example, the load balancing method parameter, lbMethod, is encapsulated within the <lbmethod> and <lbmethod> tags.

Note: After you export a load balancing virtual server, you can add elements, remove elements, and modify existing elements before importing the configuration information to a Citrix ADC appliance.

Example of a load balancing virtual server template

Following is an example of a template file that was created from a load balancing virtual server called “Lbvip”:


<?xml version="1.0" encoding="UTF-8" ?>
  <template>
    <template_info>
      <entity_name>Lbvip</entity_name>
      <version_major>10</version_major>
      <version_minor>0</version_minor>
      <build_number>40.406</build_number>
    </template_info>
    <entitytemplate>
      <lbvserver_list>
        <lbvserver>
          <name>Lbvip</name>
          <servicetype>HTTP</servicetype>
          <ipv46>0.0.0.0</ipv46>
          <ipmask>*</ipmask>
          <port>0</port>
          <range>1</range>
          <persistencetype>NONE</persistencetype>
          <timeout>2</timeout>
          <persistencebackup>NONE</persistencebackup>
          <backuppersistencetimeout>2</backuppersistencetimeout>
          <lbmethod>LEASTCONNECTION</lbmethod>
          <persistmask>255.255.255.255</persistmask>
          <v6persistmasklen>128</v6persistmasklen>
          <pq>OFF</pq>
          <sc>OFF</sc>
          <m>IP</m>
          <datalength>0</datalength>
          <dataoffset>0</dataoffset>
          <sessionless>DISABLED</sessionless>
          <state>ENABLED</state>
          <connfailover>DISABLED</connfailover>
          <clttimeout>180</clttimeout>
          <somethod>NONE</somethod>
          <sopersistence>DISABLED</sopersistence>
          <sopersistencetimeout>2</sopersistencetimeout>
          <redirectportrewrite>DISABLED</redirectportrewrite>
          <downstateflush>DISABLED</downstateflush>
          <gt2gb>DISABLED</gt2gb>
          <ipmapping>0.0.0.0</ipmapping>
          <disableprimaryondown>DISABLED</disableprimaryondown>
          <insertvserveripport>OFF</insertvserveripport>
          <authentication>OFF</authentication>
          <authn401>OFF</authn401>
          <push>DISABLED</push>
          <pushlabel>none</pushlabel>
          <l2conn>OFF</l2conn>
          <appflowlog>DISABLED</appflowlog>
          <icmpvsrresponse>PASSIVE</icmpvsrresponse>
          <lbvserver_cmppolicy_binding_list>
            <lbvserver_cmppolicy_binding>
              <name>Lbvip</name>
              <policyname>NOPOLICY-COMPRESSION</policyname>
              <priority>100</priority>
              <gotopriorityexpression>END</gotopriorityexpression>
              <bindpoint>REQUEST</bindpoint>
            </lbvserver_cmppolicy_binding>
          </lbvserver_cmppolicy_binding_list>
        </lbvserver>
      </lbvserver_list>
    </entitytemplate>
  </template>

Example of a deployment file

Following is the deployment file associated with the virtual server in the preceding example:


<?xml version="1.0" encoding="UTF-8" ?>
  <template_deployment>
    <template_info>
      <entity_name>Lbvip</entity_name>
      <version_major>10</version_major>
      <version_minor>0</version_minor>
      <build_number>40.406</build_number>
    </template_info>
    <service_list>
      <service>
      <ip>1.2.3.4</ip>
      <port>80</port>
      <servicetype>HTTP</servicetype>
      </service>
    </service_list>
    <servicegroup_list>
      <servicegroup>
        <name>svcgrp</name>
        <servicetype>HTTP</servicetype>
        <servicegroup_servicegroupmember_binding_list>
          <servicegroup_servicegroupmember_binding>
            <ip>1.2.3.90</ip>
            <port>80</port>
          </servicegroup_servicegroupmember_binding>
        <servicegroup_servicegroupmember_binding>
          <ip>1.2.8.0</ip>
          <port>80</port>
        </servicegroup_servicegroupmember_binding>
        <servicegroup_servicegroupmember_binding>
          <ip>1.2.8.1</ip>
          <port>80</port>
        </servicegroup_servicegroupmember_binding>
        <servicegroup_servicegroupmember_binding>
          <ip>1.2.9.0</ip>
          <port>80</port>
        </servicegroup_servicegroupmember_binding>
      </servicegroup_servicegroupmember_binding_list>
    </servicegroup>
  </servicegroup_list>
</template_deployment>

Understanding load balancing entity templates and deployment files