[PVE-User] VMs created in rapid succession are assigned the same IPv4 address

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Dec 3 06:19:50 CET 2019


Hey,

On 12/2/19 11:18 PM, Adrian Petrescu wrote:
> Hey all, I have a pretty intriguing issue.
> 
> I'm spinning up VMs through a Terraform provider(https://github.com/Telmate/terraform-provider-proxmox
> if it matters), which goes through the /api2/json endpoints. They are
> all full clones of a simple ubuntu1804 template. Everything is working
> just fine when I spin them up one at a time. The VMs are all just using
> a simple vmbr0 bridge with CIDR 192.168.128.207/16.
> 
> However, if I use `count = N` (with N > 1) to create multiple VMs "at
> once" (I'm using scare quotes because they are still just individual
> calls to `POST /api2/json/nodes/<NODE>/qemu/<ID>/clone` being fired off
> in rapid succession), then once everything comes up, I find that all the
> VMs in that batch were assigned the same IPv4 address, which makes all
> but one of them inaccessible.
> The IPv6 address is different, the MAC addresses are different, and if I
> reboot the VM, the IPv4 address gets reassigned to something unique as
> well, so it's not as if the parameterization is somehow forcing it. If I
> slow the calls down and make them one at a time, everything is fine. So
> it really does seem like the DHCP server has some sort of strange race
> condition that ignores the MAC. But surely any reasonable DHCP
> implementation can deal with such a basic case, so I must be missing
> something.

This really sounds like a bad DHCP, it's the one assigning the same IP
multiple times, which it really shouldn't. What DHCP server do you use?



More information about the pve-user mailing list