[PATCH] Add /etc/rc.d/vimage startup script for creating vnet jails

Devin Teske devin.teske at fisglobal.com
Sat Aug 27 17:47:17 UTC 2011


Hi All,

I'd like to submit a patch for review (attached) that adds a new /etc/rc.d script named "vimage".

_____________

The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
_____________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vimage_rc.20110827104104.patch
Type: application/octet-stream
Size: 16254 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-jail/attachments/20110827/3c8586d2/vimage_rc.20110827104104.obj
-------------- next part --------------


Essentially, a hand-tweaked version of /etc/rc.d/jail with added/removed features.

Here's how we're using it in /etc/rc.conf to successfully start up vimage jails at boot time:

========== BEGIN EXCERPT ==========
#
# Vimages
#
vimage_enable="YES"     # Set to NO to disable starting of any vimages
vimage_list="
        vnettest
" # Space-separated list of names of vimages
clone_interfaces=""     # Initialize list of epair/bridge interfaces to create

#
# Global settings for all Vimages
#
vimage_services="sshd"

####################### VIMAGE: vnettest
cloned_interfaces="$cloned_interfaces epair0 bridge0"
ifconfig_bridge0="addm fxp0 addm epair0a"
vimage_vnettest_rootdir="/usr/jails/vnettest"           # root directory
vimage_vnettest_hostname="vnettest.jbsd.vicor.com"      # hostname
vimage_vnettest_devfs_enable="YES"                      # mount devfs
vimage_vnettest_vnets="epair0b"                         # network interfaces

####################### VIMAGE: {name}
#cloned_interfaces="$cloned_interfaces epair{N} bridge{N}"
#ifconfig_bridge{N}="addm {iface} addm epair{N}a"
#vimage_{name}_rootdir="/usr/jails/{name}"              # root directory
#vimage_{name}_hostname="{hostname}"                    # hostname
#vimage_{name}_devfs_enable="YES"                       # mount devfs
#vimage_{name}_vnets="epair{N}b"                        # network interfaces
========== END EXCERPT ==========

-- 
Cheers,
Devin


More information about the freebsd-jail mailing list