Error Id: 28040 | Azure error message: 'Multiple VMExtensions per handler not supported for OS type 'Windows'. VMExtension 'InplaceOSUpgradeCleanUp' with handler 'Microsoft.Compute.CustomScriptExtension' already added or specified in input.'.

Gorav Gandhi 20 Reputation points
2024-03-13T22:59:01.5733333+00:00

I'm using Azure Migrate to migrate and upgrade Windows Server 2016 to 2022. All works fine except the OS Upgrade, which failed with following error:

  • Error ID 28040
  • Error Message An Azure Resource Manager operation failed.
  • Possible causes Azure error message: 'Multiple VMExtensions per handler not supported for OS type 'Windows'. VMExtension 'InplaceOSUpgradeCleanUp' with handler 'Microsoft.Compute.CustomScriptExtension' already added or specified in input.'.
  • Recommendation Please resolve the error and try the operation again.

Is this a known issue and resolution? Thanks

Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
718 questions
{count} votes

Accepted answer
  1. SadiqhAhmed-MSFT 37,686 Reputation points Microsoft Employee
    2024-03-21T18:05:27.1033333+00:00

    "Sharing the solution with broader community"

    There were no other errors. @Gorav Gandhi raised a ticket with MSFT support team and after validating the logs from backend following error was identified:

    "Deletion of custom script extension with name InplaceOSUpgrade of virtual machine XXXX in the resource group XXXX of subscriptionId XXXX failed. | Exception: Azure status code: Forbidden. Arm error code: AuthorizationFailed. Arm error message: The client 'XXXX' with object id 'XXXX' does not have authorization to perform action 'Microsoft.Compute/virtualMachines/extensions/delete' over scope '/subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.Compute/virtualMachines/XXXX/extensions/InplaceOSUpgrade' or the scope is invalid. If access was recently granted, please refresh your credentials..."

    Solution Provided: Please go to subscription > Choose the subscription > Add Role assignment > Contributor/Owner role to the application Hyper-V Recovery Manager . Then re-try test failover.

    Observation:

    • Upgrade was successful after giving permission to this Enterprise application.
    • It is an Enterprise application with type as Microsoft and is a default application in all tenancy.
    • MSFT support team agreed this step is no updated in current public documentation.

    Hope this helps others on this community who may be looking for a solution to this problem.


    If the response helped, do "Accept Answer" and up-vote it

    0 comments No comments

0 additional answers

Sort by: Most helpful