* [pve-devel] [PATCH pve-network 0/1] Fix duplicate DHCP leases for cloned VMs with same MAC
@ 2025-11-04 12:20 Philippos Giavridis via pve-devel
0 siblings, 0 replies; only message in thread
From: Philippos Giavridis via pve-devel @ 2025-11-04 12:20 UTC (permalink / raw)
To: pve-devel; +Cc: Philippos Giavridis
[-- Attachment #1: Type: message/rfc822, Size: 6411 bytes --]
From: Philippos Giavridis <philippos.g@me.com>
To: pve-devel@lists.proxmox.com
Cc: Philippos Giavridis <philippos.g@me.com>
Subject: [PATCH pve-network 0/1] Fix duplicate DHCP leases for cloned VMs with same MAC
Date: Tue, 4 Nov 2025 12:20:25 +0000
Message-ID: <20251104122026.62228-1-philippos.g@me.com>
This patch fixes an issue where cloned VMs with identical MAC addresses
receive different IP addresses instead of their reserved static DHCP leases.
The current behaviour allows duplicate MAC addresses in the IPAM database,
which leads to unexpected IP assignments. When a VM template with a static
DHCP reservation is cloned and the clone keeps the same MAC address (or
I assign it a NIC with the same MAC), it receives a new dynamic IP rather
than the existing reservation.
This patch adds a check for existing MAC-to-IP mappings before allocating
new addresses, so that VMs with already-registered MAC addresses in IPAM
receive their previously assigned IPs.
The issue was discovered and discussed in the Proxmox forum:
https://forum.proxmox.com/threads/ipam-reserving-dhcp-leases-via-mac-addresses.174704/
I have tested this on PVE 8.4 and 9.0.
Philippos Giavridis (1):
fix: prevent duplicate DHCP leases for identical MAC address
src/PVE/Network/SDN/Subnets.pm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
--
2.43.0
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-04 16:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-04 12:20 [pve-devel] [PATCH pve-network 0/1] Fix duplicate DHCP leases for cloned VMs with same MAC Philippos Giavridis via pve-devel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.