From owner-freebsd-virtualization@FreeBSD.ORG Wed Nov 26 23:34:12 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06C95ED1 for ; Wed, 26 Nov 2014 23:34:12 +0000 (UTC) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com [IPv6:2a00:1450:4010:c04::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78DE83B2 for ; Wed, 26 Nov 2014 23:34:11 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id z12so3252493lbi.4 for ; Wed, 26 Nov 2014 15:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=+vBe6TkGA8oL3L0Udar96KqF5d7ea4cwJK2qCHjGujM=; b=hXynQgzo/cJeDe1FjToOn7tbNySXPHXUsDZG5k9vIS3nZpFAnigCWuvy0M8O6Wl+bX fugTwByjjCoxKW2JuZ6p7O8SRwcubenTFSckmFTLmiGhS+H20gdsfuS3AZOx2vAaMh2P MRRCYyKOB5GgZWh8kW5GtlYwztzGj1iLDgFFsVp4pytLiSpqDdN6YRvEVvkGes64wZBQ pBmS1oV9+yEXa/LQ8l9XfFNhPmn3V5QUopbmgMOjUDdhfp8hDomIXwKy+l3JBjUDGUG6 UzvyBGD+KqbTuG0KQmPwSwJ5xdxKwSpXArccQER8dv62Sfzb8BPRKLrnoYWXgvkveaKE 683w== MIME-Version: 1.0 X-Received: by 10.112.137.39 with SMTP id qf7mr36074493lbb.47.1417044849631; Wed, 26 Nov 2014 15:34:09 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.130.168 with HTTP; Wed, 26 Nov 2014 15:34:09 -0800 (PST) In-Reply-To: <54729224.3060402@freebsd.org> References: <54729224.3060402@freebsd.org> Date: Wed, 26 Nov 2014 15:34:09 -0800 X-Google-Sender-Auth: Z3ymHc_5xh68eno6RP3ZaPIxVAE Message-ID: Subject: Re: cu -l /dev/nmdm not setting rows and columns From: Craig Rodrigues To: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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:34:12 -0000 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 :) > Hi, 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. -- Craig