Is there a way to set an Azure Update Mgr maintenance configuration to run based on VM local time?

sac16 75 Reputation points
2024-09-10T20:55:05.65+00:00

We would like to have newly provisioned VMs be patched monthly at a given off-hours time (let's say Sunday 2am local VM time). We would like to add the VMs to a maintenance configuration via tagging (using dynamic scoping). It would be easiest to do this by creating one maintenance configuration that it is set to run on the 2nd Sunday at 2am, but it appears it can only be set to a specific time zone. We would like to have the configuration run at 2am on the local VM time since all the VMs are in regions around the globe. Is this possible at all? If not, what is the best alternative that can handle this in an automated fashion?

Azure Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
303 questions
0 comments No comments
{count} votes

Accepted answer
  1. Stanislav Zhelyazkov 23,881 Reputation points MVP
    2024-09-11T05:32:46.7433333+00:00

    Hi,

    The schedule for the maintenance configurations runs at Azure, it does not run on the VM. On the VM only the patching is started when the maintenance configuration is running and the VM is part of it. So what you want to achieve is not possible. Tag your VMs in a way that each VM in different time zone has different tag values. Create maintenance configuration for each time zone and use the dynamic scoping to filter on the tag for each time zone. You can automate the deployment of maintenance configurations and applying the tags in various ways - Bicep, Terraform, CLI, Azure PowerShell, SDKs, etc. Whatever you feel conformable with.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


1 additional answer

Sort by: Most helpful
  1. Ryan Hill 28,106 Reputation points Microsoft Employee
    2024-09-11T13:06:21.1+00:00

    If it's only critical and security patches, then use enable automatic guest patching on the VM itself. The Azure platform will install every month, off-peak hours within the VMs time zone, as they become available. See Automatic Guest Patching for Azure Virtual Machines and Scale Sets - Azure Virtual Machines | Microsoft Learn for more info.

    However, if you're wanting to remain with a custom maintenance configuration, @Stanislav Zhelyazkov answer of creating multiple configurations is the only course of action.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.