One of the powerful features and functionality that virtualization provides to administrators is the ability to move quickly with provisioning resources. Today’s software driven approach to operating enterprise datacenters means that administrators can deploy infrastructure much more rapidly and with precision and control that simply cannot be achieved with “sneaker net” operating procedures.

One of the monotonous, time-consuming, and basic tasks that Hyper-V administrators find themselves performing, even daily or many times a day in some environments is creating virtual machines. Aside from container provisioning, standing up virtual machines is the most common resource found in today’s modern datacenters, driven by virtualization.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

Table of Contents

  1. What are Hyper-V Virtual Machine Templates?
  2. Basic Hyper-V Virtual Machine Templates
  3. System Center Virtual Machine Manager Templates
  4. Concluding Thoughts

In the world of Hyper-V, how can Hyper-V administrators make use of the tools available to use the software-driven approach mentioned above to execute the provisioning of virtual machines more quickly?

Let’s take a look at Quick Virtual Machine Deployment with Hyper-V VM Templates and see how these are created and utilized.

What are Hyper-V Virtual Machine Templates?

First off, what is a virtual machine template?

Download Banner

When you think about the word template, you may well think about a “pattern” of sorts that allows you to reproduce or create something quickly and easily in the shape or form that you want it created. In a software sense when thinking about Hyper-V virtual machines, VM templates allow quickly creating new virtual machines with a master pattern of sorts that includes the virtual hardware configuration along with CPU, memory, network, and even software configuration.

For the most part, it may only take a few seconds to spin up a new “shell” virtual machine that only has the virtual hardware configured. However, it can take hours to install the operating system, install and configure all needed software required by your organization and also install any needed Windows Updates. By utilizing Hyper-V virtual machine templates, you can create a customized virtual machine containing everything required by your organization and use the template to provision new virtual machines. This way, you do not have to recreate the time and effort required to install all needed software on subsequent new virtual machines.

Let’s take a look at a couple of ways in Hyper-V that Hyper-V administrators can make use of virtual machine templates to provision new VMs. These include:

  • Basic Hyper-V Virtual Machine Templates
  • System Center Virtual Machine Manager Templates

The basic Hyper-V virtual machine template does not require any additional software or licensing and involves creating a virtual machine, running the necessary steps to generalize the virtual machine and then copying the VHD or VHDX to a location that can be used for deploying additional virtual machines.

System Center Virtual Machine Manager is the “pay for” enterprise management software that organizations can utilize with Hyper-V to have centralized management and other unlocked features that make managing and configuring Hyper-V much easier.

Basic Hyper-V Virtual Machine Templates

With basic Hyper-V virtual machine templates, you can manually create a virtual machine template in just a few quick and easy steps. In fact, manually creating a Hyper-V VM template is simply performing most of the steps that are accomplished with System Center Virtual Machine Manager when you create a template there.

The steps involved include:

  1. Create a new Hyper-V virtual machine
  2. Configure the VM and load the needed software
  3. Run Sysprep on the virtual machine to generalize the Windows installation
  4. Virtual Machine with Hyper-V VM Templates

    Running the Sysprep utility to generalize the Windows operating system

  5. Copy the VHD or VHDX to a “Library” type location or share
  6. Virtual Machine with Hyper-V VM Templates

    Hyper-V VM template VHDXs ready to be provisioned

  7. Identify the template by a name that is intuitive
  8. To deploy from the template, copy the template VHD or VHDX to a new location for a new virtual machine you want to deploy
  9. Create a new virtual machine and point to the copied template hard disk file
  10. Boot the new virtual machine and follow the mini setup wizard for the Sysprep out-of-box experience
  11. After some basic configuration, the new virtual machine, representing hours of work initially on the template master, is now ready to use after perhaps only a few minutes!

The above represents the manual way to provision template VHD(X) hard disks in Hyper-V and use these disks as copy masters so that new hard disks copied from the virtual disk template files will contain the same software and operating system configuration as the master, including Windows Updates, etc. This can save a tremendous amount of time and administrative effort to deploy virtual machines to production.

