2

So I am trying to provision a scaleset and have it join a domain using the JsonADDomainExtension. Everything works, however when scaling in any way (auto scale or manual) two instances instead of one gets provisioned, however when the provisioning is done one instance disappears, after running DSC, extensions etc. leaving the two provisioned inside of the domain but in the end only one VM running. I've tried both using FirstLogonCommands, extension and DSC - they both act the same way. I assume this is by design, though I haven't been able to find any information about it.

Is there anyway to only trigger the extensions for the machine that's provisioned and running in the end?

  • Try to play with your autoscaling settings and specially timeWindow parameter, it is possible that during initialization the first VM uses all its resources and it triggers autoscaling conditions https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-autoscale-template – Ivan Ignatiev Aug 02 '19 at 16:47
  • 1
    It also happens with manual scaling without any auto scaling enabled – Sjokoladefoged Aug 03 '19 at 14:02

2 Answers2

1

You're seeing the effects of the overprovisioning feature, which is on by default. This temporarily provisions additional VMs beyond your specified capacity when creating or scaling up your VMSS to improve provisioning success rates.

You can turn off overprovisioning by setting the 'overprovision' field to false in the API.

Nathan Kuchta
  • 13,482
  • 2
  • 26
  • 35
1

That is default behavior of the VMSS it creates additional vms during the deployment. Once the requested number of vms are successfully provisioned it will delete those additional vms created. These additional vms that gets deployed will not be charged.,

Vijay
  • 11
  • 2