diff --git a/@xen-orchestra/backups/_VmBackup.js b/@xen-orchestra/backups/_VmBackup.js index def616bdbab..def48ed081f 100644 --- a/@xen-orchestra/backups/_VmBackup.js +++ b/@xen-orchestra/backups/_VmBackup.js @@ -243,6 +243,11 @@ class VmBackup { const deltaExport = await exportDeltaVm(exportedVm, baseVm, { fullVdisRequired, }) + // since NBD is network based, if one disk use nbd , all the disk use them + // except the suspended VDI + if (Object.values(deltaExport.streams).some(({ _nbd }) => _nbd)) { + Task.info('Transfer data using NBD') + } const sizeContainers = mapValues(deltaExport.streams, stream => watchStreamSize(stream)) const timestamp = Date.now() diff --git a/packages/vhd-lib/createStreamNbd.js b/packages/vhd-lib/createStreamNbd.js index f8653de0419..ee4984b74b3 100644 --- a/packages/vhd-lib/createStreamNbd.js +++ b/packages/vhd-lib/createStreamNbd.js @@ -105,6 +105,7 @@ exports.createNbdVhdStream = async function createVhdStream(nbdClient, sourceStr const stream = Readable.from(iterator()) stream.length = (offsetSector + blockSizeInSectors + 1) /* end footer */ * SECTOR_SIZE + stream._nbd = true stream.on('error', () => nbdClient.disconnect()) stream.on('end', () => nbdClient.disconnect()) return stream