RSS Subscription 167 Posts and 2,643 Comments

Unattended Server 2008 Base Image Creation using WSIM/Sysprep

In Windows Server 2003, creating a master image in which Sysprep was used to invoke an unattended installation was a fairly straight forward process. It consisted of the following:

  1. Installing Windows Server 2003
  2. Insert Server 2003 CDROM into the CDROM Drive
  3. Navigate to X:\Support\Tools\Deploy.cab
  4. Copy sysprep.exe and setupcl.exe to C:\Sysprep
  5. Copy Setup Manager to C:\Sysprep
  6. Open Setup Manager and create a Sysprep.inf file with the settings you want for an unattended installation
  7. Run Sysprep (Sysprep would automatically detect Sysprep.inf)

In Windows Server 2008, creating a master image is no easy feat. To briefly explain the process (will be detailed throughout the rest of this article), you must first download the Windows Automated Installation Kit (1GB in size) which you can download here, load install.wim, and create a sysprep.xml file. You would finally run the built-in Sysprep utility and tell it to use the sysprep.xml file you just created along with some other options

Once you have downloaded the Windows Automated Installation Kit, you will need to burn it via your favorite burning utility; mine is InfraRecorder which is free. Once it’s burned, go ahead and install it on your Vista or Server 2008 machine (we’ll be using Server 2008). Once it’s installed, open the Windows system Image Manager (Start > All Programs > Microsoft Windows AIK > Windows System Image Manager).

In order to begin creating a Sysprep.xml file, you will need to load a Windows Image File (WIM). Make sure that you are using the Windows Automated Kit Installation version (or above) for Vista and Server 2008 that is linked to in the beginning of this article.  Otherwise the WIM you try to load will be incompatible with the version you are using.

The WIM file we will be using is located on our Server 2008 CD-ROM (X:\sources\install.wim). X refers to the drive letter of your CD-ROM Drive. Proceed to entering your Server 2008 CD-ROM to your Server 2008′s CD-ROM Drive.

Once you have done so, in the Windows System Image Manager, go to File > Select Windows Image.

Browse to the location of the install.wim file. As stated above, this file is located at X:\sources\install.wim. X refers to the drive letter of your CD-ROM Drive.

Once install.wim has been selected, choose Open. This will bring up a new window which allows you to select the version of Windows Server 2008 you will be using as your Master Image. The edition we are currently running Server 2008 on and want to continue using for future cloned guests will be Enterprise. Select Enterprise and click OK to Continue.

We now see our selected Windows Server 2008 Enterprise Image is loaded into Windows System Image Manager.

We will now want to begin the process of configuring our new Answer File which we will name sysprep.xml. In the Windows System Image Manager, go to File > New Answer File.

We now see our newly created Answer File is loaded into Windows System Image Manager.

Now that we have a WIM loaded and an Answer File created, the two are associated with each other and you now have many customizable settings under your Windows Image.

There are many settings I want to change, and I will leave this up to you as the point of this blog entry is to get you started on the basic concepts of getting the Master Image created. At the very least, I will show you how to remove Internet Explorer Enhanced Security Configuration so the Administrators constantly don’t get bogged down with Internet Explorer security prompts.

Note: I take no responsibility for you doing this in production and getting hacked due to you reducing the security of a production machine. Do this at your own risk.

Right-Click on amd64_Microsoft-Windows-IE ESC_6.0.6001.18000_neutral and choose Add Setting to Pass 4 specialize.

Once you add the setting to Pass 4 specialize, you see this setting get added into the Answer File. From here, you can select amd64_Microsoft-Windows-IE ESC_6.0.6001.18000_neutral and modify the settings in the properties. For purposes of this lab, I chose both IEHardenAdmin and IEHardenUser and set them both to false.

Some other popular options you may want to do are as follows:

  • Auto-generated computer name
  • Organization and Owner Information
  • Setting language and locale
  • Setting the initial tasks screen not to show at logon
  • Setting server manager not to show at logon
  • Configuring the Administrator password
  • Creating a 2nd administrative account and setting the password
  • Running a post-image configuration script under the administrator account at logon
  • Setting automatic updates to not configured (to be configured post-image)
  • Configuring the network location
  • Configuring screen color/resolution settings
  • Setting the time zone

These settings are outlined in Brian W. McCann’s sample Sysprep.xml file located here. Even though my article shows you the steps required to create your own Sysprep.xml from scratch, I would still use Brian’s Sysprep.xml file as a baseline as he has popular options that most users are going to want. Why re-invent the wheel? Just copy his XML code, save it into your open Sysprep.xml file, and open it within Windows System Image Manager.

Once you are satisfied with all your modifications to your answer file, save the answer file to C:\windows\system32\sysprep\ as sysprep.xml by pressing Control + S and choosing C:\windows\system32\sysprep\ as the save location and file name as sysprep.xml. Click Save to Continue.

My final Sysprep.xml file which was derived using Brian’s Sysprep.xml file as the baseline looks as follows.

The next step would be to Open a Command Prompt, Navigate to C:\Windows\System32\Sysprep and Type the following:

