]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/examples/jails/README
Optionally bind ktls threads to NUMA domains
[FreeBSD/FreeBSD.git] / share / examples / jails / README
1 # $FreeBSD$
2
3 The below 4 samples require a VIMAGE enabled kernel:
4
5         # (as root)
6         $ cp VIMAGE /usr/src/sys/amd64/conf/
7         $ cd /usr/src
8         $ make KERNCONF=VIMAGE kernel
9         $ reboot
10
11 FreeBSD 12 has VIMAGE enabled in GENERIC on amd64.
12 In that case, for jng simply load the ng_ether module first
13 (ng_bridge and ng_eiface will load on demand):
14
15         # (as root)
16         # Load the ng_ether module at boot:
17         $ sysrc kld_list+=ng_ether
18         # Load ng_ether at once without rebooting:
19         $ kldload ng_ether
20
21 Sample 1: jail.conf(5)
22
23         $ cp jib jng /usr/sbin/
24         $ cat jail.xxx.conf >> /etc/jail.conf
25         $ vi /etc/jail.conf
26         # NB: Customize root directory and bridge interface
27         $ sysrc jail_enable=YES
28         # NB: Assumes jail_list="" (meaning ``all jails in jail.conf'')
29         # NB: Assumes rc_conf_files="" (``below rc.conf(5) samples not used'')
30         $ service jail start
31
32 Sample 2: rc.conf(5)
33
34         $ cp jib jng /usr/sbin/
35         $ cp rc.conf.jails /etc/
36         $ vi /etc/rc.conf.jails
37         # NB: Customize root directory and bridge interface
38         $ sysrc rc_conf_files+=/etc/rc.conf.jails
39         # NB: Assumes /etc/jail.conf does not exist and jail_list=""
40         $ service jail start
41
42 Sample 3: Per-jail jail.conf(5)
43
44         $ cp jib jng /usr/sbin/
45         $ cp jail.xxx.conf /etc/
46         $ vi /etc/jail.xxx.conf
47         # NB: Customize root directory and bridge interface
48         $ sysrc jail_enable=YES
49         $ sysrc jail_list+=xxx
50         # NB: Assumes rc_conf_files=""
51         $ service jail start
52
53 Sample 4: Per-jail rc.conf(5)
54
55         $ cp jib jng /usr/sbin/
56         $ cp rcjail.xxx.conf /etc/
57         $ vi /etc/rcjail.xxx.conf
58         # NB: Customize root directory and bridge interface
59         $ sysrc jail_enable=YES
60         $ sysrc jail_list+=xxx
61         $ sysrc rc_conf_files+=/etc/rcjail.xxx.conf
62         # NB: Assumes neither /etc/jail.conf nor /etc/jail.xxx.conf exist
63         $ service jail start
64
65 For additional recipes, see share/examples/netgraph for
66 making and hooking together jails using netgraph as the
67 virtual networking fabric.