Doing crazy things with Proxmox+Ceph reloaded: Cross pool replication/migration

Lephisto

Well-Known Member
Jun 22, 2019
181
18
58
48
Hi,

since I have to maintain some geographic disjunct locations for Services, I was looking for a possibility to get a nearly migrate VMs across different pools with the least downtime possible. Sure, you can backup to PBS or export and import, but depending on the size of the Images you will face a significant downtime. A second reason was to have a pretty recent Snapshot available ready to start at an offsite Location for DR reasons. Sure, this could somehow be done with ceph mirroring, but many questions like VM Configuration replication remained unanswered. So I put together something I call crossover, that solves this. It currently only works betweek Ceph backed pools, since it heavily relies on RBD Snapshots.

https://github.com/lephisto/crossover/

With this tool you can:
- Make (incremental) online replications of VM's from site/pool-a to site/pool-b.
- Migrate VMs from site/pool-a to site/pool-b with minimum Downtime (First make a full copy, then shut down, then make a incremental copy again, and start on site-b)

Features:
- Incremental Snapshot synchronisation
- Snapshot retention policy for local and remote
- VM Configuration rewrite (adjust pool names or any other changes you need to accomodate the "other" clusters requirements)
- Secure transfer through SSH
- Basic performance metric reporting to InfluxDB. (This is still Work in Progress)

I thought it would be helpful to share this.

regards.
 
@Lephisto your code is great, useful and its more professional code, I had done similar code ,but in very raw form, with option to start DR-setup with protection snapshot for checking the data/VM on DR site, you can check https://github.com/deependhulla/ceph-dr-sync-tool-for-proxmox , might be helpful for you to add same feature in your code. ....and the same time would get your code test on my cluster and would surely promote it . thanks its helpful.