Azure Managed Run Command stuck in Deleting with 409 conflict

Kannan Ramaswamy 0 Reputation points
2026-09-29T11:04:33.8666667+00:00

I have an Azure Windows VM where Managed Run Command operations have become stuck and new Run Command requests fail with HTTP 409 Conflict.

VM: AxiomQuant-Build

Resource group: AXIOMQUANT-RG

OS: Windows Server 2022

Azure Operation Failure Diagnostics reports a Critical Insight for the VirtualMachines_RunCommand_POST operation initiated on September 29, 2026 at 7:38:59 AM UTC:

“run command extension execution is in progress, please wait for completion before invoking a run command.”

The VM is running and the Azure VM Guest Agent is reported as Ready. Agent-health diagnostics report no issues.

A Managed Run Command resource named AxiomQuantRepoLocal became stuck in Deleting. Other Managed Run Command resources have also remained in Creating/Updating states.

Attempts to invoke another Run Command through Azure PowerShell return:

HTTP 409 Conflict

“Run command extension execution is in progress. Please wait for completion before invoking a run command.”

The stale AxiomQuantRepoLocal resource remains in Deleting, and its instance view shows no active execution state or error.

I would like guidance on clearing the stuck Managed Run Command/control-plane operation safely, without restarting, redeploying, resizing, or deleting the VM unless Microsoft specifically determines that one of those actions is required.

Please advise whether this requires backend ARM/Compute cleanup or cancellation of a stale Run Command operation.

Azure Virtual Machines
Azure Virtual Machines

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

0 comments No comments

2 answers

Sort by: Newest
  1. Senthil kumar 2,580 Reputation points
    2026-09-29T11:11:03.44+00:00

    Hi @Kannan Ramaswamy

    Please collect reports from below commands.

    Get-AzVMRunCommand `
     -ResourceGroupName "AXIOMQUANT-RG" `
     -VMName "AxiomQuant-Build"
     
    Get-AzVMRunCommand `
     -ResourceGroupName "AXIOMQUANT-RG" `
     -VMName "AxiomQuant-Build" `
     -RunCommandName "AxiomQuantRepoLocal" `
     -Expand InstanceView
    
    
    
    1. Review Activity Log correlation IDs for:
      • Original RunCommand POST request
      • Delete operation for AxiomQuantRepoLocal
      • Any related Microsoft.Compute operations
    2. Open a Microsoft Azure Support request and explicitly request:
      • Investigation of orphaned Managed Run Command operations
      • Verification of any non-terminal operation held by Microsoft.Compute
      • Backend cancellation/completion of the stale Run Command operation
      • Clearing of any Run Command execution lock preventing subsequent executions
      • Reconciliation of the Managed Run Command child resource stuck in Deleting

    Thanks.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-09-29T11:04:57.73+00:00

    This can require backend cleanup if the Managed Run Command control-plane operation is stuck. The documented self-service actions supported by the context are:

    1. Check whether a Run Command is still reported as active.
      • PowerShell:
             Get-AzVMRunCommand -ResourceGroupName "AXIOMQUANT-RG" -VMName "AxiomQuant-Build"
             Get-AzVMRunCommand -ResourceGroupName "AXIOMQUANT-RG" -VMName "AxiomQuant-Build" -RunCommandName "AxiomQuantRepoLocal" -Expand InstanceView
        
      • This returns the deployed Run Command resources and, with -Expand InstanceView, the latest execution state, output, exit code, and terminal state.
    2. Attempt deletion of the stuck Managed Run Command resource.
      • PowerShell:
             Remove-AzVMRunCommand -ResourceGroupName "AXIOMQUANT-RG" -VMName "AxiomQuant-Build" -RunCommandName "AxiomQuantRepoLocal"
        
      • Azure CLI:
             az vm run-command delete --resource-group AXIOMQUANT-RG --vm-name AxiomQuant-Build --name AxiomQuantRepoLocal --yes
        
      • REST:
             DELETE /subscriptions/<subscriptionId>/resourceGroups/AXIOMQUANT-RG/providers/Microsoft.Compute/virtualMachines/AxiomQuant-Build/runcommands/AxiomQuantRepoLocal?api-version=2023-03-01
        
    3. If the resource remains stuck in Deleting and new requests continue to fail with 409 Conflict, treat it as a stale operation that is not clearing through normal delete.
      • The context includes a case where a stuck Run Command operation in Cancelling was resolved only after backend removal of the stuck operation.
      • That matches the described condition: control-plane state remains blocked even though Guest Agent health is normal and no active execution is visible.
    4. For Windows Run Command troubleshooting, review the extension log on the VM for evidence of an actually running or failed handler operation:
         C:\WindowsAzure\Logs\Plugins\Microsoft.CPlat.Core.RunCommandWindows\<version>\RunCommandExtension.log
      
      Also check for these known blockers:
      • reserved characters such as & in parameters that are not escaped
      • paths containing \n
      • custom HKLM\SOFTWARE\Microsoft\Command Processor\AutoRun settings
    5. If the log does not show an active execution and the delete operation does not clear the resource, the supported next step is Microsoft-side intervention to remove the stale Run Command operation.
      • The context shows that stuck Run Command operations can require backend removal.
      • In that state, further self-service retries are unlikely to succeed while the platform still reports run command extension execution is in progress.
    6. Avoid extension removal unless specifically using it as a troubleshooting step.
      • If needed, the action Run Command Windows extension can be removed and will reinstall automatically on the next Run Command use:
             Invoke-AzVMRunCommand -ResourceGroupName 'AXIOMQUANT-RG' -VMName 'AxiomQuant-Build' -CommandId 'RemoveRunCommandWindowsExtension'
        
      • This is a troubleshooting action, not a documented fix for a stuck Managed Run Command resource in Deleting.

    Based on the described symptoms, the most accurate conclusion is: if AxiomQuantRepoLocal cannot be removed by Remove-AzVMRunCommand, CLI delete, or REST delete, and instance view shows no active execution, this points to a stale Managed Run Command operation that likely requires backend ARM/Compute cleanup or cancellation of the stuck operation.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.