'Resume the specified instance.'

def resume(self, instance):

    vm_ref = vm_util.get_vm_ref(self._session, instance)
    pwr_state = self._session._call_method(vutil, 'get_object_property', vm_ref, 'runtime.powerState')
    if (pwr_state.lower() == 'suspended'):
        LOG.debug('Resuming    the    VM', instance=instance)
        suspend_task = self._session._call_method(self._session.vim, 'PowerOnVM_Task', vm_ref)
        self._session._wait_for_task(suspend_task)
        LOG.debug('Resumed    the    VM', instance=instance)
    else:
        reason = _('instance    is    not    in    a    suspended    state')
        raise exception.InstanceResumeFailure(reason=reason)
