Cbsd jail setup

From wikinotes
Revision as of 02:43, 9 June 2020 by Will (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Generally, cbsd is used similarly to vagrant.
Build instructions are written to CBSDfile, and the server is built using sudo cbsd up.

Documentation

CBSDfile docs https://www.bsdstore.ru/en/cbsdfile.html

Initial Config

# pass params by file
cat << EOF > /root/cbsd.conf
  workdir="/usr/jails"
  nodename="auto"
EOF
/usr/local/cbsd/sudoexec/initenv /root/cbsd.conf

# pass params by envvars
env workdir=/usr/jails /usr/local/cbsd/sudoexec/initenv

# interactive setup
cbsd initenv-tui

Usage

sudo cbsd jconstruct-tui  # interactively create a jail
sudo cbsd start           # start all jails/vms

sudo cbsd jls             # list jails
sudo cbsd jstop  <jail>   # stop jail
sudo cbsd jstart <jail>   # start jail

sudo cbsd bases           # list base images