[systemd-devel] Reliable way to finish system units before termination through systemd shutdown / reboot routines

Reindl Harald h.reindl at thelounge.net
Sat Sep 2 16:06:56 UTC 2017



Am 02.09.2017 um 17:11 schrieb Andrei Borzenkov:
> 15.08.2017 17:25, Reiner Wenke пишет:
>> Hello,
>>
>> I have running some virtualbox instances under systemd control and use vboxautostart-service
>> for starting and stopping (saving). This is running on Centos7
>> As long as I use systemctl stop vboxautostart-service for termination, everything is fine,
>> but it takes some time for completion.
>>
>> If I shutdown or reboot the host system, then I get a premature kill of all running instances,
>> most likely through the systemd reboot / shutdown routines .
>> I tried some configuration changes, but nothing worked for me.
>>
>> Is there a reliable way to avoid this behavior?
>>
> 
> It really depends on how VB starts services. My best guess (from
> touching this in the past) is: when stopping VB startup script sends
> request to each VM and exits. For systemd it means VB service has
> completed and it cleans up by killing all remaining processes. You need
> to debug what happens - then someone may come up with suggestion how to
> fix it

just try to suspend guests instead shutdown them via guest-tools

at least on vmware-workstation in that case it exits after the suspend 
is finished while power off via guest-tools is asynchron


More information about the systemd-devel mailing list