mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: backup: Configure backup store image with backing file
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>
This commit is contained in:
parent
728b993c8a
commit
d6b994bafd
@ -302,7 +302,6 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
|
|||||||
bool removeStore)
|
bool removeStore)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
g_autoptr(virStorageSource) terminator = NULL;
|
|
||||||
|
|
||||||
/* set data structure */
|
/* set data structure */
|
||||||
dd->backupdisk = backupdisk;
|
dd->backupdisk = backupdisk;
|
||||||
@ -331,17 +330,14 @@ qemuBackupDiskPrepareDataOne(virDomainObjPtr vm,
|
|||||||
return -1;
|
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,
|
if (!(dd->blockjob = qemuBlockJobDiskNewBackup(vm, dd->domdisk, dd->store,
|
||||||
removeStore,
|
removeStore,
|
||||||
dd->incrementalBitmap)))
|
dd->incrementalBitmap)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* use original disk as backing to prevent opening the backing chain */
|
||||||
if (!(dd->crdata = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(dd->store,
|
if (!(dd->crdata = qemuBuildStorageSourceChainAttachPrepareBlockdevTop(dd->store,
|
||||||
terminator,
|
dd->domdisk->src,
|
||||||
priv->qemuCaps)))
|
priv->qemuCaps)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user