fix(xo-server/VM/create): compute quotas from user inputs (#3546)
Fixes #2683
This commit is contained in:
parent
e76603ce7e
commit
37a906a233
@ -20,6 +20,7 @@
|
||||
- [Backups] Fix stuck backups due to broken NFS remotes [#3467](https://github.com/vatesfr/xen-orchestra/issues/3467) (PR [#3534](https://github.com/vatesfr/xen-orchestra/pull/3534))
|
||||
- [New VM] Fix missing cloud config when creating multiple VMs at once in some cases [#3532](https://github.com/vatesfr/xen-orchestra/issues/3532) (PR [#3535](https://github.com/vatesfr/xen-orchestra/pull/3535))
|
||||
- [VM] Fix an error when an admin tried to add a disk on a Self VM whose resource set had been deleted [#2814](https://github.com/vatesfr/xen-orchestra/issues/2814)
|
||||
- [Self/Create VM] Fix some quotas based on the template instead of the user inputs [#2683](https://github.com/vatesfr/xen-orchestra/issues/2683)
|
||||
|
||||
### Released packages
|
||||
|
||||
|
@ -68,10 +68,12 @@ export async function create (params) {
|
||||
const xapi = this.getXapi(template)
|
||||
|
||||
const objectIds = [template.id]
|
||||
const cpus = extract(params, 'CPUs')
|
||||
const memoryMax = extract(params, 'memoryMax')
|
||||
const limits = {
|
||||
cpus: template.CPUs.number,
|
||||
cpus: cpus !== undefined ? cpus : template.CPUs.number,
|
||||
disk: 0,
|
||||
memory: template.memory.dynamic[1],
|
||||
memory: memoryMax !== undefined ? memoryMax : template.memory.dynamic[1],
|
||||
vms: 1,
|
||||
}
|
||||
const vdiSizesByDevice = {}
|
||||
|
Loading…
Reference in New Issue
Block a user