NOTE – VMware Virtual Center 2.5 Update 4 or vCenter 4 is required to use Guest Customizations with Windows 2008.
http://www.vmware.com/support/vi3/doc/vi3_vc25u4_rel_notes.html#whatsnew
For Windows 2008 R2 set the Template VM OS to Windows 2008 instead of Windows 2008 R2. After a new VM is deployed from the template and guest customization as finished you can set the OS back to Windows 2008 R2.
1. Use an ISO for faster OS setup.
2. Build a new VM that has at least 1 GB RAM and a 20 GB drive.
3. Attach the Windows 2008 ISO to the CD/DVD drive and set it to connect at power on.
4. On the VM Edit Settings window go to the Options tab and in the General section uncheck the Enable logging check box.
![]()
5. Go to the Boot Options section and check the box to force going into the BIOS on next boot.
![]()
6. Power on the VM and when the setup screen appears go to Advanced, I/O Device Configuration.
![]()
7. Disable the Serial and Parallel ports.
![]()
8. Go to the Boot menu and set the CD-ROM first in the boot order.
![]()
9. Save, exit and install Windows 2008, during the install choose either Standard or Enterprise.
10. On first boot up after install set the Administrator password.
11. Close the “Initial Configuration Tasks” window, after the VMware Tools have been installed we will configure the server.
![]()
12. Close the “Server Manager” window.
![]()
13. Disconnect the Windows 2008 ISO and set the device type to Client Device.
![]()
14. Install VMware Tools, choose Custom install type.
![]()
15. Disable the “Shared Folders” driver. This driver can cause issues with profiles unloading properly.
![]()
16. Set the “Hardware acceleration” to Full before reboot.
![]()
17. After reboot from the VMware Tools install configure the time zone.
![]()
18. Configure Networking. Uninstall these networking components. It is best to remove any components not needed to free up resources.
a. QoS Packet Scheduler – Not needed unless you are doing QoS at the Windows layer instead of the L2/L3 switch layer.
b. Link Layer Topology Discovery components – http://en.wikipedia.org/wiki/Link_Layer_Topology_Discovery
19. Leave the IP address set to DHCP unless DHCP isn’t available on the network.
20. Set the computer name to W2K8TEMPALTE
![]()
21. Download and install updates. Turn on Windows Updates to download and notify before install.
![]()
22. Check for updates and install the latest critical and recommended updates. If the updates fail to download restart and try again.
24. Disable the Windows Firewall.
25. Below is a screen shot of how the server should be configured.
![]()
26. Check the box to “Do not show this window at logon” and click Close.
27. When the Server Manager window opens check the box to “Do not show me this console at logon” and close Server Manager.
![]()
28. Go to the Taskbar properties and check these boxes.
![]()
29. Go to the Start Menu tab and check these boxes.
![]()
30. Click Customize and check these boxes.
![]()
![]()
31. Go to the Notification Area tab and check these boxes.
![]()
32. Click OK.
33. Go to Computer properties on the desktop and set the Performance options below.
![]()
34. Right-click on the desktop and go to Personalization.
![]()
35. Go to Screen Saver and set it to blank.
![]()
36. Disable the system screen saver, this is the screen saver that starts when no user is logged into the system. Go to start run and type regedit. Browse to this registry path “HKEY_USERS\.DEFAULT\Control Panel\Desktop” and delete the SCRNSAVE.EXE name.
![]()
37. Go to Sounds, when prompted choose No.
![]()
38. Set the Sound scheme to No Sounds.
![]()
39. Click on Change desktop Icons and uncheck the boxes below.
![]()
![]()
40. Go to Settings Control Panel. Go to View and choose Status Bar and Details
![]()
41. Go to Tools, Folder Options, View tab and check/uncheck these boxes.
![]()
42. Apply and apply to folders.
43. Delete the Desktop.ini files on the desktop.
![]()
44. Right-click on the desktop and arrange icons by Name.
45. Go to Start, Programs, Administrative Tools, Server Manger and click on Configure IE ESC, set it to off for both Administrators and Users.
![]()
46. Go to Internet Explorer properties and set the home page to blank.
![]()
47. Go to the Advanced tab and check/uncheck these boxes.
![]()
48. Clear the C:\Users\Administrator\AppData\Local\Temp folder.
![]()
49. Go to the properties of the C drive and uncheck the “Index this drive for faster searching” box, click apply and choose Apply changes to drive c:\ only.
![]()
50. Go to the cmd prompt and type powercfg.exe -h off to disable hibernation. This command also deletes the hiberfile.sys from C:\
![]()
51. Delete the page file and reboot. This is so the C drive can be fully defragmented.
![]()
52. After reboot login and delete the pagefile.sys from the C: drive. Defragment the C: drive
53. Go to Control Panel, Power options and set the Power Plan to High performance.
![]()
54. Click the change plan settings and set both options to Never.
![]()
55. Stop and disable the Windows Firewall service.
56. Create a new temporary user named ptemp and add the user to the local administrators group.
57. Log out an login as ptemp
58. Go to Computer properties, Advanced system settings, User Profiles, Settings
![]()
59. Select Administrator and choose Copy To… Type C:\Users\Default and change Permitted to use to Authenticated Users.
NOTE – FOR WINDOWS 2008 R2 FOLLOW THESE INSTRUCTIONS FOR COPYING THE USER PROFILE. – http://jeremywaldrop.wordpress.com/2009/09/18/how-to-copy-profiles-in-windows-2008-r2-and-windows-7/
![]()
60. Logout and login as Administrator, delete the ptemp user profile and user account.
61. Go to C:\Users\Default and delete the old NTUSER.DAT{ files.
![]()
63. Shutdown the VM.
64. Convert the VM to a template.
65. Create a Windows 2008 Customization Specification for Windows 2008. You do not need to worry about the sysprep files. In Vista and Windows 2008 sysprep is in C:\Windows\System32\sysprep. When the guest OS type is set to Vista VMware VC knows that the sysprep files are already on the OS.
![]()
66. When a new VM gets deployed from this template choose your Windows 2008 specification.
67. On first boot up the VM will boot up to a login screen, do not login the VM will reboot automatically after a minute. On the next boot up you should see this screen appear.
![]()
68. And this screen. This process may take a few minutes, so be patient.
![]()
69. The VM will automatically reboot again. Login and shutdown the VM.
71. The VM is now ready for use.

61 Comments
December 30, 2008 at 4:36 pm
I followed your process to a T on Windows Server 2008 x64.
Some things transferred and worked, some did not.
Items that did not work:
The server did not join the domain
The server manager displayed on login
The vmx settings did not transfer for sync time
The IE default page did not transfer
The IE empty temp files setting did not transfer
Windows Update Settings did not transfer
CEIP Settings did not transfer
hibernation was re-enabled
Items that did work:
A new SID was applied
The computer was renamed to match the name of the VM
The taskbar properties transferred
The COM and LPT ports are disabled
IESEC settings are disabled
Windows Error Reporting settings transferred
Screen Saver Settings transferred
No Sound Settings transferred
Desktop Icon Settings transferred
Folder Options transferred
Only the IE “show friendly HTTP error” transferred
Power Settings (other than hibernation) transferred
December 31, 2008 at 6:45 am
Thank you for the info Kevin.
In my setup I do not have the Customization Specification configured to join a domain.
I am not sure what is different but most of those settings transfer for me.
The Server Manager doesn’t display when I build a VM from the template.
I am not using the VM tools time sync.
Sysprep resets the Windows Update and hibernation settings.
You can use group policy to control windows update, server manager and IE settings.
The hibernation can turned off with a run once command in the guest customization template.
I
December 31, 2008 at 11:36 am
BTW,
Thank you for the very concise procedures. I have been setting up ESX servers and templates since ESX 2.5, but I learned a few more tips and tricks from this article.
Kevin
December 31, 2008 at 11:55 am
Here is an alternative to the “No Sounds” setup.
http://www.petri.co.il/change_to_no_sounds_sound_scheme_by_default.htm
February 6, 2009 at 4:23 pm
[...] guy made a very thorough guide for creating a windows 2008 template for VMware ESX server. Friday, February 6th, 2009 at 15:23 Tags: RSS feed for comments on this post Leave a [...]
February 23, 2009 at 7:39 pm
I followed your docs but I’m getting Install Windows error when it boots up.
“Windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup].
Is it maybe because I’m using Win08 x64?
And no, I didn’t set it to join a domain.
oh well.
February 24, 2009 at 6:08 am
I have seen that message if there is an error in the guest customization specification.
February 24, 2009 at 10:47 am
There’s only 1 questionable area in guest customization that I’m not sure if I picked the right one. It’s the Windows License area. Since we are pretending it’s a Windows Vista OS, do I need to put in Vista License key? and do I need to put a check mark on “include Server License Information” box?
Other than that everything is pretty standard. I used the virtual machine name for computer name, workgroup instead of domain, dhcp for network, and generate new SID.
Not sure where did I do wrong there.
Thanks!!!
February 24, 2009 at 10:49 am
Yes, you need to key in the product key and yes you need to check the box to include server license information.
February 24, 2009 at 11:48 am
Thanks Jeremy.
It works!
and also thanks Kevin for the addition memo. It helped.
February 25, 2009 at 3:13 pm
Hi,
Great stuff, just read on ict-freak.nl :
VMware vCenter 2.5 Update 4 Released
this one support 2008 customization
February 25, 2009 at 8:21 pm
Thanks, I read that yesterday in the release notes for update 4. I need to update that post.
February 26, 2009 at 5:39 pm
Hi again,
Could anyone point me to a link which explains the way keys are used, i understand mak and kms but i have problems understanding the “datacenter edition” way.
If i buy a dl585 (or 580) and also have a key (not oem) for the 2008 datacenter edition how do i use the license keys ? The dc allows me unlimited hosts but i have only one dc key.
Which license keys do i put into the hosts made from the template.
Do i have to call MS and ask for some additional keys.
Thanks in advance.
Kees
February 27, 2009 at 6:09 am
You have to setup a KMS server and setup a DNS srv location record to point to the KMS. When new virtual W2K8 VM are added to the domain they will find the KMS host via the srv location record and automatically activate. One of the gotcha with KMS is that in order to use it you have to have a minimum of either 5 physical W2K8 servers or 25 Vista clients activating with that KMS.
http://technet.microsoft.com/en-us/library/bb892849.aspx
February 27, 2009 at 12:47 pm
thats what i understood, but i was not sure if i had to give in a key when cloning from the template.
i guess you are saying: no you don’t, the new installation will find it’s own “key” and does this underwater.
March 2, 2009 at 7:19 am
I think you still need a valid key for the automated sysprep to run, I am not sure though because I haven’t tried it yet.
April 1, 2009 at 1:27 pm
Jeremy,
Excellent blog first of all. I am running into a bit of problem similar to an earlier post regarding being unable to parse the unattend answer file [C:\Windows\Panther\unattend.xml] for pass oobeSystem. So I obviously checked the path and didn’t find such an xml file. I am working from DVD disks with a Vista image provided by corporate. It is my understanding I have to have this xml file in order for the sysprep process to complete successfully. So how do I go about getting such a file if corporate didn’t provide it. Is there a way for me to generate one?
April 2, 2009 at 2:05 pm
You will have to use Windows System Image Manager to create the XML file.
http://technet.microsoft.com/en-us/library/cc722301.aspx
April 2, 2009 at 2:12 pm
That is kind of what I thought. Was hoping to not have to do that. Anyway, thanks for your response.
April 4, 2009 at 9:34 am
Classic start menu?? Seriously???
You dinosaurs need to evolve a bit, you don’t know what you’re missing.
April 6, 2009 at 7:40 am
Hi Jeremy,
I have a question about the vmdk aligment not being necessary for Server 2008. Where did you find this info since VMware support states to use vmdk aligment still.
Regards,
John.
April 7, 2009 at 10:57 am
http://theessentialexchange.com/blogs/michael/archive/2008/03/07/Exchange-2007-Disk-Performance-Partition-Alignment-.aspx
http://theessentialexchange.com/blogs/michael/archive/2008/03/07/Exchange-2007-Disk-Performance-Partition-Alignment-.aspx
April 7, 2009 at 11:26 pm
to fix the issue with the hybernation file and the boot timeout getting regenerated after sysprep, you can add the following to the Image Customization Spec Run-Once section:
powercfg -h off
bcdedit /timeout 5
Great work!!!
AK
April 8, 2009 at 8:41 am
cool, thanks for the tip.
April 10, 2009 at 10:08 am
[...] How to Build a Windows 2008 VMware ESX VM Template « Jeremy Waldrop’s blog [...]
April 15, 2009 at 7:06 am
Jeremy, what is the rationale for disabling the page file? The only reference I could find on this was a discussion that seemed on the VMWare communities that seemed to conclude that this wasn’t a good practice.
http://communities.vmware.com/message/617876
April 15, 2009 at 11:00 am
also struggled with the pagefile question.
after going thru this discussion
http://www.vistax64.com/general-discussion/178303-ram-usage-before-after-disabling-pagefile.html
i decided that i would turn on the pagefile as the last step before the final pre-template shutdown
or……
i’ll try to experiment with putting this command in the run-once: wmic computersystem where name=”%computername%” set AutomaticManagedPagefile=True
( from http://social.technet.microsoft.com/forums/en-US/winservercore/thread/708da424-3a7c-404d-8f54-f989ed62d323/ )
April 15, 2009 at 11:13 am
one of my co-workers asked for the ctrl alt delete when creating a stand-alone (non member) server
think this is the easiest way:
start, run,
control userpasswords2
advanced
check the “Require users to press ctrl+alt+del”
ok
April 15, 2009 at 10:01 pm
Only issue I’m having is the local administrator profile is getting wiped after the reboot. All that great customization and then its gone. Don’t know what I’m missing. I’m sure it is something small but the only thing I’ve found is that sysprep does that when ran. That seems pointless when it comes to creating a custom template. Thoughts?
April 16, 2009 at 12:10 am
my guess is that as a new sid is generated the local admin will be (always) a new user with a new sid (500) and therefore have new profilesettings based on the default user.
i know people who always make a new admin and disable/rename/delete the old one for security reasons
April 16, 2009 at 5:47 am
Sysprep will create a new pagefile after it runs on first boot. I am removing it so that the C drive can be fully defragmented.
April 16, 2009 at 1:35 pm
just heared today that you should always use a pagefile in the virtual machines, the vmware tools take controlled care over the paging process using balloon driver. if no pagefile is used the esxhost can experience performance problems.
April 20, 2009 at 1:59 pm
nice collection of steps, couple other items you might consider adding to your process
-blank out the default configuration settings for NTP in the guest pointing to time.windows.com, or set them to a local server
e.g. “net time /setsntp:”
-use the builtin hook for Setupcomplete.cmd to run post install scripts to disable hibernate, set boot delay, apply registry customizations, etc
http://technet.microsoft.com/en-us/library/cc766314.aspx
-using the ExtendOSPartition option in sysprep file to make the disk image resizable prior to first startup
April 21, 2009 at 6:13 am
One point which is not clear. Do you need to have a C:\Windows\Panther\unattend.xml file on the template or not?
Our installation always fails with following message :
Windows could not parse or process the untattend answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup].
I can click ok and the setup continues. But then I receive following error :
The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windiows click ok to restart the computer and then restart the installation.
This just generates a loop and you can’t use the vm.
This is a windows 2008 64 bit I try to install. I followed the above procedure, did not specify a S/N in the image, but I did enter our MAK key in the cusomization settings.
I thought you did not need to create a sysprep/unattend file for w2k8?
April 21, 2009 at 6:20 am
No, you do not need an unattend.xml file. You just need to create customization specification that has your MAK key in it. Sysprep is part of W2k8 and Vista.
April 23, 2009 at 5:17 am
I didn’t know about the Setupcomplete.cmd file. I will have to test that out. Thank you for the tip.
June 11, 2009 at 10:23 am
Heya Jeremy. Following your instructions for setting up a WIN2K8 32-bit image and, whenever I try to install VMWare Tools after the server is built and the OS loaded, I get this error:
A general system error occurred: Internal error.
I initially got that when I tried a 64-bit install, but now it is occurring on the 32-bit install. Seen or heard of this before? So far as I know, our VMWare farm is fully updated.
July 23, 2009 at 1:44 pm
I installed win2k8 64 bit, with a 20 gb c:/ drive and a 20 data drive, after installing SQL server on the box the 20gb when down to almost 2 gb, this is because of the WINSXS folder. We tried adding more space to the c:/ drive and used diskpart and we got and error, we are using esx3.5. If you have a solution or tips please let me know.
July 23, 2009 at 2:46 pm
This article tells us something more:
http://blogs.technet.com/askcore/archive/2008/09/17/what-is-the-winsxs-directory-in-windows-2008-and-windows-vista-and-why-is-it-so-large.aspx
We at our company already decided that a 36gb is the minimum size we should start a win 2008 server with.
Lucky for you 2008 kan resize its bootpartition without the use of other (non-ms) tools
July 23, 2009 at 2:50 pm
another one worth reading:
http://blogs.msdn.com/e7/archive/2008/11/19/disk-space.aspx
July 30, 2009 at 10:39 am
I have an issue with my w2k8 template where the nic seems to maintain the IP ADDRESS used during the creation of the vm. After sysprepped, I enter a new static IP, reboot the system, and the original IP is still defined statically. If i go into the advanced tab, I notice I have two ip addresses (the one used to create the vm, and the one I need). I’ve tried re-running sysprep to no avail. I can get around this problem by setting the nic to DHCP, deleting the nic, rebooting and then re-adding the static ip I need. This would be a painful task to have to do for each w2k8 vm however. Any suggestions?
July 30, 2009 at 12:45 pm
setup the VM template IP to DHCP assigned, after a new VM is deployed from the template set the static IP.
August 23, 2009 at 9:41 am
To all those who need to resize their system drives. Shutdown the guest, attach the system drive to another guest, use settings to resize the disk and then use diskpart to extend the drive. Shutdown the 2nd guest and detach the disk. Power on the original guest and when you login you should see that the system drive is of the new size.
August 23, 2009 at 7:04 pm
re: the drive resizing, you can avoid the need to mount it in another guest by using the sysprep option for ExtendOSPartition
if you run sysprep with that option set in an unattend file, and clone the vmdk of that now shutdown guest, you can simply resize the cloned vmdk prior to first power on. During mini setup the file system will be automatically extended to fill the resized drive.
August 26, 2009 at 1:24 am
FYI on the system drive resizing. You can now do this with no special process in W2K8 and do it from the Disk Management GUI. (No shutdown/restart required)
August 27, 2009 at 12:30 pm
Just wanted to say this is the second time I’ve used these steps (2008 and now 2008 R2) and I’m still quite pleased with the results. Thanks again for all your hard work and great information Jeremy!
August 27, 2009 at 12:37 pm
hello! I would like to know this apply to window 2003 r2 too? thanks
August 28, 2009 at 3:43 pm
Does anyone have any suggestions on what steps are different to create a Windows 2008 R2 Template? My first attempt did not work that great and I’m trying again. I do know that you cannot copy the Administrator Profile to the Default user Profile like you could before and I’d rather avoid doing that through sysprep if possible. I’m using ESX 3.5 Update 4 by the way. Thanks!
August 28, 2009 at 3:49 pm
Scott, I had the same issues with copying the profile in R2. There are several hacks out there but ended up not doing those as I was building my template for domain controllers and wanted to avoid any “hacking”. From what I have read it is a bug with permissions in the registry. If you google it I’m sure you will run across the hacks. Maybe someone will chime in with a fix.
August 29, 2009 at 2:39 pm
I am getting a profile was not loaded successfully after the initial login. any idea?
August 29, 2009 at 2:43 pm
what if I dont want to use the vmware custumization tools to do sysprep? I want the vm to boot up and do its own sysprep from windows?
September 7, 2009 at 3:24 pm
I am going to build a Windows 2008 R2 VM template in our lab and post a new entry on it.
Stay tunned!!
September 17, 2009 at 11:21 am
Jeremy,
Any update on when the 2008 R2 template build instructions will be ready? Thanks so much!
September 18, 2009 at 12:49 pm
I just posted a workaround to the default user profile issue. Here is the link.
http://jeremywaldrop.wordpress.com/2009/09/18/how-to-copy-profiles-in-windows-2008-r2-and-windows-7/
September 18, 2009 at 2:01 pm
Just updated it. The only thing different that I had to do for the template was to set the OS to Windows 2008 instead of Windows 2008 R2.
The default profile is a bit different and there is no longer a classic start menu that can be enabled.
October 13, 2009 at 4:40 am
[...] mit einem vCenter. (Denke mal, Du redest von ESX 3.5/4) 1.) Maschine nach Gusto installieren, z.B: How to Build a Windows 2008 VMware ESX VM Template Jeremy Waldrop’s Virtualization blog 2.) Maschine ausschalten und mit Rechtsklick in Vorlage/Template umwandeln. 3.) In Zukunft [...]
October 14, 2009 at 11:29 am
Disabling Windows Firewall shows either lazyness or incompetence.
October 19, 2009 at 1:31 am
Decent article Jeremy, but I would add more background, why you chose to set some settings. People will blindly follow guides found on the internet without criticism. I think many of the settings are open to debate. For instance, like in the previous comment, disabling firewall..
October 23, 2009 at 3:35 pm
Just had a thought about W2k8-R2 gotchas on ESX35U4/VC25U4. this site’s content saves me tons of headaches and i just wanted to express gratitude to the author for taking the time to put this all together. thank you!
October 28, 2009 at 10:44 am
Whats the point of disabling the IPv6 support, except to hinder forward progress? It doesn’t hurt anything to have it enabled and I’m not sure that step should be included in such a guide (at least without an explanation for the users to decide for themselves)
October 28, 2009 at 10:51 am
Most everything I am turning off or disabling are to make the footprint of the OS smaller. I have always been one to turn off features or services not needed to improve performance and security.