lejeczek
2015-Nov-05 14:33 UTC
[libvirt-users] how to make dhcrelay service use libvirt's interfaces?
hi everybody in my libvirtd I use bridge with route forward mode, Problem for me is dhcrelay.service on host which is starting before libvirtd thus not listening on libvirt interface. OS is RHEL7. I wonder if you know how to fix it, besides restarting dhcrelay that is. many thanks
Laine Stump
2015-Nov-05 19:01 UTC
Re: [libvirt-users] how to make dhcrelay service use libvirt's interfaces?
On 11/05/2015 09:33 AM, lejeczek wrote:> hi everybody > > in my libvirtd I use bridge with route forward mode, > Problem for me is dhcrelay.service on host which is starting before > libvirtd thus not listening on libvirt interface. > OS is RHEL7. > I wonder if you know how to fix it, besides restarting dhcrelay that is.You could make that happen automatically with a libvirt "network hook": http://libvirt.org/hooks.html You would want to create a hook script in /etc/libvirt/hooks/network that takes action (restarts dhcrelay) when $1 is the network in question, and $2 is "started" (you may also want to take action when $2 is "stopped" just for symmetry). You'll be able to learn the name of the bridge device by examining the XML of the network that your script will receive on stdin. Searching for "network" on the above page will give more details about what is possible.