fix(xo-server/backupNg.importVmBackup): do not try to detect base VM
This commit is contained in:
parent
39d7b4c7bd
commit
d34f641130
@ -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 &&
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user