In contrast to snapshots the backup job does not complain when the
backup job's store file has backing pre-configured. It's actually
required so that the NBD server exposes all the data properly.
Remove our fake termination and use the existing disk source as backing.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
bool removeStore)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
- g_autoptr(virStorageSource) terminator = NULL;
/* set data structure */
dd->backupdisk = backupdisk;
return -1;
}
- /* install terminator to prevent qemu form opening backing images */
- if (!(terminator = virStorageSourceNew()))
- return -1;
-
if (!(dd->blockjob = qemuBlockJobDiskNewBackup(vm, dd->domdisk, dd->store,
removeStore,
dd->incrementalBitmap)))
return -1;
+ /* use original disk as backing to prevent opening the backing chain */
if (!(dd->crdata = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(dd->store,
- terminator,
+ dd->domdisk->src,
priv->qemuCaps)))
return -1;