mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 16:15:23 +00:00
01079727fe
It is already discussed in "[RFC] daemon: remove hardcode dep on libvirt-guests" [1]. Mgmt can use means to save/restore domains on system shutdown/boot other than libvirt-guests.service. Thus we need to specify appropriate ordering dependency between libvirtd, domains and save/restore service. This patch takes approach suggested in RFC and introduces a systemd target, so that ordering can be built next way: libvirtd -> domain -> virt-guest-shutdown.target -> save-restore.service. This way domains are decoupled from specific shutdown service via intermediate target. [1] https://www.redhat.com/archives/libvir-list/2016-September/msg01353.html
25 lines
616 B
SYSTEMD
25 lines
616 B
SYSTEMD
[Unit]
|
|
Description=Suspend/Resume Running libvirt Guests
|
|
Wants=libvirtd.service
|
|
Requires=virt-guest-shutdown.target
|
|
After=network.target
|
|
After=time-sync.target
|
|
After=libvirtd.service
|
|
After=virt-guest-shutdown.target
|
|
Documentation=man:libvirtd(8)
|
|
Documentation=http://libvirt.org
|
|
|
|
[Service]
|
|
EnvironmentFile=-/etc/sysconfig/libvirt-guests
|
|
# Hack just call traditional service until we factor
|
|
# out the code
|
|
ExecStart=@libexecdir@/libvirt-guests.sh start
|
|
ExecStop=@libexecdir@/libvirt-guests.sh stop
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
StandardOutput=journal+console
|
|
TimeoutStopSec=0
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|