Location of xo-cli reference
-
Is there an online reference for xo-cli with examples? I can't find it. I know that xo-cli has help output, but it isn't detailed enough for me to understand fully how to use it.
Here's my specific example:
xo-cli vm.set auto_poweron=true id="f329c1f2-424e-1451-7c61-fee57273e6c4" CPUs=8 memory=17179869184 secureBoot=false ā invalid parameters property @./CPUs: must be integerAfter I create the VM with
xo-cli vm.create, I am trying to set the number of CPUs to 8 and the RAM to 16GB. -
Also more details regarding how vm.createCloudInitConfigDrive works would be good.
The help information from
xo-cli list-commandshas the followingvm.createCloudInitConfigDrive vm=<string> sr=<string> config=<string> [networkConfig=<string>]
Is the string for config and networkConfig supposed to be the id of objects created using
cloudConfig.create?Does the
template=parameter forcloudConfig.createaccept the yaml string for cloud-init? -
Ping @Butcat
-
@olivierlambert I stumbled across this here while searching for something else: https://xcp-ng.org/forum/topic/3671/xo-cli-help/5
I need to specify "json:8" to set the CPUs to 8. I did see the use of the "json:" prefix here (https://docs.xen-orchestra.com/architecture#xo-cli-cli), but the example shows using that prefix for a list rather than a single value. Not to mention that when setting the memory with
vm.set, using "json:" is not required, so I didn't think to try that. I figured it out eventually though. -
Pinging @julien-f maybe

-
@Byte0 The
json:makes the rest of the value interpreted as JSON, otherwise it is interpreted as a plain string. It is therefore required for all non-string values.Some method params (like
memoryforvm.set) accept both integers and strings, that's why it was working.
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