Creating a Gen2 VM Template for SCVMM 2012 R2

In my previous post, I did mentioned about creating templates – how ever it was for Gen1 servers. With Windows Server 2012 R2, We have a new generation of VM – AKA Gen2.

Today I would like to give a brief on how to create a Gen2 Template. Usually, I follow the traditional method of building a VM on the Hyper-V host and prepare it for becoming a template. As we did the template creation for Gen1 VM, The whole process is divided into three stages.

 

The first stage is to prepare a VM for the template.

  1. Create a Gen 2 VM – I will name it as Golden Image
  2. Windows Patch Updates
  3. Install HyperV Integration Component
  4. Antivirus/Agents or any of the custom software required on all servers deployed using this image
  5. Enable RDP
  6. Disable Firewall
  7. Set Administrator password blank
  8. Export the VM – This is required if we need to update template on a later stage
  9. SysPrep and Shutdown

The second stage is to configure the per-requisites on Hyper-V for template / deployment using template.

  1. Run As account for Local Administrator – Create if not created already.
  2. Run As account to be used with ADJoin which has the rights to Join Computers on AD – Create if not created already.
  3. Gust OS Profile – Create only if not already created.
  4. Create Gen2 Hardware Profiles

In this second stage, Run As Account and Gust OS profile can be the same which was created for a Gen1 VM. How ever, we need to have a Gen2 Hardware profile created. As you know, the architecture itself is different between a Gen1 and Gen2 VM. Hence, Its important to have a Hardware Profile created for Gen2 Server. As all other steps are similar, I will only walk through this now.

Navigate to SCVMM -> Library -> Profiles -> Hardware Profiles

Create a new Hardware Profile

On the General Page, Enter the Profile Name

Make sure Generation is selected as Gen 2.

Gen2 Hardware Profile 1

Configure the Hardware components as per your requirement.

On the Firmware page, Enable Secure Boot should be checked (By default, its checked. Don’t uncheck it).

Gen2 Hardware Profile - Secure Boot

And that’s it. We have the Hardware profile for Gen2 VM. Now we are ready for stage 3 which is the template creation.

 

In the Third Stage, I assume that we have a Gen2 VM which is prepared with SysPrep.

Navigate to SCVMM -> VMs and Services -> All Hosts

Identify the Golden Image VM which we created and performed SYSPREP.

Right Click on the VM and select Properties.

Ensure that the Operating System and Integration Service is properly updated in SCVMM.

If Operating System is displayed as unknown, Select the right Operating system and Click on OK.

Template VM- Properties

Few experts has mentioned that we need to enable the check mark for  “Contains the Operating system for the virtual machine”. Logically its correct and hence I too did that. Don’t ask my if its mandatory.

Template VM- Disk Properties

Thats it. We are ready to create the template.

Right Click on the VM and Select Create -> Create VM Template

Read the warning and click on OK.

Template Name

On the Hardware Configuration, Just click next.

On the Operating System configuration, Select the appropriate Gust OS Profile.

Create VM - GUST OS PROFILE

Select the VMM Library Server

Select the path where you need to store this on Library. I will usually put under the Templates folders inside. You can even create a folder structure as you wish.

Review the summary and click on Finish.

Once the template is created, create a new VM.

Template Selection

Select the template and click on OK.

Click next to proceed.

Create VM

On the Configure Hardware Profile, Select the Gen2 Hardware profile we just created.

Create VM - hardware profile

On the Gust OS Profile, Select the appropriate GUST OS Profile.

Create VM - GUST OS PROFILE

And proceed with the next steps what we did for a Gen1 VM creation.

 

Comments

comments