Thursday 31 May 2012

Creating a VM template

I've chosen to go with Windows 2008 R2 SP1 as the operating system wherever possible.  It offers significant improvements in terms of stability and manageability over previous versions.  Creating a template to deploy each of the machines I'm building will provide significant time savings for each new VM.

First step for this is to upload the 2008 R2 SP1 ISO to the Datastore.  Being a 3GB file I was expecting this to take a fair amount of time but was still shocked to see the 14 hours remaining timer.  Pretty typical for a consumer grade Internet connection I guess though.  Unfortunately the upload died about 5 hours in with an I/O error.  I did a little research into this error and it turns out to be pretty common, with the most common work around being to use SSH / SCP to upload the file.  I was about to call it a night anyway, and didn't know if there were any limitations with Redstation's deployment of my dedicated box that would prevent me from enabling SSH, so I decided to give the Datastore browser upload one last go, leaving it overnight, and stabilising my side of the setup as much as possible.  I turned off wireless, plugged in an Ethernet cable and copied the ISO from a USB drive to the local system disk.  On checking the upload the following day I found it had completed successfully.
For the base hardware I've chosen to go with;
  • 2x vCPU
  • 2GB Ram
  • 30GB OS Drive
  • 8GB PageFile drive
I will be adjusting these specs for a number of the individual VM's. I want to go with 2x vCPU to prevent any single threads from maxing out CPU, the 2GB Ram is a little low, but as I'm not expecting any real load on these servers it should suffice.  The 8GB PageFile disk is to allow me to double the memory to 4GB, have static PageFiles of 1.5 times memory (6GB) and still have 25% free to prevent generating SCOM alerts etc, and all disks (unless explicitly changed) will be thin provisioned anyway.  The 30GB OS drive is a little on the small side, but again, and I'd usually recommend at least 40GB but again, as I'm not really putting any load on these it should be fine, plus I can always increase them if required.

So in the v-Sphere client I chose new VM and went with custom configuration.


For naming purposes, this won't be a production VM so I'll just go with a logical name to differentiate from any other templates I may create.
For now I'll be placing the system drives on the SSD storage.  Once that starts running a little low I'll move some lower priority ones to the SAS storage, I/O on system disks is generally pretty low aside from during bootup, and as long as PageFiles are moved off and no non standard additional services have been installed to them.

Next, I chose virtual machine version 8, and Windows 2008 R2 as the guest operating system.
Then, for CPU's I went with two sockets and one core per socket.

Dropped the memory down from the default of 4GB to 2GB.
Added a single NIC, ensuring it was on the BackNet.

I left the SCSI settings at their defaults, chose to create a new virtual disk, set the size to 30GB and set disk provisioning to thin provision.
I left Advanced options at their defaults and on the completion screen ticked the box to edit the VM's settings.

Under settings I selected the CD/DVD drive and pointed it to the Windows 2008 ISO I had uploaded earlier, setting it to connect at power on.

I then chose to add additional hardware, selecting Hard Disk.

This second disk will be for the PageFile, so I set it to 8GB and also to thin provision.

After completing that wizard I was ready to boot and configure the templates OS.  I'll cover this in my next post.

No comments:

Post a Comment