backing chain */
VIR_DOMAIN_BLOCK_COPY_REUSE_EXT = 1 << 1, /* Reuse existing external
file for a copy */
+ VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB = 1 << 2, /* Don't force usage of
+ recoverable job for the
+ copy operation */
} virDomainBlockCopyFlags;
/**
* or virDomainDetachDevice(), while a copy job is active; they may
* also restrict a copy job to transient domains.
*
+ * If @flags contains VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB the job will not be
+ * recoverable if the VM is turned off while job is active. This flag will
+ * remove the restriction of copy jobs to transient domains.
+ *
* The @disk parameter is either an unambiguous source name of the
* block device (the <source file='...'/> sub-element, such as
* "/path/to/image"), or the device target shorthand (the
/* Preliminaries: find the disk we are editing, sanity checks */
virCheckFlags(VIR_DOMAIN_BLOCK_COPY_SHALLOW |
- VIR_DOMAIN_BLOCK_COPY_REUSE_EXT, -1);
+ VIR_DOMAIN_BLOCK_COPY_REUSE_EXT |
+ VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB, -1);
priv = vm->privateData;
cfg = virQEMUDriverGetConfig(driver);
_("block copy is not supported with this QEMU binary"));
goto endjob;
}
- if (vm->persistent) {
+ if (!(flags & VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB) &&
+ vm->persistent) {
/* XXX if qemu ever lets us start a new domain with mirroring
* already active, we can relax this; but for now, the risk of
* 'managedsave' due to libvirt-guests means we can't risk
size_t i;
virCheckFlags(VIR_DOMAIN_BLOCK_COPY_SHALLOW |
- VIR_DOMAIN_BLOCK_COPY_REUSE_EXT, -1);
+ VIR_DOMAIN_BLOCK_COPY_REUSE_EXT |
+ VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB, -1);
if (virTypedParamsValidate(params, nparams,
VIR_DOMAIN_BLOCK_COPY_BANDWIDTH,
VIR_TYPED_PARAM_ULLONG,