sysprep /generalize /oobe /shutdown /unattend:sysprep.xml

Once this command is initiated, you will see a window pop up showing Sysprep doing its’ magic.

Once Sysprep is finished working, the system will shut down. You can now clone your shut down machine which will provide you with a nice Sysprep’d copy of Windows Server 2008.

Before I conclude this article, I wanted to express some of my opinions on this entire process. I find it a lot more tedious to do than the method we used for Server 2003. The SetupManager laid out options very nicely and was intuitive to define the settings you wanted. Now, you must go through the process of downloading a 1GB file, burning it, installing it, figuring out all the options you want added to your XML, etc… I personally think that going forward, I will just create a base machine, shut it down without running a Sysprep, clone it, and just run NewSID which can be found here. This is actually what I did for my Exchange 2007 SP1 SCC using Server 2008 Starwind article series. Granted you won’t want to use NewSID if you are doing this in production as you risk the chance of Microsoft not supporting you.

Also, I am not a Microsoft Deployment guy, so I understand that for production, there’s a much larger picture where this tool is a lot more integrated and it is a really great tool when using it with the Microsoft Deployment Tool (MDT). But I am speaking from merely of a perspective of wanting to Sysprep a machine for easy cloning via Virtualization Tools.

Either way, I hope this article helps you out with the process of creating a base image for Server 2008 to assist you in getting new Server 2008 machines up and running as quickly as possible.

Share

