Share via

unable to delete resourse group

sathish kumar yegireddi 0 Reputation points
2026-03-28T16:51:16.4866667+00:00

unable to delete recourse group.

errror
Failed to delete resource group migration: Deletion of resource group 'migration' failed as resources with identifiers 'Microsoft.OffAzure/HyperVSites/migrationkey7045site' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is . Please check audit logs for more details. (Code: ResourceGroupDeletionBlocked) The ApiVersion '2025-12-12-preview' is not registered for ResourceType 'Microsoft.OffAzure/hypervSites'. Valid Api Versions are: '2018-05-01-preview' '2019-06-06' '2020-01-01' '2020-08-01-preview' '2022-10-27' '2023-06-06' '2024-05-01-preview' '2024-07-01-preview' '2024-12-01-preview'. (Code: ApiVersionNotRegistered,

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-28T16:55:11.4833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Deletion of the migration resource group is failing because Azure Resource Manager can’t successfully delete one of its resources:

    Microsoft.OffAzure/HyperVSites/migrationkey7045site

    When any resource delete fails, the overall resource group delete is blocked and rolled back (ResourceGroupDeletionBlocked). In this case, the failing operation is also using an invalid API version for that resource type.

    Key details from the error:

    • Resource group delete error: ResourceGroupDeletionBlocked.
    • Blocking resource: /subscriptions/.../resourceGroups/migration/providers/Microsoft.OffAzure/HyperVSites/migrationkey7045site.
    • API version error: ApiVersionNotRegistered for Microsoft.OffAzure/hypervSites with 2025-12-12-preview.
    • Only the listed API versions are valid for this resource type.

    Azure Resource Manager behavior:

    • A resource group delete issues DELETE calls for each resource in a dependency-aware order.
    • If any resource delete fails (for example, due to invalid API version, locks, or dependencies), the resource group delete fails and is rolled back.

    To resolve and delete the resource group:

    1. Remove the blocking resource first
      • Open the migration resource group.
      • Locate the migrationkey7045site resource of type Microsoft.OffAzure/HyperVSites.
      • Delete this resource directly using a supported API version (for example, via portal or tooling that uses one of the valid API versions listed in the error).
      • Ensure there are no resource locks or dependent resources preventing its deletion.
    2. Verify no locks or other blockers on the resource group
      • Confirm the migration resource group has no resource locks.
      • Confirm the migrationkey7045site resource itself has no lock.
      • If any locks exist, remove them before retrying deletion.
    3. Retry the resource group deletion
      • After the migrationkey7045site resource is successfully deleted and locks are cleared, delete the migration resource group again.
      • Resource Manager will re-evaluate dependencies and delete remaining resources in the correct order.

    If deletion still fails, use the tracking ID from the error in the activity/audit logs to identify any additional resources or conditions blocking deletion, then repeat the same approach: remove or fix the specific failing resource, then retry the resource group delete.


    References:

    0 comments No comments

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.