Unable to define count of CPUs during VM create
-
Dear Community and Vates staff,
I'm trying to automate VM creation using XO REST API, specifically using
/rest/v0/pools/_/actions/create_vmendpoint.
Looks like this endpoint doesn't yet support defining CPU count for the VM. I have XO Community setup in the lab which is compiled from sources. Version is commit c70f9, while writing this it's 9 commits behind master.After searching another topics, I found following, https://xcp-ng.org/forum/post/87887
8 Jan 2025, 18:14
We will try to add support for CPU settings soon.
Also, expect things to accelerate in 2025 regarding the REST API.This sounds awesome, but as we are already over year 2025, would there be any information available when
CPU settingsare available in the REST API ?
Are there any alternative methods available for this need? Previously mentioned Topic mentions JSON RPC but is there any docs available for this interface.Attaching also screenshot of
create_vmendpoint schema from swagger:
Thank you in advance!
Br,
Aki -
@akihu2 Hi.
It appears to be a bug, as the XO6 UI offers the option to choose the number of VCPU when creating a VM (obviously, this doesn't work).
I will fix this immediately. -
Here is the fix for the REST API + XO6
https://github.com/vatesfr/xen-orchestra/pull/9591 -
Wow thank you for super fast response! I did check the XO6 also previously and noticed that it had the option to define VCPU count but it didn't work, this explains it completely

Waiting for merge. I will test and share results here once available.Thanks again!
-
Thank you for the PR merge.
I've tested this and both REST API and XO6 seem to work perfectly.
As this issue is resolved, do I need to close this topic or how does things work here?Br,
Aki
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login