Here We Go Again

Now it’s time to get started on building the infrastructure of our virtual system. If you didn’t read the first part please check out the previous blog post here. Our infrastructure is going to consist of several VMs hosting our Active Directory, vCenter, and a SQL Server. This isn’t too much, but you can create a handful more of VMs to do whatever you need your stack to look like. As it stands we are going to create 3-5 VMs for our infrastructure.

 

We are going to use Windows 2012 R2 Standard 64-bit as the base OS for the VMs here. Also, we are going to utilize Linked Clones to save some space and make things easier.

 

Essentially, what we are going to do with Linked Clones is install one VM with Windows 2012 R2 with all patches and updates as a template. Then, we are going to create a clone of that for each VM needed.

Getting Started

Let’s get started with the template. Go ahead and select Create a New Virtual Machine.

 

Screen Shot 2015-05-06 at 12.44.15 PM

 

Choose Custom (advanced) instead of Typical (recommended). Leave the Hardware compatibility: set to Workstation 11.0 the default and choose Next. Select I will install the operating system later and click Next. Leave Guest operating system set to Microsoft Windows but we want to change the Version to Windows Server 2012. If for some reason your computer is not compatible with 64-bit guest operating systems, it will inform you below the selection.

 

5-6-2015 10-46-49 PM

 

Name the VM something generic such as Windows2012Template and store it on your SSD. I suggest you store it on your SSD as it will get quite a bit of IO. This way, you don’t stress out your HDD. Since my SSD is the C:\ drive that’s where I set the Location.


5-6-2015 10-50-09 PM

 

 

Leave the Firmware Type set to BIOS.

 

5-6-2015 10-55-06 PM

 

Once again, this is just a lab so I set the Number of processors and Number of cores per processors to 1/1.

 

5-6-2015 10-55-53 PM

 

 

Set Memory allocation for the VM, once again keeping it low I set it to 1024MB.

 

5-6-2015 10-56-42 PM

 

Now we need to set a Network Type – we want to set this to Do not use a network connection.

 

5-6-2015 10-57-28 PM

 

 

Shouldn’t really have a choice on this next option as BusLogic isn’t supported on 64-bit guests and LSI Logic isn’t supported by Windows Server 2012. Make sure LSI Logic SAS is selected and continue on.

 

5-6-2015 10-58-01 PM

 

We want to create a SCSI virtual disk.

 

5-6-2015 10-59-07 PM

 

 

It’s going to be new this time so make sure Create a new virtual disk is selected.

 

5-6-2015 11-06-17 PM

 

I would suggest keeping the disk size at 60GB and make sure Allocate all disk space now is not selected. This selection just means that we want to it to be thin provisioned so only used space is allocated. Also let’s go ahead and change it to Store virtual disk as a single file since we are going to be using Windows and it will probably be NTFS. This shouldn’t be an issue and it improves performance a tad.

5-6-2015 11-07-05 PM

 

Keep the default on Disk File.

 

 

 

 

5-6-2015 11-08-09 PM

 

 

Give the settings a quick overview to make sure everything is correct and continue on with Finish to create the VM. It will then appear in your VMware Workstation window.

 

Optimizing the Template

Now that we have our VM we need to make it ready to be copied to our several future lab VMs. First, let’s remove some devices you don’t need, they can always be added later.

 

Go into Edit virtual machine settings and remove the USB Controller, Sound Card, and Printer. They will only use up space and resources.

5-6-2015 11-23-13 PM

 

 

We need to add a Network Adapter so click Add…

 

5-6-2015 11-26-33 PM

 

 

We are going to use VMnet0 for this so select the Custom radio button and make sure the dropdown is set to VMnet0.

 

5-6-2015 11-27-39 PM

 

For the next part you must first download the ISO for Windows 2012 R2. If this is for an at-home lab and you are a student, you can use Dreamspark. However, any edition of Windows Server will work – even trial editions.

 

Go ahead and select the CD/DVD (SATA) drive and for the Connection we want to do Use ISO image file:, then select Browse and grab the ISO file for Windows 2012 R2.

 

5-6-2015 11-29-44 PM

 

Once you have that, close out of the Virtual Machine Settings and click Power on this virtual machine.

 

5-6-2015 11-30-47 PM

 

 

You may receive some warnings during power on, but you should be able to continue on with most of them. However, if you get a message about the host not supporting VT-x, this means you won’t be able to stand up 64 bit operating systems. For all other messages I just suggest checking Do not show this message again and continuing.

 

The VM will boot from the ISO and the installation will begin. Choose your language and regional settings and hit Next and then Install now.

Screen Shot 2015-05-06 at 2.38.26 PM

 

 

First thing first, we need to install VMware Tools. This will fix the mouse being so choppy and it should be a habit to install VMware Tools on every box you have in the environment. After logging into the VM with the Administrator account, in VMware Workstation select the VM dropdown and go to Install VMware Tools. This should prompt the AutoPlay feature to popup in the top right of the Windows Server screen. Click on the Choose what to do with disc popup and you should be able to select Run setup64.exe.

 

Screen Shot 2015-05-06 at 4.15.18 PM

 

 

Run through the VMware Tools Setup by simply leaving the defaults for all the selections and then finish the installation wizard. You will be asked to restart now or later. Go ahead and choose now and upon reboot you should notice graphics performance is much better.

 

First thing we want to do is go ahead and run Windows Update to bring the VM up-to-date. This prevents us from running into these updates on every VM we clone from this template. Go ahead and install all updates deemed necessary through Windows Update. Also, I would suggest disabling Internet Explorer Enhanced Security Configuration. This can be done through the Server Manager.

 

Screen Shot 2015-05-06 at 4.27.24 PM

 

Now that our template is fully up-to-date, let’s check out how big the actual VM is by looking at the vmdk file.

 

Screen Shot 2015-05-12 at 11.22.51 AM

 

Wow, that is quite a big VM to use for a template so we really want to slim that down. First thing we are going to do is remove all the Windows Update backup files, stop the Windows Update service, and delete the entire C:\Windows\SoftwareDistribution folder. You can restart the Windows Update service after deletion.

 

Then we are going to modify the hibernation file. Open a command prompt as Administrator and type powercfg.exe /hibernate off and hit enter.

Screen Shot 2015-05-12 at 11.45.47 AM

 

The disk is now down to 11.3 GB; still quite large, but we did our best quickly to cut the fat here.

 

Screen Shot 2015-05-12 at 12.21.28 PM

 

 

Now the VM is ready to be used as a template. First, we need to run C:\Windows\System32\Sysprep\sysprep.exe in the virtual machine and we want to have the following settings selected.

 

Screen Shot 2015-05-12 at 12.25.17 PM

 

The VM will then shutdown automatically and is now ready to be converted into a template. This is going to be it for now as next time we are going to start deploying our VMs first being the domain controller.