Let’s now take a look at a more streamlined way to accomplish the above tasks with System Center Virtual Machine Manager.

System Center Virtual Machine Manager Templates

The System Center software package is a monolithic management software from Microsoft that can do just about anything. In the scope of virtualization however, System Center Virtual Machine Manager allows Hyper-V administrators to have a centralized management plane for performing configuration and management of Hyper-V. One of the things that can be done in a more “wizardized”, automated way is creating Hyper-V virtual machine templates.

To create a new virtual machine template in SCVMM, click Library >> Templates >> right click VM Templates >> Create VM Template.

Virtual Machine with Hyper-V VM Templates

Beginning the Create VM Template Wizard

The Create VM Template Wizard begins. You can use an existing VM template or a virtual hard disk stored in the library, or you can manually select your own VHD(X) file to use.

Virtual Machine with Hyper-V VM Templates

Choosing the source for the new VM template

The Select VM Template Source launches and allows picking from “in the box” templates already configured (no operating system).

Virtual Machine with Hyper-V VM Templates

Picking from default templates in System Center Virtual Machine Manager

Configure the Identity for the new template. Typically, you would want to name the template something intuitive. This could be the loaded operating system or any other description that would be helpful.

Virtual Machine with Hyper-V VM Templates

Setting the identity for the new template

Next, you configure the hardware. This would include the processor layout and configuration, memory, virtual media, etc. This saves you from having to configure specific hardware settings each time you deploy a virtual machine.

Virtual Machine with Hyper-V VM Templates

Configuring hardware in a Hyper-V virtual machine template

The next step involves configuring the operating system. Here you are not installing the OS, but rather telling the template the variant of operating system the template will contain (Windows 10, Windows 8.1, etc).

Virtual Machine with Hyper-V VM Templates

Configuring the Hyper-V virtual machine template operating system

The next two options relate to templates that have the operating system set for a Windows Server operating system – Application Configuration, and SQL Configuration. In the example configuration, Windows 10 was chosen, so these screens will not be relevant to the operating system install.

Virtual Machine with Hyper-V VM Templates

Application configuration for Windows Server operating systems in Hyper-V virtual machine template configuration

Virtual Machine with Hyper-V VM Templates

SQL Server configuration for Windows Server operating system templates

At this point, the SCVMM Hyper-V template is ready to be created with the configured parameters. Select the Create button and the template should be successfully created.

Virtual Machine with Hyper-V VM Templates

Ready to finish the Hyper-V SCVMM virtual machine template

After the template is created, you can click the Templates >> VM Templates >> click the new template created >> Create Virtual Machine to deploy a new virtual machine from the newly created template.

Virtual Machine with Hyper-V VM Templates

Creating a new Hyper-V virtual machine from the newly created SCVMM template

With System Center Virtual Machine Manager, creating a new virtual machine template is extremely easy. It makes the manual processes required without SCVMM irrelevant and fully automates the process.

Concluding Thoughts

Automating infrastructure processes is a powerful way that Hyper-V administrators can become more agile, quick, and efficient in provisioning virtual resources. One of the more time and effort intensive operations in the day to day tasks of a Hyper-V administrator is creating a new virtual machine or many virtual machines.

Creating a new virtual machine involves more than simply creating the “shell” virtual machine. It includes the time involved with loading the operating system, loading custom software, and configuring the virtual machine for the particular organization’s environment.

By creating Hyper-V virtual machine templates, either manually, or using SCVMM, Hyper-V administrators can deploy one or many virtual machines in a fraction of the time it would take to manually install and configure individual virtual machines from scratch. Leveraging these capabilities, features, and management software such as SCVMM utilized in conjunction with PowerShell, Hyper-V administrators can get much closer to operating infrastructure as code and becoming much more agile in their operations.

Related Posts:

How to Create VM Templates in VMware vSphere
Learn about the new Backup Job Template feature included in Vembu BDR Suite 5.0
AWS – EC2 Launch Configuration vs Launch Templates
Microsoft Azure for Beginners: How to Create your First Azure Bicep Template – Part 6
An introduction to Azure Resource Manager Templates

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post