Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
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
languagebash
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
languagebash
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={}