From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id EF6FD5A005E for ; Mon, 21 Nov 2022 17:21:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669047676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8ZZFDot7e5+0TJVqoiMMjHjDZ2McSzQWJ8nQg8c97NE=; b=PRN2nQGoofWBftZ8wR4Q8a3UWUXHqpKD2OLAfSUgLf0qkdxKbJP2f9WD0UTzlQyjb9GmOU HLibuLJXTp/PmlRgLw9tjRlGFqXQPhGhrbj6ehJeMvZlF+hAhxC49mfS8cuxndpOj/XqAS lt/ggeJsvscOHwnTIUa6NHDvg5LPy4A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-332-POyCMvmmNpOJDSmJw3PPVQ-1; Mon, 21 Nov 2022 11:21:05 -0500 X-MC-Unique: POyCMvmmNpOJDSmJw3PPVQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EEEC101A528; Mon, 21 Nov 2022 16:21:05 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-30.brq.redhat.com [10.40.208.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 16623111DCE4; Mon, 21 Nov 2022 16:21:05 +0000 (UTC) Date: Mon, 21 Nov 2022 17:20:53 +0100 From: Stefano Brivio To: Amir Gonnen Subject: Re: Handshake timeout? Message-ID: <20221121172053.0858ba96@elisabeth> In-Reply-To: References: Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 6SJM5OBGAYUENDGDBI2IF2RTKTU7BCRB X-Message-ID-Hash: 6SJM5OBGAYUENDGDBI2IF2RTKTU7BCRB X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "passt-user@passt.top" X-Mailman-Version: 3.3.3 Precedence: list List-Id: "For users: support, questions and answers" Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Amir, On Mon, 21 Nov 2022 16:08:35 +0000 Amir Gonnen wrote: > Hi, > > I'm trying out passt with custom QEMU (we emulate a proprietary device). > > On one terminal I'm running latest passt (3eb26fe): > ./passt --debug -f -t 55556:22 -s /tmp/passt.socket > > On another terminal I'm running our qemu-system-x86_64 with: > -device virtio-net-pci,netdev=net0 -netdev stream,id=net0,server=off,addr.type=unix,addr.path=/tmp/passt.socket > > QEMU starts and the VM boots, but without network: > [FAILED] Failed to start NetworkMan...[0m - Network Manager Wait Online. I would have a look into this first -- check NetworkManager logs (and traffic capture, more below) and try to figure out why the network isn't being configured -- passt implements a DHCP server, and it seems to be configured given your output. > On passt side I see this log: > > No external routable interface for IPv6 > Outbound interface (IPv4): ens160 > MAC: > host: 00:50:56:87:50:45 > DHCP: > assign: 192.168.120.119 > mask: 255.255.255.0 > router: 192.168.120.1 > DNS: > 192.168.3.240 > 0.8229: UNIX domain socket bound at /tmp/passt.socket > > 0.8245: You can now start qemu (>= 7.2, with commit 13c6be96618c): > 0.8247: kvm ... -device virtio-net-pci,netdev=s -netdev stream,id=s,server=off,addr.type=unix,addr.path=/tmp/passt.socket > 0.8250: or qrap, for earlier qemu versions: > 0.8252: ./qrap 5 kvm ... -net socket,fd=5 -net nic,model=virtio > 143.3596: accepted connection from PID 1704978 > 144.3168: TCP: index 0, SOCK_ACCEPTED: CLOSED -> SYN_RCVD > 144.3168: TCP: hash table insert: index 0, sock 41, bucket: 59909, next: (nil) > 144.3169: TCP: index 0: ACK_FROM_TAP_DUE > 144.3170: TCP: index 0, timer expires in 10.000s > 154.3170: TCP: index 0, handshake timeout > 154.3170: TCP: index 0, reset at tcp_timer_handler:2965 > 154.3170: TCP: index 0, CLOSED: SYN_RCVD -> CLOSED > 154.3171: TCP: hash table remove: index 0, sock 41, bucket: 59909, new: (nil) > 154.3172: TCP: hash table compaction: maximum index was 0 (0x5600919ac500) > 159.3257: TCP: index 0, SOCK_ACCEPTED: CLOSED -> SYN_RCVD > 159.3257: TCP: hash table insert: index 0, sock 41, bucket: 134652, next: (nil) > 159.3258: TCP: index 0: ACK_FROM_TAP_DUE > 159.3258: TCP: index 0, timer expires in 10.000s > 169.3258: TCP: index 0, handshake timeout > 169.3258: TCP: index 0, reset at tcp_timer_handler:2965 > 169.3259: TCP: index 0, CLOSED: SYN_RCVD -> CLOSED > 169.3259: TCP: hash table remove: index 0, sock 41, bucket: 134652, new: (nil) > 169.3259: TCP: hash table compaction: maximum index was 0 (0x5600919ac500) > 174.3371: TCP: index 0, SOCK_ACCEPTED: CLOSED -> SYN_RCVD > ... > > Looks like a handshake timeout. Yes, and I would expect that to happen if the guest has no configured network: passt will send packets but your SSH daemon won't answer. Other than checking NetworkManager logs for DHCP issues, you can also use the --pcap option in passt: ./passt --pcap guest.pcap --debug -f -t 55556:22 -s /tmp/passt.socket guest.pcap will contain a guest-side packet capture in pcap format (readable with e.g. Wireshark). > Am I doing something wrong? I don't know yet. :) -- Stefano