[Obligatory new to Proxmox banner...]
Summary:
Despite a different MAC address a Virtual Bridge on a cloned VM gets the same IP assigned through DHCP. Is this a feature of the cloning process and happening at the guest layer or the virtual bridge layer?
Details:
Proxmox: 8.1.4
Guest OS: FreeBSD 13.2-RELEASE
VMs: all three running from a template built from OS. All have a virtual bridge vmbr1.
VM1 has `dnsmasq` handling DHCP and DNS assignments.
VM2 is unremarkable.
VM3 is a clone of VM2.
Steps (reproduce behavior):
In fact, now that I'm writing this (again, without turning on logging and debugging), I suspect that the cloned state of VM2 gets transferred over to VM3 and despite a different MAC address, the interface or the device stack retains the IP address somewhere and makes a DHCP renew with it versus an entirely new IP request. When I delete the virtual bridge (effectively pulling out a NIC and dropping in a new one), that wipes the slate clean and VM3 requests a new DHCP address. In both cases, the MAC address was different than the original VM2 machine's MAC, so the difference must be a preserved clone's hardware state.
Am I correct in my thinking?
Thank you.
Summary:
Despite a different MAC address a Virtual Bridge on a cloned VM gets the same IP assigned through DHCP. Is this a feature of the cloning process and happening at the guest layer or the virtual bridge layer?
Details:
Proxmox: 8.1.4
Guest OS: FreeBSD 13.2-RELEASE
VMs: all three running from a template built from OS. All have a virtual bridge vmbr1.
VM1 has `dnsmasq` handling DHCP and DNS assignments.
VM2 is unremarkable.
VM3 is a clone of VM2.
Steps (reproduce behavior):
- Run VM2
- VM2(bc:24:11:77:79:63) gets 172.17.0.100 from DHCP server on VM1
- Shutdown VM2
- Clone VM3 from VM2 w/ MAC address auto changed
- VM3 MAC Address is bc:24:11:ab:08:12 (diff than VM2)
- Start VM3, acquires 172.17.0.100 from somewhere (I have not debugged the DHCP log)
- Check DHCP lease database (/var/db/dnsmasq.leases) and there are two entries for same IP, one per MAC
- Same as Steps 1-4
- Delete network device under hardware; recreate with same vmbr1
- Startup VM3
- New IP acquired from DHCP: 172.17.0.101
In fact, now that I'm writing this (again, without turning on logging and debugging), I suspect that the cloned state of VM2 gets transferred over to VM3 and despite a different MAC address, the interface or the device stack retains the IP address somewhere and makes a DHCP renew with it versus an entirely new IP request. When I delete the virtual bridge (effectively pulling out a NIC and dropping in a new one), that wipes the slate clean and VM3 requests a new DHCP address. In both cases, the MAC address was different than the original VM2 machine's MAC, so the difference must be a preserved clone's hardware state.
Am I correct in my thinking?
Thank you.