2019-09-19 14:49:21 +00:00
|
|
|
/*
|
|
|
|
* qemu_checkpoint.h: Implementation and handling of checkpoint
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "virconftypes.h"
|
|
|
|
#include "datatypes.h"
|
2019-09-20 11:47:04 +00:00
|
|
|
#include "qemu_conf.h"
|
2019-09-19 14:49:21 +00:00
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *
|
2019-09-19 14:49:21 +00:00
|
|
|
qemuDomObjFromCheckpoint(virDomainCheckpointPtr checkpoint);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainMomentObj *
|
|
|
|
qemuCheckpointObjFromCheckpoint(virDomainObj *vm,
|
2019-09-19 14:49:21 +00:00
|
|
|
virDomainCheckpointPtr checkpoint);
|
|
|
|
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainMomentObj *
|
|
|
|
qemuCheckpointObjFromName(virDomainObj *vm,
|
2019-09-19 14:49:21 +00:00
|
|
|
const char *name);
|
|
|
|
|
2019-09-20 11:47:04 +00:00
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointDiscardAllMetadata(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm);
|
2019-09-20 11:47:04 +00:00
|
|
|
|
2019-09-19 14:49:21 +00:00
|
|
|
virDomainCheckpointPtr
|
|
|
|
qemuCheckpointCreateXML(virDomainPtr domain,
|
2021-03-11 07:16:13 +00:00
|
|
|
virDomainObj *vm,
|
2019-09-19 14:49:21 +00:00
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
|
|
|
|
char *
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointGetXMLDesc(virDomainObj *vm,
|
2019-09-19 14:49:21 +00:00
|
|
|
virDomainCheckpointPtr checkpoint,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointDelete(virDomainObj *vm,
|
2019-09-19 14:49:21 +00:00
|
|
|
virDomainCheckpointPtr checkpoint,
|
|
|
|
unsigned int flags);
|
2019-10-01 13:04:33 +00:00
|
|
|
|
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointCreateCommon(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virDomainCheckpointDef **def,
|
|
|
|
virJSONValue **actions,
|
|
|
|
virDomainMomentObj **chk);
|
2019-10-03 12:35:58 +00:00
|
|
|
|
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointCreateFinalize(virQEMUDriver *driver,
|
|
|
|
virDomainObj *vm,
|
|
|
|
virQEMUDriverConfig *cfg,
|
|
|
|
virDomainMomentObj *chk,
|
2019-10-03 12:35:58 +00:00
|
|
|
bool update_current);
|
2020-01-06 14:03:56 +00:00
|
|
|
|
|
|
|
void
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointRollbackMetadata(virDomainObj *vm,
|
|
|
|
virDomainMomentObj *chk);
|
2020-01-08 09:25:33 +00:00
|
|
|
|
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointDiscardDiskBitmaps(virStorageSource *src,
|
2020-10-22 17:04:18 +00:00
|
|
|
GHashTable *blockNamedNodeData,
|
2020-01-08 09:25:33 +00:00
|
|
|
const char *delbitmap,
|
2021-03-11 07:16:13 +00:00
|
|
|
virJSONValue *actions,
|
2020-01-09 16:34:29 +00:00
|
|
|
const char *diskdst,
|
|
|
|
GSList **reopenimages);
|
2020-11-03 06:51:19 +00:00
|
|
|
|
|
|
|
int
|
2021-03-11 07:16:13 +00:00
|
|
|
qemuCheckpointWriteMetadata(virDomainObj *vm,
|
|
|
|
virDomainMomentObj *checkpoint,
|
|
|
|
virDomainXMLOption *xmlopt,
|
2020-11-03 06:51:19 +00:00
|
|
|
const char *checkpointDir);
|