Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for VM Replication Pause / Resume using REST API #3

Open
ddemlow opened this issue Aug 26, 2020 · 0 comments
Open

Example for VM Replication Pause / Resume using REST API #3

ddemlow opened this issue Aug 26, 2020 · 0 comments

Comments

@ddemlow
Copy link
Member

ddemlow commented Aug 26, 2020

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}'

@ddemlow ddemlow changed the title Provide example for VM Replication Pause / Resume using REST API Example for VM Replication Pause / Resume using REST API Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant