0
votes

I am looking to use vmss for an application with multiple instances. however i am not sure how upgradepolicy works.

If i set it to automatic. then does this mean all the configuration on my existing vmss instances shall be replicated to a new instance if it comes up after scaling?

for eg. If I have currently one instance in vmss with sql server image and i have manually created new database with some database.Then i perform manual scaling , and a new instance comes up. how can I ensure, the new instance has the same configuration including database and data? or for that matter any custom application that is deployed on the vm.

1

1 Answers

1
votes

The Virtual Machine Scale Set is a group of load-balanced VMs. And all the VM instances are created from the same configuration that you set when you create the VMSS, not matter the manual scale or automatic scale. So if you only create the database in the instance, the new instance will not contain the database when it scales.

There are two ways to make the new instance contain the database you create. One is to create a new VM image with the database you need and then replace your VMSS image. And the second one is to use the VMSS extension to install the database. Then the extension will be deployed in the new instance when it scales.