Home > Ultimate vSphere Lab > Building the Ultimate vSphere Lab: Part 4 – Base Template

Building the Ultimate vSphere Lab: Part 4 – Base Template

Now it’s time to start building our Virtual Infrastructure services.  This will consist of a bunch of VMs hosting Active Directory, SQL Server, vCenter, …  So we’re talking about 3 to 5 VMs here.

We will use Windows 2008 R2 as the base OS for these VMs.  We will be using Linked Clones technology of VMware Workstation to put those VMs in the smallest space possible.

To make it a short story, we’ll install one ‘Base VM’ with Windows 2008 R2 including all the patches/service packs.  Then, we will create a linked clone for each of our VMs.  This linked clone contains only the differences between the Base VM and the linked clone.  In most cases, this is less than 5 GB per VM.

So let’s start for the Base VM.  Click Create a New Virtual Machine to create your first VM.

image

Pick Custom (advanced).

image

The Hardware Compatibility must be Workstation 8.0 (default).

image

Select I will install the operation system later.

image

Pick Windows Server 2008 R2 x64 as the OS Type.

image

Name it Windows2008R2_Base and store it under the VM folder on your SSD drive.  DO NOT STORE IT ON YOUR HDD!!!  This Base VM will get A LOT of Read IO.  If you put it on your HDD, smoke will probably arise from it :-)

Since my SSD is the C: drive, I store it under C:\VM

image

One CPU/Core will be sufficient.

image

Memory size of 1024 MB.

image

Set the Network Type to Do not use a network connection.

image

LSI Logic SAS Controller.

image

Create a new virtual disk.

image

Type is SCSI.

image

Select Store virtual disk as a single file.  These days everybody uses NTFS on Windows 7 so there are no issues with big files.

40 GB disk size is fine.  They are thin provisioned (since we do not select the Allocate all disk space now) so only used space will be allocated.

image

Accept the default Disk File.

image

Click Finish to create the VM.

It will appear in your VMware Workstation console now.

image

Edit the virtual machine settings.

First, remove the Floppy, USB Controller, Sound Card & Printer devices.  We won’t need them and they only consume unnecessary resources.

image

Next, click the Add button and add a Network Adapter.

image

Select Custom – VMnet0 as the network connection.  This will give the VM internet access.

image

Click the CD-DVD (IDE) drive and attach the Windows 2008 R2 ISO file to it.  This ISO file is best stored on the HDD as you need it only once.

Click Power on this virtual machine.

If you get a warning about your Memory Configuration, just tick Do not show this message again and continue.

The VM will boot from DVD and the installation of Windows begins.  Pick the correct regional settings and install it.

image

Every Full Installation edition of Windows besides Web Server will do.  Since i will run a trial edition, i use the Datacenter edition…  Not that we will be using any of those features, but it just shows up nice :-)

image

Pick a Custom Installation and install it on the 40 GB drive.  Now is a good time to look at the files in the VM directory on your desktop.  The VMDK file which actually contains all the data will grow now as data is been copied from the ISO to the VM.

image

After installation, about 7 GB will be consumed.  Nice.

Back to the VM, change the password to something strong (capital letters + small letters + number).  We will reuse this password for all accounts.  After all it’s only a lab so no sensitive information will be found, but we need to have a password since blanks are not accepted.

image

Your mousepointer will be choppy, so let’s solve that first.

First, we start by installing VMware Tools on it (VM – Install VMware Tools…).

image

An AutoPlay popup will appear in the VM.  Click Run setup64.exe and perform a Typical Installation.  Reboot the VM.

Performance of the VM is okay now, as well as the graphics performance.

Before updating the VM, we will install .NET Framework first.  Open Server Manager and click the Features item.  Click the Add Features link.

image

Select the .NET Framework 3.5.1 Features item.

image

Some additional roles need to be installed.  Do so by clicking Add Required Role Services.

image

Click Next, Next, … Install to install it.

Next, we will turn on Windows Update to bring the VM up-to-date.  You can go ahead and install all the updates, but it’s easier to apply the latest service pack first.  Download it from the Microsoft website and then apply all Windows Updates patches afterwards.

