How to deploy Windows 7 or higher Systems with Static IP Via OSIM

Document ID : KB000021304
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary:

It is required to deploy Windows 7 or higher to multiple machines with Static IP addresses. How to do this via OSIM?

 

Instructions: 

OSIM automates the unattended installation but this is still the standard Microsoft unattended install and is therefore possible to do anything Microsoft supports.

In order to configure this successfully a full understanding of the xml Microsoft unattended setup file that Windows uses is required.

This is fully documented in the Windows Automated Installation Kit (WAIK) (Windows 7) or the Windows Assessment and Deployment Kit (ADK) (windows 8 or higher) documentation from Microsoft.

See the example below for basic instructions on defining static IP into the XML file.

Consider the requirements:

IP address required = 192.168.1.25
Subnet mask = 255.255.255.0
Gateway = 192.168.1.108
DNS Domain = forward.inc.local
DNS servers = 192.168.1.1, 192.168.1.2

These requirements require work in 2 components of the specialize phase of the install

Microsoft-Windows-TCPIP
and
Microsoft-Windows-DNS-Client

to add these into an image you use the "Windows System Image Manager (SIM)" installed with the WAIK or ADK

  1. Open Windows SIM
  2. Right click on "select a Windows image or catalog file"

    Note: if your IPS is an x64 system then you cannot mount a 32bit WIM you will need to install WAIK or ADK on a 32 bit system, this can then access any x86 or x64 based Wim.
    Note: in the instructions below change xxxxx_Microsoft......... according to the architecture of the image you are creating (x86 \ amd64)
  3. Select the WIM for this image
  4. Answer yes when asked to create a catalog - This may take some time.
  5. Right click on "create or open an answer file"
  6. Select the image.inf
  7. Answer yes to associate this with the image
  8. In the windows image pane:

    1. expand xxxxx_Microsoft-Windows-DNS-Client_xxxxxxxxx_neutral
    2. expand Interfaces, Interface.
    3. right click on DNSServerSearchOrder and select "Add setting to Pass 4 Specialize"
  9. In the Answer File Pane

    1. expand components - 4 specialize - xxxxx_Microsoft-Windows-DNS-Client_neutral
    2. Expand Interfaces - Interface
    3. Define the following

      • DNSDomain = Forward.inc.local
      • Identifier = Local Area Connection
    4. Right Click on "DNSServerSearchOrder" and Select "Insert New IpAddress"
    5. Select IpAddress
    6. Enter

      • Key=1
      • Value = 192.168.1.1
    7. Right Click on "DNSServerSearchOrder" and Select "Insert New IpAddress" (to add second DNS server IP address)
    8. Select IpAddress
    9. Enter

      • key=2
      • Value = 192.168.1.2
  10. In the Windows Image Pane

    1. expand xxxxx_Microsoft-Windows-TCPIP_xxxxxxxx_neutral
    2. expand Interfaces
    3. expand Interface
    4. right click on the following 3 sections and select "Add setting to Pass 4 Specialize"

      • Ipv4Settings
      • Routes
      • UnicastIpAddresses
  11. In The Answer File Pane

    1. expand components - 4 specialize - xxxxx_Microsoft-Windows-TCPIP-neutral
    2. Expand Interfaces - Interface
      • identifier = Local Area Connection
    3. expand Ipv4Settings
      • DhcpEnabled = false
    4. Right Click on UnicastIpAddresses and select "Insert New IpAddress"
    5. expand IpAddress

      • key=1
      • Value=192.168.1.25/24
    6. Right Click on Routes and select "Insert New Route"
    7. Expand Route

      • identifier = 0
      • Metric = 20
      • NextHopAddress = 192.168.1.1098
      • Prefix = 0.0.0.0/0

Note the addition of the routing prefix length /24 this is instead of subnet mask. See MS documentation in WAIK or ADK for further detail.
This would work fine for a single PC but is not very useful for OSIM deployments; OSIM uses parameters in order that it is possible define the values in the OSIM GUI when scheduling the OS deployment. These Parameters must be defined within the image.

First ascertain which values need to be parameters

In the requirements the values that need to be defined per machine are IP address and Gateway. However it is a good idea to allow the choice of DHCP or Static IP in the image.

Adding the Parameters to the XML

Follow the procedure above with the following differences

  • 11-3
    Enter $DhcpEnabled$ in DhcpEnabled
    Note: in some versions of the Windows SIM this value is Boolean and will only accept "true or False". In this case it is required to manually edit the value in the <image_name>.inf located in ...Program Files\CA\DSM\Server\SDBS\var\managedpc\camenu.
  • 11-5
    Enter $IpAddress$ in IpAddress
  • 11-8
    Enter $Gateway$ in NextHopAddress

Updating the Image registration in the MDB to provide these new parameters in the UI

In Windows Explorer navigate to

...Program Files\CA\DSM\Server\SDBS\var\managedpc\images\<ImageName>

Open the file default.ini


in the section [Default] add the lines

 

DhcpEnabled=TRUE
IpAddress=
Gateway=

scroll to bottom of file and add
 
[DhcpEnabled]
Type=MapList
MaxLength=5
Trans=yes
Comment=Select if the target will use DHCP or static IP address
item=TRUE "DHCP"
item=FALSE "Static IP"
 
[IpAddress]
Type=Text
MaxLength=18
Trans=yes
Comment=Enter the IpAddress and routing prefix length eg 192.168.1.25/24. Only required if you have configured for static IP.
 
[Gateway]
Type=Text
MaxLength=18
Trans=yes
Comment=Enter the IpAddress of the network gateway. Only required if you have configured for static IP.

 

save the file and now run the update osimage wizard


Run the Wizard

  1. In DSM Explorer navigate to Software - boot and OS Image library - Image prepare system - wizards - Update OS Image Wizard
  2. select the image to be updated on Stage 2
  3. Select "Update the image registration in a domain only" in stage 3
  4. select "register Data only" in stage 4
  5. complete the wizard and after this your addition will be available in the UI for OS deployments.

    If the environment contains remote scalability servers that function as boot servers then in Step 4 of the wizard create the package as well so that the update can be distributed to all bootservers.