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
|
|
|
|
|
|
|
virDomainObjPtr
|
|
|
|
qemuDomObjFromCheckpoint(virDomainCheckpointPtr checkpoint);
|
|
|
|
|
|
|
|
virDomainMomentObjPtr
|
|
|
|
qemuCheckpointObjFromCheckpoint(virDomainObjPtr vm,
|
|
|
|
virDomainCheckpointPtr checkpoint);
|
|
|
|
|
|
|
|
virDomainMomentObjPtr
|
|
|
|
qemuCheckpointObjFromName(virDomainObjPtr vm,
|
|
|
|
const char *name);
|
|
|
|
|
2019-09-20 11:47:04 +00:00
|
|
|
int
|
|
|
|
qemuCheckpointDiscardAllMetadata(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm);
|
|
|
|
|
2019-09-19 14:49:21 +00:00
|
|
|
virDomainCheckpointPtr
|
|
|
|
qemuCheckpointCreateXML(virDomainPtr domain,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
const char *xmlDesc,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
|
|
|
|
char *
|
|
|
|
qemuCheckpointGetXMLDesc(virDomainObjPtr vm,
|
|
|
|
virDomainCheckpointPtr checkpoint,
|
|
|
|
unsigned int flags);
|
|
|
|
|
|
|
|
int
|
|
|
|
qemuCheckpointDelete(virDomainObjPtr vm,
|
|
|
|
virDomainCheckpointPtr checkpoint,
|
|
|
|
unsigned int flags);
|
2019-10-01 13:04:33 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuCheckpointCreateCommon(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
virDomainCheckpointDefPtr *def,
|
|
|
|
virJSONValuePtr *actions,
|
|
|
|
virDomainMomentObjPtr *chk);
|
2019-10-03 12:35:58 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuCheckpointCreateFinalize(virQEMUDriverPtr driver,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
virQEMUDriverConfigPtr cfg,
|
|
|
|
virDomainMomentObjPtr chk,
|
|
|
|
bool update_current);
|
2020-01-06 14:03:56 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
qemuCheckpointRollbackMetadata(virDomainObjPtr vm,
|
|
|
|
virDomainMomentObjPtr chk);
|
2020-01-08 09:25:33 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuCheckpointDiscardDiskBitmaps(virStorageSourcePtr src,
|
2020-10-22 17:04:18 +00:00
|
|
|
GHashTable *blockNamedNodeData,
|
2020-01-08 09:25:33 +00:00
|
|
|
const char *delbitmap,
|
2020-01-09 13:19:07 +00:00
|
|
|
virJSONValuePtr actions,
|
2020-01-09 16:34:29 +00:00
|
|
|
const char *diskdst,
|
|
|
|
GSList **reopenimages);
|
2020-11-03 06:51:19 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
qemuCheckpointWriteMetadata(virDomainObjPtr vm,
|
|
|
|
virDomainMomentObjPtr checkpoint,
|
|
|
|
virDomainXMLOptionPtr xmlopt,
|
|
|
|
const char *checkpointDir);
|