Setting up a self hosted DevOps agent pool
Tags: azure, cicd, devops
Published: 2021-10-16 02:05:08

---
title: Setting up a self hosted DevOps agent pool
published: true
date: 2021-09-27 03:07:00 UTC
tags: azure,CICD,DevOps
canonical_url: https://waiholiu.blogspot.com/2021/09/want-to-use-microsoft-hosted-agent-pool.html
---

  

  

I was setting up a new hobby project and was just setting up my Azure DevOps CI/CD pipeline. When I ran the pipeline the first time, I got this new error. 

> ##[error]No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form https://aka.ms/azpipelines-parallelism-request

  

Bit weird so that I did some googling and I came across this [article ](https://docs.microsoft.com/en-us/azure/devops/pipelines/licensing/concurrent-jobs?view=azure-devops&tabs=ms-hosted)

*We have temporarily disabled the free grant of parallel jobs for public projects and for certain private projects in new organizations. However, you can request this grant by submitting [a request](https://aka.ms/azpipelines-parallelism-request). Existing organizations and projects are not affected. Please note that it takes us 2-3 business days to respond to your free tier requests.*

So that's not cool! Anyway, do what the error says and submit a form at https://aka.ms/azpipelines-parallelism-request and you should get your access in a few days.

If you really can't wait, this is how you set up a self hosted agent pool. This is kind of the same thing except you're doing it on your own desktop.

### **Self Hosted Agent pool**

#### 1. Go to your Organisation DevOps and add a new Agent Pool and pick SelfHosted

  

[![](https://lh3.googleusercontent.com/-4wMXY4m0G6w/YVExbigZaAI/AAAAAAACah0/1GqeSBIQQJ8syUCWA49nFgHynYoawMBqwCLcBGAsYHQ/w616-h331/image.png)](https://lh3.googleusercontent.com/-4wMXY4m0G6w/YVExbigZaAI/AAAAAAACah0/1GqeSBIQQJ8syUCWA49nFgHynYoawMBqwCLcBGAsYHQ/image.png)
  
  
  
  
  
  

#### 2. Once it's created, click on the agent pool

  

[![](https://lh3.googleusercontent.com/-C83K3o8CbSY/YVExlnqQwsI/AAAAAAACaiE/_BDLB1VEC1wkFsjlYCCsXH0kItcd5KL5gCLcBGAsYHQ/w568-h169/image.png)](https://lh3.googleusercontent.com/-C83K3o8CbSY/YVExlnqQwsI/AAAAAAACaiE/_BDLB1VEC1wkFsjlYCCsXH0kItcd5KL5gCLcBGAsYHQ/image.png)
  
  

  

  

  

  

  

  

  

  

  

#### 3. Set up a new agent

#### You should be presented with the following instructions to be completed on your own computer

[![](https://lh3.googleusercontent.com/-qhTacpxfIH4/YVEyJt5OpAI/AAAAAAACaiU/PHzR9vPRh-Y9M6bUUhqFQpRJBgKoCKjVgCLcBGAsYHQ/w513-h557/image.png)](https://lh3.googleusercontent.com/-qhTacpxfIH4/YVEyJt5OpAI/AAAAAAACaiU/PHzR9vPRh-Y9M6bUUhqFQpRJBgKoCKjVgCLcBGAsYHQ/image.png)
  
  

  

#### 4. Unzip the agent zip file and run it

### 5. When you get to config

  

server URL => your DevOps organisation (https://dev.azure.com/wai0211)

authentication type => PAT

  

  

### 6. Generate a Personal Access Token

**Go to DevOps -> Account -> Security -> Personal Access Token**

**[![](https://lh3.googleusercontent.com/-bxQp6pmMKdo/YVEzaPz3grI/AAAAAAACaig/kmp87GIv4BUlQM3l65W7zLbzL00MUbsqQCLcBGAsYHQ/image.png)](https://lh3.googleusercontent.com/-bxQp6pmMKdo/YVEzaPz3grI/AAAAAAACaig/kmp87GIv4BUlQM3l65W7zLbzL00MUbsqQCLcBGAsYHQ/image.png)**

  

  
  

  

  

  

  

  

Configure it by giving the relevant permissions

  

[![](https://lh3.googleusercontent.com/-ICHKTd1_CG4/YVEzwdHKZqI/AAAAAAACaio/kfn-doiMIaYj3wmGn4JCxjz_KIjyWtXoACLcBGAsYHQ/w562-h737/image.png)](https://lh3.googleusercontent.com/-ICHKTd1_CG4/YVEzwdHKZqI/AAAAAAACaio/kfn-doiMIaYj3wmGn4JCxjz_KIjyWtXoACLcBGAsYHQ/image.png)

  

Copy the token and put it into the powershell window

  

Enter the rest of the commands as required

  

[![](https://lh3.googleusercontent.com/-2Y8orS1rc_c/YVE0PjG5gcI/AAAAAAACaiw/b-MKOhLDFHgNCqh2HuLjUV2QHrkCGzhzQCLcBGAsYHQ/w542-h349/image.png)](https://lh3.googleusercontent.com/-2Y8orS1rc_c/YVE0PjG5gcI/AAAAAAACaiw/b-MKOhLDFHgNCqh2HuLjUV2QHrkCGzhzQCLcBGAsYHQ/image.png)
  
  

  
  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

#### 7. Run the pipeline

Make sure you point the pipeline to the new agent pool

  

[![](https://lh3.googleusercontent.com/-IQi9jTbxAb0/YVE0_9GkJmI/AAAAAAACai4/RY6JlUANGzAGIbaCW2cB3-fWDZybp96CgCLcBGAsYHQ/w589-h273/image.png)](https://lh3.googleusercontent.com/-IQi9jTbxAb0/YVE0_9GkJmI/AAAAAAACai4/RY6JlUANGzAGIbaCW2cB3-fWDZybp96CgCLcBGAsYHQ/image.png)