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 integer
After 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-commands
has 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.create
accept the yaml string for cloud-init? -
Ping @utcat
-
@livierlambert 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 @ulien-f maybe
-
@yte0 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
memory
forvm.set
) accept both integers and strings, that's why it was working.