From owner-freebsd-virtualization@FreeBSD.ORG Wed Nov 26 23:44:33 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 591ED15F; Wed, 26 Nov 2014 23:44:33 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 31F70674; Wed, 26 Nov 2014 23:44:32 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id sAQNiVon092907 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Nov 2014 15:44:32 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id sAQNiVc1092906; Wed, 26 Nov 2014 15:44:31 -0800 (PST) (envelope-from jmg) Date: Wed, 26 Nov 2014 15:44:31 -0800 From: John-Mark Gurney To: Craig Rodrigues Subject: Re: cu -l /dev/nmdm not setting rows and columns Message-ID: <20141126234431.GN99957@funkthat.com> References: <54729224.3060402@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 26 Nov 2014 15:44:32 -0800 (PST) Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 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, 26 Nov 2014 23:44:33 -0000 Craig Rodrigues wrote this message on Wed, Nov 26, 2014 at 15:34 -0800: > On Sun, Nov 23, 2014 at 6:04 PM, Peter Grehan wrote: > > > Hi Craig, > > > > # stty -a > >> speed 9600 baud; 0 rows; 0 columns; > >> # echo $TERM > >> dialup > >> > >> Any idea how I can fix this? The console inside the VM > >> is quite unusable when it does not have the correct > >> rows/colums set. > >> > > > > Not sure how you're getting 'dialup' as the terminal type: the default > > ttys file for 10.1 shouldn't need to be edited, and has > > > > ttyu0 "/usr/libexec/getty std.9600" vt100 onifconsole secure > > > > The rows/columns is always 0 for uart-style serial lines since it's not > > possible to know what's on the other end. That's why $TERM has to be set > > correctly for these. > > > > Having an xterm attached to the other end of an nmdm device isn't too > > different from swapping say a vt100 with a vt420 or some other terminal > > with a different resolution on a real serial line. There's no way for the > > serial driver to know this has happened. > > > > The only way to fix the changing-size problem is to have a > > paravirtualized tty device that has a way of reading the terminal window > > size and being informed of changes. The virtio-serial specification has > > this ability, however, the FreeBSD driver for this can't operate in polled > > mode so can't be the main console port, and in any event there's no bhyve > > backend for it currently. > > > > Or, you can network-login to the guest in which case xterm works fine :) > > I need to log into the serial console for two reasons: > -> networking has not been set up yet, and I need to log in to see what > is going on > -> networking has failed or been misconfigured, so I cannot ssh into the > VM, but I still need to log in to see what is going on > > cu and tip are in the base system, so they are handy to use, but they are > quite primitive. > Do programs like minicom work better for this type of thing, in terms of > presenting > a usable terminal? I haven't used these types > of programs for serial port communication since the 1990's, so it's been a > while for me. So, what exactly is the problem again? If you're complaining about terminal not being set correctly, or rows/columns not being set correctly, welcom to the world of dumb serial devices, and they have to be set manually and correctly... termcap does contain default rows/columns for when they aren't provided (i.e. dumb terminals)... Is there another issue that you're having issues with? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."