<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct" -->

---
title: An autoscaling build farm using TeamCity and Windows Azure
description: A step-by-step walkthrough shows how to build an autoscaling TeamCity build agent farm on Windows Azure: creating a sysprepped build agent VM image, cloning it...
canonical: https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: An autoscaling build farm using TeamCity and Windows Azure | daily.dev
og:description: A step-by-step walkthrough shows how to build an autoscaling TeamCity build agent farm on Windows Azure: creating a sysprepped build agent VM image, cloning it...
og:url: https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct
og:image: https://api.daily.dev/og/posts/ToZQbUbct.png
og:image:alt: An autoscaling build farm using TeamCity and Windows Azure
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# An autoscaling build farm using TeamCity and Windows Azure

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 9 min read · 0 upvotes · 0 comments

## Summary

A step-by-step walkthrough shows how to build an autoscaling TeamCity build agent farm on Windows Azure: creating a sysprepped build agent VM image, cloning it into multiple agents under one cloud service with distinct port mappings, authorizing agents in TeamCity, and configuring CPU-based autoscale rules so idle agents shut down and new ones spin up under load, cutting build farm costs. A note at the top points out JetBrains later released an official TeamCity Azure plugin as the now-recommended approach.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2013-08-05-an-autoscaling-build-farm-using-teamcity-and-windows-azure>

## Questions this post answers

### How do I set up autoscaling TeamCity build agents on Windows Azure based on CPU usage?

Create a sysprepped VM image with the TeamCity build agent installed, clone it into multiple VMs under the same cloud service and availability set, map each agent to a distinct external port (9090, 9091, etc.), authorize them in TeamCity, then configure the cloud service's Scale tab to autoscale based on average CPU, setting a target range (e.g. 60-80 for production) and minimum/maximum instance counts.

_daily.dev surfaces practical infrastructure walkthroughs like this for teams tuning CI build capacity against cost._

### Why do all the VMs in an autoscaled Windows Azure build farm need to share the same cloud service?

Autoscaling in Windows Azure can only be configured within a single cloud service, so every build agent VM must belong to the same cloud service and availability set to be scaled together as one pool, sharing one DNS hostname while listening on different external ports for incoming TeamCity traffic.

_daily.dev helps engineers tracking cloud platform constraints like this when designing scalable build infrastructure._

## Similar posts on daily.dev

- [Introducing Warm Agents, a TeamCity Plugin](https://daily.dev/posts/introducing-warm-agents-a-teamcity-plugin-szkmm3jfz) · JetBrains · 0 upvotes · 0 comments
- [Managed DevOps Pools: Scale Agents Without Burning Money — Daily DevOps & .NET](https://daily.dev/posts/managed-devops-pools-scale-agents-without-burning-money-daily-devops-net-4kytogtxv) · Daily DevOps & .NET · 1 upvotes · 0 comments
- [Introducing the new hosted agents in Foundry Agent Service: secure, scalable compute built for agents](https://daily.dev/posts/introducing-the-new-hosted-agents-in-foundry-agent-service-secure-scalable-compute-built-for-agent-0euoil4hi) · DevBlogs · 0 upvotes · 0 comments
- [AWS Image Builder Plugin for TeamCity](https://daily.dev/posts/aws-image-builder-plugin-for-teamcity-p0qtgtsdv) · JetBrains · 0 upvotes · 0 comments
- [Autoscalable GitLab runners on AWS EC2](https://daily.dev/posts/autoscalable-gitlab-runners-on-aws-ec2-myamn1tth) · Palark Blog · 1 upvotes · 0 comments

---

Tags: [#cicd](https://daily.dev/tags/cicd)

[View this post on daily.dev](https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"An autoscaling build farm using TeamCity and Windows Azure","url":"https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct"},"datePublished":"2026-10-04T13:04:55.506Z","dateModified":"2026-10-04T13:07:21.211Z","description":"A step-by-step walkthrough shows how to build an autoscaling TeamCity build agent farm on Windows Azure: creating a sysprepped build agent VM image, cloning it...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3dcf9940317b8a654504d8f9af934f03?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3dcf9940317b8a654504d8f9af934f03?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cicd","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"An autoscaling build farm using TeamCity and Windows Azure"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/an-autoscaling-build-farm-using-teamcity-and-windows-azure-tozqbubct#faq","mainEntity":[{"@type":"Question","name":"How do I set up autoscaling TeamCity build agents on Windows Azure based on CPU usage?","acceptedAnswer":{"@type":"Answer","text":"Create a sysprepped VM image with the TeamCity build agent installed, clone it into multiple VMs under the same cloud service and availability set, map each agent to a distinct external port (9090, 9091, etc.), authorize them in TeamCity, then configure the cloud service's Scale tab to autoscale based on average CPU, setting a target range (e.g. 60-80 for production) and minimum/maximum instance counts. daily.dev surfaces practical infrastructure walkthroughs like this for teams tuning CI build capacity against cost."}},{"@type":"Question","name":"Why do all the VMs in an autoscaled Windows Azure build farm need to share the same cloud service?","acceptedAnswer":{"@type":"Answer","text":"Autoscaling in Windows Azure can only be configured within a single cloud service, so every build agent VM must belong to the same cloud service and availability set to be scaled together as one pool, sharing one DNS hostname while listening on different external ports for incoming TeamCity traffic. daily.dev helps engineers tracking cloud platform constraints like this when designing scalable build infrastructure."}}]}
```

