How-to Deploy Windows Virtual Machines using a Golden Image, Templates and Guest OS Specification.

Introduction

In this How-to we will use a Golden Image, Templates, and Guest OS Specification to demonstrate an efficient virtual machine deployment process.

Before diving into the deployment process, let's briefly discuss the key components involved:

Golden Image: A Golden Image is a pre-configured and optimized VM that serves as a blueprint for creating new VMs. It includes the operating system, applications, patches, and configurations needed for your environment.

Templates: A virtual machine template is a main copy of a virtual machine that can be used to create and provision new virtual machines. Templates streamline the deployment process by ensuring consistent configurations across VMs.

Guest OS Specification: A Guest OS Specification is a set of customized settings that can be applied during the VM creation process, such as hostname, network configuration, time zone, and domain membership.

TLDR Steps:

  • Create a Golden Image Virtual Machine

  • Convert the Golden Image virtual machine to a template

  • Use the Golden Image Template to deploy VMs with Guest OS Customization Specification

  • Applying updates to VM Templates

Detailed step-by-step guide:

Create a Golden Image Virtual Machine:

  1. VM Creation: Start by creating a new VM, either from scratch or by cloning an existing VM.

  2. OS Installation: Install the Windows operating system on the VM, along with any necessary updates, patches, and drivers.

  3. Application Installation: Install the required applications and software that will be included in the Golden Image.

  4. Configuration: Configure the OS and applications according to your departments standards. This might include security settings, networking configurations, and other customizations.

  5. Optimization: Fine-tune the VM for performance by optimizing settings, disabling unnecessary services, and cleaning up unnecessary files.

  6. Sysprep: Run the System Preparation Tool (Sysprep) to generalize the VM, removing unique identifiers and preparing it for duplication.

Convert the Golden Image virtual machine to a template:

  1. Login to the ITS Private Cloud Portal:

  1. Click the pen icon to edit the Golden Image VM.

  1. If the VM is powered on, toggle the Power Status button to turn it off and click UPDATE to apply.

  1. Once the VM is powered off, convert the VM to Template by toggling the Template button and accepting the Template Message.

  1. Congratulations you have created a Golden Image VM Template, it can now be used to efficiently deploy VMs!

 

Use the Golden Image Template to deploy VMs with Guest OS Customization Specification:

  1. To create a new VM using the Template, start by clicking the + button in the top right.

  1. On the SPECS page click Build From * field and select VM Template.

  1. Click the Source Template* field and select your template from the drop down list.

  1. Click the Name* field and enter a VM name, confirm the remaining setting on the page or make adjustments as required.

  1. Click on the DISKS tab and confirm or adjust the settings

  1. Click on the NETWORKS tab and confirm or adjust the settings

  1. Click on the ADMIN tab and confirm or adjust the settings.

NOTE: All fields marked with an * must be filled in order to create the VM (confirm the Phone*).

  1. Create the Guest OS Customization Specification in JSON format.

NOTE: Ensure the JSON is formatted properly, you can confirm the formatting with an online JSON viewer.

NOTE: The number of interfaces in the Specification must match the number of interfaces on the VM.

 

EXAMPLE 1: Set hostname, dns server, static IP address for one network interface card and timezone

NOTE: Microsoft uses numbered time zones, 35 is Eastern Standard Time https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)

{ "hostname": "win2022-fm-template", "domain": "dept.utoronto.ca", "dns": [ "128.100.100.128" ], "interfaces": [ { "dhcp": false, "ip": "10.1.1.101", "mask": "255.255.255.0", "gateway": [ "10.1.1.1" ] } ], "time_zone": 35 }

EXAMPLE 2: Set hostname, dhcp address for 2 network interface cards and timezone

{ "hostname": "win2022-fm-template", "domain": "dept.utoronto.ca", "interfaces": [ { "dhcp": true, }, { "dhcp": true, } ], "time_zone": 35 }
  1. Click on the OTHER tab select the Restore options, paste the Specification JSON (Example 1) in the input box and click CREATE.

  1. Logging in to the virtual machine we can confirm the Guest OS Customization Specification was applied.

 

Applying updates to VM Templates:

  1. Click the Menu button in the top right corner.

  1. Select Templates from the Menu.

  1. Find the template that needs to be updated and click the edit button.

  1. Convert the Template to a VM by clicking the Template toggle button.

  1. Once the Template has been converted to a VM, you can boot the

    and apply updates or make configuration changes.

  2. When the updates are complete, power down the VM and convert it back into a template.

https://eis-vss.atlassian.net/wiki/spaces/VSSPublic/blog/2023/02/21/1249280023

https://eis-vss.atlassian.net/wiki/spaces/VSSPublic/pages/751599603

 

 

University of Toronto - Since 1827