Export (0) Print
Expand All

Image-based Installation of the Operating System and the Cluster Service Using Automated Deployment Services (ADS)

Updated: January 1, 2003

Applies To: Windows Server 2003 with SP1

Automated Deployment Services (ADS) enables you to personalize the operating system image to your needs. Imaging/Cloning requires you to modify the sysprep.inf (file that contains the configuration information for operating system) every time you need to deploy the image to a different server or deploy a different configuration of the operating system. ADS reduces this complexity by allowing the user to personalize the sysperp.inf file. For more information about sysprep.inf and imaging please refer to section Image based installation of Server Cluster.

In addition, ADS enables you to use a single server to manage servers in your data center. This server, or "Controller," together with the all of the other ADS services, enables you to deploy operating system images onto devices without an operating system or to repurpose existing devices with new operating system images. In short, you can use ADS to:

Remotely purpose a device that has no operating system to a useful state or repurpose a device from one state to another state.

Operate a scale-out data center by providing ability to run extensible and configurable operations, such as scripts, on one or more systems from a single point of control.

Automated Deployment Services consists of the following three main services:

- Controller service

- Image Distribution service

- Network Boot Services

Refer to ADS help and documentation for more information about ADS and ADS setup and installation. This section assumes that you have ADS installed and running.

Following are the steps to deploying Server Clusters using ADS

  1. Add devices (systems that you want to install cluster service to) to ADS Controller

  2. Create a Master Image

  3. Upload the image to ADS controller

  4. Modify sysprep.inf to include Variables

  5. Create task sequence file for Image deployment

  6. Create a job template for the sequence file

  7. Create and store variables associated value in ADS database for the desired device

  8. Execute Job Template against the desired device

If you are using shared storage device then it is vital that only one node have access to the shared disk. Otherwise the shared disk can become corrupted. To prevent corruption either shutdown all but one node or use some other techinique(LUN, zoning etc) to isolate the datapath for the nodes. Once a single node cluster is formed then you can add and join other nodes to this cluster. Here are the key things you need be aware and plan accordingly before deploying clusters.

- The disks must be preformatted and ready to mount when the machine boots up in to operating system.

- No other machine should be in full operating system at the time when the first node is creating the cluster ( this is to avoid any shared disk corruption).

- Join Node(adding another node to the cluster) task sequence must be run only after a cluster has been formed . This is to avoid nodes joining simultaneously when the cluster creation is still in progress.

1. Add Devices (Systems that You Want to Install Cluster Service to) to ADS Controller:

After installation and configuration of ADS, you would need to add device(system where you want to deploy operating system and configure Server Cluster) to the controller. You can add the device through UI or through command line interface. Refer to ADS Help section Manage Devices for more information. You need to make sure the device is set to Network boot in the BIOS. Once the device boots up, it communicates with Controller and boots into deployment agent. This device will show-up in the ADS controller and you should take control of the device. You can control the device through UI (ads.msc) or through command-line interface.

To add a device through command line interface:

adsdevice [/s controllername [/u username /w password]] /add devicename [/description "text"] [ /ip ipaddress] [/adminmac macaddress] [/guid smbiosguid] [/assettag assettag] [/jobtemplate templatename] [/?]


adsdevice [/scontrollername [/uusername/w password]] /add @filename


Adsdevice /add mnhp6n11 /description "server cluster 1st node" /ip /adminmac 00306E1215b8 /guid 239d1df6-1dd6-11b2-f0e7-00306e12 /jobtemplate servercluster.xml

To add a device through ADS.msc (UI interface):

Open Automated Deployment Services.


In the console tree, right-click the Devices folder and click Add.

In the Add Device dialog box, type the device name in the Name box.


If you want to add more information to help identify the device, type the information in the remaining boxes, and then click OK.

2. Create a Master Image:

Creating Master image consists of following steps:

- Building a master installation on a master computer. Building a master installation includes installing and configuring the operating system and any software and drivers you need to include on your disk image.

- Preparing the master installation with the Sysprep tool. This includes configuring and running the Sysprep tool on the master computer.

- Generating a disk image of the master installation with the disk-imaging tool. This includes saving each disk image to a permanent storage location.

You cannot clone a cluster node with cluster service installed. You must de-install the cluster service or use a specially prepared master computer without cluster services installed to create a disk image.

Refer to Image based installation of Server Cluster for more information about creating master image.

3. Upload the Image to ADS Controller

After Capturing the image of the operating system you would need to add the captured image to the controller. Create directories named images imagebackup and sequences from the root of the controller. Make sure the volume where you create these directories have enough free disk space to hole at least 2 times the image size. Copy the image to images directory.

