Hi Fraser,
Thanks for reaching out.
The error you're encountering — "Operation is not allowed since VM has an extension in failed state" — typically occurs when one or more VM extensions are in a Failed or Unknown status. This blocks operations such as migrating the VM to managed disks.
generally, it is safe to remove extensions that are in a Failed or Unknown state, especially if they are not actively used by any monitoring or security solution.
Examples of extensions that are commonly safe to remove if not in use:
LinuxDiagnostic
OmsAgentForLinux
AzureMonitorLinuxAgent
DependencyAgentLinux
CustomScript
However, before removing any extension, please confirm whether your environment depends on features like Microsoft Defender for Cloud, Log Analytics, or Azure Monitor. If those solutions are in place, make sure you don’t remove any required agents.
😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!