TIP: Disable IE ESC in Server Manager.  Makes surfing a bit easier on the VM.

image

Now that our system is up-to-date, it’s time to clean it up.  When looking at the VMDK file size, we have grown to 17 GB already!  Yikes!

image

We’ll start by removing the SP1 installation files.  In a command prompt, run dism /online /cleanup-image /spsuperseded.

image

After that, we are going to remove all Windows Update backup files.  Stop the Windows Update service and delete the C:\Windows\SoftwareDistribution folder.

image

After deletion, Start the Windows Update service.

Next up the hibernation file: open a command prompt as Administrator.  Type powercfg.exe /hibernate off

image

After all these step, the VM is consuming less than 10 GB.

image

Open up VMware Tools, go to the Shrink tab.  Click the Prepare to shrink button.

image

It’ll take some time…

image

image

After it has completed, look at the VMDK file size:

image

9 GB!  That’s more like it!

Now the VM is ready to be used as a Template.  Run c:\windows\system32\sysprep in the VM.

image

Select the OOBE option and check Generalize.  Select Shutdown and click OK.

image

The VM will shutdown automatically and is ready to be templatized (i just invented a new word :-) ).

image

That’s it for now!  On the next episode we will start deploying our first VM which will be the Domain Controller.

 

Building the Ultimate vSphere Lab – Part 1: The Story

Building the Ultimate vSphere Lab – Part 2: The Hardware

Building the Ultimate vSphere Lab – Part 3: VMware Workstation 8

Building the Ultimate vSphere Lab – Part 4: Base Template

Building the Ultimate vSphere Lab – Part 5: Prepare the Template

Building the Ultimate vSphere Lab – Part 6: Domain Controller

Building the Ultimate vSphere Lab – Part 7: SQL Server

Building the Ultimate vSphere Lab – Part 8: vCenter

Building the Ultimate vSphere Lab – Part 9: ESXi

Building the Ultimate vSphere Lab – Part 10: Storage

Building the Ultimate vSphere Lab – Part 11: vMotion & Fault Tolerance

Building the Ultimate vSphere Lab – Part 12: Finalizing the Lab

Categories: Ultimate vSphere Lab
  1. December 27, 2011 at 18:22 | #1

    at what point would it make sense to switch it EFI BIOS type?

  2. Ben Loveday
    January 3, 2012 at 21:27 | #3

    Hi Sammy,

    Great article! I just have one comment to add, the Intel i5 does have a true quad core model (non-ht) and is a lower cost option than the i7. I myself have an AMD FX 8 core CPU and is perfect for my home lab, only problem is finding 8gb dimms although these are becoming more affordable now.

    Thanks again for the great post!

    cheers,
    Ben

  3. Marko
    January 4, 2012 at 14:51 | #4

    Wow, really great article!!!
    Only one suggestion: when you Power On for the first time the VM instead just Power On the VM, Power On To Bios and in the Main screen set “Legacy Diskette A” Disabled and in the Advanced–>I/O Device Configuration set all voices to Disabled.
    This is what I do everytime I create a new VM, in this way I have all the unused hardware disabled.
    Again, really great guide!!!!!

    • January 4, 2012 at 14:55 | #5

      Thanks for the suggestion! I’ll try to update the post ASAP with this valuable info!

  4. Raed Hussein
    January 19, 2012 at 23:04 | #6

    A great effort indeed, that doesn’t need my testimony :)

    However i have a comment to add that other may found helpful; we have to enable the VMCI option ( VM setting >> under the option tab >> guest isolation >> check the VMCI which is the VM communication interfce ), cause i was trying to install windows 2008 by booting from the CD, but the VM never detect the CD drive and then try to PXE boot, which drive me crazy until i enable this feature when i was clicking around :P ,

    Again thanks a lot Sir,

  5. Brian Doyle
    May 4, 2012 at 22:36 | #7

    Great tutorial Sammy! It was exactly what I was looking for. :)

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 27 other followers