...
Code Block | ||
---|---|---|
| ||
curl -sS -X GET -H "apikey: $ADMIN_APIKEY" https://$API_HOST/v1/base-operator/host/list | \ jq -r '.[]|.uuid' | \ xargs -n 1 -I {} curl -X PUT -H "apikey: $ADMIN_APIKEY" https://$API_HOST/v1/base-operator/admin/host_flags -d uuid={} -d is_accepting_workloads=1 |
Finally, Now start all VMs that were running before.
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={} |
This process will take some time. Some starts might fail, these need investigation, possibly by the VM owner.
Finally, check the current status of VMs in the running_vms.json file.
Code Block | ||
---|---|---|
| ||
cat running_vms.json | jq -r '.[]|.uuid' | \ xargs -n 1 -I {} bash -c \ "curl -sS -X GET -H \"apikey: $ADMIN_APIKEY\" https://$API_HOST/v1/user-resource/admin/vm?uuid={} | jq -r '.uuid+\"\t\"+(.user_id|tostring)+\"\t\"+.status'" |
The result has three columns:
- VM UUID
- User ID
- VM status
Make note of all VMs that do not have status running. Either try to start the VM again, maybe manually from the UI while impersonating the user or send a notification to the user that their VM was unable to start, they should go and have a look. Virtual Console is useful for troubleshooting VM boot issues.