diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 0732614f762e5b5a0578c98ff97bdaf104934f73..d50099cd7fd18ea4cbbf560afc5d547b707adf9c 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2941,8 +2941,9 @@ cleanup: VIR_FORCE_CLOSE(fd); } - cookieFlags |= (QEMU_MIGRATION_COOKIE_PERSISTENT | - QEMU_MIGRATION_COOKIE_NETWORK); + cookieFlags |= QEMU_MIGRATION_COOKIE_NETWORK; + if (flags & VIR_MIGRATE_PERSIST_DEST) + cookieFlags |= QEMU_MIGRATION_COOKIE_PERSISTENT; if (ret == 0 && qemuMigrationBakeCookie(mig, driver, vm, cookieout, cookieoutlen, cookieFlags) < 0) {