We have a cloud profile with 2 images in it using vSphere integration.
Most of our builds can be done on the first image and we have a few builds that require the second image. Ideally we'd like to make as much use as possible of our 5 licences so have set the maximum instance count to 5.
The problem here is that if 5 instances of the first image start up then it seems like until we hit the idle timeout teamcity wont terminate any idle instances so that it can start up the other image to complete the other builds. Ideally we'd like to make use of the idle timeout as there are various caches that get populated that would need to be restored each time we spin up a new image so keeping them as long lived as possible is ideal.
Is there a way to get teamcity to terminate say the oldest idle (but potentially hasn't hit the idle timeout) instance if there is another build that requires a different image?