Skip to content

Commit

Permalink
fix(xo-server/Xapi#exportVm): correctly use getRecord
Browse files Browse the repository at this point in the history
Introduced by 6aa5ec6
  • Loading branch information
julien-f committed Mar 26, 2022
1 parent fa6ca01 commit 7830c89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/xo-server/src/xapi/index.mjs
Expand Up @@ -526,8 +526,8 @@ export default class Xapi extends XapiBase {
const useSnapshot = isVmRunning(vm)
const exportedVm = useSnapshot
? await this.getRecord(
await this.VM_snapshot(vm.$ref, { cancelToken: $cancelToken, name_label: `[XO Export] ${vm.name_label}` }),
'VM'
'VM',
await this.VM_snapshot(vm.$ref, { cancelToken: $cancelToken, name_label: `[XO Export] ${vm.name_label}` })
)
: vm

Expand Down Expand Up @@ -582,8 +582,8 @@ export default class Xapi extends XapiBase {
}

vm = await this.getRecord(
await this.VM_snapshot(vm.$ref, { cancelToken: $cancelToken, name_label: snapshotNameLabel }),
'VM'
'VM',
await this.VM_snapshot(vm.$ref, { cancelToken: $cancelToken, name_label: snapshotNameLabel })
)
$defer.onFailure(() => this.VM_destroy(vm.$ref))
}
Expand Down

0 comments on commit 7830c89

Please sign in to comment.