aboutsummaryrefslogtreecommitdiff
path: root/include/migration/snapshot.h
blob: e72083b117a65addeb0092a9e3085e23db344993 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
 * 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

#include "qapi/qapi-builtin-types.h"

/**
 * save_snapshot: Save an internal snapshot.
 * @name: name of internal snapshot
 * @overwrite: replace existing snapshot with @name
 * @vmstate: blockdev node name to store VM state in
 * @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 save_snapshot(const char *name, bool overwrite,
                   const char *vmstate,
                   bool has_devices, strList *devices,
                   Error **errp);

/**
 * load_snapshot: Load an internal snapshot.
 * @name: name of internal snapshot
 * @vmstate: blockdev node name to load VM state from
 * @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 load_snapshot(const char *name,
                   const char *vmstate,
                   bool has_devices, strList *devices,
                   Error **errp);

/**
 * 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);

#endif