azure-pipelinespower-saving

Initiating VSTS Hosted Build agent in sleep/hibernate mode


I'm using the free visual studio (Now Team Services)

VSTS hosted build by definition needs an always-on box. It's shown with a green box under available agents.

I have a machine at home which I want to run these builds. EVerything works fine when the machine is up and running, I want to know if there is a way to use the box when it's in power saving (sleep/hibernate)?

I can RDP / browse to that box when it's in sleep/hibernate mode it just takes a few seconds to come back up so I need to retry the connection a few times.

Is there a way to:

  1. Force a build agent to be used if it appears offline?
  2. Retry accessing that build agent for x number of minutes (to give it time to wake up) ?

Solution

  • Regarding Hosted Build agent, it isn’t under our control, you can’t log on (RDP/browse) or install new software. It applies the agent automatically when you queue build, so you don’t need to worry sleep/hibernate mode.

    Regarding on premise build agent:

    You can’t force a build agent to be used of it is offline, but you can force to queue build with a queue that there aren’t any agents available (online), the builds are in queue and start to build once there is an agent available (meet capacity).