Next step is to add the image to the ADS controller database. You can add the image either through User Interface or command line. Following is the syntax for command line to add the image

adsimage [/s controllername [/u username /w password]] /add imagename /path  imagepath [/description]

After adding the image, you would need to move the image to the image directory. You can check if the image is been properly added by running adsimage.exe again.

Refer to managing Images section in ADS help for more information about managing image.

To add the image through UI Interface

open ADS.MSC (Automated deployment service)


Right click Images and click Add


Fill out the Image File Path and Image Name, click OK

4. Modify sysprep.inf to include Variables

Sysprep.inf file is used by the mini-setup to install and configure the operating system. This files contains the configuration information details for the image that you just added to the ADS controller database. This configuration information is static to the image. ADS allows you to customize sysprep.inf file by allowing you to insert variables in the sysprep.inf file. This way, the configuration information that will change from system to system can be removed from the sysprep.inf file. Instead variable configuration is moved to the ADS controller.

Before modifying the sysprep.inf file from the image, you would need to mount the image to a drive. ADS has tools that will allow you this functionality. Change directory to the images and mount the image using below command line syntax

imgmount /mount /w {imagefilename} /d: driveletter

Change drive to the above drive letter and change directory to sysprep directory. There 2 ways to create or modify the sysprep.inf either through setupmgr.exe or through notepad.exe. Refer to Imaged-Base server cluster installation section for more information about sysprep.inf.

Open the sysprep.inf file in notepad.exe. Locate variables for your installation that changes from a system to system. Define them as variables instead of putting static values in sysprep.inf file. For example, In the following snippet of sysprep.inf file, items marked with * at the beginning of the line can be defined as variable. These settings differ for each system.

*    DHCP="No" 
*    IPAddress=",," 
*    SubnetMask="," 
*    WINS="No" 
;Adapter02 is used for public network 
*    DefaultGateway="" 
*    DHCP="No" 
*    IPAddress="" 
*    SubnetMask="" 
*    DNSServerSearchOrder="," 
*    WINS="Yes" 
*    WINSServerList="," 
;see section 2.2.1 in this document for a sample text of AssignDriveLetters.bat file 
;see configuring cluster section and appendix B for createfs.vbs 
*Command1 = "%windir%\system32\cluster.exe /cluster:SV-CLUSTER /CREATE /NODE:SV-NODE1 /USER:domain\user /PASS:***** /IPADDR:" 
*Command2 = "%systemdrive%\ClusterInstallFiles\createfs.vbs SV-CLUSTER ClusterGroup SVFileShareResource E:\ SVFileShare"

After replacing these with variables, the snippets will look like the following. Notice that each variable name starts with ^ and ends with ^. They must be embedded within quotes (). If not ADS will not install and configure the operating system properly. Note: In the guirunonce section, above sample snippet replaces the cluster configuration commands to variables also. You can run your own scripts in this section also. After successful installation, Windows will run commands in guirunonce section on the first boot for configuring cluster services or any other services specified.

;Adapter02 is used for public network 
    ;Mount all volumes before form/join the cluster 

Once you have modified the sysprep.in file, unmount image using the below command line interface.

Imgmount u drive:

ADS also allows you to define the variables through scripts. Refer to ADS help on managing Images for more information.

Appendix F contains a modified and complete sample sysprep.inf.

You can also use setupmgr.exe to create, modify unattended setup file, syspre.inf file with variables. Run setupmgr.exe through cmd a window.


choose create new


choose sysprep setup


choose the operating system type that you want to deploy

65ee1e0d-350e-4cc4-bf28-65c3460d6eaa 709777eb-7f0d-4ce2-bd9d-79b9f4fd7414

Above allows you to enter values for the setup. Here instead of providing the actual values, you can provide the variable names that you will define in ADS. For example ^Name^ is a variable whose value will be replaced through ADS.


After completing above, click Run Once and enter the cluster configuration command. In the above example, ^cluster_create_command^ variable is inserted in the sysprep.inf file whose actually value will be defined in ADS. Once the sysprep.inf is created with the variables, save it and copy this sysprep.inf file into the image by mounting the image to a drive.

5. Create task sequence file for image deployment

Next step is to create a task sequence file for ADS controller. It is a XML file containing sequence of task for controller to perform against a device or a set of devices. ADS ships with few sample sequence files. You can use any of the sample XML file and modify to your needs. In this file you will define the personalize variables for controller to replace in the sysprep.inf file. In addition, you will define what other sequence of task controller must run against the device. For example, partition the disk, copy the image, replace the variables in the sysprep.inf file, reboot and check the state of the device etc.

