41
votes

I have a Windows VM that hosts a VSTS build agent. Due to the number and length of builds that are running I would like to know whether multiple build agents can be hosted on one computer? That would allow a dedicated agent for slow builds, and a dedicated agent for quick builds.

https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-windows

2

2 Answers

47
votes

Yes you can run multiple agents in a single VM.

Make two directories say Agent1 and Agent2, extract the agent in each one of them and configure them with different names against your VSTS/TFS account.

It should work out of the box.

3
votes

We run 4 agent jobs per machine concurrently with no issues. As mentioned above, should work out of the box. Just make sure you clean up directories. We have a script to do it every night