0
votes

I am using a Azure. I created a custom image of Linux virtual machine. I have to create multiple virtual machines of a custom image. BUT I don't know the way to do. In Resource manager portal, 'virtual machine scale out' function is only for OS images (not for custom images). I prefer a solution done in the portal though, using Azure CLI or using template is okay to me.

1

1 Answers

0
votes

There is an azure-quickstart-template named 201-vmss-windows-customimage that will give you a template to achieve your scenario.

From the readme.md

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.

Update: If your custom image is based on Linux, you need modify osType in this template. Modify it to Linux and save it as name test.json. You could execute following cmdlet.

New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName mygroup -TemplateFile C:\Users\shui\Desktop\test.json

This is my test in my lab.

enter image description here

Also, you could use this Deployment template for autoscaled custom image vmss

This template allows you to deploy an autoscaled VM Scale Set of Linux VMs based of an existing custom image. The load balancers and vms should be assigned public IPs