VMware Cloud Community
ricky73
Hot Shot
Hot Shot

ESXI 5.5 howto prepare new template for windows src 2008/2012

Does it exist howto create correct Windows 2008/2012 template ?

I don't understand if I have to run sysprep utility BEFORE to convert virtual machine to template.

I a sky myself this one because when I'd like understand better how works "Deploy Virtual Machine from this Template" specifically in Guest customisation:


  1. Do not customize
  2. Customize using the customization wizard
  3. Customize using an existing customization specification



Revise me if I wrong:

step 1: vmware will not invoke sysprep utility

step 2,3: vmware will invoke sysprep utility


If It was right my opinion when I run sysprep before to convert vm to template and after I choose step 2,3, sysprep would be invoke 2 twice !!! While in step 1 it should be once.

I don't run sysprep before to convert vm to template and I choose step 1 sysprep is never applied, so no new SID for new virtual machine is created!??! what is state  of new vm?!?





Reply
0 Kudos
3 Replies
vNEX
Expert
Expert

Hello,

I don't understand if I have to run sysprep utility BEFORE to convert virtual machine to template.

Sysprep is always used during deployment of the new VM from the VM Template you have prepared/customized before.


So first you have to prepare vanilla install of  2008/2012 server as VM ... reconfigure it for your needs and once you have finished

you have to convert (ensile it) this VM to the Template from which you will deploy as many new VMs as you want...


Sysprep will come to the process right at the VM deployment phase during Deploy Template Wizard where you have 3 options:
Do not customize - this options will not change any OS settings they remain the same as in source machine (Template)
Customize using the Customization Wizard - any custom option it this wizard will trigger sysprep procces inside newly deployed VM after its first Power On...
Customize using an existing customization specification - same as above using previously created and saved customnization


If It was right my opinion when I run sysprep before to convert vm to template and after I choose step 2,3, sysprep would be invoke 2 twice !!! While in step 1 it should be once.
I don't run sysprep before to convert vm to template and I choose step 1 sysprep is never applied, so no new SID for new virtual machine is created!??! what is state  of new vm?!?
You are running or invoking sysprep proccess always after you already have VM Template ready using Customization Wizard/Existing cutomization specification.
When you choose  Do not customize option SID remains the same as in source VM/Template so you will have then SID duplicity in your environment...


Just in addition if you chose Do not customize or uncheck SID change option in the Cust.Wizard duplicated SID its not an issue if your VMs
are part of Active Directory domain and also if you using mainly AD accounts.


If your VMs are just a part of a Workgroup and local accounts are used you can have a problems with ACLs on files/folders for more on that topic see:
Blogs - Mark's Blog - Site Home - TechNet Blogs

Aslo review these articles before you begin:

VMware KB: Guest OS customization of Windows 8 and Windows Server 2012 may not complete

VMware KB: Sysprep file locations and versions


_________________________________________________________________________________________ If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards, P.
ricky73
Hot Shot
Hot Shot

Your explanation is very exhaustive and clear and to not do mistakes I think to run sysprep before to convert VM to template, because I'm not the unique user to manage vSphere and we have servers both in workgroup and domain, so if someone will create new VM from template with no customization I will have no issues.

But if I chose "customization", sysprep process will be invoked twice, what problems can I have ?

What do you think of this alternative? To create 2 templates:

the former, where inside I already invoked sysprep, to use for 'no customization'

the latter, where I didn't invoked sysprep, to use to 'customization/wizard'

Reply
0 Kudos
vNEX
Expert
Expert

Hi ricky,

if someone opt to customize (invoke sysprep) VM during deployment from Template you will have no issues if the VM will be part of the domain.

What do you think of this alternative? To create 2 templates:

the former, where inside I already invoked sysprep, to use for 'no customization'

the latter, where I didn't invoked sysprep, to use to 'customization/wizard'

Yes, if  "Customization specification" doesn't suite your needs in terms of bullet proof SID change you can prepare OS for imaging-> adjust its configuration, install updates etc.

and when everything is finished then manually invoke sysprep with e.g. this syntax:

Sysprep.exe /generalize /oobe /unattend: <X:\Unattend.xml>

-> right away wait for sysprep plugins initialization they will trigger OS reboot ... upon restart quickly Power Off  your VM and then convert (seal) it as Template.

Every time when someone will deploy a brand new VM from this template sysprep will continue with generalization just after Power on.

This method will ensure that OS will be always generalized (including SID) regardless what the "Customization" options was chosen.

But if I chose "customization", sysprep process will be invoked twice, what problems can I have ? if you mean that you will choose Cust.option on already pre-syspreped template as above...

From what I tested the final word has the manually invoked sysprep and I didn't encounter any issues.

Hope this helps Smiley Happy

_________________________________________________________________________________________ If you found this or any other answer helpful, please consider to award points. (use Correct or Helpful buttons) Regards, P.
Reply
0 Kudos