[libvirt] question about the flow of live migration with non-shared storage in libvirt

Eric Blake eblake at redhat.com
Wed Jan 14 14:55:26 UTC 2015

On 01/14/2015 02:44 AM, Zhang Haoyu wrote:
> Hi,
> 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...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150114/8ebced1a/attachment-0001.sig>

More information about the libvir-list mailing list