vm.create() returns the new VM id.
This commit is contained in:
parent
f572cb5f3e
commit
a1a7cf59b3
@ -41,7 +41,7 @@ create = $coroutine ({
|
||||
vifs: VIFs
|
||||
})
|
||||
|
||||
return vm.id
|
||||
return vm.$id
|
||||
|
||||
create.permission = 'admin'
|
||||
|
||||
|
@ -471,6 +471,9 @@ export default class Xapi extends XapiBase {
|
||||
await this.call('VM.set_VCPUs_at_startup')
|
||||
}
|
||||
|
||||
// Removes any preexisting entry.
|
||||
await this.call('VM.remove_from_other_config', vm.$ref, 'disks').catch(noop)
|
||||
|
||||
// TODO: remove existing VDIs (to make sure there are only those
|
||||
// wanted).
|
||||
//
|
||||
@ -487,9 +490,6 @@ export default class Xapi extends XapiBase {
|
||||
}
|
||||
})
|
||||
|
||||
// Removes any preexisting entry.
|
||||
await this.call('VM.remove_from_other_config', vm.$ref, 'disks').catch(noop)
|
||||
|
||||
await this.call('VM.add_to_other_config', vm.$ref, 'disks', vdisXml)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user