How can I create a VM scale set with a custom Windows Server 2012 image with autoscale enabled?

I found azure templates which create scale sets + custom image and another which creates scale set with autoscaling. However I need to combine scale set, auto scaling and custom image.


We can modify the template, here is my template.

PS C:\windows\system32> New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName ExampleResourceGroup -TemplateFile c:\Users\Desktop\jasontest2.json

cmdlet New-AzureRmResourceGroupDeployment at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
sourceImageVhdUri: https://jasontestdisks591.blob.core.windows.net/vhds/jasonvm20170227164237.vhd
vmssName: jason786
instanceCount: 3
adminUsername: jason
adminPassword: ************

DeploymentName          : ExampleDeployment
ResourceGroupName       : ExampleResourceGroup
ProvisioningState       : Succeeded
Timestamp               : 2/27/2017 9:38:24 AM
Mode                    : Incremental
TemplateLink            :
Parameters              :
                          Name             Type                       Value
                          ===============  =========================  ==========
                          vmSku            String                     Standard_D1
                          sourceImageVhdUri  String                     https://jasontestdisks591.blob.core.windows.net/vhds/jasonvm20170227164237.vhd
                          vmssName         String                     jason786
                          instanceCount    Int                        3
                          adminUsername    String                     jason
                          adminPassword    SecureString

Outputs                 :
DeploymentDebugLogLevel :

We can modify the auto scale settings here. More information about configure and update the autoscale setting for a scale set, refer to the link.


There is an azure-quickstart-template named 201-vmss-windows-customimage that will give you a template to accomplish this.

From the readme.md

Deploy a VM Scale Set based on a Windows Custom Image

This template deploys a VM Scale Set from a user provided Windows Custom Image

The template allows a URL to a custom image to be provided as a parameter at run time. The custom image should be contained in a storage account which is in the same location as the VM Scale Set is created in, in addtion the storage account which contains the image should also be under the same subscription that the scale set is being created in.

  • Thanks for your reply. I came across that template, however this template does not provide the functionality to autoscale. – joebegborg07 Feb 26 '17 at 11:00

Scale Set template

The following template should allow you to created the desired scaleset, its uses a Blob url to specify the VHD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.