fix(vm.create): cloudConfig handling

This commit is contained in:
Julien Fontanet 2016-07-26 14:26:24 +02:00
parent 124cb15ebe
commit 5d346aba37

View File

@ -50,7 +50,7 @@ export default {
const template = this.getObject(templateId)
// Clones the template.
const vm = await this._getOrWaitObject(
let vm = await this._getOrWaitObject(
await this[clone ? '_cloneVm' : '_copyVm'](template, nameLabel)
)
@ -178,6 +178,9 @@ export default {
// TODO: Assign VGPUs.
if (cloudConfig != null) {
// Refresh the record.
vm = this.getObject(vm.$id)
// Find the SR of the first VDI.
let srRef
forEach(vm.$VBDs, vbd => {