Now that we have a base OS build completed, we need to start configuring the OS to the settings we want.
Step 1: Get VMware Tools Installed
Without VMware tools on the OS, many things are sluggish and just annoying. Most importantly it fixes the annoying mouse cursor tracking issues (this is even more noticable when you’re in a VDI session into a VMware Console).
Login to your vSphere Web Client and Locate your VM
Select the VM > Actions > Guest OS > Install VMware Tools...
You will get a prompt to mount the Tools ISO. Select Mount.
Now inside the OS, Open My Computer/This Computer and Tab over to the CD ROM Drive. I found it almost impossible with the mouse using the VRM Console until Tools was installed so I had no choice but to use the keyboard to get it done. A combination of Tab and Space did the trick.
Once you are there, run Setup and you should be presented with the VMware Tools installation screen.
Select Typical for your installation type
Once installation is complete, reboot the OS
Step 2: Fine tune your OS
First of all a big thanks to some of my twitter friends who gave some good suggestions on tweaks here. There is always going to be a debate as to what gets done in the template vs GPO/Configuration Management. I’d say the settings I set below are just the core ones necessary to facilitate deployment of an OS with ease. AD and configuration management should definitely come in after the fact and take care setting other OS settings to their necessary values.
Patch the OS to the latest (It’s worth automating this in the future)
Set the OS Hostname to VM Template Name – this helps to know if sysprep worked etc.
Create a Local User account for use by vRealize (e.g. svc_vrealize). You can make sure this account gets disabled automatically as part of your builds or via Puppet, GPO to comply with security requirements. It helps however to be able to easily get into a system using vRO Guest File Operations via a local service account early on.
Just before we dive in, it is worth noting that depending on how you are remotely connected into the desktop, you may have issues controlling your mouse. In my case I was going via a View Desktop and then into the VRM console. I decided to just use the Tab and Spacebar key instead to make my selections. This will get much easier later on when VMware Tools is installed in the VM.
Select Install now, accept the defaults for language etc. until you get to the type of OS you wish to deploy.
I choose the Datacenter Edition with GUI here. Note: You can always remove the GUI and go back to ServerCore if needed. I know in my environment our Windows team still generally uses the GUI
Click Next once chosen
Accept the license terms and click Next
Change the installation type to Custom: Install Windows Only (advanced) and click Next.
Next you will be prompted for your drive layout. It should look like the screenshot below unless you chose a different drive configuration.
Leave Drive 0 selected and click Next
Sit back relax and enjoy the show!
Enjoy some tea while you wait…
Once finished you will need to enter your Administrator Password for your Windows Template.
Coming soon – Part 3 – Configuring and tuning your OS
Microsoft Windows Server 2012 ISO (Download from Microsoft)
Step 1: Create your ISO
It really helps to first upload your ISO to one of your datastores. Many people prefer an NFS store attached to vSphere for this purpose as it it allows more flexibility when you want to connect that ISO to multiple other hosts where your storage array may not be mapped. In our lab examples, we are using a Tintri-T880 VMstore to keep our templates.
Create a Folder and Upload Windows ISO
Login to vCenter
Browse to your Datastore
Create a New Folder (Something like ISOs or Windows ISOs so you can find it easily)
Browse to your new folder
Select Upload File to Datastore
Browse for your ISO and let it upload. This will take a short while depending on your connection to vSphere
Step 2: Create your VM Shell
Switch back to VMs & Templates View
Create a new folder to store your templates in
With your new folder selected, select Create a New Virtual Machine from the actions menu
Select Create a new virtual machine and click next
Type in a name for your template. In our example we use “TT_W2K12_Template”. Simple and easy to find. Select the VM Templates folder you created previously and click next.
Select your vSphere Cluster and click next
Select your Datastore and click next
Choose your compatibility level. Our clusters are all at 5.5 or above so we have no issues selecting the default of ESXi 5.5 and later.
Customize your VM Hardware
Choose your CPU, Memory, and Disk configuration
4096 MB Memory
60GB Disk (Up from the default of 40GB. Many could argue to keep it at 40, but with patches and other functions in Windows Management I’ve found 60 to be a safer amount. Plus, since I’m thin provisioned on the storage, it adds little additional cost to me)
Change the network adapter to VMXNET3 (The days of needing to use the E1000 are over and 2012 supports the VMXNET3 fine without needing to install VMware tools first)
Attach the ISO we created earlier to the CD-ROM
Select the VM Options Tab and change the boot options so that the VM boots to the BIOS first.
Power On the VM and it should be automatically in the BIOS
Go to Advanced > I/O Device Configuration and disable the Floppy Drive, Serial Ports, and Parallel Port
Press F10 to Save and Exit
Edit Settings on your VM and connect the CD Rom Drive.