fix(Xapi#importVm): remove VM's VDIs on failure
This commit is contained in:
parent
a002958448
commit
603a444905
@ -905,7 +905,7 @@ export default class Xapi extends XapiBase {
|
|||||||
is_a_template: false
|
is_a_template: false
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
$onFailure(() => this._deleteVm(vm))
|
$onFailure(() => this._deleteVm(vm, true))
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this._setObjectProperties(vm, {
|
this._setObjectProperties(vm, {
|
||||||
@ -1149,7 +1149,7 @@ export default class Xapi extends XapiBase {
|
|||||||
VCPUs_max: nCpus
|
VCPUs_max: nCpus
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
$onFailure(() => this._deleteVm(vm))
|
$onFailure(() => this._deleteVm(vm, true))
|
||||||
// Disable start and change the VM name label during import.
|
// Disable start and change the VM name label during import.
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.addForbiddenOperationToVm(vm.$id, 'start', 'OVA import in progress...'),
|
this.addForbiddenOperationToVm(vm.$id, 'start', 'OVA import in progress...'),
|
||||||
|
Loading…
Reference in New Issue
Block a user