Job

No hosted parallelism has been purchased or granted Error.

When creating a pipeline in your DevOps some users might get the above error.

Well, there are 2 ways to get rid of it, if one has 2–3 working days of time I recommend raising a request on aka. ms/pipelines-parallelism-request, or else one can create a self-hosted agent.

In this article, we are going to see how to create a self-hosted agent (on your personal system or even on a Virtual Machine).

Simply navigate to your organization settings “Agent pools” > Default> New Agent> Download agent which meets your configuration.

Agent pools

Downloading Agent

Once the agent is downloaded, run PowerShell as admin navigate to C Drive, and run the 1st command i.e. mkdir agent; cd agent.

This will simply create a directory with the name agent and navigate you to the folder.

Now run the 2nd command which will extract the downloaded files in your agent folder.

Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory(
    "$HOME\Downloads\vsts-agent-win-x64-3.243.0.zip",
    "$PWD"
)

Downloaded files

Extracted Files

Configuring Pipelines

Now navigate to organization settings > Agent Pools > Default > Agents, you can see currently your agent is currently in an offline state.

Configuring Pipelines

Agent status

In order to start the agent, run the run command in your agent folder. So in Powershell run the below command.

.\run.cmd

Now you can see your server is listening for the jobs now. Also, the agent will be online now.

CMD

Run command

Note. Some errors one can encounter when setting pipelines.

Open access

No Agent was found in the default pool

To resolve the above error, I had to install Visual Studio Community 2022 on my machine, restart the Machine, and after restart I was able to see the below capabilities in “Organization Settings” > “Agent Pools” > “Default” > “Agents” > “Your Agent” > “capabilities”

Organization Settings

Agent Capabilities

Once the above capabilities are visible, run the pipeline again.