Hi,
I'm trying to set up some hierarchical vnet jails but am having problems getting the child jails to launch automatically after the parent jail is started. I've set the jail_list entry in the rc.conf of the parent jail and hence would expect the child jails to launch at startup but when I check the parent jail after it has launched none of the child jails are running.
I can manually launch the child jails from the parent using service jail start without any issues. I also tried starting the child jails by adding exec.start += "/usr/sbin/service jail start"; into the jail.conf for the parent jail and while that worked fine in automatically launching all child jails at startup it feels a bit 'clunky' to me. Any ideas on what might be going on here?
The jail.conf to launch the parent jail as well as the rc.conf used by the parent jail are attached below. Both the host as well as all the jails are running FreeBSD 13.0-RELEASE-p3.
jail.conf to launch parent jail
rc.conf used in parent jail
I'm trying to set up some hierarchical vnet jails but am having problems getting the child jails to launch automatically after the parent jail is started. I've set the jail_list entry in the rc.conf of the parent jail and hence would expect the child jails to launch at startup but when I check the parent jail after it has launched none of the child jails are running.
I can manually launch the child jails from the parent using service jail start without any issues. I also tried starting the child jails by adding exec.start += "/usr/sbin/service jail start"; into the jail.conf for the parent jail and while that worked fine in automatically launching all child jails at startup it feels a bit 'clunky' to me. Any ideas on what might be going on here?
The jail.conf to launch the parent jail as well as the rc.conf used by the parent jail are attached below. Both the host as well as all the jails are running FreeBSD 13.0-RELEASE-p3.
jail.conf to launch parent jail
Code:
exec.timeout = 90;
stop.timeout = 30;
path = "/jails/${name}";
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
exec.consolelog = "/var/log/jails/jail_${name}.log";
exec.clean;
mount.devfs;
parent {
exec.prestart = "/jails/scripts/jib addm ${name} some_interface";
exec.poststop = "/jails/scripts/jib destroy ${name}";
vnet;
vnet.interface = e0b_${name};
devfs_ruleset=32;
allow.mount;
allow.mount.devfs;
allow.mount.procfs;
allow.mlock;
enforce_statfs = 1;
children.max = 5;
}
rc.conf used in parent jail
Code:
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
syslogd_flags="-ss"
sendmail_enable="NONE"
clear_tmp_enable="YES"
cron_flags="$cron_flags -J 15"
jail_enable="YES"
jail_list="child1 child2 child3" # Explicitly setting jail_list="" as per the man page didn't launch them either