[Bug 238326] Kernel crash on jail stop (VIMAGE/VNET)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Aug 9 20:30:07 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238326

--- Comment #16 from Mason Loring Bliss <mason at blisses.org> ---
Markus Stoff wrote:

> Running 'ifconfig ${epair}b -vnet ${jid}' before removing the jail avoids 
> the kernel panic. However, I would prefer to shut my jails down in a 
> clean way rather than just pulling the (network) plug.

While it's a little awkward-looking, you can do something like this to make
sure you've cleanly shut down and detached:

    exec.prestop = "/usr/sbin/jexec ${name} /bin/sh /etc/rc.shutdown";
    exec.prestop += "/sbin/ifconfig epair${ep}b -vnet ${name}";

    exec.poststop = "ifconfig $bridge deletem epair${ep}a";
    exec.poststop += "ifconfig epair${ep}a destroy";

The notable thing is that exec.prestop and exec.poststop run in system 
context, not jail context, so you need the jexec to execute the clean 
shutdown - but it works.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-jail mailing list