You would need to modify at least the following sections in the sample XML files for it to work properly.

<!-- STEP 1 Create a single 4999MB partition on the disk --> 
    <task description="Partition the disk"> 
            <parameter>\device\harddisk0</parameter> <!-- selects harddisk0 --> 
            <parameter>/init</parameter> <!-- erases all partitions on harddisk0 --> 
            <parameter>/C:4999</parameter> <!-- creates a new partition (#1) of size 4999MB --> 
                 <!-- activate the newly created partition (#1) --> 
In the above section (step 1) you need to define the partition size for the disk. In the above example it will create a partition of 4999MB on drive 0. 
    <!-- STEP 2 download images --> 
    <task description="Download image"> 
            <parameter>3718Plain</parameter> <!-- name of the image to be deployed--> 
            <parameter>\device\harddisk0\partition1</parameter> <!-- deploy the image to partition1  --> 
            <parameter>-r</parameter> <!-- specifies deploy mode  --> 
            <parameter>-client</parameter> <!-- required parameter  --> 
In the above section (step 2) you need specify the image name that you used to add to controller. In the above 3718Plain used for the image. 
    <!-- STEP 3 Personalize the sysprep.inf file --> 
    <task description="Set sysprep custom info in the sysprep.inf file"> 
            <parameter>^ProductKey^</parameter> <!--  key(ProductKey to be searched in sysprep.inf file   
            <parameter>"$ProductKey$"</parameter> <!value to be replaced with. Make sure to Embed it in quotes  --> 

In the above section (step 3) you need to specify the variable names that you used in sysprep.inf. Notice that the variables are embedded in ^xxx^ and its accompanied value to be replaced with is in quotes ($xxxx$).

A sample XML file for deploying a single node clusters is included in the appendix D. This sample file will also create file shares on the disk.

6. Create a job template for the sequence file

Job templates in ADS provides a way to define and store instructions for task that you plan to run against a device (or set of devices) more than once. You can use either the adsjobtemplate command-line tool or the ADS snap-in to create a job template. You would need to associate this job template with the XML file that you just created for deploying operating system and configuring server cluster. After you create a job template, you can use it to run a job as often as you want against any device with freedom to modify the variable values. For instance, you can first create a single node cluster using the cluster command with create switch. After the cluster creation, modify this command to addnode to the next system you want to join this cluster after operating system deployment. For this you would only need to change the value associated with IPaddress and cluster command variables.

To add the jobtemplate using ADS UI interface. Open ADS.MSC


Right click Job Template and click Add. This will invoke the adding job template wizard that will guide you through the process.

7. Create and store variables associated value in ADS database for the desired device

Now you would need to define and store the variables for each device in controller database. These values get replaced in sysprep.inf file when the job is executed against the device. You can define variables through ADS snap-in or command-line interface. To add through ADS Snap-in, double-click the device and on the resulting pop-up click user. Click Add to add variable name that is used in the sequence file and sysprep.inf and associate it with a value.

Open ADS.MSC and double click the appropriate device

fd981ea2-db20-4d51-ab7f-a867aceaf7c5 e0089d4f-e967-4597-924d-7e59762951af

Click User and then click Add .


Enter the variable name and then enter the value for this variable and click ok.

You can also use command-line interface as listed below to add variables to the device database on the controller.

Adsdevice /edit device-name /setvar variable-name "value"


Adsdevice /edit mnhp11n3 /setvar DNSServerSearchOrder2 ","

Mnhp11n3 is a device name, DNSServerSearchOrder2 is a variable.

You can create a batch script to add all the variables for a device. Appendix G includes a sample batch script file that defines values for the variables from appendix D sysprep.inf file.

8. Execute Job Template Against the Desired Device

Next step is to execute the job templates against the device. To assign a job template to devices manually, use either the ADS snap-in or adsController command-line tool.

Once the device is connected to the controller, right click the device and click run job. This will invoke a wizard that will take you through the steps of selecting the right jobtemplate to execute.

Once the execution starts, you can monitor the job progress by clicking on running job option on the left pane of ADS snap-in. It lists all the task that you have defined in the sequence XML file. After cluster creation you may want to configure the cluster based on your need. You can use any script to configure cluster in the [guirunonce] section of sysprep.inf file.

You can use the same sequence file, sysprep.inf, image for installing and configuring second node with little modification. You would need to modify the defined values for the variables for the second node(device). For example, cluster command to add a node to this cluster, IP address for the node etc.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft