Azure Gen2 Windows Template Creation

Creating Virtual Machine in Azure:

Creating a VM:

  • On the “Create a Virtual Machine” page, Under the Basics Tab:

    • Select the required Subscription.

    • Select the Resource Group based on the requirement.

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

  • Give “Virtual machine name”.

  • Select the Required Region

  • Availability Options leave the default value.

  • Select “Security Type” as <Trusted Launch Virtual Machines> this is a mandatory step while creating a VM on Win11 OS uses Managed Disks implicitly with this.

  •  Select “Image” as Windows 11 Pro/Windows 11 Enterprise in Marketplace

    • For Azure Windows 11 we are supporting both 21H2 & 22H2 (version) images

  • 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 Agent in VM:

Connect VM using MSTSC (RDP) install Workspot agent and register to the required control account.

Steps for Agent installation:  

  • Download the Agent from https://download.workspot.com/ and install it with the path in the command prompt in Administrative Mode

  •  Please refer to the below link for details:workspot-desktop-agent-installation-and-configuration

  • Complete the Agent Installation by giving the control admin credentials.  

  • Copy the Workspotconfig file.

  • Place the file in C:\Programdata\WorkspotAgent\config.

  • Open C:\Programfiles\WorkspotAgent

  • Left-click on workspotConfigEditor and open it in admin mode.

  • After filling in the Service Domain, Service Username, and Service Password, click on Test Secure Credentials

  • Then fill in the Admin Domain, Admin Username, and Admin Password and click submit

  • After successful submission close the WorkspotConfig Editor

 After successful installation of Agent, Go to Azure Console and stop the VM

Creating Azure Compute Gallery

If there is no Gallery available in the required Resource Group, if there is an existing Gallery available in the Resource Group, we can directly go Add VM image Definition step>

  • 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 >

  • Sharing Tab

    • Select Sharing Method as “Role-based access control (RBAC)”

    • 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

Add VM Image Definition in 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

  • 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

  • Open Network interface

  • Navigate to ‘Properties’ under Settings

  • 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.

  • 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.

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