Index: head/share/examples/jails/README =================================================================== --- head/share/examples/jails/README (revision 295541) +++ head/share/examples/jails/README (revision 295542) @@ -1,49 +1,57 @@ # $FreeBSD$ +The below 4 samples require a VIMAGE enabled kernel: + + # (as root) + $ cp VIMAGE /usr/src/sys/amd64/conf/ + $ cd /usr/src + $ make KERNCONF=VIMAGE kernel + $ reboot + Sample 1: jail.conf(5) $ cp jib jng /usr/sbin/ $ cat jail.xxx.conf >> /etc/jail.conf $ vi /etc/jail.conf # NB: Customize root directory and bridge interface $ sysrc jail_enable=YES # NB: Assumes jail_list="" (meaning ``all jails in jail.conf'') # NB: Assumes rc_conf_files="" (``below rc.conf(5) samples not used'') $ service jail start Sample 2: rc.conf(5) $ cp jib jng /usr/sbin/ $ cp rc.conf.jails /etc/ $ vi /etc/rc.conf.jails # NB: Customize root directory and bridge interface $ sysrc rc_conf_files+=/etc/rc.conf.jails # NB: Assumes /etc/jail.conf does not exist and jail_list="" $ service jail start Sample 3: Per-jail jail.conf(5) $ cp jib jng /usr/sbin/ $ cp jail.xxx.conf /etc/ $ vi /etc/jail.xxx.conf # NB: Customize root directory and bridge interface $ sysrc jail_enable=YES $ sysrc jail_list+=xxx # NB: Assumes rc_conf_files="" $ service jail start Sample 4: Per-jail rc.conf(5) $ cp jib jng /usr/sbin/ $ cp rcjail.xxx.conf /etc/ $ vi /etc/rcjail.xxx.conf # NB: Customize root directory and bridge interface $ sysrc jail_enable=YES $ sysrc jail_list+=xxx $ sysrc rc_conf_files+=/etc/rcjail.xxx.conf # NB: Assumes neither /etc/jail.conf nor /etc/jail.xxx.conf exist $ service jail start For additional recipes, see share/examples/netgraph for making and hooking together jails using netgraph as the virtual networking fabric. Index: head/share/examples/jails/VIMAGE =================================================================== --- head/share/examples/jails/VIMAGE (nonexistent) +++ head/share/examples/jails/VIMAGE (revision 295542) @@ -0,0 +1,59 @@ +# $FreeBSD$ + +################################################################################ +######################### VIMAGE KERNEL CONFIGURATION ########################## +################################################################################ + +#################### Inheritance + +# +# Inherit from, and override `GENERIC' +# +include GENERIC # Base configuration file +ident VIMAGE # Kernel name + +################################################################################ +##################### ENABLE NON-INHERITED OPTIONS/DEVICES ##################### +################################################################################ + +#################### Non-GENERIC options + +# +# Network Virtualization for Jails +# +options VIMAGE # vnet paravirtualization + +# +# Netgraph based bridging for vnet jails +# NB: Not strictly necessary; will load automatically via KLD when needed +# +options NETGRAPH # netgraph(4) system +options NETGRAPH_BRIDGE # ng_bridge(4) +options NETGRAPH_EIFACE # ng_eiface(4) +options NETGRAPH_ETHER # ng_ether(4) +options NETGRAPH_SOCKET # ng_socket(4) + +#################### Non-GENERIC devices + +# +# if_bridge based bridging for vnet jails +# NB: Not strictly necessary; will load automatically via KLD when needed +# +device epair # epair(4) +device if_bridge # if_bridge(4) + +################################################################################ +################ DISABLE UNNECESSARY INHERITED OPTIONS/DEVICES ################ +################################################################################ + +#################### Disable select inherited options + +# none + +#################### Disable select inherited devices + +# none + +################################################################################ +# END +################################################################################ Property changes on: head/share/examples/jails/VIMAGE ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property