'resume guest state when a host is booted.'

def resume_state_on_host_boot(self, context, instance, network_info, block_device_info=None):

    try:
        guest = self._host.get_guest(instance)
        state = guest.get_power_state(self._host)
        ignored_states = (power_state.RUNNING, power_state.SUSPENDED, power_state.NOSTATE, power_state.PAUSED)
        if (state in ignored_states):
            return
    except (exception.InternalError, exception.InstanceNotFound):
        pass
    self._hard_reboot(context, instance, network_info, block_device_info)
