]> git.proxmox.com Git - mirror_qemu.git/blame - include/migration/snapshot.h
Merge tag 'pull-qapi-2023-07-10' of https://repo.or.cz/qemu/armbru into staging
[mirror_qemu.git] / include / migration / snapshot.h
CommitLineData
5e22479a
JQ
1/*
2 * QEMU snapshots
3 *
4 * Copyright (c) 2004-2008 Fabrice Bellard
5 * Copyright (c) 2009-2015 Red Hat Inc
6 *
7 * Authors:
8 * Juan Quintela <quintela@redhat.com>
9 *
10 *
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
13 */
14
15#ifndef QEMU_MIGRATION_SNAPSHOT_H
16#define QEMU_MIGRATION_SNAPSHOT_H
17
f1a9fcdd
DB
18#include "qapi/qapi-builtin-types.h"
19
7ea14df2
PMD
20/**
21 * save_snapshot: Save an internal snapshot.
22 * @name: name of internal snapshot
f781f841 23 * @overwrite: replace existing snapshot with @name
f1a9fcdd
DB
24 * @vmstate: blockdev node name to store VM state in
25 * @has_devices: whether to use explicit device list
26 * @devices: explicit device list to snapshot
7ea14df2
PMD
27 * @errp: pointer to error object
28 * On success, return %true.
29 * On failure, store an error through @errp and return %false.
30 */
f1a9fcdd
DB
31bool save_snapshot(const char *name, bool overwrite,
32 const char *vmstate,
33 bool has_devices, strList *devices,
34 Error **errp);
f61fe11a
DB
35
36/**
37 * load_snapshot: Load an internal snapshot.
38 * @name: name of internal snapshot
f1a9fcdd
DB
39 * @vmstate: blockdev node name to load VM state from
40 * @has_devices: whether to use explicit device list
41 * @devices: explicit device list to snapshot
f61fe11a
DB
42 * @errp: pointer to error object
43 * On success, return %true.
44 * On failure, store an error through @errp and return %false.
45 */
f1a9fcdd
DB
46bool load_snapshot(const char *name,
47 const char *vmstate,
48 bool has_devices, strList *devices,
49 Error **errp);
5e22479a 50
bef7e9e2
DB
51/**
52 * delete_snapshot: Delete a snapshot.
53 * @name: path to snapshot
54 * @has_devices: whether to use explicit device list
55 * @devices: explicit device list to snapshot
56 * @errp: pointer to error object
57 * On success, return %true.
58 * On failure, store an error through @errp and return %false.
59 */
60bool delete_snapshot(const char *name,
61 bool has_devices, strList *devices,
62 Error **errp);
63
5e22479a 64#endif