[pve-devel] [RFC series pve-network/pve-cluster/qemu-server] DHCP

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Mon Nov 13 16:44:01 CET 2023

Hi Stefan !

On 11/13/23 11:04, Alexandre Derumier wrote:
> I have splitted the ipam add|del , from the dhcp lease reservation.
> The ipam add|del ip is done when creating|deleting vm, or add|del a
> vm nic
> The dhcp reservation is done at vm start.
> The delete of dhcp reservation is done at vm destroy.
> (This can be easily extend for ephemeral ip)
> At vm start, we search ip associated with mac address.

>>Thanks very much, that looks like a very good solution! From what I
>>tell migration would also work with this?

yes sure !  (and also remote migration to another cluster with same
external ipam)

> I have only implemented calls in qemu-server for now

>>Do you plan on checking out pve-container as well? Or should I look
>>into this?

I was waiting comments before doing pve-container, but if you are ok,
no problem,I'll work on it.

I'll try also to improve dnsmasq reload, as we don't always need to
reload it (if nothing change), and maximum once by vm start. (currently
it's always done for each interface)

I don't have tested yet ipv6 with dnsmasq, but the ips are correctly
set in ethers file.

>>I integrated it into my branch and will be giving it a test drive

Thanks. I have spare time theses next 2 weeks for help/fix/bug.

>>I've been working on a UI integration in the meanwhile and it's
>>along quite well although it will need to cook for another day or

I think it also need api to add dhcp-range in subnet, as for external
ipam like netbox, It need to call netbox api to add the ip range.

So, maybe a button in subnet panel :"add dhcp-range", allowing to add
multiple range. 

More information about the pve-devel mailing list