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

2013-09-03 Thread Alexandre DERUMIER
your patches yet, I need to look a little bit how ressources pool work. - Mail original - De: Dietmar Maurer diet...@proxmox.com À: Alexandre DERUMIER aderum...@odiso.com Cc: pve-devel@pve.proxmox.com Envoyé: Mardi 3 Septembre 2013 06:37:12 Objet: RE: [pve-devel] [PATCH 2/2] setup

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

2013-09-03 Thread Dietmar Maurer
Do you mean, modify bridge configuration ? or change the vm network nic config ? The VM config can change completely, for example use vmbr1 instead of vmbr0. Libvirt do it like this, setup bridges/dhcp/ippool (restart dnsmasq) , and vm get ip through dhcp-config (without restart) I

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

2013-09-03 Thread Dietmar Maurer
ok, so in this case, the ip shouldn't work anymore. (dhcp listen on a different pool of ip on each bridge right? and dhcp need an ip in the range of the pool). The ip is also changed. The pool definition is also allowed to change. So we should deny changing bridge without changing ip.

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

2013-09-03 Thread Alexandre DERUMIER
DERUMIER aderum...@odiso.com Cc: pve-devel@pve.proxmox.com Envoyé: Mardi 3 Septembre 2013 09:55:36 Objet: RE: [pve-devel] [PATCH 2/2] setup DHCP server at vm_start ok, so in this case, the ip shouldn't work anymore. (dhcp listen on a different pool of ip on each bridge right? and dhcp need an ip

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

2013-09-03 Thread Dietmar Maurer
IMHO, IP assignment to VMs is a completely different topic. Ok, I really need to test your patches ;) Yes, but my patches do not anything about IP assignment (you can assign any IP to the VM). It just add a framework to read/write /etc/pve/resource.cfg, using the PVE::SectionConfig

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

2013-09-02 Thread Alexandre DERUMIER
Hi Dietmar, I'm a bit busy today, I'll look at it tomorrow. (for vlan, I think user need to configure manually bridgevlan vmbrXvY in /etc/network/interfaces,It shouldn't break the current implementation. - Mail original - De: Dietmar Maurer diet...@proxmox.com À: Alexandre

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

2013-09-02 Thread Dietmar Maurer
Hi Dietmar, I'm a bit busy today, I'll look at it tomorrow. OK, thanks! (for vlan, I think user need to configure manually bridgevlan vmbrXvY in /etc/network/interfaces,It shouldn't break the current implementation. Maybe - but wanted to mention that this is not tested so far.

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

2013-09-02 Thread Alexandre DERUMIER
+ # 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' I'm thinking if restarting the dnsmasq daemon at each vm start is good ? (what happen if multiple vm

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

2013-09-02 Thread Dietmar Maurer
+ # 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.

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

2013-09-02 Thread Dietmar Maurer
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 And what if bridge or vlan changes? Above only works

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

2013-09-02 Thread Dietmar Maurer
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) Would you like to take over development on that now? I just wonder where we should put the resources