cannot remove vm from maintenance schedule

Chris Welford 0 Reputation points
2025-02-21T13:09:53.3566667+00:00

I have a VM in a maintenance schedule that cannot be removed. When I try and do this, I get an error saying that the resource cannot be located. This VM was moved from one resource group to another; the error is trying to find the VM in its original resource group.

I have tried deleting the maintenance schedule entirely and re-creating it from scratch, then adding the VM, but updates are not successfully applied in update manager, and when I go to look at the VM in the new maintenance schedule, I get the same error. It's as if update manager is somehow remembering the resource group the VM was originally in, even though I moved it some time ago.

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

1 answer

Sort by: Most helpful
  1. Pranay Reddy Madireddy 2,400 Reputation points Microsoft Vendor
    2025-02-21T15:46:20.66+00:00

    Hi Chris Welford

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    Before moving a VM to a new resource group, verify that any existing maintenance configuration assignments are removed. This is important because the system does not support transferring resources with active configurations between resource groups or subscriptions.
    User's image

    After moving the VM, create a new maintenance configuration. When doing this, check that you assign the VM from its new resource group to the new maintenance configuration. If you try to use the same name for the configuration as before, allow at least 20 minutes for backend cleanup before recreating it.

    If you are using dynamic scopes in your maintenance configuration, initiate or wait for the next scheduled run. This can help in completely removing any stale assignments related to the VM before re-adding it.
    Reference:
    https://learn.microsoft.com/en-us/azure/virtual-machines/troubleshoot-maintenance-configurations
    https://learn.microsoft.com/en-us/azure/virtual-machines/maintenance-configurations-portal

    Feel free to reach out if you have any further questions or need additional information—I’m happy to assist!

    Please provide your valuable comments User's image

    Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.


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.