Share via

Migration to Managed Disks Impossible

Gisli Þorvaldsson 0 Reputation points
2026-04-01T12:10:32.75+00:00

We have received an email saying we need to migrate our Azure VMs to managed disks.

However, when we try to migrate to managed disks, we get told:

"Operation is not allowed since VM has an extension in failed state"

This extension is OmsAgentForLinux.

We tried uninstalling from the azure portal, but it timed out and said it did not uninstall successfully. Ever since it has been hanging in state "Transitioning."

We have tried using the Azure CLI and ran:

We get told, after a very long time - maybe half an hour:

Message: Provisioning of VM extension OmsAgentForLinux has timed out. Extension provisioning has taken too long to complete. The extension did not report a message. More information on troubleshooting is available at https://aka.ms/VMExtensionOMSAgentLinuxTroubleshoot

We have then also tried out the purge script (as mentioned in that link) directly on the affected VMs; the purge script executed successfully on both, but still the portal shows OmsAgentForLinux as Transitioning and prevents us from migrating to managed disks.

We need assistance with either:

(1) removing the OmsAgentForLinux extension, or

(2) getting an exception to not need to move to managed disks (we have no intrinsic motivation or need to move to managed disks, and it is blocked by this OmsAgentForLinux nonsense anyway; we are only moving there because Microsoft Azure told us we have to)

<Personal info>

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. Himanshu Shekhar 4,990 Reputation points Microsoft External Staff Moderator
    2026-04-01T13:12:18.16+00:00

    Gisli Þorvaldsson - Azure requires all VM extensions to be in a healthy Provisioning succeeded state before performing operations like converting unmanaged disks to managed disks. If any extension is Failed, Transitioning, or in an inconsistent backend state, Azure blocks the operation with the error:

    Operation is not allowed since VM has an extension in failed state

    This validation occurs at the Azure control plane, and the portal view may not always reflect the internal extension state accurately. Slow Azure VM Start operations when extensions are "Failed" - https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/slow-vm-start-extensions-troubleshooting

    The OmsAgentForLinux purge script only removes the agent binaries from the guest OS. It does not remove or update the VM extension record stored in Azure. As a result, the extension continues to appear as Transitioning in the portal and continues to block disk migration.

    Migration from unmanaged disks to managed disks is mandatory due to the retirement of unmanaged disks. Azure does not support exemptions for remaining on unmanaged disks. - https://docs.azure.cn/en-us/virtual-machines/windows/migrate-to-managed-disks


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.