def check_can_live_migrate_source(self, context, instance, dest_check_data):
    'Check if it is possible to execute live migration.\n\n        This checks if the live migration can succeed, based on the\n        results from check_can_live_migrate_destination.\n\n        :param context: security context\n        :param instance: nova.db.sqlalchemy.models.Instance\n        :param dest_check_data: result of check_can_live_migrate_destination\n        :returns: a dict containing migration info\n        '
    source = CONF.host
    dest_check_data.update({'is_shared_block_storage': self._is_shared_block_storage(instance, dest_check_data)})
    dest_check_data.update({'is_shared_instance_path': self._is_shared_instance_path(dest_check_data)})
    if dest_check_data['block_migration']:
        if (dest_check_data['is_shared_block_storage'] or dest_check_data['is_shared_instance_path']):
            reason = _('Block migration can not be used with shared storage.')
            raise exception.InvalidLocalStorage(reason=reason, path=source)
        self._assert_dest_node_has_enough_disk(context, instance, dest_check_data['disk_available_mb'], dest_check_data['disk_over_commit'])
    elif (not (dest_check_data['is_shared_block_storage'] or dest_check_data['is_shared_instance_path'])):
        reason = _('Live migration can not be used without shared storage.')
        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
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
:returns: a dict containing migration info
def check_can_live_migrate_source(self, context, instance, dest_check_data):
    'Check if it is possible to execute live migration.\n\n        This checks if the live migration can succeed, based on the\n        results from check_can_live_migrate_destination.\n\n        :param context: security context\n        :param instance: nova.db.sqlalchemy.models.Instance\n        :param dest_check_data: result of check_can_live_migrate_destination\n        :returns: a dict containing migration info\n        '
    source = CONF.host
    dest_check_data.update({'is_shared_block_storage': self._is_shared_block_storage(instance, dest_check_data)})
    dest_check_data.update({'is_shared_instance_path': self._is_shared_instance_path(dest_check_data)})
    if dest_check_data['block_migration']:
        if (dest_check_data['is_shared_block_storage'] or dest_check_data['is_shared_instance_path']):
            reason = _('Block migration can not be used with shared storage.')
            raise exception.InvalidLocalStorage(reason=reason, path=source)
        self._assert_dest_node_has_enough_disk(context, instance, dest_check_data['disk_available_mb'], dest_check_data['disk_over_commit'])
    elif (not (dest_check_data['is_shared_block_storage'] or dest_check_data['is_shared_instance_path'])):
        reason = _('Live migration can not be used without shared storage.')
        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