...
Code Block |
---|
|
cat running_vms.json | jq -r '.[]|.uuid' | \
xargs -n 1 -I {} curl -X POST -H "apikey: $ADMIN_APIKEY" https://$API_HOST/v1/...user-resource/admin/vm/stop -d uuid={} |
Check the responses, not all VMs might agree to stop. These must be stopped forcefully.
Code Block |
---|
|
cat running_vms.json | jq -r '.[]|.uuid' | \
xargs -n 1 -I {} curl -X POST -H "apikey: $ADMIN_APIKEY" https://$API_HOST/v1/.../user-resource/admin/vm/stop -d uuid={} -d force=True
|
...
Code Block |
---|
|
cat running_vms.json | jq -r '.[]|.uuid' | \
xargs -n 1 -I {} curl -X POST -H "apikey: $ADMIN_APIKEY" https://$API_HOST/v1/...user-resource/admin/vm/start -d uuid={} |