curl example for VM Replication Pause / Resume using REST API #14
ddemlow
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In cases where initial VM replications may take many days - customers may want to selectively or in- mass pause VM replication during business hours to preserve bandwidth and resume replication after hours. I could see this being scripted via powershell and triggered by windows scheduler at appropriate times.
I first got the VirDomain UUID of the VM(s) I wanted to pause replication, then using that I got the /VirDomainReplication UUID(s) that contains that source domain UUID
With that I can PATCH the appropriate /VirDomainReplication/{uuid} with appropriate json to enable or disable replication
This example worked for me using curl " to pause and resume replication of a single VM by changing it's associated VirDomainReplication enable property from true to false and back. the equivalent of clicking the pause button in UI and clicking again to resume replication for that VM.
curl --request PATCH
--url https://10.205.15.70/rest/v1/VirDomainReplication/925452b2-6d5b-4527-a7ae-ef725ac18a54
--header 'accept: application/json'
--header 'authorization: Basic YXBpOnNjYWxl'
--header 'content-type: application/json'
--data '{"enable":false}'
curl --request PATCH
--url https://10.205.15.70/rest/v1/VirDomainReplication/925452b2-6d5b-4527-a7ae-ef725ac18a54
--header 'accept: application/json'
--header 'authorization: Basic YXBpOnNjYWxl'
--header 'content-type: application/json'
--data '{"enable":true}'
Beta Was this translation helpful? Give feedback.
All reactions