Fighting with vnet / jails epair and so on
Philipp Huebner
philipp.huebner at fdrive.com.au
Thu Jan 19 22:34:02 UTC 2012
On 19/01/12 18:22, Denny Schierz wrote:
> hi,
>
> Am 18.01.2012 um 23:21 schrieb Philipp Huebner:
>>
>> I use 9.0.0 release for host and jail and a generic kernel with
>> OPTIONS VIMAGE being the only change/addition. No problem.
>
> so, how looks your rc.conf config ? Do you use vimage the tool? I
> can't use vimage (as I know) on sparc64.
/etc/rc.conf
=============================
jail_enable="YES"
jail_v2_enable="YES"
jail_dir=/etc/jails
jail_list=`ls ${jail_dir}`
for j in ${jail_list}; do
. ${jail_dir}/${j}
done
=============================
/etc/jails/dhcp
=============================
jail_dhcp_name="dhcp"
jail_dhcp_hostname="dhcp.vv.fda"
jail_dhcp_devfs_enable="YES"
jail_dhcp_rootdir="/jails/dhcp/20120110"
jail_dhcp_vnet_enable="YES"
jail_dhcp_exec_prestart0="ifconfig epair9 create"
jail_dhcp_exec_prestart1="ifconfig bridge300 addm epair9a"
jail_dhcp_exec_prestart2="ifconfig epair9a up"
jail_dhcp_exec_earlypoststart0="ifconfig epair9b vnet dhcp"
jail_dhcp_exec_afterstart0="/etc/rc.jail"
#jail_dhcp_exec_poststop0="ifconfig bridge300 deletem epair9a"
#jail_dhcp_exec_poststop1="ifconfig epair9a destroy"
=============================
/jails/dhcp/20120110/etc/rc.jail
=============================
#!/bin/sh
. /etc/rc.conf
echo "#"
echo "# Starting JAIL: $hostname"
echo "#"
/etc/rc.d/netif start
route add default $defaultrouter
/etc/rc.d/sshd start
/usr/local/etc/rc.d/nrpe2 start
/usr/local/etc/rc.d/isc-dhcpd start
echo "#"
echo "# JAIL $hostname is now up and running!"
echo "#"
echo
==============================
I do not use (and never have) the vimage commandline tool.
Regards,
Philipp
More information about the freebsd-stable
mailing list