mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
79ca7e4e57
I originally postet this into the Fedora bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=843836 Currently gracefully shutting down guest vms on host shutdown does not work on Fedora 17, the guests are killed hard on system shutdown. The reason is systemd considers libvirt-guests.service to be stopped when the system is running: $ systemctl status libvirt-guests.service libvirt-guests.service - Suspend Active Libvirt Guests Loaded: loaded (/usr/lib/systemd/system/libvirt-guests.service; enabled) Active: deactivating (stop) since Fri, 27 Jul 2012 15:47:31 +0200; 2min 48s ago Process: 1085 ExecStart=/etc/init.d/libvirt-guests start (code=exited, status=0/SUCCESS) Control: 1150 (libvirt-guests) CGroup: name=systemd:/system/libvirt-guests.service └ control ├ 1150 /bin/sh /etc/init.d/libvirt-guests stop └ 2257 sleep 1 libvirt-guests.service is defined as type "simple" in systemd (the default). That means systemd will shut down the service when the start executable is terminated after starting is done. Systemd will not call stop again on system shutdown because it thinks it is already stopped. The solution is to define it as type "oneshot" and set the flag "RemainAfterExit". Then systemd will consider the service as active after startup and will call the stop function on host shutdown. |
||
---|---|---|
.. | ||
console.c | ||
console.h | ||
libvirt_win_icon_16x16.ico | ||
libvirt_win_icon_32x32.ico | ||
libvirt_win_icon_48x48.ico | ||
libvirt_win_icon_64x64.ico | ||
libvirt-guests.init.sh | ||
libvirt-guests.service.in | ||
libvirt-guests.sysconf | ||
Makefile.am | ||
virsh_win_icon.rc | ||
virsh-domain-monitor.c | ||
virsh-domain.c | ||
virsh-edit.c | ||
virsh-host.c | ||
virsh-interface.c | ||
virsh-network.c | ||
virsh-nodedev.c | ||
virsh-nwfilter.c | ||
virsh-pool.c | ||
virsh-secret.c | ||
virsh-snapshot.c | ||
virsh-volume.c | ||
virsh.c | ||
virsh.pod | ||
virt-host-validate-common.c | ||
virt-host-validate-common.h | ||
virt-host-validate-lxc.c | ||
virt-host-validate-lxc.h | ||
virt-host-validate-qemu.c | ||
virt-host-validate-qemu.h | ||
virt-host-validate.c | ||
virt-pki-validate.in | ||
virt-sanlock-cleanup.in | ||
virt-xml-validate.in |