fix(xo-server/Xapi#importDeltaVm): remove transferSize in result
Not necessary and broken since bdb0ca836
This commit is contained in:
@@ -68,10 +68,9 @@ export async function copyVm({ vm, sr }) {
|
||||
console.log('export delta VM...')
|
||||
const input = await srcXapi.exportDeltaVm(vm)
|
||||
console.log('import delta VM...')
|
||||
const { transferSize, vm: copyVm } = await tgtXapi.importDeltaVm(input, {
|
||||
const { vm: copyVm } = await tgtXapi.importDeltaVm(input, {
|
||||
srId: sr,
|
||||
})
|
||||
console.log('transfered size:', transferSize)
|
||||
await tgtXapi.VM_destroy(copyVm.$ref)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -793,7 +793,6 @@ export default class Xapi extends XapiBase {
|
||||
})
|
||||
|
||||
const { streams } = delta
|
||||
let transferSize = 0
|
||||
|
||||
await Promise.all([
|
||||
// Import VDI contents.
|
||||
@@ -802,12 +801,7 @@ export default class Xapi extends XapiBase {
|
||||
if (typeof stream === 'function') {
|
||||
stream = await stream()
|
||||
}
|
||||
const sizeStream = stream.pipe(createSizeStream()).once('finish', () => {
|
||||
transferSize += sizeStream.size
|
||||
})
|
||||
sizeStream.task = stream.task
|
||||
sizeStream.length = stream.length
|
||||
await this._importVdiContent(vdi, sizeStream, VDI_FORMAT_VHD)
|
||||
await this._importVdiContent(vdi, stream, VDI_FORMAT_VHD)
|
||||
}
|
||||
}),
|
||||
|
||||
@@ -851,7 +845,7 @@ export default class Xapi extends XapiBase {
|
||||
),
|
||||
])
|
||||
|
||||
return { transferSize, vm }
|
||||
return { vm }
|
||||
}
|
||||
|
||||
async _migrateVmWithStorageMotion(
|
||||
|
||||
Reference in New Issue
Block a user