VMSS Instance Extension Questions

안 남기 181 Reputation points
2022-11-14T13:08:12.993+00:00

For example, the extension in the red box in the image below may be applied to VMSS.
PICPICKSHAPE

I was wondering if applying the above extension to VMSS will automatically apply to newly added instances in VMSS.

Since you asked for more clarification, I've re-uploaded the question with a more detailed explanation.

thank you

Azure Virtual Machine Scale Sets
Azure Virtual Machine Scale Sets
Azure compute resources that are used to create and manage groups of heterogeneous load-balanced virtual machines.
347 questions
0 comments No comments
{count} votes

Accepted answer
  1. KarishmaTiwari-MSFT 18,367 Reputation points Microsoft Employee
    2022-11-15T05:48:37.283+00:00

    Hello @안 남기 ,

    To answer your question,
    Is the extension associated with the existing set of virtual machine scale set instances is automatically applied to the newly created VMSS instance?
    VMSS model implies a property of the scale set which affects VMs, for example, the VM size, the OS version or an extension. The newly added instances are upgraded to the latest VMSS model depending on the Policy upgrade (automatic, manual) that you have selected.

    If you look at the instances for a VMSS in Azure Portal as shown below, you can see that each instance has a field called Latest Model (Yes/No). If the upgrade policy for that VMSS is set to automatic, these VM instances are brought up-to-date with the latest scale set model (which includes the extensions as well) and Latest Model field will show as 'Yes'. Basically, yes, the extensions will apply to the newly added instances in this case.

    If the upgrade policy is set to 'Manual', you will need to manually go in and upgrade newly added instances to the latest VMSS model. Once the upgrade to the latest VMSS model is completed, the extensions applied to the existing VMSS instances will apply to the newly added instances as well.

    In short, the answer is, yes it is possible. It depends on the upgrade policy selected.

    260354-image.png

    How do I add an extension to all VMs in my virtual machine scale set?

    If update policy is set to automatic, redeploying the template with the new extension properties updates all VMs.

    If update policy is set to manual, first update the extension, and then manually update all instances in your VMs.

    If the extensions associated with an existing virtual machine scale set are updated, are existing VMs affected?

    If the extension definition in the virtual machine scale set model is updated, and the upgradePolicy property is set to automatic, it updates the VMs. If the upgradePolicy property is set to manual, extensions are flagged as not matching the model.

    By default the upgrade policy is set to manual. In this mode, when you update the scale set model, updates are not applied to existing VMs.
    If you don't want manual intervention, you can use automatic upgrade policy.

    How to bring VMs up-to-date with the latest scale set model?
    Scale sets have an "upgrade policy" that determine how VMs are brought up-to-date with the latest scale set model. The three modes for the upgrade policy are:

    Automatic - In this mode, the scale set makes no guarantees about the order of VMs being brought down. The scale set may take down all VMs at the same time.
    Rolling - In this mode, the scale set rolls out the update in batches with an optional pause time between batches.
    Manual - In this mode, when you update the scale set model, nothing happens to existing VMs.

    How to enable 'automatic upgrade policy' for a VMSS?
    You can do it via Azure Portal by going to Settings->Upgrade Policy as shown below:

    260383-image.png

    You can also change the upgrade Policy setting by changing it in the template you used to deploy a scale set and then redeploy the template.

    Reference documents:
    https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq#how-do-i-add-an-extension-to-all-vms-in-my-virtual-machine-scale-set-
    https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-upgrade-scale-set#how-to-bring-vms-up-to-date-with-the-latest-scale-set-model

    ----------

    If this answers your query, do click “Accept the answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread.
    And, if you have any further query do let me know in the comments.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful