API command create-system option to assign vcpu

how to set the amount of vcpu using API on Xen virtual system creation?

i tried using --xen-cpu 300 (on 4 cores host) but it didn't assign 3 core on the virtual system. there is no vcpu = 3 config inside the .cfg

but when i modify it from cloudmin web interface "Manage Virtual CPUs" it does add vcpu = 3 in the .cfg file

Status: 
Closed (fixed)

Comments

The --xen-cpu flag is followed by the percentage of a core than the VM can use. However, if you want to assign multiple VCPUs this cannot be done at creation time - instead you need to use a separate API call like cloudmin modify-limits --host yourvm --vcpus 3

is there any reason why this can't be done on creation time? because it's simply adding vcpu tag in the .cfg file

Sure, I will add this in the next release (via the --xen-vcpus flag)

Automatically closed -- issue fixed for 2 weeks with no activity.