On Wed, Mar 12, 2025 at 17:18:00 +0000, Daniel P. Berrangé wrote:
> The daemons are wired up to shutdown in responsible to UNIX process
> signals, as well as in response to login1 dbus signals, or loss of
> desktop session. The latter two options can optionally preserve state
> (ie running VMs).
> 
> In non-systemd environments, as well as for testing, it would be useful
> to have a way to trigger shutdown with state preservation more directly.
> 
> Thus a new admin protocol API is introduced
> 
>   virAdmConnectDaemonShutdown
> 
> which will trigger a daemon shutdown, and preserve running VMs if the
> VIR_DAEMON_SHUTDOWN_PRESERVE flag is set.
> 
> It has a corresponding 'virt-admin daemon-shutdown [--preserve]' command
> binding.
> 
> Signed-off-by: Daniel P. Berrangé <berra...@redhat.com>
> ---
>  docs/manpages/virt-admin.rst        | 13 +++++++++
>  include/libvirt/libvirt-admin.h     | 13 +++++++++
>  src/admin/admin_protocol.x          | 11 +++++++-
>  src/admin/admin_server_dispatch.c   | 13 +++++++++
>  src/admin/libvirt-admin.c           | 33 +++++++++++++++++++++++
>  src/admin/libvirt_admin_public.syms |  5 ++++
>  tools/virt-admin.c                  | 41 +++++++++++++++++++++++++++++
>  7 files changed, 128 insertions(+), 1 deletion(-)

Reviewed-by: Peter Krempa <pkre...@redhat.com>

Reply via email to