Skip to content
Latchkey

Azure Pipelines "vmImage" Deprecated / Image Not Found

A vmImage label was deprecated and removed by Microsoft (e.g. ubuntu-18.04, vs2017-win2016, macOS-10.15), or vmImage was set on a self-hosted pool where it has no meaning. The job cannot pick a hosted image.

What this error means

The run fails to start with a message that the image is deprecated/unrecognized, or it ignores vmImage on a name:-based self-hosted pool. New runs break even though the YAML did not change - the image label was retired.

Azure DevOps
##[error]The image 'ubuntu-18.04' is deprecated and has been removed.
Use 'ubuntu-latest' or a supported image label.

Common causes

Retired hosted image label

Microsoft removes old images on a schedule. A pipeline pinned to a retired label (ubuntu-18.04, windows-2016, macOS-10.15) stops scheduling until you move to a supported image.

vmImage on a self-hosted pool

vmImage only applies to the Microsoft-hosted Azure Pipelines pool. On a self-hosted pool referenced by name:, vmImage is ignored or invalid - use demands instead.

How to fix it

Move to a supported hosted image

Use a current label (or *-latest) for the Microsoft-hosted pool.

azure-pipelines.yml
pool:
  vmImage: ubuntu-latest   # or ubuntu-22.04 / windows-latest / macOS-latest

Use name + demands for self-hosted pools

Self-hosted pools select agents by name and demands, not vmImage.

azure-pipelines.yml
pool:
  name: Linux-SelfHosted
  demands:
    - Agent.OS -equals Linux

How to prevent it

  • Prefer *-latest images, or pin to a currently supported version.
  • Watch the Azure DevOps image-retirement announcements.
  • Use vmImage only for the hosted pool; name/demands for self-hosted.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →