libvirt: make network-restart script a bit more resilient