FULL AI ANALYSIS

Duplicate DHCP leases after hypervisor DHCP server restart cause VMs to keep stale IPs post-resume

Generated Oct 3, 2026, 12:35:03 AM

Analysis summary

When a DHCP server's lease database is rotated or corrupted while clients are suspended, the server and client can end up with inconsistent lease state: the client believes it holds a lease while the server's lease file may have duplicate or stale entries. On resume, a client may attempt a renewal that collides with a stale record or triggers server-side re-allocation, causing ARP conflicts and transient loss. Restoring consistency required removing stale dnsmasq lease entries or forcing clients to release/renew. Preventing recurrence involves ensuring lease persistence across restarts and avoiding lease file editing without proper server reload semantics.

Possible causes

dnsmasq lease file rotation or corruption during restart left duplicate entries for same MAC/IP

95%

dnsmasq was restarted without dumping/reading existing leases properly leading to reissued IPs and timestamp mismatches

90%

VMs resumed with unchanged DHCP state while server had reallocated addresses to other MACs

90%

Bridge ARP cache retained stale mappings causing transient conflicts

70%

Suggested fixes

1

Diagnostic step 1

Before maintenance, gracefully stop dnsmasq and back up /var/lib/misc/dnsmasq.leases (or distro-specific path); after restart, restore lease file and restart dnsmasq to preserve mapping. Test in a maintenance window.

2

Diagnostic step 2

Enable persistent static DHCP host entries in dnsmasq configuration for critical VMs using MAC→IP mappings to avoid dynamic reallocation on restart.

3

Diagnostic step 3

When resuming many VMs, stagger resumes and monitor DHCP server logs; consider scripting forced dhclient renewals across guests after dnsmasq reload to sync state.

4

Diagnostic step 4

Deploy a small health-check script that inspects dnsmasq.leases for duplicate MAC/IP entries and logs or fixes them automatically; avoid in-place manual editing of lease files while dnsmasq is running.

5

Diagnostic step 5

If lease corruption is frequent despite precautions, consider running a highly-available DHCP service or move VM networking to an external DHCP appliance; escalate to virtualization/networking team for HA design changes.