Deploying Windows 8: Unattended Installation Using Windows Deployment Services (WDS) – Part IIApril 28, 2012 at 11:25 pm | Posted in Deployment, WAIK, Windows 8, Windows Deployment Services (WDS) | 22 Comments
Tags: Deployment, Unattended Deployment, Unattended Files, WDS, Windows 8, Windows Deployment Services (WDS)
In the first post of this series we’ve already reviewed the initial steps for preparing Windows Deployment Services (WDS), adding boot and clean Windows 8 images into the environment, an also how to capture a reference Windows 8 image for deployment. Now, it is time to take a deeper look into the unattended process for deployment.
In this post we will complete our step-by-step guide for unattended deployment of Windows 8 images: Understanding unattended deployment process, generating our own unattended/answer files, reviewing some examples and deploying a full Windows 8 image using our unattended files.
Understanding Unattended Files
The process of automated and silent deployment of an operating system, as well as for any application, depends on parameterizing correctly our setup. These parameters are stored in what we call unattended or answer files.
Starting in Windows Vista / Windows Server 2008 (these two have the same OS kernel), Microsoft improved the setup process of operating systems making it highly scalable and simpler. That’s why these unattended files are presented in an XML.
Using XML as unattended files makes sense since this markup language is used to structure, store, and transport information. Structure is a key term because Windows setup is composed by “configuration passes” which are basically the phases of a Windows installation; and the answer file can structure the information in an efficient manner to offer answers for each phase.
Reviewing Configuration Passes
As we said, the configuration passes represents the phases included in a Windows installation; those phases are basically the same since Windows Vista, even though several of its components have changed over time.
To understand a little bit more about the unattended files we are about to create, let’s review the configuration passes included:
- windowsPE: In this phase we can find the configurations and parameters used in Windows Preinstallation environment (reviewed in Post I), for example handling the disk where we are going to install the OS.
- offlineServicing: This configuration pass is used to apply updates, drivers, or language packs to a Windows image.
- generalize: In this phase computer-specific information is removed from the Windows installation enabling you to capture and reapply the Windows image to different computers.
- specialize: In this stage we can find several Windows configurations like enabling features, network settings and domain settings.
- auditSystem: This phase is only used when we select to boot using audit mode. Settings apply here before a user logs onto the computer, for example to installing out-of-box drivers.
- auditUser: This phase also runs when audit mode is selected in the boot process. Here are settings applied when a user logs onto the computer.
- oobeSystem: In this configuration pass, settings are applied before the “Windows Welcome” message starts. Some options usually used are language or creating user accounts.
Here’s a short diagram, taken from Microsoft TechNet, to explain the configuration passes:
For more information, visit the following link: “How Configuration Passes Work”
Reviewing Unattended Files Best Practices
Before we jump into creating our own unattended files, let’s review some common best practices we need to know:
- Review and understand configuration passes: We need to have the installation phases clear as we explained above; understanding them will allow us to use the right components and settings.
- Always validate answer files: Windows System Image Manager (WISM) is the tool we are going to use to create our unattended files; this tool includes the option for “validation” which verifies that the settings we’ve configured are set correctly and there’s no inconsistency.
- If you have Windows Vista / Windows Server 2008 unattended files, do not try to use the same for Windows 7 or Windows 8: Even though all of them use XML files, there have been several changes in time. Take a look to the following link: “Changes in Unattended Setup Settings from Windows Vista and Windows Server 2008”.
- Don’t add unnecessary settings: Answer files could contain hundreds of settings, which translate in time to parse them and slow installation processes. Do not use unnecessary settings that could delay the OS deployment.
- When you are not sure about the setting value, try WISM help: All of components include a “help” option which describes the setting and provide some examples. If you are not sure what value to use or if you can leave the setting “empty”, check the help file to verify.
- Use separate answer files for separate images and architectures: It is not convenient to use same answer file to different OS architecture. Even though it is possible to include same settings for both architectures in the same file, it could lead us into deployment problems or failures.
6. Preparing Windows System Image Manager (WISM)
Windows System Image Manager (WISM) is included in the Windows Automated Installation Kit (AIK) as one of the tools offered to customize Windows OS deployments.
Using WISM we are going to be able, taking a selected OS image, to retrieve the configuration passes included and modify the settings available on each phase. To prepare it for creating our unattended files we only need a simple process:
6.1. Download and install Windows Automated Installation Kit (AIK).
6.2. Copy the “install.wim” file from Windows 8 media to a local folder (must be available to WISM for read/write operations).
If we don’t have the media available, we can still use the reference Windows 8 image we’ve uploaded in Post I. We need to use the “Export” option from WDS console.
6.3. Access Windows System Image Manager (WISM), “File” and “Select Windows Image” and select the WIM file we’ve copied or exported.
If WISM is not able to perform read/write operations to the file we selected we will receive an error message saying “Windows SIM was unable to generate catalog. Details: The specified image file did not contain a resource section”
6.4. Now we will have all the components available in the image. We are going to select several of these components and add those to the configuration passes.
Optionally we can use a “Distribution Share” in WISM; in here we can save drivers and other files to use them in the configuration passes.
7. Creating and Using WDSClientUnattend.xml
Now that we have WISM ready to start creating answer files, we are going to start with the first one used by WDS: WDSClientUnattend.xml. In this file, we will configure all necessary components related to our first configuration pass: windowsPE.
The components we will need to add are the following:
7.1. To start adding them, in “Components” right-click on the selected one and use “Add Setting to Pass 1 windowsPE”.
7.2. After adding all of those mentioned, the WISM console should be looking like this.
Now we need to start editing this components and adding some values.
7.3. For example: Selecting “amd64_Microsoft-Windows-International-Core-WinPE_6.2.8250.0_neutral”, we need to configure the options for “InputLocale”, “SystemLocale”, “UILanguage”, “UILanguageFallback” and “UserLocale”. In my case I’m selecting all of them as “en-US”.
To understand the option we are selecting, we can right-click the setting in WISM and select “Help”. In there, we will find a complete description to understand the setting and in some cases a few examples to use in the answer file.
7.4. The rest of values that need to be added can be reviewed in the following table:
- When we use the “CreatePartitions” and “ModifyPartitions” components, we need to first right-click on this option, select “Insert New CreatePartition” and then we will receive the options to edit.
- Value used in “Filename” name must be the WIM file located in WDS. For example “install.wim”.
- Also, in “ImageGroup” and “ImageName” we must use the values used in WDS console.
7.5. After completing the settings values, we need to validate the answer file. Select “Tools” and “Validate Answer File”.
7.6. Verify that in the lower section, “Messages”, there’s no warning / error appearing.
7.7. Save the file and place it in “%drive%\RemoteInstall\WdsClientUnattend”. This particular file must be located in this folder, and should not be moved.
7.8. To configure the unattended file, access the WDS console and right-click the name of the server selecting “Properties”.
7.9. Select the “Client” pane. Since in this example we’ve used the x64 architecture, browse for the XML file in the selected section.
IMPORTANT: Using WDS we can only assign one WdsClientUnattend file at a time (considering the same architecture for all clients). And as we can see, these file contains the image file we are going to install, so every time we need to change the image, to use a full unattended installation we are going to need to manually change the unattended file.
8. Creating and Using AutoAttend.xml
Here’s an example of AutoAttend.xml for Windows 8.
Our second unattended file is dedicated to the Windows customization, as well as providing some important settings to the computer, for example: Product key, computer name, joining it to domain or workgroup, and so on.
Using this answer file we are going to focus in two configuration passes: 4 specialize and 7 oobeSystem. Let’s take a look to the components we are going to use:
Cycle 4: specialize
Cycle 7: oobeSystem
8.1. Select “File”, “New Answer File” WISM to start creating the new unattended file.
8.2. Add the mentioned components to their particular cycles.
8.3. After it’s done, the WISM pane should look something like this.
8.4. Complete the settings using the values shown in the following table.
Here’s an example of AutoAttend.xml for Windows 8.
- In “ProductKey” setting, the value must be entered using the “-“ as separator between 5 digits. For example: 6RH4V-HNTWC-JQKG8-RFR3R-36498
- When we add “LocalAccount” component, as we did for disk partitions, we need to right-click the component and select “Insert New LocalAccount”. In my example, I’m adding the “Admin” user in the Administrators group.
8.5. Validate the answer file. Take note that using these components, there will be some warnings generated that we can actually ignore.
For example, some components that is deprecated and no longer used in Windows images like “StartPanelLinks”.
8.6. Save the answer file and place it in any location available for WDS Server. This particular file does not have to be saved with any special name nor location.
8.7. To associate this file with the reference Windows 8 image, access the WDS console and select “Properties” in the install image we would like to use the unattended file.
8.8. In the lower section, select the option “Allow image to install in unattended mode” and select the file we’ve just created.
9. Deploying Windows 8 Using Unattended Files
Once we have completed the unattended files and associate them in Windows Deployment Services (WDS) console, the rest is really simple: Just turn on a client machine and start a PXE boot.
9.1. Start the PXE boot in any client machine.
9.2. Make sure you select the Windows PE for booting an installation and not the capture process.
9.3. Review that the steps are completing without any user intervention.
When the normal installation is finished, in “Finalizing your settings” stage all the customizations in the image will be performed.
9.4. After the process is done, we should see in our case the OS ready for account login using domain credentials.
As we can see, the processes involved for a fully unattended deployment of Windows 8 are really simple:
- Installing and configuring Windows Deployment Services (WDS) only requires a couple of wizards.
- Adding clean boot and install images for Windows 8 to WDS does not require any complexity, just by using Windows media we can complete it.
- Capturing a reference Windows 8 basically requires running sysprep and boot the machine using a capture boot image.
- To create our own unattended files using WISM, we have all the support we need in the same tool.
Taking these aspects into account, I think all IT departments should consider using an automated and unattended deployment for Windows operating systems. Using this free tools offered by Microsoft can improve IT processes efficiency in large amounts.