qemu: stop NBD server after successful migration

In qemuMigrationFinish mig->nbd can not be initialized by
qemuMigrationEatCookie without the QEMU_MIGRATION_COOKIE_NBD flag.
That causes qemuMigrationStopNBDServer to return early without
stopping the NBD server properly.

Signed-off-by: Weiwei Li <nuonuoli@tencent.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit c3012a023f)
This commit is contained in:
Weiwei Li 2014-11-04 10:52:10 +01:00 committed by Cole Robinson
parent 963d0bb5e6
commit dbc11c4f97

View File

@ -4823,7 +4823,8 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
VIR_FREE(priv->job.completed);
cookie_flags = QEMU_MIGRATION_COOKIE_NETWORK |
QEMU_MIGRATION_COOKIE_STATS;
QEMU_MIGRATION_COOKIE_STATS |
QEMU_MIGRATION_COOKIE_NBD;
if (flags & VIR_MIGRATE_PERSIST_DEST)
cookie_flags |= QEMU_MIGRATION_COOKIE_PERSISTENT;