From owner-freebsd-virtualization@FreeBSD.ORG Fri Oct 4 02:00:30 2013 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B9A30681; Fri, 4 Oct 2013 02:00:30 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 329C72D67; Fri, 4 Oct 2013 02:00:30 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id u57so2453168wes.15 for ; Thu, 03 Oct 2013 19:00:28 -0700 (PDT) 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:cc:content-type; bh=3Imzepr12kh9+Lr9h/RCeaFo2ohWabBngUPHK8haAUo=; b=xyjl6K7N2tYw1Ovo58Z+2G8NWbe4tCTG7Cb/NBcCjR2IxV/y7un1tsamLk6K81OG1e Q9y5hUwVnADBfaluzjPFZi8FLNfm44B2/4lRQp9QE5KGkpHVoYjWY8FKCh0/7rLonPu2 X5evDPPIjfu2L7/ngh4dCLUE+ch94Zv2BIwm7fLJBFyZ5vritIH735Ea1w3lhDvOBW+w wunUjg0Tp7zQTpd2NZ+uB1e2Tn90hgItsWKIrFFiWMLXab0XT3JYBaexW2XI76t6mQ4+ 5LUOnsoYgeIGTJ0V7wExp2/jo7hfRSCTjdWMWX2NLqJFmIZU5HutJmf4VlH1s93nxq+3 I/Hw== MIME-Version: 1.0 X-Received: by 10.194.110.138 with SMTP id ia10mr10174134wjb.3.1380852028545; Thu, 03 Oct 2013 19:00:28 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.216.84.208 with HTTP; Thu, 3 Oct 2013 19:00:28 -0700 (PDT) In-Reply-To: <522B5010.1080105@freebsd.org> References: <522B5010.1080105@freebsd.org> Date: Thu, 3 Oct 2013 19:00:28 -0700 X-Google-Sender-Auth: w-Lz9L4lQxiPobpMCazSVKWmCzQ Message-ID: Subject: Re: Problems with missing ttyv devices in BHyve? From: Craig Rodrigues To: Peter Grehan Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-virtualization@freebsd.org" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 04 Oct 2013 02:00:30 -0000 On Sat, Sep 7, 2013 at 9:10 AM, Peter Grehan wrote: > Hi Craig, > > > Does anyone have any ideas what the fix for this should be? >> > > You'll have to edit the /etc/ttys file and > > -ttyu2 "/usr/libexec/getty std.9600" dialup off secure > +ttyu2 "/usr/libexec/getty std.9600" vt100 on secure > > bhyve is ttyu2 rather than ttyu0 since it emulates a PCI serial port. > > Maybe this could go into the FreeNAS repo - I've never really understood > the aversion to having logins open on the serial ports by default. Seems a > relic of 1980's Unix dialup modems. > > Thanks Peter, thats worked. With some other changes that I have done, I have been able to successfully install and boot the latest FreeNAS code inside BHyve. It's very cool, and extremely useful for testing FreeNAS. A few questions for you. (1) I want to get the same FreeNAS image working inside Bhyve and on real hardware. In the source code for /sbin/init, when it parses /etc/ttys, if the entry does not exist, it prints out an error message about not being able to find the tty entry to open it. Do you know if there is a way to specify an entry for /dev/ttyu2, only if it exists, and not print out an error message otherwise? That way, I can get the same image to boot on real hardware, which has ttyv console devices, but does not have /dev/ttyu2, and also in BHyve, and /sbin/init won't print any errors. (2) Is it possible to connect to the console of the BHyve VM via /dev/ttyu2 or some other mechanism? I would like to be able to connect to the BHyve VM and use something like Expect or py-expect to execute console commands in the VM, for automated testing. Thanks. -- Craig