|
@@ -1422,7 +1422,11 @@ static int postcopy_start(MigrationState *ms, bool *old_vm_running)
|
|
*old_vm_running = runstate_is_running();
|
|
*old_vm_running = runstate_is_running();
|
|
global_state_store();
|
|
global_state_store();
|
|
ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
|
|
ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
|
|
|
|
+ if (ret < 0) {
|
|
|
|
+ goto fail;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ ret = bdrv_inactivate_all();
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
goto fail;
|
|
goto fail;
|
|
}
|
|
}
|
|
@@ -1541,6 +1545,9 @@ static void migration_completion(MigrationState *s, int current_active_state,
|
|
|
|
|
|
if (!ret) {
|
|
if (!ret) {
|
|
ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
|
|
ret = vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
|
|
|
|
+ if (ret >= 0) {
|
|
|
|
+ ret = bdrv_inactivate_all();
|
|
|
|
+ }
|
|
if (ret >= 0) {
|
|
if (ret >= 0) {
|
|
qemu_file_set_rate_limit(s->file, INT64_MAX);
|
|
qemu_file_set_rate_limit(s->file, INT64_MAX);
|
|
qemu_savevm_state_complete_precopy(s->file, false);
|
|
qemu_savevm_state_complete_precopy(s->file, false);
|