Site icon mulcas

VDI-LAB-2018 - Part 4 - Creating a Windows server 2016 template

VDI lab guide

Summary:

In this part, I will create a new VM and Install Windows server 2016, then convert it as a template. This template is the one that will be used for all the virtual servers for the lab, servers such as: Active Directory, SQL Database, vCenter, View Connection, Login VSI, and Launchers. Previously I have worked with Windows server 2012 and everything works just fine, but I think it was a perfect time for an update.

This is part 4 out of 12 of the VDI LAB series. Check out the introduction first.

The ultimate VDI deployment guide (from scratch) with VMware vSphere 6.5 and Horizon View 7.3 – 2018. 😉

1. Prerequisites

  1. ESXi host previously configured.
  2. Windows server 2016 ISO file and upload it into the local Datastore.

Important notes

I am trying to keep simple the configuration, due to the server is for different purposes. There are more thing to configure and tune to improve performance, it could be also considered (as needed):

2. VM Creation from ESXi host

NOTE: I decided to use ESXi Web client for this VM creation, at this point VCSA web client interface could be used as well. 

@ ESXi Web Client

  1. From Navigator, go to Virtual Machines / Create/Register VM
  2. Select Create a new virtual machine and click Next.
  1. Name your VM, (like “Win2106_Template”) and select Microsoft Windows Server 2016 (64-bit) as Guest OS version. Click Next.
  1. Select datastore to store VM and click Next.
  1. From Virtual Hardware tab, left CPU, RAM and Hard disk by default. (This can be modified later as required) and from Network Adapter 1, change Adapter Type to VMXNET 3.
  1. Still on Virtual Hardware, select Datastore ISO file and look for the Windows 2016 server ISO.
  1. From VM Options tab, go to Boot Options and check Force BIOS setup screen like the image below. Click Save.
  1. Review settings and hit Finish.

3. Windows Server 2016 - Installation

  1. Power on the VM. The BIOS should appear when starting the VM.
  1. Go to Advanced tab, hit enter on I/O Device Configuration.
  1. Disable all serial and parallel ports.
  1. Go to Exit and choose Exit Saving Changes (or hit F10).
  2. The VM should boot now with the Windows Setup, left by default (or as the image below) and click Next.
  1. Click Install now.
  1. Select Windows Server 2016 Datacenter Evaluation (Desktop Experience). Click Next.
  1. Accept license terms.
  1. In "type of installation" select Custom: Install Windows only (advanced).
  1. Hit Next to install windows on the default drive.
  1. The installation will start. Will take about 5 min and then the VM will be restarted.
  1. On "Customize settings", input a password for the Administrator account. Remember to choose a strong password or you’ll get a similar message as the image below. Click Next.
  1. Finally, Windows welcome page will show up.

4. Windows Server 2016 - VMware tools

@ESXi

  1. From new VM created, right click on it and go to Guest OS / Install VMware tools. VMware tools ISO will be mounted on the Guest OS.

@VM Guest

  1. Go to This PC and double click on Drive D: VMware Tools.
  1. Double click on setup64.
  1. Follow the VMware Tools Setup, select typical installation, leave everything by default, hit Install and finish.
  1. After the installation is finished, reboot the server.

5. Windows Server 2016 - Configuration and Tuning

@VM Guest

5.1 Disable Server Manager at logon

  1. From Server Manager, go to Manage / Server Manager Properties.
  1. Check Do not start Server Manager automatically at logon and click OK.

5.2 Update the server until no more patches are available.

Note: Keep updating the server regularly in order to have it ready for quick deployment.

  1. From Server Manager / Local Server, click any of the 3 options related to Windows update.
  1. From Update status, hit Check for updates.
  1. Wait for the updates to be downloaded and install them. Go and grab a coffee, this will take a while, more than an hour in my case.

NOTE: Install and repeat until you see no more updates

5.3 Change Time zone

After updates are made and the server is rebooted, let’s change the Time zone. This can truly impact the performance of some tests, especially when working with the active directory. Time zone setup is also important for all the ESXi host in our environment.

  1. From Server Manager / Local Server, click Time zone.
  1. Click Change time zone… and well, select according to yours.

5.4 Change computer name

  1. From Server Manager / Local Server, click on the current computer name.
  1. From the Computer Name tab, click Change.
  1. Input the new name for the template and click OK.
  1. Restart the VM.

5.5 Change System Properties

  1. Go back to Server Manager / Local Server and click on your new server name. Go to Advanced tab and configure Performance and Setup and Recovery option.
  1. From Performance click settings, in Visual Effects tab, select Adjust for best performance, click OK.
  1. Go back to Advanced tab and from Setup and Recovery click Settings and change both “Time to display...” to 5.

5.6 IE configuration

  1. From Server Manager / Local Server, go to IE Enhanced Security Configuration and click on "On".
  1. Check Off for both options and click OK. (You might decide only to turn off Administrators).
  1. Go to IE / Internet Option / General tab and set home page as blank (About:blank).

5.7 Clean up backup updates and logs.

  1. Clear backups. Run command prompt as admin.
  2. Use this command: Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase. This took about 15 min for me! (Grab another coffee?)
  1. Clear all event logs. Run Windows PowerShell as admin.
  2. Us this command line: Get-EventLog -List | foreach{Clear-EventLog -LogName $_.log}

5.8 Others (important):

  1. Disable hibernation: Open command prompt as admin and run: powercfg -h off.
  1. Disable indexing: Right click on (C:), from General tab, uncheck Allow files on this drive to have contents indexed in addition to file properties. Apply also to all subfolder.
  1. From Windows Explorer / Folder Option / View, check Hidden Items.
  1. Go to the Network Adapter and disable IPv6.
  1. Go to Control Panel / Power Options and choose High Performance for power plan.
  1. Install google chrome.
  2. Disconnect the ISO files.
  3. Run Sysprep
  1. Select options as the image below:

6. Convert VM to a template

@ VCSA

Finally, turn the VM into a template.

Convert template….. Click Yes in the following windows.

Here we’ll have our Windows Server 2016 template!

Exit mobile version