From owner-freebsd-virtualization@freebsd.org Wed Aug 21 15:48:31 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04879CBDC1 for ; Wed, 21 Aug 2019 15:48:31 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46DBs93xtWz45n1 for ; Wed, 21 Aug 2019 15:48:28 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x7LFmOw0054359; Wed, 21 Aug 2019 08:48:24 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x7LFmOua054358; Wed, 21 Aug 2019 08:48:24 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201908211548.x7LFmOua054358@gndrsh.dnsmgr.net> Subject: Re: Severely broken bhyve console In-Reply-To: <20190821095133.29344da4@almond.int.arc7.info> To: Mark Raynsford Date: Wed, 21 Aug 2019 08:48:24 -0700 (PDT) CC: "Rodney W. Grimes" , freebsd-virtualization@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 46DBs93xtWz45n1 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [0.98 / 15.00]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[org.freebsd.virtualization]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.53)[0.529,0]; NEURAL_HAM_LONG(-0.35)[-0.351,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(0.04)[ip: (0.15), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.05), country: US(-0.05)]; NEURAL_HAM_SHORT(-0.14)[-0.145,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2019 15:48:31 -0000 > On 2019-08-20T14:34:02 -0700 > "Rodney W. Grimes" wrote: > > > > What it looks as if is happened is you have disconnected from > > a session while it was in grub and had sent specific control > > sequences, possibly even expecting scroll regions and such > > set up in the terminal. Now when you reconnect from a newly > > initialzed terminal that has none of this setup things go > > very wrong. > > Interesting. I don't remember this happening, but it's not > inconceivable that it happened and I didn't notice it. Is it possible the VM guest dropped out to grub, or is in a failed reboot state, or in a partial boot state? If grub started up while you had no console attached it may of output a bunch of control sequences that now went into the bit bucket that are need to set the scroll regions, reverse video, etc. Is there a way to tell grub it is using a dumb terminal and not a PC console, or vt100, or xterm. Just a dumb old tty (/etc/termcap calls this "dumb".) Using that as the console type may resolve these issues. > What is kind of strange is that I appear to be partly in the grub > prompt and partly in the Debian installer; I see output and responses > from both interleaved. I agree that is very odd, is it possible the same nmdm device somehow has been attached to multip vm's? I am not even sure if that is possible. Traditional tty's can be open by more than one process so I think it might be possible to do that, and this would lead to a mess as well. > > One solution is to use the graphics console, that does not suffer > > from these tty type issues, its a bit sluggish if you do not have > > a good high speed network path to the bhyve host though. > > It's a 1Gbps LAN, so I assume that's fast enough. > > However: Is there some way I can reset the nmdm device? The problem is not that you need to reset the nmdm device, the problem is what ever is running on the inside the guest talking to the console believes the device to be in a different state than what your device is in, and there is no convienient way to get your device in the expected state. In the situation of a shell prompt you can get the 2 states alligned by issueing a terminal reset command of some form, I have no idea how to do that at a grub prompt. -- Rod Grimes rgrimes@freebsd.org