An Azure service that is used to provision Windows and Linux virtual machines.
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:
- 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.
- PowerShell:
- 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
- PowerShell:
- If the resource remains stuck in
Deletingand new requests continue to fail with409 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
Cancellingwas 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.
- The context includes a case where a stuck Run Command operation in
- For Windows Run Command troubleshooting, review the extension log on the VM for evidence of an actually running or failed handler operation:
Also check for these known blockers:C:\WindowsAzure\Logs\Plugins\Microsoft.CPlat.Core.RunCommandWindows\<version>\RunCommandExtension.log- reserved characters such as
&in parameters that are not escaped - paths containing
\n - custom
HKLM\SOFTWARE\Microsoft\Command Processor\AutoRunsettings
- reserved characters such as
- 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.
- 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.
- If needed, the action Run Command Windows extension can be removed and will reinstall automatically on the next Run Command use:
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: