Problems with missing ttyv devices in BHyve?
Craig Rodrigues
rodrigc at FreeBSD.org
Fri Oct 4 02:00:30 UTC 2013
On Sat, Sep 7, 2013 at 9:10 AM, Peter Grehan <grehan at freebsd.org> 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
More information about the freebsd-virtualization
mailing list