<!DOCTYPE safe>
<safe>
<!-- Define the service names, in the startup order, separated by commas (,)
    Use the Get-Service PowerShell cmdlet to get the service names
-->
<macro name="SERVICES" value="W3SVC"/>
<macro name="VIRTUAL_IP" value="" />
<macro name="IIS_PORT" value="" />
<service mode="farm" boot="on">
  <!-- Farm topology configuration for the membership protocol -->
  <farm>
    <lan name="default" />
  </farm>
  <!-- Virtual IP Configuration -->
  <!-- Use VIRTUAL_IP defined in macro above -->
  <vip>
    <interface_list>
      <interface>
        <virtual_interface type="vmac_directed">
          <virtual_addr addr="%VIRTUAL_IP%" where="alias"/>
        </virtual_interface>
      </interface>
    </interface_list>
    <loadbalancing_list>
      <group name="IIS">
        <!-- Set load-balancing rule on IIS_PORT defined in macro above -->
        <rule port="%IIS_PORT%" proto="tcp" filter="on_addr"/>
      </group>
    </loadbalancing_list>
  </vip>
  <!-- TCP Checker Configuration -->
  <!-- Use VIRTUAL_IP and IIS_PORT defined in macros above -->
  <check>
    <tcp ident="HTTP_IIS" when="both">
      <to
         addr="%VIRTUAL_IP%"
         port="%IIS_PORT%"
         interval="10"
         timeout="5"
       />
    </tcp>
  </check>
  <!-- User scripts activation -->
 <user>
    <var name="SERVICES" value="%SERVICES%"/>
  </user>
</service>
</safe>
