Sider

Saturday 9 July 2011

Creating a customized image of WHS2011–Part 1


I got a comment on the post ”Installing WHS 2011 on “headless” hardware using AutoUnattend.xml” with a question in the direction of sysprep and WHS2011.

If you don’t now “Sysprep.exe” here is a short explanation:

Sysprep.exe is a tool u can use to prepare a customized Windows installation for capturing and distributing to other computers. The reason you would want to do this is if you are going to deploy a lot of systems with the same drivers, and/or software configuration. Sysprep.exe is a “Online” tool that you run from a booted Windows OS, it´s located in “C:\Windows\System32\Sysprep\”. IMPORTANT – Do NOT run this tool on you workstation, there is a good chance that you will destroy your installation. Of course, if you already have a WHS2011 that would not be a problem, you can just restore you system Smiley

If your not a IT pro dealing with tons of systems there can still be good reasons for making you own customized image of Windows. Looking at client OS it make sense to have a image with the most common software installed, and keeping you image updated with the most common NIC drivers also make things easy. Also if you are the “family go-to IT guy”, you will quick learn to love a USB stick with a couple of customized images.

When we are talking WHS2011, to be honest, I don’t see a lot of reasons for creating images, unless you plan to build/sell systems. On the other hand, I always find a excuse and this time I decided to make a image of WHS2011 with my favorite screen capture software installed.

In the first part of the guide I will focus on creating the image. In order to use the image we also have to capture it and find some way of deploy it, I will do that in separate blog posts.

Here we go…

In order to complete the steps in this guide all you need is a WHS2011 system with “desktop access”, you can not create images on a headless system (Actually that’s not true, but it´s not worth trying). If your goal is to make a image with customized software (and even some standard drivers) I will recommend using some kind of virtualization, eg. VirtualBox. If you gold is to create a “hardware based” image ready for deployment to other similar systems you will have to use real hardware.

Step One – Install WHS 2011

You need to do a “core” installation of WHS2011. I´m not going to explain this in detail, but in short:

Boot off the WHS2011 DVD, or iso file.
Accept EULA, select language and confirm disk configuration.

Let the installation run until you see the first page of the “Set Up Windows Home Server 2011” wizard.

WHS001-2011-07-03-18-53-44

Now it´s important the you DOES NOT press “Next”! Instead you have to press ALT+F4 to abort the wizard. You will have to confirm the cancelation.

WHS001-2011-07-03-18-53-59

Press “Yes” to Confirm, and you will get to the desktop logged on as “Administrator”.

WHS001-2011-07-03-18-54-07


Step Two – Customize you Image

Now you can customize you image. Please notice that if you reboot (and you properly will if you install drivers) you will get the “Set Up Windows Home Server 2011” wizard again. Just hit ALT+F4 again to close it.

In my case I go to a website to download my software, and the run the installation.

WHS001-2011-07-03-18-56-21

WHS001-2011-07-03-18-56-38

At the end of the installation I chose not to run the software. If you get experienced with sysprep.exe you will notice that software reacts different to the way sysprep.exe “cleans” the system for individualized settings. Remember that the purpose is to prepare the image for deployment to new systems, so you cant “individualize” the software (eg. activating). If you do so, some software makes sysprep.exe fail in the process of cleaning up and you have to start all over. My advise is to only run the software if you can´t avoid it.

Step Three – Sysprep the Image

If you ever “sysprep´ed” a normal client OS you will notice that it´s different with WHS2011. The reason is that WHS 2011 consist of the core “Server 2008 R2” OS, and the “WHS2011 component” on top of that.

On a normal OS you would run sysprep.exe, but dealing with WHS2011 you will have to use “WssSysPrep.exe”. (Actually you can use sysprep.exe for example en with a AutoUnattended.exe file to automated software and driver installations, but in the end you will have to run “WssSysPrep.exe”)

If you are going to use the image for systems that you pass on to other you would want to add a entry in the registry. The purpose is to “rearm” the system so when you boot the new system you will have the full (30 days I think) “grace period”.

Open a command prompt as administrator.

Use the following command (in one line!):

"C:\Windows\system32\reg.exe add HKLM\Software\Microsoft\ServerInfrastructureLicensing /v Rearm /t REG_DWORD /d 1 /f"

If typed correct you will get a confirmation.

0001

Next step is to actually run the “WssSysprep.exe”. When you do this sysprep will do the “clean up”, and in the end shut down the system.

The command for running WssSysprep.exe is:

C:\Program Files\Windows Server\bin\WssSysprep.exe

You should now be able to see a sysprep status.

WHS001-2011-07-09-07-43-41

When the system is turned of, it´s important that you DO NOT turn it on again! The next time Windows boot it will run the “Specialize” pass, and after that you can´t move the image. If you for some reason turn on the system you will have to run “WssSysprep.exe" again.

In my next post I will walk walk through the process of capturing the image so we can deploy it to new systems.

5 comments:

  1. Is this a clean load or loading from existing OS?

    ReplyDelete
  2. Hi. Sorry for the late reply. I´m not sure that i understand your question correct. The guide is done with a new clean installation. You have to customize and sysprep before the "Initial Configuration", so you can not use a existing installation.

    ReplyDelete
  3. Hi,
    If I want to create unattend.xml on wsssysprep, how can I do?
    I tested many times , but it show the unattend.xml file is unsupported format.
    (The unattend.xml from Home Server OPK)
    I also tried using Windows System Image Manager to create the new answer file, but the result is the same.
    Thanks!!

    ReplyDelete
  4. Dear Torben
    Did you write the second part of this post?
    How we can capture the image we have created following this info?
    Thanks and Regards
    Daniel

    ReplyDelete
  5. Hi, I can't seem to find your follow up post on capturing the image. Can you point me to the correct page, please ?

    ReplyDelete