xo-cli help
-
Hi, i was messing around xo-cli and I'm kinda stuck with these ones:
- xo-cli vm.create CPUs=1 deploys CPU limits: 1/2. How can i achieve something like CPU limits 2/4 ?
- The same goes with memory. How can i configure min/max static and dynamic memory. I've tried with memory='json:[{"dynamic": [1073741824, 4294967296]}]' but no luck.
- How can i update the SR size/name when deploying from template using custom config? (i'm using the CentOS 8 Cloudinit ready template from XO Hub)
- How can i disable fast_clone checkbox?
Appreciate your help
-
Ping @julien-f
-
- @badrAZ Do you have the answer to this one?
- Use
memoryMin&memoryMax - To alter disks inherited from the template, you must use
existingDisks=json:'{"0": { "name_label": "New name", "$SR": "ddb10e9b-31a4-0354-8816-d3fd992f7fcb" } }'
Where0is the device of the existing disks (in fact the VBD between the VDI and the VM template). clone=json:false
-
Hi,
For the first question, you can use
cpusMaxto set the CPUs limit.xo-cli vm.create cpus=2 cpusMax=4 -
Thanks a lot guys! @julien-f could you provide me an example with memoryMin and memoryMax cuz when I try to run this command:
xo-cli vm.create template="118d4978-a9f9-ec99-52e3-df5e78b004a2" name_label="vmnew1" cloudConfig="centos8-cc" VIFs='json:[{"network":"40f00688-388d-997e-7f1c-12bbdf6134f8"}]' bootAfterCreate=true memoryMin=1073741824 memoryMax=1073741824the output is:
✖ unknown error from the peer JsonRpcError: unknown error from the peer at Peer._callee$ (/usr/local/lib/node_modules/xo-cli/node_modules/json-rpc-peer/dist/index.js:212:17) ..and so onThis works tho if i specify memoryMin or memoryMax only (not both). Also, do these memoryMin and memoryMax refer to the static or dynamic memory? I'm kinda newbie on this one.
@badrAZ after the deployment, when i try to set the cpu, for example:
xo-cli vm.set id=<some_id> CPUs=4i got this error:
✖ invalid parameters property @.CPUs: must be integer, but is stringIf you know anything about this, please let me know.
Thanks! -
It's not obvious but when you get
unknown error from the peeryou can go to the Settings/Logs of the web UI to have a detailed error.Also, for non-string values, like
CPUs, you need to prefix withjson::xo-cli vm.set id=<some_id> CPUs=json:4 -
@julien-f Thanks a lot man! One more thing tho. It seems that i can't use
existingDiskswhen i try to upgrade the VM disk size usingvm.set. It saysinvalid parameter property @: should not contains property ["existingDisks"].@olivierlambert you can close this one tho. Many thanks!
-
@kirovtome Indeed, this param only applies to
vm.create, notvm.set. -
@julien-f and what if i want to update the disk size. Is there any parameter that i can use with
vm.setor is it another command? -
> xo-cli --list-commands vdi.set vdi.set id=<string> [name_label=<string>] [name_description=<string>] [size=<integer|string>] -
B Byte0 referenced this topic on
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