How do SDN IPAM plugins assign addresses to VMs?

nett_hier

Member
Mar 27, 2023
18
0
6
I'm new to proxmox and currently looking at the new SDN feature.
According to the docs, it's possible to configure an IPAM plugin to automatically assign IP addresses to VMs or CTs.
How exactly does that assignment work in the case of VMs though? Is there some kind of DHCP server assigning the correct addresses to the VM, or does it work via something like qemu-agent? Or something completely different?
 
Currently, it's not yet implmented.
The ipam plugins are ready, but it's not yet hooked with vm|CT.
The plan is when you choose a vnet in vm|ct nic gui, an ip will be retrieve from ipam.
for ct, it'll be eady.
for vm, cloudinit. (I don't think it's possible through qemu-agent).

Maybe dhcp later, but I'll be difficult for some zone type. (vlan for example), where you need an ip for each subnet on the vnet.
(with evpn it's more easy as you have an anycat ip on each subnet).
Maybe some kind of virtual appliance for dhcp could work. I'm really not sure yet.
 
  • Like
Reactions: nett_hier
Currently, it's not yet implmented.
The ipam plugins are ready, but it's not yet hooked with vm|CT.
The plan is when you choose a vnet in vm|ct nic gui, an ip will be retrieve from ipam.
for ct, it'll be eady.
for vm, cloudinit. (I don't think it's possible through qemu-agent).

Maybe dhcp later, but I'll be difficult for some zone type. (vlan for example), where you need an ip for each subnet on the vnet.
(with evpn it's more easy as you have an anycat ip on each subnet).
Maybe some kind of virtual appliance for dhcp could work. I'm really not sure yet.
Thanks for the answer, cloud-init makes sense. Is there some kind of ETA for the feature already?
 
DHCP support will be great (inside VLAN for example).
So, DHCP support is crucial in an environment where network segmentation is made on an easy way (VLAN). In my case, simple dnsmasq is great for that job. DNS service inside (VLAN) is also welcome.
As i remember on Open Stack it is done in a similar way: dnsmasq instance per segment [inside network namespace].

Maybe this is also an easy way to implement it here.


P.S. Dnsmasq is extremely small and fast and can act as: DHCP, BOOTP, DNS and TFTP server.
 
Last edited:
What about DHCP relay? I've found this, but don't know if it is implemented yet: https://www.openvswitch.org/support/ovscon2023/slides/OVN_DHCP_Relay_Agent.pdf

Anyway an integration with the cloud-init service to get IPs automatically through the IPAM API would be enough.
The code is almost ready.

dhcp relay don't help here because it still need an ip address in the subnet to reply to the vm request.

(We have managed it with a single/same isolated ip on each host )
 
  • Like
Reactions: kmorwath