[pve-devel] [PATCH 2/2] setup DHCP server at vm_start

Alexandre DERUMIER aderumier at odiso.com
Tue Sep 3 06:32:34 CEST 2013


>>Sure, but where to get that settings? I guess we need to extend the IPPool 
>>to include that information. 
yes, make sense.


>>I would like to avoid any additional complexity (restart is quite easy), unless we run 
>>into a real problem. 
>>
>>Also, how does 'dhcp-script' option helps here? 
with dhcp script, you don't need to restart dnsmasq deamon to change the config, as the dhcp-script can do something like:

#dhcp-script.pl macaddress
  parse vm config files
  return ip


But As you say, I think that client will try to wait around 30s for a dhcp response, so restart could be ok too.
(Just need to avoid parallel restart, and restart only on config change)



----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mardi 3 Septembre 2013 06:19:32 
Objet: RE: [pve-devel] [PATCH 2/2] setup DHCP server at vm_start 

> + # fixme: howto pass gateway for that pool 
> --dhcp-option='option:router,192.168.2.1' 
> 
> + # fixme: howto pass additional dhcp options 
> + 
> --dhcp-option='option:optionnumber,optionvalue' 

Sure, but where to get that settings? I guess we need to extend the IPPool 
to include that information. 

> I'm thinking if restarting the dnsmasq daemon at each vm start is good ? 
> (what happen if multiple vm stop/start at same time, can we loose some 
> dhcp requests?) 

Well, we need to add some lock to avoid parallel restarts. 

But I think it dfoes not matter if we lose a few request (client retries anyways)? 

> Maybe can we restart it only if ressources changes (ip pool, range). 

We can do a diff to see if anything has changed. 

> and use dhcp-script option to give leases without need to restart daemon ? 

I would like to avoid any additional complexity (restart is quite easy), unless we run 
into a real problem. 

Also, how does 'dhcp-script' option helps here? 



More information about the pve-devel mailing list