question

v-mazayt avatar image
1 Vote"
v-mazayt asked CosmeJunior edited

Disable Auto Updates on VMs created from custom images

How can I disable auto updates on VMs created from custom images

I've tried to configure image with

 Set-ItemProperty -Path "HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"  -Name NoAutoUpdate -Value 1

But after deployment is complete, NoAutoUpdate key is set to 0

What is the right approach here?

azure-virtual-machinesazure-devtestlabsazure-dtl-base-images
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is there any update?


Please "Accept as answer" wherever the information provided helps you to help others in the community.

0 Votes 0 ·
jakaruna-MSFT avatar image
0 Votes"
jakaruna-MSFT answered

Can you set that VM's "enableAutomaticUpdates" to false as shown below and try again.

"osProfile.windowsConfiguration.enableAutomaticUpdates" Set this property to false Then rebbot and check for the registry key.

By default that value is set to true.

You can change that value through powershell or rest api.
In powershell just get the vm though get-azvm and change that value and set with set-azvm.

Try this out and let me know

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

CosmeJunior avatar image
0 Votes"
CosmeJunior answered CosmeJunior edited

@jakaruna-MSFT




111373-image.png




Automatic modes to Manual mode is currently not supported

Switching from AutomaticByOS mode to AutomaticByPlatfom mode is supported.

I think we can't disable for already created machines, must be or manage by OS or by Platform.......

I did what you said, after the restart of the VM, the value kept as 1, however I am not sure if the next time the windows update runs, it will not start up automatically, since the other properties remain the same

osProfile.windowsConfiguration.enableAutomaticUpdates=true
osProfile.windowsConfiguration.patchSettings.patchMode=AutomaticByPlatform

do you know how I can check this parameters for the existing VM I have, is this on the registry ?


https://docs.microsoft.com/en-us/azure/virtual-machines/windows/tutorial-config-management#manage-windows-updates


image.png (23.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.