Search code examples
azure-devopsazure-devops-hosted-agent

how does Microsoft hosted agent relate to vmImage types?


I am a free tier user of Azure DevOps, as indicated in https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#use-a-microsoft-hosted-agent, each user is entitled to 10 parallel jobs.

when i login to see the available agent in the Azure Pipeline pool, I see the following:

enter image description here

I am just curious, are the agents listed here equivalent to 10 virtual machines? if so, how man of them are windows images? how many mac images? or those are just wild cards and they can be provisioned to be any vmImage type during run time?

thanks!


Solution

  • Or those are just wild cards and they can be provisioned to be any vmImage type during run time?

    Just consider them as wildcards, they can be provisioned to be any vmImage type during queue time.

    Details:

    Azure Devops provides some predefined variables about agent, for me I use this script in CMD task to confirm statements above:

    echo ID: $(Agent.Id)
    echo OS: $(Agent.OS)
    echo Name: $(Agent.Name)
    echo MachineName: $(Agent.MachineName)
    

    We can disable some of those agents and enable part of them, then we can make sure one specific agent is used to run the pipeline. Here's part of the result list:

    enter image description here

    enter image description here

    enter image description here

    So you can consider it as wildcard, those agent can represent any vmImage type. It's not recommended to disable any of those agents in normal situation, it's just for test purpose. Normally if those agents are enabled in Public project, you can easily run ten pipelines(no matter what OS system) at the same time.