Disable "Windows automatic updates" when creating a VMSS in azure portal

ClementJohannes-1110 20 Reputation points
2023-03-16T14:14:54.9133333+00:00

You can create a vmss in Azure Portal. Is it possible to disable "Windows automatic updates" in Azure Portal while creating the vmss, and on which tab is the setting and what is the setting called please?

I left "Guest OS updates > Enable automatic OS upgrades" unclicked but "Windows automatic updates" is still enabled for the scaleset. Can this can be done in Portal when creating the VM and not through powershell afterwards?

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
{count} votes

Accepted answer
  1. deherman-MSFT 33,456 Reputation points Microsoft Employee
    2023-03-24T19:05:18.2466667+00:00

    @ClementJohannes-1110

    In the portal I found that Patch orchestration options setting allows you to control the Windows Automatic Updates setting. This option is available under Management for single VMs as well as VMSS if the orchestration mode is set to Flexible.

    User's image

    Since you are not seeing that option, I am assuming you are using the Uniform orchestration mode. When creating a VMSS with Uniform mode the Windows Automatic Update is defaulted to whatever the image has it set to.

    If Flexible orchestration mode is not an option, you will need to first update the VM image and disable Windows Automatic Update. One way to do this is by launching a standalone VM from the image and setting Patch orchestration options to Manual updates. After the VM is created you can create an image from it. When creating the VMSS with this image Windows Automatic Update should now be set to Manual inside the OS.

    Hope this resolves your issue. Let me know if you still need assistance or have any more questions.


    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Tech-Hyd-1989 5,746 Reputation points
    2023-03-16T18:32:13.5133333+00:00

    Hi Clement Johannes

    Yes, it is possible to disable "Windows automatic updates" in Azure Portal while creating the vmss. The setting is called "osProfile.windowsConfiguration.enableAutomaticUpdates". You can find this setting in the "Operating system" tab under the "Windows Configuration" section.

    To disable "Windows automatic updates", you need to set the value of "osProfile.windowsConfiguration.enableAutomaticUpdates" to false. This can be done in the Azure Portal while creating the vmss.

    Please note that the property "osProfile.windowsConfiguration.enableAutomaticUpdates" can only be set when the vmss is first created. Switching between "AutomaticByPlatform" and "Manual" modes is supported on vmss that have "osProfile.windowsConfiguration.enableAutomaticUpdates=false". However, switching between "AutomaticByOS" and "Manual" modes is not supported.

    For details you can see, https://learn.microsoft.com/en-us/azure/virtual-machines/automatic-vm-guest-patching#patch-orchestration-modes

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.