libvirt/tools
Benjamin Taubmann a39dd25715 Extend libvirt-guests to shutdown only persistent VMs
At the moment, there is no configuration option for the libvirt-guests
service that allows users to define that only persistent virtual machines
should be shutdown on host shutdown.

Currently, the service config allows to choose between two ON_SHUTDOWN
actions that are executed on running virtual machines when the host goes
down: shutdown, suspend.
The ON_SHUTDOWN action should be orthogonal to the type of the virtual
machine. However, the existing implementation, does not suspend
transient virtual machines.
This is the matrix of actions that is executed on virtual machines based
on the configured ON_SHUTDOWN action and the type of a virtual machine.

         | persistent | transient
shutdown | shutdown   | shutdown (what we want to change)
suspend  | suspend    | nothing

Add config option PERSISTENT_ONLY to libvirt-guests config that allows
users to define if the ON_SHUTDOWN action should be applied only on
persistent virtual machines. PERSISTENT_ONLY can be set to true, false,
default. The default option will implement the already existing logic.

Case 1: PERSISTENT_ONLY=default
         | persistent | transient
shutdown | shutdown   | shutdown
suspend  | suspend    | nothing

Case 2: PERSISTENT_ONLY=true
         | persistent | transient
shutdown | shutdown   | nothing
suspend  | suspend    | nothing

Case 3: PERSISTENT_ONLY=false
         | persistent | transient
shutdown | shutdown   | shutdown
suspend  | suspend    | suspend

Signed-off-by: Benjamin Taubmann <benjamin.taubmann@nutanix.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2024-04-04 09:10:00 +02:00
..
bash-completion
nss
wireshark
libvirt_recover_xattrs.sh
libvirt_win_icon_16x16.ico
libvirt_win_icon_32x32.ico
libvirt_win_icon_48x48.ico
libvirt_win_icon_64x64.ico
libvirt-guests.service.in
libvirt-guests.sh.in Extend libvirt-guests to shutdown only persistent VMs 2024-04-04 09:10:00 +02:00
meson.build
virsh_win_icon.rc
virsh-backup.c
virsh-backup.h
virsh-checkpoint.c
virsh-checkpoint.h
virsh-completer-checkpoint.c
virsh-completer-checkpoint.h
virsh-completer-domain.c
virsh-completer-domain.h
virsh-completer-host.c
virsh-completer-host.h
virsh-completer-interface.c
virsh-completer-interface.h
virsh-completer-network.c
virsh-completer-network.h
virsh-completer-nodedev.c
virsh-completer-nodedev.h
virsh-completer-nwfilter.c
virsh-completer-nwfilter.h
virsh-completer-pool.c
virsh-completer-pool.h
virsh-completer-secret.c
virsh-completer-secret.h
virsh-completer-snapshot.c
virsh-completer-snapshot.h
virsh-completer-volume.c
virsh-completer-volume.h
virsh-completer.c
virsh-completer.h
virsh-console.c
virsh-console.h
virsh-domain-event.c
virsh-domain-event.h
virsh-domain-monitor.c
virsh-domain-monitor.h
virsh-domain.c
virsh-domain.h
virsh-edit.c
virsh-host.c
virsh-host.h
virsh-interface.c
virsh-interface.h
virsh-network.c
virsh-network.h
virsh-nodedev.c
virsh-nodedev.h
virsh-nwfilter.c
virsh-nwfilter.h
virsh-pool.c
virsh-pool.h
virsh-secret.c
virsh-secret.h
virsh-snapshot.c
virsh-snapshot.h
virsh-util.c
virsh-util.h
virsh-volume.c
virsh-volume.h
virsh.c
virsh.h
virt-admin-completer.c
virt-admin-completer.h
virt-admin.c vsh: Replace 'VSH_OFLAG_EMPTY_OK' bitwise flag with a separate struct member 2024-04-02 14:24:30 +02:00
virt-admin.h
virt-host-validate-bhyve.c
virt-host-validate-bhyve.h
virt-host-validate-ch.c
virt-host-validate-ch.h
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-login-shell-helper.c
virt-login-shell.c
virt-login-shell.conf
virt-pki-query-dn.c
virt-pki-validate.in
virt-qemu-qmp-proxy
virt-qemu-sev-validate
virt-sanlock-cleanup.in
virt-xml-validate.in
vsh-table.c
vsh-table.h
vsh.c
vsh.h