Preparing Windows Templates for VMWare vSphere Lab

4

Hi All,

Welcome back to the series, How to setup VMware vSphere Lab in VMware Workstation.

This is the third part of the guide, where we will preparing Windows Server 2012 R2 template so that we can utilize linked clones for efficient use of disk space. In the first part, we dealt with the prerequisites and in the second, we designed the network using Virtual Network Editor.

Before we move any further, let us set the preference for the working directory so that we don't have to do this every time we create a virtual machine.

Go to Edit > Preferences

Preparing Windows Templates for VMWare vSphere Lab

Go to Workspace, and change the working directory to your preference.

Preparing Windows Templates for VMWare vSphere Lab

Now, we will create a new virtual machine which is going to be our base template to install all other Server Operating Systems.

Preparing Windows Templates for VMWare vSphere Lab

A wizard comes up, choose the custom radio button.

Preparing Windows Templates for VMWare vSphere Lab

Preparing Windows Templates for VMWare vSphere Lab

 

Choose to install the OS later, since we’ll need to personalize the virtual hardware of this VM first.

Preparing Windows Templates for VMWare vSphere Lab

We choose Microsoft Windows and as a family the Windows Server 2012.

Preparing Windows Templates for VMWare vSphere Lab

Name it in the way you would like, I am naming it TemplateServer2012R2

Preparing Windows Templates for VMWare vSphere Lab

Choose the firmware type as BIOS

Preparing Windows Templates for VMWare vSphere Lab

 

Choose one CPU, you can change that later when working with linked clones.

Preparing Windows Templates for VMWare vSphere Lab

Give the virtual memory as 1GB.

Preparing Windows Templates for VMWare vSphere Lab

Concerning the network, choose not to connect for now, since we’ll be able to choose the network.
Afterward when we’ll be working with linked clones.

Preparing Windows Templates for VMWare vSphere Lab

Accept the default values for the rest.

Preparing Windows Templates for VMWare vSphere Lab

Preparing Windows Templates for VMWare vSphere Lab

 

Select Create a new Virtual Disk.

Preparing Windows Templates for VMWare vSphere Lab

 

We are selecting the disk size as 30GB, but you will notice later on that because on selecting single virtual disk and thin provisioning our VMDK file will be just over 8GB only.

Preparing Windows Templates for VMWare vSphere Lab

Before clicking on Finish, select Customize hardware to add the ISO image path of the Server OS

Preparing Windows Templates for VMWare vSphere Lab

Preparing Windows Templates

Next, you can power-On this VM by clicking the green triangle in the Top left corner. You should see the VM booting and showing you the Windows server 2012 R2 default installation screen.

Preparing Windows Templates

Preparing Windows Templates

Provide the product key here.

Preparing Windows Templates

 

Select Windows Server 2012 R2 Datacenter with GUI.

 

Preparing Windows Templates

 

Accept the License agreement.

Preparing Windows Templates

 

Select Custom install.

Preparing Windows Templates

 

Next select the 30Gb drive that we allocated earlier on.

Preparing Windows Templates

Once done, it will install the Operating system. In the next step, we will Install VMWare Tools.

The installation of VMWare Tools is necessary step, since it will install all the necessary drivers for your VM (Display, network, hard drive…. Etc….)

Preparing Windows Templates

Once done, you will see it as your D drive.

Preparing Windows Templates

Select the Typical option and continue with the installation.

Preparing Windows Templates

You can disconnect the ISO of Windows Server 2012R2 now. We will not need it anymore.

Next up, we need to shrink the size of the C drive so that we can keep it just around the 8.5GB mark.

Preparing Windows Templates

Preparing Windows Templates

 

Preparing Windows Templates for VMWare vSphere Lab

This is pretty good, since from now on we’ll use only delta files which will use as a base this VMDK file image. Now we only need to Sysprep the VM and Turn it into Template.

Do a Sysprep and shut down the VM.

Preparing Windows Templates

By doing a Sysprep, the next time we will do a linked clone and start the clone, the VM get it’s new identifier, new NetBIOS name, etc etc.. And we’ll not have a trouble with dealing with double SIDs.

Now when the Sysprep operation has finished, the VM has been automatically stopped. We need to create a template.

To make this template a real “Template” you need to check in the VM properties the “Enable Template Mode”

Preparing Windows Templates

As you can see, our VM is now protected from accidental deletion and Delete from disk option is disabled.

Preparing Windows Templates

The last step would be to take the snapshot of the Template.

Preparing Windows Templates

In the next part, we will create a Domain Controller using the Template we just created.

This is the third part of the VMWare vSphere Lab using VMWare Workstation. Links to the rest of the articles can be found below.

  1. What do you need to build VMWare vSphere Lab?
  2. The network design of VMWare vSphere lab in VMware Workstation.
  3. Preparing Windows Templates for VMWare vSphere Lab
  4. How to create the Domain Controller Virtual Machine
  5. Installing of Nested ESXi hosts in our VMware vSphere Lab
  6. Installing the vCenter Virtual Machine for VMWare vSphere Lab
  7. Designing the Shared Storage for VMWare vSphere Lab
Share.

About Author

I am Adil Arif, working as a Senior Technical Support Engineer at Rubrik as well as an independent blogger and founder of Enterprise Daddy. In my current role, I am supporting infrastructure related to Windows and VMware datacenters.

4 Comments

  1. Hi , good practice lab!!
    But if i want to install first esxi hosts and then install DC inside the local datastore and with wan configuration but not using my local network as the managment network? I need to set routing as i know , i tried to that with GNS3 with cisco router set to RIP v2 but n0 internet connection only local connection same as vmware workstation , I now that i can add vmnet0 autobridge interface to ESXi but but how can i apply it on vm network or other?

  2. Hi.
    how can i shrink the size of the C drive in win server 2016. and by the way you are shrinking the C drive in the VM or in the physical Machine ?

    • I personally think its a typo, His screen shot shows that he is actually shrinking disk E: It is definitely the VM template Server he is shrinking. If you notice he shrunk it to 8.65 gb in the screen shot.

Leave A Reply