
On Tue, Jun 06, 2017 at 16:46:14 +0200, Peter Krempa wrote:
Allow starting the block-copy job for a persistent domain if a user declares by using a flag that the job will not be recovered if the VM is switched off while the job is active.
This allows to use the block-copy job with persistent VMs under the same conditions as would apply to transient domains. --- include/libvirt/libvirt-domain.h | 3 +++ src/libvirt-domain.c | 3 +++ src/qemu/qemu_driver.c | 9 ++++++--- 3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 720db32f7..45f939a8c 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -2428,6 +2428,9 @@ typedef enum { 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;
/** diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 310b91b37..6726a5120 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -10027,6 +10027,9 @@ virDomainBlockRebase(virDomainPtr dom, const char *disk, * or virDomainDetachDevice(), while a copy job is active; they may * also restrict a copy job to transient domains.
I think a short note saying the restriction can be lifted by using the new flag if the user is willing to accept the limitation you described below.
* + * If @flags contains VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB the job will not be + * recoverable if the VM is turned of while job is active.
s/of/off/ ACK Jirka