'Do live migration.
:param context: security context
:param instance:
nova.db.sqlalchemy.models.Instance object
instance object that is migrated.
:param dest: destination host
:param post_method:
post operation method.
expected nova.compute.manager._post_live_migration.
:param recover_method:
recovery method when any exception occurs.
expected nova.compute.manager._rollback_live_migration.
:param block_migration: if true, do block migration.
:param migrate_data: a LibvirtLiveMigrateData object
This fires off a new thread to run the blocking migration
operation, and then this thread monitors the progress of
migration and controls its operation'

def _live_migration(self, context, instance, dest, post_method, recover_method, block_migration, migrate_data):

    guest = self._host.get_guest(instance)
    disk_paths = []
    device_names = []
    if (migrate_data.block_migration and (CONF.libvirt.virt_type != 'parallels')):
        (disk_paths, device_names) = self._live_migration_copy_disk_paths(context, instance, guest)
    opthread = utils.spawn(self._live_migration_operation, context, instance, dest, block_migration, migrate_data, guest, device_names)
    finish_event = eventlet.event.Event()
    self.active_migrations[instance.uuid] = deque()
    def thread_finished(thread, event):
        LOG.debug('Migration    operation    thread    notification', instance=instance)
        event.send()
    opthread.link(thread_finished, finish_event)
    time.sleep(0)
    try:
        LOG.debug('Starting    monitoring    of    live    migration', instance=instance)
        self._live_migration_monitor(context, instance, guest, dest, post_method, recover_method, block_migration, migrate_data, finish_event, disk_paths)
    except Exception as ex:
        LOG.warning('Error    monitoring    migration:    %(ex)s', {'ex': ex}, instance=instance, exc_info=True)
        raise
    finally:
        LOG.debug('Live    migration    monitoring    is    all    done', instance=instance)
