3 The below 4 samples require a VIMAGE enabled kernel:
6 $ cp VIMAGE /usr/src/sys/amd64/conf/
8 $ make KERNCONF=VIMAGE kernel
11 Sample 1: jail.conf(5)
13 $ cp jib jng /usr/sbin/
14 $ cat jail.xxx.conf >> /etc/jail.conf
16 # NB: Customize root directory and bridge interface
17 $ sysrc jail_enable=YES
18 # NB: Assumes jail_list="" (meaning ``all jails in jail.conf'')
19 # NB: Assumes rc_conf_files="" (``below rc.conf(5) samples not used'')
24 $ cp jib jng /usr/sbin/
25 $ cp rc.conf.jails /etc/
26 $ vi /etc/rc.conf.jails
27 # NB: Customize root directory and bridge interface
28 $ sysrc rc_conf_files+=/etc/rc.conf.jails
29 # NB: Assumes /etc/jail.conf does not exist and jail_list=""
32 Sample 3: Per-jail jail.conf(5)
34 $ cp jib jng /usr/sbin/
35 $ cp jail.xxx.conf /etc/
36 $ vi /etc/jail.xxx.conf
37 # NB: Customize root directory and bridge interface
38 $ sysrc jail_enable=YES
39 $ sysrc jail_list+=xxx
40 # NB: Assumes rc_conf_files=""
43 Sample 4: Per-jail rc.conf(5)
45 $ cp jib jng /usr/sbin/
46 $ cp rcjail.xxx.conf /etc/
47 $ vi /etc/rcjail.xxx.conf
48 # NB: Customize root directory and bridge interface
49 $ sysrc jail_enable=YES
50 $ sysrc jail_list+=xxx
51 $ sysrc rc_conf_files+=/etc/rcjail.xxx.conf
52 # NB: Assumes neither /etc/jail.conf nor /etc/jail.xxx.conf exist
55 For additional recipes, see share/examples/netgraph for
56 making and hooking together jails using netgraph as the
57 virtual networking fabric.