Deploying an Auto-Scaling VM Scale Set with a Custom Disk Image

An in-depth explanation of the architecture of this template file will require an entire post all by itself so I am not going to break down the template here.  That said, keep an eye out for a future post, where I will break everything down.

What Does the Template Do?

In its current state, the template (as written) limits the initial scale set deployment to a maximum of 3 instances.  It also deploys the required load balancer for the scale set, along with the network and subnet values specified in the template ( and

The template configures the scale set to autoscale based on CPU utilization.  At 60% utilization over 5 minutes, it will scale up by one instance.  At 30% utilization, it will scale down by one instance.

Deploying the Template

Deploying the scale set using the template isn’t terribly difficult.  To deploy it, browse the marketplace in the portal and search for “template deployment” and click on it in the list.

After clicking on the “Template Deployment” resource, click the blue “Create” button.  You’ll then be offered the opportunity to upload the template.

Click the “Edit” button, then “Load File”, and then browse to your saved template file.  The screen will change, displaying the content of your template:

With your template loaded, click “Save”.

You will be prompted for information about your scale set.  Provide the following information:

  • Resource Group (I usually create a new one so everything is in one place)
  • VMSS Name (name of your scale set)
  • Instance Count (number of instances to deploy)
  • Admin Username (admin username for all instances)
  • Admin Password (admin password for all instances)
  • OS Type (what type of OS you are deploying)

After supplying the information for your new scale set, check the box to agree to terms and conditions and then click “Purchase”.  The template is validated and the deployment begins.

Click here to join the Understanding Azure Facebook group or here for the latest Azure practice questions, answers, explanations, and reference materials.

Thomas Mitchell

Tom is a 20+ year veteran of the IT industry and carries numerous Microsoft certifications, including the MCSE: Cloud Platform and Infrastructure certification. A Subject Matter Expert in Active Directory and Microsoft Exchange, Tom also possesses expert-level knowledge in several other IT disciplines, including Azure, Storage, and O365/Exchange Online. You can find Tom at his website, on LinkedIn, or on Facebook. Need to reach him by phone? Call 484-334-2790.