@Anonymous Welcome to Microsoft Q&A, thank you for posting your here!!
Could you please try to follow below process to enable automatic VM guest patching
- Validate the extension isn't enabled You shouldn't see a patch setting section.
az vm get-instance-view --resource-group myResourceGroup --name myVM
- Enable the Preview for the subscription
It can take up to 15 minutes, but you can check the status with az feature show --namespace Microsoft.Compute --name InGuestAutoPatchVMPreviewaz feature register --namespace Microsoft.Compute --name InGuestAutoPatchVMPreview az provider register -n Microsoft.Compute
- Update the existing VM to have it
az vm update --resource-group myResourceGroup --name myVM --set osProfile.windowsConfiguration.enableAutomaticUpdates=true osProfile.windowsConfiguration.patchSettings.patchMode=AutomaticByPlatform
- Now validate you got it...
You should see: "patchSettings": {az vm get-instance-view --resource-group myResourceGroup --name myVM
"patchMode": "AutomaticByPlatform"
},
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.