24 Responses to “Unattended Server 2008 Base Image Creation using WSIM/Sysprep”

  1. [...] vreselijk uitgebreid en schiet het zijn doel in veel gevallen voorbij. Ik verwijs daarom naar een artikel dat een voorbeeld geeft, mocht je het toch willen. STAP [...]

  2. [...] HP Rapid Deployment Pack Windows Server 2008 automated install.  In my travels I came across this well documented and informative blog posting by Elan Shudnow that takes you through step by step, the process of creating a unattended Windows [...]

  3. on 12 Nov 2008 at 9:55 amjarvisdavis

    Perhaps I misunderstand what you are trying to do, but it isn’t as complicated as what this. If all you are trying to do is sysprep a reference computer (that you could then take an image of), it is much easier than this. Sysprep is included in Server 2008 and can just be double-clicked to run it. Check out this guys blog for more complete information:
    http://www.jameskovacs.com/blog/HowToSysprepWindowsServer2008.aspx

    ~ Jarvis
    The Verbal Processor
    verbalprocessor.com

  4. on 12 Nov 2008 at 5:25 pmElan Shudnow

    I think you are confused on the point of the article. What you linked to just shows a very basic Sysprep with no customization. My article shows how to customize Windows options using the Sysprep.xml file which you then feed into Sysprep. The Sysprep CLI was used in my article so you have the ability to feed the XML information into Sysprep. What you linked to shows the Sysprep GUI and what I did was take the custom Windows settings in an XML file and utilize the Sysprep CLI to feed the XML file into Sysprep. So again, the point of my article was to show people that how you can customize your Sysprep experience by creating a Sysprep.xml file.

  5. on 17 Nov 2008 at 1:23 pmDaniel

    Hi Elan, yes, thank you for spending the time to write the article. Just wanted to let you know that your efforts are appreciated. D.-

  6. on 20 Dec 2008 at 12:05 ambalkark

    Very nice article for admins used to Windows 2003 methods of unattended installs. If you have any documents for HP RDP customizations,would be great if you can post them.

  7. on 15 Jan 2009 at 8:18 amOMGWTFBBQ

    Yo doofus! Your link to the AIK from this article is incorrect. That is the link to the original AIK (02/13/07) released around Vista’s release time and is not compatible with Windows 2008. If you try and open the Windows 2008 install.wim with the AIK provided in your link, it generates the error “The specified location contains a Windows image that is not compatible with the current version of Windows.” And yes I was running the AIK from an installed Windows 2008 OS not that it should matter. I then found an AIK build from 04/09/08 (http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=94bb6e34-d890-4932-81a5-5b50c657de08&displaylang=en) that says it supports Windows 2008. Uninstalled the version you provided, reinstalled newer build, works like a charm!

  8. on 15 Jan 2009 at 9:20 amElan Shudnow

    Cool, thanks for that information… other than the doofus part :P I blame my Windows Deployment friend for not letting me know about that, so he’s the doofus!

  9. on 14 Feb 2009 at 1:25 amFrankm

    How would this be different if I wanted to create an unattended install DVD of Server 2008? I need a DVD that I can drop into multiple machines simultaneously that will install Server 2008 off of an answer file that is located on the install DVD itself, like you used to be able to do with XP and Server 2003 by renaming the answer file and placing it in one of the folders in the DVD info and then burning the disc again. Any thoughts?

  10. on 14 Feb 2009 at 9:29 amElan Shudnow

    This may help: http://www.windowsreference.com/windows-server-2008/unattended-installation-of-windows-server-2008/

  11. on 15 Mar 2009 at 3:48 amJesper

    Hi Elan,

    What you’re doing here is cloning, which in my world differs from unattended installation. Do you have any reference to unattended install a la winnt.sif answer files, ie, where we don’t need sysprep to do it’s magic?

    Best
    JM

  12. on 16 Dec 2009 at 11:55 pmBee

    Hi There,

    thanks for the great post. i am not able to load the .wim file from the sources folder of my windows server 2008 32bit cd. When i select this i get error
    " The Catalog file for Windows image Windows Longhorn SERVERSTANDARD cannot be opened for the following reason:
    The Catalog file associated with the Windows Image Longhorn SERVERSTANDARD is out of date.

    You must have a valid catalog file to continue, Do you want to create a catalog file?

    Do you know why this is?, the cd i am using is the OEM version of windows server 2008.

    Thanks,
    BH

  13. on 29 Dec 2009 at 4:57 amMohsen

    Elan,

    I am going to repeat Frankm question, but please don't forward me to the same link, because it's useles.

    How would this be different if I wanted to create an unattended install DVD of Server 2008? I need a DVD that I can drop into multiple machines simultaneously that will install Server 2008 off of an answer file that is located on the install DVD itself, like you used to be able to do with XP and Server 2003 by renaming the answer file and placing it in one of the folders in the DVD info and then burning the disc again. Any thoughts?

  14. on 04 Jan 2010 at 9:00 pmThunderbird

    I'm looking to do the same thing as Frankm, I too have tried the fore mention link which is not helpful. Anyone find a solution?

  15. on 15 Jan 2010 at 3:31 pmAbhishek singh

    hello,

    i got problem with my sysprep.xml file…when i am running it it's not replicating the drivers after the restart…
    tellme if i am doing mistakes….how to add driver in sysprep for capturing the image for win server 2008 using winpe2.1 and imagex tool….

    capturing part will be ok once my sysprep is ready……

    so,need help in sysprep making..
    pls help..

  16. on 12 Mar 2010 at 7:51 amDavid Vassallo

    Cool article :)

    I got a question though. At the end of your post you say you prefer to use the NewSID program. I'm not sure you need to use this since the sysprep tool which you used, when applied with the /generalize option, removes the SID of an image and allows creation of a new one too.

    http://technet.microsoft.com/en-us/library/cc7219… : have a look at the /generalize switch comments

  17. on 23 Jul 2010 at 11:08 amAnuj

    thanks for such nice post
    regards
    Anuj

    http://www.winservers.co.in/

  18. on 24 Aug 2010 at 11:07 pmAr

    Ye gods,

    having just gone through the process of automating a RedHat install for the first time (Hint: create a file, edit file, save file in ISO, burn ISO) I am now in the process of learning about windows automated installs and found this article…

    …Jeez what a hassle, why cant it just be easy.

  19. on 10 Oct 2010 at 11:09 pmDade

    I have not been able to get this to work. I've been to a lot of forums, but no one has a solution. Every time I attempt to to create an answer file using WSIM I get an error: Windows System Image Manager execution failed Details – Parameter count mismatch. The platform is 32-bit and the images are 32-bit, WAIK is version 1.1. I have tried to do this on Server 2008 and XP SP3 with .NET 2.0 & MSXML 6.0 dependencies installed. This occurs when it's trying to create a catalog file for the image. And when I select the catalog file associated with the image, I get an invalid image error. If there's already a catalog file on the disc, why is it trying to create one? I have tested Deployment services using the same images and they work just fine. I have syspreped an image and uploaded it to the WDS server, but I can't get the WSIM in the AIK to make me an answer file.

    Oh wow, well I've just found the problem as I was writing this. I was using a disc that had a corrupt image on it, either a bad download or a faulty burn. I tried a known good disc and after coping the files in the sources folder over to the local hard drive it worked just fine.
    Now, if I can only figure out why windows explorer keeps crashing I'll have it made … although that just seems to be business as usual. xD

  20. on 06 Sep 2011 at 11:00 amsbdunford

    There are deployment tools such as SmartDeploy Enterprise that simplify the image creation process and actually run sysprep for you at deployment time. WIM creation is easy and wizard-driven. Sysprep happens for you automatically at deployment time.

    SmartDeploy

  21. on 09 Sep 2011 at 3:32 amJohn

    well i want to ask something.i am new to this and a little confused.if i buy the technet subscription the images of windows 2008 and win 7 will be activated or do i have to enter keys and rearm these.if anyone can help me.
    thanks in advance!

  22. on 20 Jan 2012 at 1:14 amwolffparkinsonwhite

    I got a question though. At the end of your post you say you prefer to use the NewSID program. I'm not sure you need to use this since the sysprep tool which you used, when applied with the /generalize option, removes the SID of an image and allows creation of a new one too.

  23. on 20 Apr 2013 at 2:19 amlovelyanimita

    Your blog post is really informative for me. I think I have read the same kind of information somewhere else but in different manner. Thanks and keep posting new things :)

  24. on 20 Apr 2013 at 2:27 amfacebook-buy-fans

    Your post is really good and full of useful tips. I like your post. Thanks for sharing with us.

Trackback this post | Feed on Comments to this post

Leave a Reply