Monday, January 28, 2013

How to make a Sysprep for Windows 8 (useful for Virtual machines)

(For Unattended Sysprep, read this)

When using VMware Workstation in testing, sometimes you need to have your environments prepared quickly. In those cases, it is completely annoying to have to install a new machine all over again. To solve this problem, we can consider some options:

  • Cloning a machine: The problem with it is that a machine is cloned with its IP number and the SID, unique identifies for every machine. Thus, when you have cloned some machines and have them in a network, you may have problems, specially if you are working with Active Directory Domains, because 2 or more machines are recognized as if they were just one machine.
  • Copying a machine: The same problem than cloning.
  • Sysprep: In my opinion, this is the best option to have environments ready to deploy.  Basically, Sysprep prepares the machine to be deployed in other hardware. For example, lets say I have a Windows XP machine. It is a clean environment and I'll need it in the future.  What I can do is make a Sysprep and then compress the virtual machine files. Every time I need a new Windows XP machine, I just extract the files to another folder prepared for a new virtual machine and start the VM (virtual machine). What I'm going to see is a new machine deploying, and in a couple of minutes I'll have a new machine.  I can do this every time I need it.
The method to make a Sysprep is different with each version of Windows. What I’m going to show now is how to make a Sysprep for Windows 8.
  • VMware Workstation installed (get a free trial here).
  • A Windows 8 Machine (get a free trial here).
  1. Go to C:\Windows\System32\Sysprepimage
  2. Execute Sysprep.exe
  3. Configure the dialog that is displayed as specified in the following pictureimage
After that, the machine will be shutdown.  Just wait for it, and then compress all the files of the VM. Now, every time you need a clean Windows 8 machine, you can extract the Sysprep to another folder and you will have a new machine.
imageHyper Smash


  1. The setup seems very similar to Windows 7. You should also be able to use an unattend.xml to do a lot of handy dandy magic.

    1. You're right! It is possible to use an .xml to make an unattended Sysprep. The only problem I found is that sometimes editing the xml could be uncomfortable for an average user. I would recommend using this: to make it happen.

  2. what do you have to have on the other end to deploy the image?

    1. you need a WDS (windows deployment server) server or make install media. i'd suggest you use a WDS server. with WDS you can add drivers to the images for diffrent hardware and its centrally manageable.

      there is however a limit to the amount of times you can sysprep one copy of windows. 3 to 5 ( you should google this because i dont remeber 100% the function is called "rearm")depending on the pro or ent version of windows. id suggest you create a vm to build your os in then make a copy of the vms hard drive prior to running the sys prep.

      we use this at my work, but i also use it at home when ever i need to rebuild one of my machines. it will take a copy of everything installed including after market applications making a system rebuild very quick. if you choose to use wds go with server 2012 as 08r2 requires active directory integration. you will need to extract a "boot.wim" from some install media then use wds to convert it to a capture.wim

      have a google for wds and you will find tutorials