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

Lephisto

Well-Known Member
Jun 22, 2019
154
16
58
47
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!