'Check if it\'s possible to execute live migration on the source side.
:param ctxt: security context
:param instance_ref: nova.db.sqlalchemy.models.Instance object
:param dest_check_data: data returned by the check on the
destination, includes block_migration flag'

def check_can_live_migrate_source(self, ctxt, instance_ref, dest_check_data):

    if (len(self._get_iscsi_srs(ctxt, instance_ref)) > 0):
        if (not self._session.is_xsm_sr_check_relaxed()):
            raise exception.MigrationError(reason=_('XAPI    supporting    relax-xsm-sr-check=true    required'))
    if (('block_migration' in dest_check_data) and dest_check_data.block_migration):
        vm_ref = self._get_vm_opaque_ref(instance_ref)
        try:
            self._call_live_migrate_command('VM.assert_can_migrate', vm_ref, dest_check_data)
        except self._session.XenAPI.Failure as exc:
            reason = exc.details[0]
            msg = (_('assert_can_migrate    failed    because:    %s') % reason)
            LOG.debug(msg, exc_info=True)
            raise exception.MigrationPreCheckError(reason=msg)
    return dest_check_data
