Can I deploy this image with scale sets?

Yes, but maybe not directly from the portal.

You might have stumbled across an image in the portal that deploys a VM, but you actually wanted to deploy that image to a scale set. This blog post will discuss how to do so.

Find the Image Reference

First, you need to find the image reference for the image you want. If you’ve already found the image in the portal that you want to use, then fill out the required boxes, then click “Download a template for automation”:

download a template for automation

This should lead you to a page like the below. Scroll through the template till you find a block called “imageReference”:

find image reference

This imageReference uniquely identifies the image (note: this is the same image reference that you can see in my periodically-updated dump of images here).

Actually Deploy

Once you have the image reference, you can deploy in various ways:

To deploy from an ARM template,  you could drop that image reference into an existing scale set ARM template like this one.

Or, you could provide them in the az cli vmss create command like: ‘az vmss create –image {publisher}:{offer}:{sku}:{version}’. {version} may be ‘latest’, by the way.

Similarly, in powershell, you can use the -ImageReferencePublisher, -ImageReferenceOffer, -ImageReferenceSku, and -ImageReferenceVersion options in the Set-AzureRmVmssStorageProfile command to set the image reference for a scale set config powershell object.

Leave a comment