"Live" migration with zfs

FinnTux

Renowned Member
Aug 4, 2011
54
0
71
Hello,

Now that we have zfs in proxmox (and just announced zfs sync tool) I've been toying with the idea of migrating VMs using zfs send/receive.

Here's the basic idea:
1. Snapshot VM
2. Do initial send to the target host
3. Suspend VM
4. Do final send/receive
5. Transfer VM config
6. Start VM on target host suspended.
7. Transfer VM state to the target host
8. Kill VM on source host
9. Load transferred state and resume VM on target host
10. Clean up snapshots and configs

What if VM image is large and changes a lot during initial send? It could be snapshotted again after initial send and then send incremental snapshot. This way final sync wouldn't take long and VM would be suspended only short time.

VM snapshots (taken in GUI or CLI) should be transferred also but I guess it should be doable.



SR
 
live migration is a QEMU feature - currently we need shared/distributed storage but it can also work in future with local storage - storage migration (with any local storage). so I see no reason why we should limit such a feature to ZFS only.
 
I was thinking about zfs incremental snapshots. Initial syncing, which could take quite a long time, could be done while VM is still running on source host. VM would be down only during incremental send/receive. Or could this be achieved using, for example, rsync?

SR
 
1.) You can use Flocker for this.
https://docs.clusterhq.com/en/1.0.2/introduction/index.html
https://github.com/ClusterHQ/flocker

2.)
The step "3. Suspend VM" should not be the third step.
You transfer changed data again and again up to the time
for the transfer is for example less 100ms.
This time you also transfer the used Ram of the VM.
Then you suspend the VM and restart it on a different
server in way less than a second.

3.) This works even faster with an LXC container.
 

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!