]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Enabled pause-before-switchover migration capability
authorJiri Denemark <jdenemar@redhat.com>
Fri, 20 Oct 2017 08:12:21 +0000 (10:12 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 26 Oct 2017 08:36:02 +0000 (10:36 +0200)
commit32c29f10db3f7e847508564d8d91848f41f43abb
tree26b43511c10814543e9569c90a5f1ce01f2afcd6
parent6addde24bee54f2502a942b6cc4a5e61f5e6ba4a
qemu: Enabled pause-before-switchover migration capability

QEMU identified a race condition between the device state serialization
and the end of storage migration. Both QEMU and libvirt needs to be
updated to fix this.

Our migration work flow is modified so that after starting the migration
we to wait for QEMU to enter "pre-switchover", "postcopy-active", or
"completed" state. Once there, we cancel all block jobs as usual. But if
QEMU is in "pre-switchover", we need to resume the migration afterwards
and wait again for the real end (either "postcopy-active" or
"completed" state).

Old QEMU will just enter either "postcopy-active" or "completed"
directly, which is still correctly handled even by new libvirt. The
"pre-switchover" state will only be entered if QEMU supports it and the
pause-before-switchover capability was enabled. Thus all combinations of
libvirt and QEMU will work, but only new QEMU with new libvirt will
avoid the race condition.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_migration.c