'Rescue the specified instance.
- shutdown the instance VM.
- set \'bootlock\' to prevent the instance from starting in rescue.
- spawn a rescue VM (the vm name-label will be instance-N-rescue).'

def rescue(self, context, instance, network_info, image_meta, rescue_password):

    rescue_name_label = ('%s-rescue' % instance.name)
    rescue_vm_ref = vm_utils.lookup(self._session, rescue_name_label)
    if rescue_vm_ref:
        raise RuntimeError((_('Instance    is    already    in    Rescue    Mode:    %s') % instance.name))
    vm_ref = self._get_vm_opaque_ref(instance)
    vm_utils.hard_shutdown_vm(self._session, instance, vm_ref)
    self._acquire_bootlock(vm_ref)
    self.spawn(context, instance, image_meta, [], rescue_password, network_info, name_label=rescue_name_label, rescue=True)
