We have a server (hypervisor) hosting many virtual machines controlled by libvirt. libvirt provides a virtual network for communication between the virtual machines and the hypervisor. This virtual network is established at runtime by libvirtd.service
and called sys-devices-virtual-net-virbr1.device
.
A few services, running on the hypervisor, should be bound to that virtual network, like IMAP, Database and so on.
The problem we face is that the services, running on the hypervisor, are started by systemd before the virtual network is setup and so the startup of the services failed. The current startup order are shown in this graph:
systemd startup order graph
For cases like this there are systemd directives, like
and so on. But they don't help in my case. As far as I understood is the reason for this that the sys-devices-virtual-net-virbr1.device
is created by libvirtd.service
dynamically at runtime and not known to systemd at system startup. So the dependency can't be resolved at startup by systemd, since the sys-devices-virtual-net-virbr1.device
network interface is not known.
Does systemd provides techniques to solve such issues?
Any hint is appreciated.
Thanks.