sysprep executed properly only three times – what’s up about that?

Hi all,

In my template article I talk about doing sysprep before you turn the VM into a template.  I got a tweet from Josh Cohen that said sysprep can only be used three times before it will error out.  Since I expect this Win2K12 template to last a long time this is a real issue.  I have done this a bunch with Win2K8 and a few with Win2K12 R2 with no issues so what was going on?

A quick investigation was necessary.  So what did I learn?

  • sysprep can be done many times
  • the sysprep parameter /generalize can only be done three times
  • the generalize parameter does a number of things including restart the Activation 30 day clock.  It also resets the SID, clears restore points and event logs.
  • you can use skipRearm to avoid the activation thing.  But does it skip anything else?  Nothing I could find suggests it does or does not.
  • several Microsoft articles I found suggest building out each time with automation is the way to go.
  • we are in this problem since we cannot use some sort of CopyProfile – outside of sysprep – to copy the administrator profile into the Default Profile.  This is important as much of our config would not be provided to new users without this action.
  • I activate Windows during the setup of the VM and I believe that is why I have not had issues with this.  It does mean my template does use up a license but such is life.  This has been confirmed for me in Win2K8 as I was able to deploy many times without issue.  I have only done two so far with Win2K12 but will keep trying.  I think that I will be able to confirm that activation before sysprep avoids the potential issue of three times with /generalize.
  • I built a new Win2k12 template using this, and when I turned the template back to a VM to startup and update, it prompted me with the questions that Win2K12 asks during install.  I wonder if I could let that finish, update it, and turn it back into a template?  With OS activated it might work.  Need to test.

What happens if activation before doesn’t solve the problem?

While I believe it will what are the options?  One would be the ability to edit the unattended XML file that VMware uses when a VM is deployed from template.  I would add the CopyProfile parameter to it.  But where is that file?  If I could find it this is a nice option.  A not so nice option would be to move all configuration to GPO.  That would be more complex for me personally and not sure if other issues would come up from that. Another idea might be to deploy from that template to a new VM, and then it becomes the new template – v2 I guess – need to test.\.

Interesting Links

BTW, I will update this as I learn.  I hope for comments and suggestions – how do others deal with this issue?!


11/5/14 – The article I have on doing Win2K12 is working great.  I use a third party tool to help with the profile and it all works great.  I suggest you ignore this article and use it.

5/26/14 – with the another idea – deploy from template to new VM and make that a new VM.  Boy I wish people would chime in on this.  Also added the last point in what did I learn – it starts with “I built a new Win2K12 …”.

BTW, thanks to all of the clients in my past who would give me junior people to have them trained, and at the same time make me more powerful by being able to do more!  I really miss that.


=== END ===

Leave a Reply