0

When I manually scalled my vmss from 2 to 4, it provisioned new nodes with an ordinal index higher than the current ones:

vm-01,vm-02,vm-06,vm-07

And if the newly ones are deleted and re-scaled will show vm-08 and vm-09

Is there a way to enforce the index to remain in sequence?

x300n
  • 311
  • 5
  • 14

1 Answers1

1

It is not possible to sequence it as 1,2,3,4 . As its by default when you scale-up and then scale-down then the instances with highest id are deleted .So again if you try scaleup then it will take the highest instance id that was created or deleted to consideration and then add new scale sets instances.

As mentioned in the FAQ for Virtual machine Scale Set:

Q: If I reduce my scale set capacity from 20 to 15, which VMs are removed?

Ans: By default, virtual machines are removed from the scale set evenly across availability zones (if the scale set is deployed in zonal configuration) and fault domains to maximize availability. VMs with the highest IDs are removed first. You can change the order of virtual machine removal by specifying a scale-in policy for the scale set.

Q: What if I then increase the capacity from 15 to 18?

Ans: If you increase capacity to 18, then 3 new VMs are created. Each time, the VM instance ID is incremented from the previous highest value (for example, 20, 21, 22). VMs are balanced across fault domains.

Reference:

Azure Virtual Machine Scale-sets FAQ

Ansuman Bal
  • 9,705
  • 2
  • 10
  • 27