---
title: "Azure Gen2 Windows Template Creation"
slug: "azure-gen2-windows-template-creation"
updated: 2026-05-29T01:00:23Z
published: 2026-05-29T01:00:23Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.workspot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Gen2 Windows Template Creation

## Create a Virtual Machine in Azure

- Go to [Azure Portal](https://portal.azure.com/#home).
- Navigate to the [Virtual Machines Page](https://portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Compute%2FVirtualMachines), click on “Create,” and select the below option:

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/b98c635d-98ee-4204-9f6b-146e5db15c74.png)

- On the “Create a Virtual Machine” page, Under the “Basics” tab:
  - Select the required Subscription.
  - Select the Resource Group based on your requirements.

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/2264530c-06f6-465b-b926-1c3e4b6013db.png)

*For ex: if we are creating for Production environment select “Workspot-RG”*

- Enter the new VM’s name under “Virtual machine name”.
- Select the required Region
- Accept the default value for “Availability Options.”

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/68b84ad7-35e2-4ef0-b7a5-4d5a60f7e9b4.png)

- For “Security Type,” select “Trusted Launch Virtual Machines.” This is a mandatory step when creating a VM on Win11 OS uses Managed Disks implicitly with this.
- Select “Image” as Windows 11 Pro/Windows 11 Enterprise in Marketplace
  - Choose a supported version (one that’s listed in [Workspot Compatibility Matrices](/v1/docs/workspot-compatibility-matrices#windows-operating-system-support-by-cloud-and-vm-type)).
- VM Architecture should be set to “X64” (64 - Bit)
- Select “Size” – select the required VM size <Gen2> supported for Win 11
- For the “Administrator Account”
  - Username: <username>
  - Password: < **********>
  - Confirm password: <***********>
- Inbound Port Rules
  - Public inbound ports “Allow Selected port” radio button should be selected
  - Select inbound ports <“ HTTP”, “HTTPS”, “RDP” >should be selected
- Licensing
  - Select this check box “I confirm I have an eligible Windows 10/11 license with multi-tenant hosting rights.”
- Click on Next: Disks>
  - Select the required <OS disk>
  - OS Disk type: <Premium SSD/Standard SSD/Standard HDD>
    - Keep the remaining options as Default.
    - Click on Next: Networking
- Networking Tab
  - In the “Network interface” <select Virtual network >
  - Public IP Should be selected as “None”.
  - Keep option “Basic” for “NIC network security group”.
  - Public inbound ports: All selected ports
  - Select inbound ports: HTTP, HTTPS & RDP
  - Click on Next: Management >
- Management Tab
  - keep all default settings.
  - Click on Next: Monitoring.
- Monitoring Tab
  - keep all default settings.
  - Click on Next: Advance.
- Advance Tab
  - keep all default settings.
  - Click on Next: Tags.
- Tags Tab
  - keep all default settings.
  - Click on Next: Review+create.
- Review+ Create Tab
  - After successfully giving “Validation Passed” is observed
  - Click on Create
  - After successful creation of the VM, navigate to the VM Overview Page and copy the Private IP address under Networking.

## Installing the Workspot Agent on the VM

1. Connect to the VM using Remote Desktop connection (MSTSC)
2. Install the Workspot Windows Desktop Agent as described in [The Workspot Windows Desktop Agent](/v1/docs/workspot-desktop-agent-installation-and-configuration#installing-the-agent-on-a-new-workspot-template).
3. After successful installation of Agent, Go to Azure Console and stop the VM.

### Create an Azure Compute Gallery

If there is a Gallery available in the required Resource Group, skip to [Add a Definition to the Gallery](/v1/docs/azure-gen2-windows-template-creation#add-vm-image-definition-in-gallery).

1. Navigate to [Azure Compute Gallery](https://portal.azure.com/#create/Microsoft.sharedImageGallery) in Azure Console and click on Create.

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/9a4768bc-d7e7-4f17-87dd-966a1e9edadd.png)

1. Basics Tab

- Select the required subscription.
- Select the valid Resource group.
- Select Instance details.
  - Name: Give a name for the Gallery
  - Region: select the required region
  - Description: add details of the VM for reference
  - Click on Next: (Sharing)

1. “Sharing” Tab

- Select “Role-based access control (RBAC)” as the sharing method.
- Click on Next: (Tags)

1. “Tags” Tab

- Keep the default settings.
- Click on Next: (Review + Create).

1. “Review + Create” Tab

- After “Validation Passed” is observed, click on “Create.”

### Add a Definition to the Gallery

- Once the Gallery image is created click on Gallery, the overview page will be opened
- Click on Add
  - VM Image definition
  - VM Application definition

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/0c2496f1-726d-4e7f-af53-3748da673cf7.png)

- Click on VM Image definition..
  - Basics Tab
  - Project details
    - Subscription: Should be prepopulated from Gallery.
    - Resource Group: Should be prepopulated from Gallery.
  - Under Instance details Region: Select the valid region.
  - VM image definition details:
    - Target Azure compute gallery: Gallery name should be prepopulated.
    - VM image definition name: <Enter name> The name that has been given here will show up in Control while performing the Register Template operation.
    - OS type: Windows
    - Security Type: select “Trusted Launch”
    - VM Generation: “Gen2”
    - OS state: Select “Specialized”.
    - VM Architecture: Select “x64”
    - Publisher: Add details for reference here
    - Offer: Add details for reference here
    - SKU: Add details for reference here.
    - Click on Next: Versions >
  - Versions Tab
    - Version name: enter <1.0.0>
    - Region: Select the region where the VM has been created and registered to control (Agent installed)
    - OS Disk: Select the created VM instance OS Disk in the drop-down menu.
    - Replication: Add the Replication count here; the Default value will be ‘1’ The maximum replication count we can add is 10. Note that increasing the replication count will incur more COGS.
    - Click Next: Publishing Options: leave all the default settings.
  - Publishing Options Tab
    - keep all default settings.
    - Click on Next: Tags
  - Tags Tab
    - keep all default settings.
    - Click on Next: Review Create
  - Review + Create Tab
    - After successfully giving “Validation Passed” is observed
    - Click on Create
    - VM Image definition will be created successfully.

## **Adding “mac_address”, vm_size to VM Image Definition**

- Navigate to the VM which is created in Create a Virtual Machine in Azure
- Open the Overview page of the Stopped VM
- Click on the Networking bar under Settings in the overview page

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/16ae385e-855a-4b3a-8ffc-0f1d07f734b6.png)

- Open Network interface
- Navigate to ‘Properties’ under Settings

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/e3bdca77-af26-4d9f-96fd-a4c496ff8217.png)

- Copy the “MAC address”
- Open the overview page of VM Image definition Which is created in ‘step – 2’ in <Add VM image Definition>
- Navigate to the Definitions tab and click on the <VM image definition>
- Open the 1.0.0(latest version) under the versions tab on the overview page of the VM Image definition.
- VM Image Version overview page will open.
- Click on tags (Edit) Edit tag slider will appear.

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/13a604dc-70cf-4674-9b9f-4ad0713e862f.png)

- In the name field add “mac_address” and in the value field paste the MAC address which is already copied (from the 6th point)
- Add another tag vm_size. A tag value is the VM size used to create the source VM. In control when this template is cloned, control uses the vm size in the tag to create a cloned template vm. Azure doesn’t store source VM size in the image definition, so we are using tags to save this.

![](https://cdn.us.document360.io/ad9153e1-c8de-4f56-94f2-b717a1fc3a68/Images/Documentation/7e6c5449-4089-4f51-9677-ff5254b4347e.png)

## **Register Template in Workspot Control**

- Login to Control
- Navigate to Setup Tab
- Under the Cloud tab select the required Azure cloud Subscription to register the template
- The Manage subscription page will open and click on the “Register Template” Button
- Add Template popup will appear.
  - Click on the “**Windows 10/11 (Azure Gallery Image)”**radio button.
  - Select the required resource group under – Select Resource Group – dropdown.
  - Perform a Blank search or Full/partial search with the “VM Image Definition” name.
  - Click on the appeared < VM Image Definition >name and save.
  - New template will be added successfully.
  - Check the corresponding Control Events
