diff --git a/src/api/vm.coffee b/src/api/vm.coffee index 79a66962a..426d198b2 100644 --- a/src/api/vm.coffee +++ b/src/api/vm.coffee @@ -480,7 +480,7 @@ set = $coroutine (params) -> if auto_poweron yield xapi.call 'VM.add_to_other_config', ref, 'auto_poweron', 'true' - yield xapi.setPoolProperties({autoPowerOn: true}) + yield xapi.setPoolProperties({autoPoweron: true}) else yield xapi.call 'VM.remove_from_other_config', ref, 'auto_poweron' diff --git a/src/xapi.js b/src/xapi.js index b6a66f824..6f0aeb8c2 100644 --- a/src/xapi.js +++ b/src/xapi.js @@ -408,8 +408,8 @@ export default class Xapi extends XapiBase { nameLabel, nameDescription }), - this._updateObjectMapProperty(pool, 'other_config', { - autoPoweron + autoPoweron != null && this._updateObjectMapProperty(pool, 'other_config', { + autoPoweron: autoPoweron ? 'on' : null }) ]) }