[libvirt] question about the flow of live migration with non-shared storage in libvirt
eblake at redhat.com
Wed Jan 14 14:55:26 UTC 2015
On 01/14/2015 02:44 AM, Zhang Haoyu wrote:
> Someone can help detail the the flow of live migration with non-shared storage in libvirt?
> Especially, the flow of migration of non-shared storage part?
The code is in src/qemu/qemu_migration.c. Also, read
Libvirt probes whether both source and destination are new enough to
support NBD storage migration as part of the cookies it passes during
the Begin and Prepare phases. When that is the case, the Prepare side
sets up the destination disks, as well as starts an NBD server for each
disk. The Perform side on the source then uses drive-mirror to clone
the contents of the source disk into the destination NBD disks; once
things are in the mirroring stage, then it can proceed with the live
migration. When everything is migrated, the Finish stage then breaks
the drive-mirror syncing (the source no longer needs to push writes),
and the destination side can stop the NBD server (the disk has been
cloned and is ready to use directly). Things get tricky with correct
error handling, and a Confirm phase is required to make sure the source
side cleans up correctly.
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 604 bytes
Desc: OpenPGP digital signature
More information about the libvir-list