An Azure service that is used to provision Windows and Linux virtual machines.
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:
ApiVersionNotRegisteredforMicrosoft.OffAzure/hypervSiteswith2025-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:
- Remove the blocking resource first
- Open the
migrationresource group. - Locate the
migrationkey7045siteresource of typeMicrosoft.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.
- Open the
- Verify no locks or other blockers on the resource group
- Confirm the
migrationresource group has no resource locks. - Confirm the
migrationkey7045siteresource itself has no lock. - If any locks exist, remove them before retrying deletion.
- Confirm the
- Retry the resource group deletion
- After the
migrationkey7045siteresource is successfully deleted and locks are cleared, delete themigrationresource group again. - Resource Manager will re-evaluate dependencies and delete remaining resources in the correct order.
- After the
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: