From owner-freebsd-virtualization@FreeBSD.ORG Mon Nov 24 02:13:35 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 8AFBD86B; Mon, 24 Nov 2014 02:13:35 +0000 (UTC) Received: from alto.onthenet.com.au (alto2.onthenet.com.au [203.13.68.14]) by mx1.freebsd.org (Postfix) with ESMTP id 4E4927AE; Mon, 24 Nov 2014 02:13:34 +0000 (UTC) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTP id 0CBD512425; Mon, 24 Nov 2014 12:04:23 +1000 (EST) Received: from Peters-MacBook-Pro.local ([64.245.0.210]) by dommail.onthenet.com.au (MOS 4.4.4-GA) with ESMTP id BZY22724 (AUTH peterg@ptree32.com.au); Mon, 24 Nov 2014 12:04:22 +1000 Message-ID: <54729224.3060402@freebsd.org> Date: Sun, 23 Nov 2014 18:04:20 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Craig Rodrigues Subject: Re: cu -l /dev/nmdm not setting rows and columns References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Mon, 24 Nov 2014 02:13:35 -0000 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 :) later, Peter.