Jan Grashöfer
2015-Dec-07 18:20 UTC
Re: [libvirt-users] Destroy autostarted network on shutdown
> autostarting (and autostopping) based on what event?Based on start/shutdown of the host or starting/stopping libvirtd. I just wrote a script to start with systemd but as there is that autostart functionality in libvirtd this might not be the best solution. Regards, Jan
Laine Stump
2015-Dec-07 18:29 UTC
Re: [libvirt-users] Destroy autostarted network on shutdown
On 12/07/2015 01:20 PM, Jan Grashöfer wrote:>> autostarting (and autostopping) based on what event? > Based on start/shutdown of the host or starting/stopping libvirtd. I > just wrote a script to start with systemd but as there is that autostart > functionality in libvirtd this might not be the best solution.networks with autostart set will be started when libvirtd is started if they are seen to be inactive, but they will never be stopped by libvirt. libvirtd is designed so that it can be restarted at any time without disrupting any active guest or network, and doing an auto-shutdown of the network would go against that. Also, when using libvirt's hook scripts, you need to keep in mind that the scripts cannot call back into libvirt (e.g. using virsh) as that would create a deadlock. None of that really answers your question, but hopefully it at least gives you a better idea of what you've got to work with :-)
Jan Grashöfer
2015-Dec-07 19:10 UTC
Re: [libvirt-users] Destroy autostarted network on shutdown
> None of that really answers your question, but hopefully it at least > gives you a better idea of what you've got to work with :-)You are right ;) I guess making my initialization hook fault-tolerant towards missing cleanup plus the systemd script should fit for me. Regards, Jan