Solved How to get a serial console with a guest jail?

I have created a jail following instructions from https://docs.freebsd.org/en/books/handbook/jails/ and https://freebsdfoundation.org/freebsd-project/resources/introduction-to-freebsd-jails/ my /etc/jail.conf contains the following:
Code:
myjail {
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
exec.consolelog = "/var/log/jail_console_${name}.log";

allow.raw_sockets;
exec.clean;

host.hostname = "${name}";
path = "/jails/myjailtest";

ip4.addr = 192.168.1.151;
interface = re0;
}
It starts, and is a untouched installation with bsdinstall jail.

There is a way to setup a serial console to manage this jail?
 
you probably can hack /etc/ttys and /etc/gettytab to exec a shell script instead /usr/bin/login and use jexec inside the script
you do this on the host not in the jail
 
Back
Top