I am configuring an internal build system using Teamcity with VMWare vSphere. Once configured, the build server is supposed to start build agent VMs using vSphere API. I've got to a point where TeamCity build server spins up build agent VMs that I need, but there is a problem.
When build server detects that it needs several agent VMs, it spins up VMs very fast, and those VMs tend to get the same IP address in ~80% of the cases. If I start build agents manually with a small pause in between the calls, the VMs get unique IP address.
The same IP addresses result in many networking issues. Here's a screenshot from 2 build agent VMs with the same IP address.
I think vSphere is using Cisco Meraki box that has DHCP service, but I don't have access to it. I've spent a few days trying to narrow this issue down to the screenshot above, but I am not sure where to go from here. I thought DHCP services supposed to handle this situation just fine, but I must have misconfigured this somehow.
My build agent VM is Ubuntu 20.04 LTS, it did not have DHCP pre-configured when I made a snapshot. I did not run any scripts to prepare the image for snapshotting, it's more or less vanilla Ubuntu with docker installed, all our builds are containerised. I am using cloned VMs, not templates.
Could someone please point me in the right direction?