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.
##[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.
pool:
vmImage: ubuntu-latest # or ubuntu-22.04 / windows-latest / macOS-latestUse name + demands for self-hosted pools
Self-hosted pools select agents by name and demands, not vmImage.
pool:
name: Linux-SelfHosted
demands:
- Agent.OS -equals LinuxHow to prevent it
- Prefer
*-latestimages, or pin to a currently supported version. - Watch the Azure DevOps image-retirement announcements.
- Use
vmImageonly for the hosted pool;name/demandsfor self-hosted.