First time here? Check out the FAQ!
![]() | 1 | initial version |
I eventually got this to work:
I created a file pause.json which looks like the following:
{"pause":null}
I then issued the following command:
curl -i http://<controllernode>:8774/v2/<TENANT_ID>/servers/<VM_ID>/action -X POST -H "Content-Type: application/json" -H "X-Auth-Project-Id:<PROJECTNAME>" -H "X-Auth-Token: <TOKEN_ID>" -H "Accept: application/json" -T pause.json
This ended up pausing my VM. I think the Key here was to include H "Accept: application/json" on the command line
curl -i http://<controllernode>:8774/v2/<tenant_id>/servers/<vm_id>/action -X POST -H "Content-Type: application/json" -H "X-Auth-Project-Id:<projectname>" -H "X-Auth-Token: <token_id>" -H "Accept: application/json" -T pause.json
The -H "X-Auth-Project-Id:<projectname>" is optional in this case.
If you do not wish to call a file, you can replace -T pause.json
with -d '{"pause":null}'
Note: use unpause to resume your server