vSphere 5.5 VM Templates

Soldato
Joined
27 Feb 2003
Posts
7,293
Location
Shropshire
I'm building a Windows Server 2012 R2 I want to make into a template. Thus I'm tweaking all the bits like pining things to the taskbar, adding in tools we consider essential.

Although based on Server 2008, this blog post runs SysPrep inside the VM before converting it to a template with vSphere (which also runs SysPrep AIUI) to copy the profile settings to the default user. Is that still needed on 2012?

I've created a Customization Spec in the "fat" vSphere Client for Time Zone settings, new SID etc
 
Running Sysprep inside the VM has *never* been required, and in fact, could prove to be quite confusing -- vCenter initiates its own Sysprep using the details you provide during the Template deployment (so if the template has a sysprep waiting to kick off... do you get 2 syspreps in succession?). You just need a clean, non-Domain-joined machine.
 
What rotor said.
Also, look out for customisations setting the local password to blank. Basically, if you set a password in the wizard. It won't use it and will instead set the password to blank, Way to get around this is to make the admin password blank just before temolating the machine. That way it can set it to whatever you put in the customisation. Hope that makes sense...
 
I doubt it. You would have to modify the default profile (from which new profiles are created).
 
Cheers folks.

Found this little util which copies your current profile to the default profile. Saves having to re-pin everything to the taskbar (etc)
 
That isn't the way to do it, those utils are a fudge. This function is built in, but A: you must only have the administrator account at the point of sysprep. B: enable copyprofile in the Unattend.xml

Configure the everything you want under the Administrator account, it will then be copied at the point of sysprep. The way you are doing it is not supported and can have undesired effects.

http://technet.microsoft.com/en-us/library/cc748953(v=WS.10).aspx
 
Just as another point, if you are building images it's good to have your master or reference fully automated. I build all mine in MDT it's well worth taking the time to set a server up and produce images this way. As you end up with a WIM file that can be used anywhere. (MDT/VMware/Hyper-V/SCCM etc etc). Your reference image should also be as thin as possible, any additional apps above the basics should be added at the point of deployment. You can be much more fluid this way.
 
Does the CopyProfile unattend.xml work as a custom file with the vSphere Customization Manager? The blog post I linked to in my original post was running SysPrep inside the VM, which the guys above said don't do...
 
The unattend.xml is gets processed when you run the sysprep you should be able to specify one. It's part of the sysprep process. It's the Sysprep Answer File which you can import in Vsphere I believe. Maybe someone can clarify, I don't use it.
 
On a fresh VM, I've gone through doing an in VM SysPrep for the OOBE. I put Registered User/Owner, CopyProfile (true) and SkipRearm (1) into the XML (via WSIM) and ran:

Code:
C:\windows\system32\sysprep\sysprep.exe  /generalize /unattend:unattend.xml

Once that had rebooted, I converted my VM into a template in vSphere, then deployed as new VM.

My desktop shortcuts and other profile changes have been kept but things pinned to the Taskbar haven't. It turns out they aren't part of the user profile (I wonder why?) - see here:

When running sysprep in Windows 7 with the unattend.xml file, you will probably notice that the taskbar icons are something that don’t copy over. Well that is because the icons are not part of the users profile. So the copyprofile=true command does work for almost everything, but it doesn’t copy over your taskbar icons. So here is a script that will do it for you.

Time to knock up a bit of PowerShell to do the pinning.
 
Back
Top Bottom