From nobody Fri Jun 20 01:47:34 2025 X-Original-To: freebsd-virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bNgMy1d7dz5yHP3 for ; Fri, 20 Jun 2025 01:47:42 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bNgMx4FLpz3x8m; Fri, 20 Jun 2025 01:47:41 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Authentication-Results: mx1.freebsd.org; none Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id 55K1lYWg086996 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Jun 2025 18:47:34 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id 55K1lYjT086994; Thu, 19 Jun 2025 18:47:34 -0700 (PDT) (envelope-from jmg) Date: Thu, 19 Jun 2025 18:47:34 -0700 From: John-Mark Gurney To: Roman Bogorodskiy Cc: freebsd-virtualization@freebsd.org Subject: Re: bhyve: detecting TCP console support Message-ID: <20250620014734.GC4297@funkthat.com> References: List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.3-STABLE amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Thu, 19 Jun 2025 18:47:34 -0700 (PDT) X-Rspamd-Queue-Id: 4bNgMx4FLpz3x8m X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:32354, ipnet:208.87.223.0/24, country:US] Roman Bogorodskiy wrote this message on Thu, Jun 19, 2025 at 18:50 +0200: > Hi, > > Is there a way to check if the given bhyve binary supports tcp console, > such as "... -l com1,tcp="? > > I've been using various workarounds to detect bhyve features for quite > some time, including parsing of the "bhyve -h" output or running "bhyve > -s 0," and see if reports unknown device etc, but apparently none > of that works for the tcp console. > > Am I missing something or is it really not possible? Likely the current best way is to use `uname -U`, and have a table to check which version the feature was added. Less than ideal, in that you'll have to dig that info up, but not entirely terribly hard to do. Use git blame to figure out commit hash when a feature was added, then use: git show :sys/sys/param.h | grep __FreeBSD_version to fetch it. Annoyingly, this will may need to be done for each stable branch as features are backported. This obviously doesn't solve the problem where someone in place upgraded bhyve, but that shouldn't be common, and if they did that, they should know that they might break things. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."