'Invoke the live migration operation
:param context: security context
:param instance:
nova.db.sqlalchemy.models.Instance object
instance object that is migrated.
:param dest: destination host
:param block_migration: if true, do block migration.
:param migrate_data: a LibvirtLiveMigrateData object
:param guest: the guest domain object
:param device_names: list of device names that are being migrated with
instance
This method is intended to be run in a background thread and will
block that thread until the migration is finished or failed.'

def _live_migration_operation(self, context, instance, dest, block_migration, migrate_data, guest, device_names):

    try:
        if migrate_data.block_migration:
            migration_flags = self._block_migration_flags
        else:
            migration_flags = self._live_migration_flags
        serial_listen_addr = libvirt_migrate.serial_listen_addr(migrate_data)
        if (not serial_listen_addr):
            self._verify_serial_console_is_disabled()
        migrate_uri = None
        if (('target_connect_addr' in migrate_data) and (migrate_data.target_connect_addr is not None)):
            dest = migrate_data.target_connect_addr
            if ((migration_flags & libvirt.VIR_MIGRATE_TUNNELLED) == 0):
                migrate_uri = self._migrate_uri(dest)
        params = None
        new_xml_str = None
        if (CONF.libvirt.virt_type != 'parallels'):
            new_xml_str = libvirt_migrate.get_updated_guest_xml(guest, migrate_data, self._get_volume_config)
        if self._host.has_min_version(MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION):
            params = {'bandwidth': CONF.libvirt.live_migration_bandwidth, 'destination_xml': new_xml_str, 'migrate_disks': device_names}
            if ((migration_flags & libvirt.VIR_MIGRATE_TUNNELLED) != 0):
                params.pop('migrate_disks')
        serial_ports = []
        if CONF.serial_console.enabled:
            serial_ports = list(self._get_serial_ports_from_guest(guest))
        guest.migrate(self._live_migration_uri(dest), migrate_uri=migrate_uri, flags=migration_flags, params=params, domain_xml=new_xml_str, bandwidth=CONF.libvirt.live_migration_bandwidth)
        for (hostname, port) in serial_ports:
            serial_console.release_port(host=hostname, port=port)
    except Exception as e:
        with excutils.save_and_reraise_exception():
            LOG.error('Live    Migration    failure:    %s', e, instance=instance)
    LOG.debug('Migration    operation    thread    has    finished', instance=instance)
