Lines Matching full:migration
2 * QEMU live migration
20 #include "migration/blocker.h"
30 #include "migration/global_state.h"
31 #include "migration/misc.h"
32 #include "migration.h"
33 #include "migration-stats.h"
37 #include "migration/vmstate.h"
41 #include "qapi/qapi-visit-migration.h"
43 #include "qapi/qapi-commands-migration.h"
44 #include "qapi/qapi-events-migration.h"
54 #include "migration/colo.h"
97 dynamic creation of migration */
189 error_setg(errp, "Migration requires seekable transport (e.g. file)"); in migration_channels_and_transport_compatible()
195 error_setg(errp, "Migration requires multi-channel URIs (e.g. tcp)"); in migration_channels_and_transport_compatible()
202 "Migration requires a transport that allows for extra fds (e.g. file)"); in migration_channels_and_transport_compatible()
328 * COLO thread before migration shutdown. in migration_shutdown()
332 * Cancel the current migration - that will (eventually) in migration_shutdown()
333 * stop the migration using this structure in migration_shutdown()
339 * Cancel outgoing migration of dirty bitmaps. It should in migration_shutdown()
345 * Cancel incoming migration of dirty bitmaps. Dirty bitmaps in migration_shutdown()
433 * of the migration.
547 error_report("ENABLE_COLO command come in migration stream, but the " in migration_incoming_enable_colo()
553 error_report("ENABLE_COLO command come in migration stream, but x-colo " in migration_incoming_enable_colo()
619 error_setg(errp, "unknown migration protocol: %s", uri); in migrate_uri_parse()
636 * Incoming postcopy migration will stay in PAUSED state even if in migration_incoming_state_setup()
643 error_setg(errp, "Illegal migration incoming state: %s", in migration_incoming_state_setup()
685 /* transport mechanism not suitable for migration? */ in qemu_start_incoming_migration()
720 error_setg(errp, "unknown migration protocol: %s", uri); in qemu_start_incoming_migration()
813 * Where a migration had postcopy enabled (and thus went to advise) in process_incoming_migration_co()
830 error_setg(&local_err, "load of migration failed: %s", strerror(-ret)); in process_incoming_migration_co()
860 * migration_incoming_setup: Setup incoming migration
861 * @f: file for main migration channel
879 /* Returns true if recovered from a paused migration, otherwise false */
885 /* Resumed from a paused postcopy migration */ in postcopy_try_recover()
922 * Returns true when we want to start a new incoming migration process,
938 * For all the rest types of migration, we should only reach here when in migration_should_start_incoming()
964 * postcopy live migration. Also tls live migration already does in migration_ioc_process_incoming()
1016 * we need for migration.
1236 * There are two types of reasons a migration might be blocked; in fill_source_migration_info()
1238 * b) Explicit migration blockers in fill_source_migration_info()
1252 /* no migration has happened ever */ in fill_source_migration_info()
1253 /* do not overwrite destination migration status */ in fill_source_migration_info()
1356 " the start of migration"); in qmp_migrate_start_postcopy()
1361 error_setg(errp, "Postcopy must be started after migration has been" in qmp_migrate_start_postcopy()
1366 * we don't error if migration has finished since that would be racy in qmp_migrate_start_postcopy()
1372 /* shared migration helpers */
1488 /* Never fail a postcopy migration; switch back to PAUSED instead */ in migrate_fd_error()
1496 error_report("%s: Illegal migration status (%s) detected", in migrate_fd_error()
1523 /* If the migration is paused, kick it out of the pause */ in migrate_fd_cancel()
1531 * If we're unlucky the migration code might be stuck somewhere in a in migrate_fd_cancel()
1677 * Reinitialise all migration state, except in migrate_init()
1705 * set mig_stats memory to zero for a new migration in migrate_init()
1720 "disallowing migration blocker " in is_busy()
1721 "(migration/snapshot in progress) for: "); in is_busy()
1734 "disallowing migration blocker " in is_only_migratable()
1827 error_setg(errp, "The incoming migration has already been started"); in qmp_migrate_incoming()
1874 * Note that this call will never start a real migration; it will in qmp_migrate_recover()
1875 * only re-setup the migration stream and poke existing migration in qmp_migrate_recover()
1891 /* Tell the core migration that we're pausing */ in qmp_migrate_pause()
1892 error_setg(&error, "Postcopy migration is paused by the user"); in qmp_migrate_pause()
1902 error_setg(errp, "Failed to pause source migration"); in qmp_migrate_pause()
1906 * Kick the migration thread out of any waiting windows (on behalf in qmp_migrate_pause()
1917 error_setg(errp, "Failed to pause destination migration"); in qmp_migrate_pause()
1948 "paused migration"); in migrate_prepare()
1959 * the client from resuming such a postcopy migration. in migrate_prepare()
1978 error_setg(errp, "There's a migration process in progress"); in migrate_prepare()
1983 error_setg(errp, "Guest is waiting for an incoming migration"); in migrate_prepare()
1989 "previous migration"); in migrate_prepare()
2074 /* transport mechanism not suitable for migration? */ in qmp_migrate()
2110 "a valid migration protocol"); in qmp_migrate()
2134 error_setg(errp, "Migration not in expected state: %s", in qmp_migrate_continue()
2143 /* If migration has failure already, ignore the wait */ in migration_rp_wait()
2421 * period the main migration thread can be waiting on rp_sem for in source_return_path_thread()
2424 * When this happens, explicitly kick the migration thread out of in source_return_path_thread()
2577 * it starts processing it. Unfortunately the ad-hoc migration format in postcopy_start()
2585 qio_channel_set_name(QIO_CHANNEL(bioc), "migration-postcopy-buffer"); in postcopy_start()
2610 error_setg(errp, "postcopy_start: Migration stream errored (pre package)"); in postcopy_start()
2647 error_setg_errno(errp, -ret, "postcopy_start: Migration stream error"); in postcopy_start()
2700 * If the migration is cancelled when it is in the completion phase, in migration_maybe_pause()
2701 * the migration state is set to MIGRATION_STATUS_CANCELLING. in migration_maybe_pause()
2741 * to remember to reactivate them if migration fails or is cancelled. in migration_completion_precopy()
2800 * @s: Current migration state
2844 error_setg_errno(&local_err, -ret, "Error in migration completion"); in migration_completion()
2856 * @s: Current migration state
2864 * By this moment we have RAM content saved into the migration stream. in bg_migration_completion()
2921 * ready for the migration resume. in postcopy_do_resume()
2959 * postcopy migration. Returns MIG_THR_ERR_RECOVERED if recovered, or
2979 * modified by the migration thread. That also guarantees that the in postcopy_pause()
2999 "Migration paused."); in postcopy_pause()
3053 /* End the migration, but don't set the state to failed */ in migration_detect_error()
3090 /* Time to stop the migration, now. */ in migration_detect_error()
3205 /* Migration thread iteration status */
3408 * migration has been canceled in qemu_savevm_wait_unplug()
3417 warn_report("migration: partially unplugged device on " in qemu_savevm_wait_unplug()
3429 * Master migration thread on the source VM.
3430 * It drives the migration and pumps the data down the outgoing channel.
3479 /* Notify migration destination that we enable COLO */ in migration_thread()
3497 * devices to unplug. This to preserve migration state transitions. in migration_thread()
3523 * should stop the migration now. in migration_thread()
3527 /* Stop migration */ in migration_thread()
3559 * Background snapshot thread, based on live migration code.
3560 * This is an alternative implementation of live migration mechanism
3564 * in v5.7 kernel. Compared to existing dirty page logging migration much
3589 * We want to save vmstate for the moment when migration has been in bg_migration_thread()
3593 * then write RAM part of the vmstate to the migration stream in bg_migration_thread()
3595 * the vmstate from the buffer to the migration stream. in bg_migration_thread()
3622 * devices to unplug. This to preserve migration state transitions. in bg_migration_thread()
3680 * should stop the migration now. in bg_migration_thread()
3684 /* Stop migration */ in bg_migration_thread()
3719 * Meanwhile if migration completes successfully, there won't have an error in migrate_fd_connect()
3743 /* This is a resumed migration */ in migrate_fd_connect()
3746 /* This is a fresh new migration */ in migrate_fd_connect()
3749 /* Notify before starting migration thread */ in migrate_fd_connect()
3780 /* Wakeup the main migration thread to do the recovery */ in migrate_fd_connect()
3796 * Take a refcount to make sure the migration object won't get freed by in migrate_fd_connect()