Azure Pipelines cancels the job with no valid image label found
Fix it fast
Most common cause, 1 of 2vmImage still names a hosted image that Microsoft has retired
Change the label to one in the current table: ubuntu-24.04 or ubuntu-latest, windows-2025 or windows-2022, macOS-15 or macOS-26.
pool:
vmImage: 'ubuntu-24.04'Short answer
No valid image label found in agent specification means Azure Pipelines could not match the job to a hosted image it still offers. Either vmImage names a retired image (windows-2019, ubuntu-20.04, macOS-13) or a classic pipeline was saved with Agent Specification empty. Set a current label such as ubuntu-24.04. Applies to Azure DevOps Services, November 2026.
Which cause do you have?
List every image label your YAML pipelines ask for. Any value missing from the current table of hosted images is the problem; if nothing turns up and the job comes from a classic pipeline, open its Agent job instead.
grep -rn "vmImage" --include=*.yml --include=*.yaml .Then find the line you see in this list and open its fix:
- 1vmImage still names a hosted image that Microsoft has retired
grep shows a label such as windows-2019, ubuntu-20.04, macOS-13 or macOS-14, and the pipeline last worked months ago - 2A classic pipeline was saved with the Agent Specification left blank
The pipeline is a classic build or release with no vmImage in any YAML file, and recreating it with the same settings sometimes works for a while
What does the error look like?
No valid image label found in agent specificationJob is canceled before any step runs, on the Azure Pipelines pool
Cause 1 of 2
vmImage still names a hosted image that Microsoft has retired
You seegrep shows a label such as windows-2019, ubuntu-20.04, macOS-13 or macOS-14, and the pipeline last worked months ago
Check
Azure Pipelines keeps at most two generally available images per OS family and retires the oldest once a newer one ships. The hosted agents page lists Windows Server 2019 as retired on 31 December 2025, Ubuntu 20.04 as retired and macOS 13 as retired on 4 December 2025, while macOS 14 is scheduled for removal on 23 November 2026. A label for a removed image no longer resolves to any machine.
grep -rnE "vmImage: *'?(windows-2019|ubuntu-20.04|ubuntu-18.04|macOS-13|macOS-14)" --include=*.yml --include=*.yaml .Fix
Change the label to one in the current table: ubuntu-24.04 or ubuntu-latest, windows-2025 or windows-2022, macOS-15 or macOS-26. A pool can be set at pipeline, stage and job level, so update it in every place it appears.
pool:
vmImage: 'ubuntu-24.04'Verify
Queue the pipeline again. The job log now opens with the agent and image details instead of the cancel message.
grep -rn "vmImage" --include=*.yml --include=*.yaml .Confirmed by learn.microsoft.com
Cause 2 of 2
A classic pipeline was saved with the Agent Specification left blank
You seeThe pipeline is a classic build or release with no vmImage in any YAML file, and recreating it with the same settings sometimes works for a while
Check
The runner-images maintainers traced this message to release definitions that had been saved with no Agent Specification at all, even though the team believed an image was picked. Azure DevOps accepted the save, then cancelled each job at queue time because no image was named.
# In the classic editor: Pipelines > Releases (or Builds) > Edit > Agent job > Agent SpecificationFix
Open each Agent job in the definition, select a current image in Agent Specification, save, and create a new release so it uses the saved definition rather than a snapshot of the old one.
# Classic editor, for every Agent job in the definition:
# Agent pool: Azure Pipelines
# Agent Specification: ubuntu-24.04 (or windows-2025, macOS-15)
# Save, then Create releaseVerify
The new release's job gets an agent and its log lists the selected image.
# Open the new release > the stage > job log: the Initialize job step shows the imageConfirmed by github.com
How do I stop it coming back?
- Check the hosted image deprecation schedule each quarter; it gives brownout dates, during which jobs on the old image fail on purpose ahead of removal.
- Name versioned labels such as ubuntu-24.04 in pipelines that must stay stable, and move them in a planned change before a removal date.
- Keep the pool in one YAML template that other pipelines extend, so one edit updates every pipeline.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: Raheeb.