2017-04-20 14:25:55 +02:00
|
|
|
/*
|
|
|
|
* QEMU snapshots
|
|
|
|
*
|
|
|
|
* Copyright (c) 2004-2008 Fabrice Bellard
|
|
|
|
* Copyright (c) 2009-2015 Red Hat Inc
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Juan Quintela <quintela@redhat.com>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QEMU_MIGRATION_SNAPSHOT_H
|
|
|
|
#define QEMU_MIGRATION_SNAPSHOT_H
|
|
|
|
|
2021-02-04 13:48:30 +01:00
|
|
|
#include "qapi/qapi-builtin-types.h"
|
|
|
|
|
2021-02-04 13:48:24 +01:00
|
|
|
/**
|
|
|
|
* save_snapshot: Save an internal snapshot.
|
|
|
|
* @name: name of internal snapshot
|
2021-02-04 13:48:29 +01:00
|
|
|
* @overwrite: replace existing snapshot with @name
|
2021-02-04 13:48:30 +01:00
|
|
|
* @vmstate: blockdev node name to store VM state in
|
|
|
|
* @has_devices: whether to use explicit device list
|
|
|
|
* @devices: explicit device list to snapshot
|
2021-02-04 13:48:24 +01:00
|
|
|
* @errp: pointer to error object
|
|
|
|
* On success, return %true.
|
|
|
|
* On failure, store an error through @errp and return %false.
|
|
|
|
*/
|
2021-02-04 13:48:30 +01:00
|
|
|
bool save_snapshot(const char *name, bool overwrite,
|
|
|
|
const char *vmstate,
|
|
|
|
bool has_devices, strList *devices,
|
|
|
|
Error **errp);
|
2021-02-04 13:48:25 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* load_snapshot: Load an internal snapshot.
|
|
|
|
* @name: name of internal snapshot
|
2021-02-04 13:48:30 +01:00
|
|
|
* @vmstate: blockdev node name to load VM state from
|
|
|
|
* @has_devices: whether to use explicit device list
|
|
|
|
* @devices: explicit device list to snapshot
|
2021-02-04 13:48:25 +01:00
|
|
|
* @errp: pointer to error object
|
|
|
|
* On success, return %true.
|
|
|
|
* On failure, store an error through @errp and return %false.
|
|
|
|
*/
|
2021-02-04 13:48:30 +01:00
|
|
|
bool load_snapshot(const char *name,
|
|
|
|
const char *vmstate,
|
|
|
|
bool has_devices, strList *devices,
|
|
|
|
Error **errp);
|
2017-04-20 14:25:55 +02:00
|
|
|
|
2021-02-04 13:48:31 +01:00
|
|
|
/**
|
|
|
|
* delete_snapshot: Delete a snapshot.
|
|
|
|
* @name: path to snapshot
|
|
|
|
* @has_devices: whether to use explicit device list
|
|
|
|
* @devices: explicit device list to snapshot
|
|
|
|
* @errp: pointer to error object
|
|
|
|
* On success, return %true.
|
|
|
|
* On failure, store an error through @errp and return %false.
|
|
|
|
*/
|
|
|
|
bool delete_snapshot(const char *name,
|
|
|
|
bool has_devices, strList *devices,
|
|
|
|
Error **errp);
|
|
|
|
|
2017-04-20 14:25:55 +02:00
|
|
|
#endif
|