@@ -120,18 +120,20 @@ def configure_connection(self, node: RemoteNode, log: Logger) -> None:
120120 port = runbook .network .ssh_port ,
121121 public_port = runbook .network .ssh_port ,
122122 )
123- try :
124- wait_tcp_port_ready (
125- runbook .network .connection_address ,
126- runbook .network .ssh_port ,
127- log = log ,
128- timeout = OPENVMM_CONNECTION_TIMEOUT ,
129- )
130- except Exception as identifier_error :
123+ is_ready , error_code = wait_tcp_port_ready (
124+ runbook .network .connection_address ,
125+ runbook .network .ssh_port ,
126+ log = log ,
127+ timeout = OPENVMM_CONNECTION_TIMEOUT ,
128+ )
129+ if not is_ready :
131130 raise LisaException (
132131 "OpenVMM guest SSH port did not become reachable at "
133- f"{ runbook .network .connection_address } :{ runbook .network .ssh_port } "
134- ) from identifier_error
132+ f"{ runbook .network .connection_address } :{ runbook .network .ssh_port } "
133+ f"(error code: { error_code } ). Verify the guest is running, "
134+ "networking is configured correctly, and the SSH service is "
135+ "listening on the expected port."
136+ )
135137
136138 def stop_node (self , node : Node , wait : bool = True ) -> None :
137139 node_context = get_node_context (node )
0 commit comments