diff --git a/heat_tempest_plugin/common/test.py b/heat_tempest_plugin/common/test.py
index c56ab40..177477a 100644
--- a/heat_tempest_plugin/common/test.py
+++ b/heat_tempest_plugin/common/test.py
@@ -257,6 +257,7 @@
         if not servers:
             servers = self.compute_client.servers.list()
         for server in servers:
+            LOG.info('Server %s', server)
             LOG.info('Console output for %s', server.id)
             LOG.info(server.get_console_output())
 
@@ -408,7 +409,8 @@
                                success_on_not_found=False,
                                signal_required=False,
                                resources_to_signal=None,
-                               is_action_cancelled=False):
+                               is_action_cancelled=False,
+                               log_nova_servers=False):
         """Waits for a Stack to reach a given status.
 
         Note this compares the full $action_$status, e.g
@@ -447,8 +449,28 @@
         message = ('Stack %s failed to reach %s status within '
                    'the required time (%s s).' %
                    (stack_identifier, status, build_timeout))
+        LOG.info(
+            f"{message} "
+            f"Event list:"
+            f" {self.client.events.list(stack_identifier, nested_depth=999)}"
+        )
+        if log_nova_servers:
+            self._log_nova_servers(stack_identifier)
         raise exceptions.TimeoutException(message)
 
+    def _log_nova_servers(self, stack_identifier):
+        server_resources = self.client.resources.list(
+            stack_identifier,
+            type="OS::Nova::Server",
+            nested_depth=999)
+        servers = list(self.compute_client.servers.get(s.physical_resource_id)
+                       for s in server_resources)
+        if not servers:
+            LOG.info("No OS::Nova::Server resources found in stack %s",
+                     stack_identifier)
+            return
+        self._log_console_output(servers=servers)
+
     def _stack_delete(self, stack_identifier):
         try:
             self._handle_in_progress(self.client.stacks.delete,
@@ -481,7 +503,8 @@
                      files=None, parameters=None, tags=None,
                      expected_status='UPDATE_COMPLETE',
                      disable_rollback=True,
-                     existing=False):
+                     existing=False,
+                     log_nova_servers=False):
         env = environment or {}
         env_files = files or {}
         parameters = parameters or {}
@@ -498,7 +521,8 @@
             existing=existing)
 
         kwargs = {'stack_identifier': stack_identifier,
-                  'status': expected_status}
+                  'status': expected_status,
+                  'log_nova_servers': log_nova_servers}
         if expected_status in ['ROLLBACK_COMPLETE']:
             # To trigger rollback you would intentionally fail the stack
             # Hence check for rollback failures
@@ -649,7 +673,8 @@
                      parameters=None, environment=None, tags=None,
                      expected_status='CREATE_COMPLETE',
                      disable_rollback=True, enable_cleanup=True,
-                     environment_files=None, timeout=None):
+                     environment_files=None, timeout=None,
+                     log_nova_servers=False):
         name = stack_name or self._stack_rand_name()
         templ = template or self.template
         templ_files = files or {}
@@ -673,7 +698,8 @@
         stack = self.client.stacks.get(name, resolve_outputs=False)
         stack_identifier = '%s/%s' % (name, stack.id)
         kwargs = {'stack_identifier': stack_identifier,
-                  'status': expected_status}
+                  'status': expected_status,
+                  'log_nova_servers': log_nova_servers}
         if expected_status:
             if expected_status in ['ROLLBACK_COMPLETE']:
                 # To trigger rollback you would intentionally fail the stack
