fix(xo-server/backupNg.importVmBackup): do not try to detect base VM

This commit is contained in:
Julien Fontanet 2018-03-16 17:30:42 +01:00
parent 39d7b4c7bd
commit d34f641130
2 changed files with 13 additions and 9 deletions

View File

@ -919,6 +919,7 @@ export default class Xapi extends XapiBase {
delta: DeltaVmExport, delta: DeltaVmExport,
{ {
deleteBase = false, deleteBase = false,
detectBase = true,
disableStartAfterImport = true, disableStartAfterImport = true,
mapVdisSrs = {}, mapVdisSrs = {},
name_label = delta.vm.name_label, name_label = delta.vm.name_label,
@ -931,8 +932,9 @@ export default class Xapi extends XapiBase {
throw new Error(`Unsupported delta backup version: ${version}`) throw new Error(`Unsupported delta backup version: ${version}`)
} }
const remoteBaseVmUuid = delta.vm.other_config[TAG_BASE_DELTA]
let baseVm let baseVm
if (detectBase) {
const remoteBaseVmUuid = delta.vm.other_config[TAG_BASE_DELTA]
if (remoteBaseVmUuid) { if (remoteBaseVmUuid) {
baseVm = find( baseVm = find(
this.objects.all, this.objects.all,
@ -944,6 +946,7 @@ export default class Xapi extends XapiBase {
throw new Error('could not find the base VM') throw new Error('could not find the base VM')
} }
} }
}
const baseVdis = {} const baseVdis = {}
baseVm && baseVm &&

View File

@ -212,6 +212,7 @@ const importers: $Dict<
} }
const { vm: newVm } = await xapi.importDeltaVm(delta, { const { vm: newVm } = await xapi.importDeltaVm(delta, {
detectBase: false,
disableStartAfterImport: false, disableStartAfterImport: false,
srId: sr, srId: sr,
// TODO: support mapVdisSrs // TODO: support mapVdisSrs