Unsolved
3 Posts
0
1170
July 23rd, 2021 00:00
Unable to change vm protection with API
Hi everyone, I'm trying to change the status (ACTIVE to DISABLED) of the protection for a specific virtual machine with RESTful API.
I'm using the Swagger UI of my Plugin-Server to generate and execute the curl request.
When I execute the request I get 204 Validation passed but nothing really happens.
Here's my command:
curl -X PATCH "https://172.17.2.63/api/v1/vms/Sabik?validate-only=false" -H "accept: application/json" -H "authorization: Basic dNNwaGAyZS5sb2NhbFxBZG1pbmlzdlJhdG9yOmh7JTg2M0dpRw==" -H "Content-Type: application/json" -d "{ \"id\": \"dc9d7700-e507-42c4-a2b9-f7859f910755_5031f98a-2bb0-eda9-d6ce-800434468c99\", \"name\": \"Sabik\", \"role\": \"REPLICA\", \"status\": \"DISABLED\" }"
No Events found!
Idan
675 Posts
0
August 24th, 2021 23:00
You need to execute this change (disable or pause) against the CG and not the protected VM.
davide.vieceli
3 Posts
0
September 3rd, 2021 00:00
Hi Idan, can you show me an example of the full command based on my previous informations? I tried to replace the vm name with the cg name but I get a 404 Error vm cg_Sabik not found
The vm name is Sabik and the cg name is cg_Sabik
Idan
675 Posts
0
September 14th, 2021 02:00
curl -X PATCH "https://172.17.2.63/api/v1/groups/cg_Sabik?validate-only=false" -H "accept: application/json" -H "authorization: Basic dNNwaGAyZS5sb2NhbFxBZG1pbmlzdlJhdG9yOmh7JTg2M0dpRw==" -H "Content-Type: application/json"" -d "{ \"id\": \"157715861\", \"transferStatus\": \"PAUSED\"}"
davide.vieceli
3 Posts
0
September 23rd, 2021 00:00
Hi Idan,
I've executed your command and it seems correct as I get a 204 (No content) response.
Unfortunately nothing changes in the corresponding consistency group.