Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Microsoft-Windows-TCPIP to set the TCP/IP properties of each interface, with the following properties IN THIS SAME ORDER:
    • Ipv4Settings/DhcpEnabled = true/false, to enable or disable DHCP on IPv4 addresses.
    • Ipv6Settings/DhcpEnabled for IPv6.
    • Identifier = interface name or MAC address of the interface. Since flexVDI Agent 3.1.1, you can use ${mac_addresses} to get a comma-separated list of MAC addresses of the virtual desktop. However, they are in the form aa:bb:cc:dd:ee:ff, and Sysprep expects it in the form aa-bb-cc-dd-ee-ff, so you should use a script to parse and format them.
    • UnicastIpAddresses/IpAddress to add a static IP address to the interface, either IPv4 or IPv6. You can use Desktop Policy parameters and scripting to generate suitable static addresses for your virtual desktops automatically.
    • Routes, to add routing rules. This is also used to add the default gateway, using the following values:
      • Route/Prefix = 0.0.0.0/0
      • Route/NextHopAddress = gateway IP address
  • Microsoft-Windows-DNS-Client to set the DNS server addresses and options for each interface:
    • Identifier = interface name or MAC address.
    • DNSServerSearchOrder/IpAddress to add a DNS server IP address. DNS servers are queried in the order set by the wcm:keyValue attribute.
  • Microsoft-Windows-NetBT to set the NetBIOS server and options for each interface.
    • Identifier = interface name or MAC address.
    • NameServerList/IpAddress to add a NetBIOS server IP address.
    • NetbiosOptions, with a value between 0 and 2, meaning:
      • 0: Use DHCP-provided settings if available, otherwise the settings of the interface.
      • 1: Use the NetBIOS settings of the interface.
      • 2: Disable NetBIOS

If you are going to set static IP addresses for your interfaces, do not set a static IP address in the template. Enable DHCP instead, so that the previous IP address does not get mixed up with the new one, resulting in duplicated addresses and unwanted behavior.

Code Block
languagexml
titleNetwork components example
collapsetrue
<component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Interfaces>
        <Interface wcm:action="add">
            <Ipv4Settings>
                <DhcpEnabled>false</DhcpEnabled>
            </Ipv4Settings>
            <Ipv6Settings>
                <DhcpEnabled>false</DhcpEnabled>
            </Ipv6Settings>
            <Identifier>${mac}</Identifier>
            <UnicastIpAddresses>
                <IpAddress wcm:action="add" wcm:keyValue="1">${ip}/24</IpAddress>
            </UnicastIpAddresses>
            <Routes>
                <Route wcm:action="add">
                    <Identifier>1</Identifier>
                    <Metric>10</Metric>
                    <NextHopAddress>192.168.1.1</NextHopAddress>
                    <Prefix>0.0.0.0/0</Prefix>
                </Route>
            </Routes>
        </Interface>
    </Interfaces>
</component>
<component name="Microsoft-Windows-DNS-Client" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Interfaces>
        <Interface wcm:action="add">
            <Identifier>${mac}</Identifier>
            <DNSServerSearchOrder>
                <IpAddress wcm:action="add" wcm:keyValue="1">192.168.1.1</IpAddress>
                <IpAddress wcm:action="add" wcm:keyValue="2">8.8.8.8</IpAddress>
            </DNSServerSearchOrder>
            <EnableAdapterDomainNameRegistration>true</EnableAdapterDomainNameRegistration>
            <DisableDynamicUpdate>false</DisableDynamicUpdate>
        </Interface>
    </Interfaces>
</component>
<component name="Microsoft-Windows-NetBT" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Interfaces>
        <Interface wcm:action="add">
            <NameServerList>
                <IpAddress wcm:action="add" wcm:keyValue="1">192.168.1.10</IpAddress>
            </NameServerList>
            <NetbiosOptions>1</NetbiosOptions>
            <Identifier>${mac}</Identifier>
        </Interface>
    </Interfaces>
</component>

...