FreeBSD jails: Difference between revisions

From wikinotes
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Jails are a hardened version of chroots. They allow multiple separate
Jails are a hardened version of chroots. They allow multiple separate
FreeBSD installations to run on one machine, while sharing a kernel, ram, resources.
FreeBSD installations to run on one machine, while sharing a kernel, ram, resources.
Because programs are running natively, this is much faster than using a type2-hypervisor.
Jails are like low-level lego blocks, you'll want to either setup your own scripts, or use a management tool.
{{ TODO ||
These docs are now overcomplicated an dout of date.
* bsdinstall means you do not need to compiled kernel anymore
* jail.conf should be separated so page is smaller
}}


= Documentation =
= Documentation =
Line 66: Line 55:
<blockquote>
<blockquote>
{|
{|
|-
| [[rctl]] || set jail resource restrictions
|-
|-
| [[cbsd]] || abstraction layer over jails/bhyve/xen
| [[cbsd]] || abstraction layer over jails/bhyve/xen

Latest revision as of 03:21, 31 August 2022

Jails are a hardened version of chroots. They allow multiple separate FreeBSD installations to run on one machine, while sharing a kernel, ram, resources.

Documentation

man jail https://www.freebsd.org/cgi/man.cgi?query=jail&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
man jail.conf https://www.freebsd.org/cgi/man.cgi?query=jail.conf&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html

Tutorials

excellent/comprehensive tutorial http://clinta.github.io/freebsd-jails-the-hard-way/
FreeBSD Manual https://www.freebsd.org/doc/handbook/jails.html

Locations

/etc/rc.conf enable jails, global jail configuration
/etc/jail.conf configure individual jails
/etc/jails/*.fstab individual jail fstabs

Notes

jail usage
jail setup
jail maintenance
jail troubleshooting

Jail Management Tools

rctl set jail resource restrictions
cbsd abstraction layer over jails/bhyve/xen
iocage more powerful tool to facilitate managing jails
ezjail shellscript to facilitate managing jails