'Check if it is possible to execute live migration.
This checks if the live migration can succeed, based on the
results from check_can_live_migrate_destination.
:param context: security context
:param instance: nova.db.sqlalchemy.models.Instance
:param dest_check_data: result of check_can_live_migrate_destination
:param block_device_info: result of _get_instance_block_device_info
:returns: a LibvirtLiveMigrateData object'

def check_can_live_migrate_source(self, context, instance, dest_check_data, block_device_info=None):

    if (not isinstance(dest_check_data, migrate_data_obj.LiveMigrateData)):
        md_obj = objects.LibvirtLiveMigrateData()
        md_obj.from_legacy_dict(dest_check_data)
        dest_check_data = md_obj
    source = CONF.host
    dest_check_data.is_shared_instance_path = self._check_shared_storage_test_file(dest_check_data.filename, instance)
    dest_check_data.is_shared_block_storage = self._is_shared_block_storage(instance, dest_check_data, block_device_info)
    if ('block_migration' not in dest_check_data):
        dest_check_data.block_migration = (not dest_check_data.is_on_shared_storage())
    if dest_check_data.block_migration:
        if dest_check_data.is_on_shared_storage():
            reason = _('Block    migration    can    not    be    used    with    shared    storage.')
            raise exception.InvalidLocalStorage(reason=reason, path=source)
        if ('disk_over_commit' in dest_check_data):
            self._assert_dest_node_has_enough_disk(context, instance, dest_check_data.disk_available_mb, dest_check_data.disk_over_commit, block_device_info)
        if block_device_info:
            bdm = block_device_info.get('block_device_mapping')
            if (bdm and (not self._host.has_min_version(MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION))):
                ver = '.'.join([str(x) for x in MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION])
                msg = (_('Cannot    block    migrate    instance    %(uuid)s    with    mapped    volumes.    Selective    block    device    migration    feature    requires    libvirt    version    %(libvirt_ver)s') % {'uuid': instance.uuid, 'libvirt_ver': ver})
                LOG.error(msg, instance=instance)
                raise exception.MigrationPreCheckError(reason=msg)
            if (bdm and ((self._block_migration_flags & libvirt.VIR_MIGRATE_TUNNELLED) != 0)):
                msg = (_('Cannot    block    migrate    instance    %(uuid)s    with    mapped    volumes.    Selective    block    device    migration    is    not    supported    with    tunnelled    block    migrations.') % {'uuid': instance.uuid})
                LOG.error(msg, instance=instance)
                raise exception.MigrationPreCheckError(reason=msg)
    elif (not (dest_check_data.is_shared_block_storage or dest_check_data.is_shared_instance_path)):
        reason = _('Shared    storage    live-migration    requires    either    shared    storage    or    boot-from-volume    with    no    local    disks.')
        raise exception.InvalidSharedStorage(reason=reason, path=source)
    instance_path = libvirt_utils.get_instance_path(instance, relative=True)
    dest_check_data.instance_relative_path = instance_path
    return dest_check_data
