'Return last few lines of instance console.'

def get_console_output(self, instance):

    dom_id = self._get_last_dom_id(instance, check_rescue=True)
    try:
        raw_console_data = vm_management.get_console_log(self._session, dom_id)
    except self._session.XenAPI.Failure:
        LOG.exception(_('Guest    does    not    have    a    console    available'))
        raise exception.ConsoleNotAvailable()
    return zlib.decompress(base64.b64decode(raw_console_data))
