Hi all,
I'm trying to make work a vnet jail in a FreeBSD 8.2 host on vmware. I searched here and Googled a lot. A lot of references I found referred to those pages:
http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet
http://lifanov.com/doc/vimage.html
Following the first one, I compiled the kernel with VIMAGE and without SCTP and patched /etc/rc.d/jail.
Im the host rc.conf file, I have for jails:
In the jail configuration file /etc/jails/jsmb1.conf:
The virtual network stack is active in jail but I have a problem with the network configuration. The prestart and poststop commands work correctly. The earlypoststart and afterstart commands don't. If I execute the commands manually, they work.
I don't know if something changed between the moment the article was created and the 8-2 release(-p2).
Did anybody already have this problem? And how did you solve it (if you solved it)? Any advice is welcome.
Thanks.
I'm trying to make work a vnet jail in a FreeBSD 8.2 host on vmware. I searched here and Googled a lot. A lot of references I found referred to those pages:
http://wiki.polymorf.fr/index.php/Howto:FreeBSD_jail_vnet
http://lifanov.com/doc/vimage.html
Following the first one, I compiled the kernel with VIMAGE and without SCTP and patched /etc/rc.d/jail.
Code:
# uname -a
FreeBSD jsrv.host.lan 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2 #2: Tue Jun 14 16:39:14 CEST 2011 root@jsrv.host.lan:/usr/obj/usr/src/sys/JKERN i386
Code:
# egrep -v '^#|^$' /usr/src/sys/i386/conf/JKERN
include GENERIC
ident JKERN
nooptions SCTP
options VIMAGE
Im the host rc.conf file, I have for jails:
Code:
jail_enable="YES"
jail_v2_enable="YES"
jail_list=""
jail_set_hostname_allow="NO"
In the jail configuration file /etc/jails/jsmb1.conf:
Code:
jail_list="$jail_list jsmb1"
jail_jsmb1_name="jsmb1"
jail_jsmb1_hostname="jsmb1.host.lan"
jail_jsmb1_devfs_enable="YES"
jail_jsmb1_rootdir="/jails2/dir/jsmb1"
#jail_jsmb1_devfs_ruleset="devfsrules_jail"
#jail_jsmb1_exec_start="/bin/sh /etc/rc"
jail_jsmb1_vnet_enable="YES"
jail_jsmb1_exec_prestart0="ifconfig epair0 create"
jail_jsmb1_exec_prestart1="ifconfig bridge0 addm epair0a"
jail_jsmb1_exec_prestart2="ifconfig epair0a up"
jail_jsmb1_earlypoststart0="ifconfig epair0b vnet jsmb1"
#jail_jsmb1_poststart0="ifconfig epair0b vnet jsmb1"
#jail_jsmb1_afterstart0="ifconfig lo0 127.0.0.1"
#jail_jsmb1_afterstart1="ifconfig epair0b 192.168.3.89 netmask 255.255.255.0"
#jail_jsmb1_afterstart2="ifconfig add default 192.168.3.251"
#jail_jsmb1_afterstart3="/bin/sh /etc/rc"
jail_jsmb1_exec_poststop0="ifconfig bridge0 deletem epair0a"
jail_jsmb1_exec_poststop1="ifconfig epair0a destroy"
The virtual network stack is active in jail but I have a problem with the network configuration. The prestart and poststop commands work correctly. The earlypoststart and afterstart commands don't. If I execute the commands manually, they work.
I don't know if something changed between the moment the article was created and the 8-2 release(-p2).
Did anybody already have this problem? And how did you solve it (if you solved it)? Any advice is welcome.
Thanks.