Beispiel #1
0
void migrate_fd_cancel(MigrationState *mig_state)
{
    FdMigrationState *s = migrate_to_fms(mig_state);

    if (s->state == MIG_STATE_CANCELLED) {
        return;
    }

    DPRINTF("cancelling migration\n");

    s->state = MIG_STATE_CANCELLED;
    notifier_list_notify(&migration_state_notifiers);

    if (ft_mode) {
        if (s->file) {
            qemu_ft_trans_cancel(s->file);
        }
        ft_mode = FT_OFF;
        event_tap_unregister();
    }

    if (s->file) {
        qemu_savevm_state_cancel(s->mon, s->file);
        migrate_fd_cleanup(s);
    }
}
Beispiel #2
0
static void migrate_ft_trans_error(FdMigrationState *s)
{
    ft_mode = FT_ERROR;
    qemu_savevm_state_cancel(s->mon, s->file);
    migrate_fd_error(s);
    /* we need to set vm running to avoid assert in virtio-net */
    vm_start();
    event_tap_unregister();
    vm_stop(0);
}