Share via

Unable to unregister resource from Recovery services vault

syed 0 Reputation points
2026-03-05T20:39:50.8133333+00:00

I am trying to migrate a resource group from one subscription to another and to that end I have to delete Backup resources that do not support move between subscriptions. However, when I try to Unregister "Workload in Azure VM" from the console I get an internal server error (see the screenshot). How can I fix this

Azure Backup
Azure Backup

An Azure backup service that provides built-in management at scale.

{count} votes

1 answer

Sort by: Most helpful
  1. Suchitra Suregaunkar 9,420 Reputation points Microsoft External Staff Moderator
    2026-03-06T01:38:03.7+00:00

    Thanks for sharing the details.

    When attempting to Unregister “Workload in Azure VM” (SQL workload) from a Recovery Services vault, the Azure portal returns: “Microsoft Azure Backup encountered an internal error”

    This occurs while preparing the VM / resource group for cross‑subscription migration, where Azure Backup resources must be removed first.

    Based on the provided details:

    • 7 SQL workload items and 14 VM backup items were stopped
    • Backup data deletion was triggered, but:
      • Backup items are in Soft‑Deleted state (isScheduledForDeferredDelete = true)
      • DeleteBackupData failed for at least one SQL workload (e.g., msdb)
      • Multiple failed backup / register jobs exist for the same VM
    • Soft Delete is enabled on the vault (14‑day retention)

    Azure does NOT allow unregistering an AzureWorkload container (SQL / SAP workloads) if ANY of the following exist:

    1. Backup items in Soft‑Deleted state
    2. Failed DeleteBackupData jobs
    3. Failed or incomplete workload backup jobs

    In this state, unregister is blocked and the portal surfaces a generic “Internal error”, which matches the screenshot.

    As s resolution please try below workarounds:

    Step 1 – Permanently purge backup data

    You must ensure all workload and VM backup items are permanently deleted.

    • Go to Recovery Services vault → Backup items
    • For each SQL workload and VM backup item:
      • Stop backup
      • Delete backup data
    • All DeleteBackupData jobs must complete successfully

    ProtectionStopped is Not sufficient. Backup data must be permanently deleted.

    Step 2 – Resolve Soft‑Delete blocking:

    Because Soft Delete is enabled, the deleted items remain for 14 days and block unregister by design.

    Choose one option:

    • Option A (Immediate) Temporarily disable Soft Delete, then permanently purge all soft‑deleted items
    • Option B (Passive) Wait until the 14‑day retention expires, after which items are auto‑purged

    Reference: https://learn.microsoft.com/azure/backup/backup-azure-security-feature-cloud

    Step 3 – Clear failed backup jobs:

    Verify there are no failed or active jobs remaining:

    • Recovery Services vault → Backup jobs
    • Ensure DeleteBackupData, Register, and Backup jobs are not failed or in progress

    Unregister is blocked until the vault job state is clean.

    Step 4 – Unregister the AzureWorkload container

    Once all backup data is permanently deleted and no failed jobs remain, unregister succeeds.

    Azure CLI is recommended if the portal previously failed:

    az backup container list </span>
      --backup-management-type AzureWorkload </span>
      --resource-group <VaultRG> </span>
      --vault-name <VaultName>
    az backup container unregister </span>
      --backup-management-type AzureWorkload </span>
      --container-name <ContainerName> </span>
      --resource-group <VaultRG> </span>
      --vault-name <VaultName>
    
    
    • This error is expected Azure Backup behavior.
      Unregistering a Workload in Azure VM fails with an internal error when backup data is soft‑deleted or deletion jobs have failed.
      The fix is to permanently delete all workload and VM backups, purge soft‑deleted items (or wait for retention), clear failed jobs, and then unregister the workload container. Once these conditions are met, the operation succeeds.

    Thanks,

    Suchitra.


Your answer

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