blob: 49e7477c6b4007966cf0d0c8daec8881290ec78d [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
%BOOK_ENTITIES;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<section id="sysprep-windows-server-2008R2">
<title>System Preparation for Windows Server 2008 R2</title>
<para>For Windows 2008 R2, you run Windows System Image Manager to create a custom sysprep response XML file. Windows System Image Manager is installed as part of the Windows Automated Installation Kit (AIK). Windows AIK can be downloaded from <ulink url="http://www.microsoft.com/en-us/download/details.aspx?id=9085">Microsoft Download Center</ulink>.</para>
<para>Use the following steps to run sysprep for Windows 2008 R2:</para><note><para>The steps outlined here are derived from the excellent guide by Charity Shelbourne, originally published at <ulink url="http://blogs.technet.com/askcore/archive/2008/10/31/automating-the-oobe-process-during-windows-server-2008-sysprep-mini-setup.aspx">Windows Server 2008 Sysprep Mini-Setup.</ulink></para>
</note>
<para></para>
<orderedlist>
<listitem><para>Download and install the Windows AIK</para><note><para>Windows AIK should not be installed on the Windows 2008 R2 VM you just created. Windows AIK should not be part of the template you create. It is only used to create the sysprep answer file.</para></note></listitem>
<listitem><para>Copy the install.wim file in the \sources directory of the Windows 2008 R2 installation DVD to the hard disk. This is a very large file and may take a long time to copy. Windows AIK requires the WIM file to be writable.</para></listitem>
<listitem><para>Start the Windows System Image Manager, which is part of the Windows AIK.</para></listitem>
<listitem><para>In the Windows Image pane, right click the Select a Windows image or catalog file option to
load the install.wim file you just copied.</para></listitem>
<listitem><para>Select the Windows 2008 R2 Edition.</para><para>You may be prompted with a warning that the catalog file cannot be opened. Click Yes to create a new catalog file.</para></listitem>
<listitem><para>In the Answer File pane, right click to create a new answer file.</para></listitem>
<listitem><para>Generate the answer file from the Windows System Image Manager using the following steps:</para>
<orderedlist numeration="loweralpha">
<listitem><para>The first page you need to automate is the Language and Country or Region Selection page. To automate this, expand Components in your Windows Image pane, right-click and add the Microsoft-Windows-International-Core setting to Pass 7 oobeSystem. In your Answer File pane, configure the InputLocale, SystemLocale, UILanguage, and UserLocale with the appropriate settings for your language and country or region. Should you have a question about any of these settings, you can right-click on the specific setting and select Help. This will open the appropriate CHM help file with more information, including examples on the setting you are attempting to configure.</para>
<mediaobject>
<imageobject>
<imagedata fileref="./images/sysmanager.png" />
</imageobject>
<textobject><phrase>sysmanager.png: System Image Manager</phrase></textobject>
</mediaobject></listitem>
<listitem><para>You need to automate the Software License Terms Selection page, otherwise known as the End-User License Agreement (EULA). To do this, expand the Microsoft-Windows-Shell-Setup component. High-light the OOBE setting, and add the setting to the Pass 7 oobeSystem. In Settings, set HideEULAPage true.</para> <mediaobject>
<imageobject>
<imagedata fileref="./images/software-license.png" />
</imageobject>
<textobject><phrase>software-license.png: Depicts hiding the EULA page.</phrase></textobject>
</mediaobject></listitem>
<listitem><para>Make sure the license key is properly set. If you use MAK key, you can just enter the MAK key on the Windows 2008 R2 VM. You need not input the MAK into the Windows System Image Manager. If you use KMS host for activation you need not enter the Product Key. Details of Windows Volume Activation can be found at <ulink url="http://technet.microsoft.com/en-us/library/bb892849.aspx"></ulink></para></listitem>
<listitem><para>You need to automate is the Change Administrator Password page. Expand the Microsoft-Windows-Shell-Setup component (if it is not still expanded), expand UserAccounts, right-click on AdministratorPassword, and add the setting to the Pass 7 oobeSystem configuration pass of your answer file. Under Settings, specify a password next to Value.</para>
<mediaobject>
<imageobject>
<imagedata fileref="./images/change-admin-password.png" />
</imageobject>
<textobject><phrase>change-admin-password.png: Depicts changing the administrator password</phrase></textobject>
</mediaobject><para>You may read the AIK documentation and set many more options that suit your deployment. The steps above are the minimum needed to make Windows unattended setup work.</para></listitem></orderedlist></listitem>
<listitem><para>Save the answer file as unattend.xml. You can ignore the warning messages that appear in the validation window.</para></listitem>
<listitem><para>Copy the unattend.xml file into the c:\windows\system32\sysprep directory of the Windows 2008 R2 Virtual Machine</para></listitem>
<listitem><para>Once you place the unattend.xml file in c:\windows\system32\sysprep directory, you run the sysprep tool as follows:</para>
<programlisting>cd c:\Windows\System32\sysprep
sysprep.exe /oobe /generalize /shutdown
</programlisting><para>The Windows 2008 R2 VM will automatically shut down after sysprep is complete.</para></listitem>
</orderedlist>
</section>