-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az vm run-command create doesn't return even the script is finished #28172
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotact-observability-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
I'm running PowerShell scripts on Windows VMs with
az vm run-command create ...command as part of our DevOps pipelines. I'm running those on multiple similar VMs but the command doesn't return randomly on many VMs even though the script has finished on VM. I'm logging the execution and PowerShell script does callexit 0as last step but still the run-command hangs for some reason and eventually times out in DevOps. I can see withaz vm run-command show ...that command is still in"executionState": "Running"and"provisioningState": "Creating"states.Related command
Errors
I don't get errors but the command hangs for over an hour.
I can see the status with separate command:
Issue script & Debug output
Expected behavior
I would expect the
az vm run-command create ...to return quite quickly after the given script is completed.Environment Summary
Additional context
I'm not able to delete the command either so it will block our DevOps pipelines for over an hour before command can be run again. I have also tried to delete the command but that also might take an hour to complete. For example: