jail starts but doesn't start

Host's /etc/rc.conf

Code:
    ifconfig_bge0="inet 192.168.224.11 netmask 255.255.255.0"
    defaultrouter="192.168.224.1"
    sshd_enable="YES"
     
    linux_enable="YES"
    zfs_enable="YES"
    jail_enable="YES"
    jail_list="www0 dns0 smarty0 centos"
     
    ifconfig_bge0_alias0="inet 192.168.224.12 netmask 255.255.255.255"
    jail_www0_rootdir="/tank/jails/www0"
    jail_www0_hostname="www0"
    jail_www0_ip="192.168.224.12"
    jail_www0_devfs_enable="YES"
    jail_www0_exec_stop="/etc/rc.shutdown"
     
    #JAIL READY TO USE, JUST NEEDS APPROPRIATE FSTAB ENTRIES
    #ENTRIES ARE IN LOADER.CONF
    #TRIED TO BOOT WITH REQUIRED FSTAB BUT IT BROKE SO I REVERTED
    #5/3/11 MH
    #ifconfig_bge0_alias1="inet 192.168.224.13 netmask 255.255.255.255"
    #jail_deb0_rootdir="/tank/jails/deb0"
    #jail_deb0_hostname="deb0"
    #jail_deb0_ip="192.168.224.13"
    #jail_deb0_devfs_enable="YES"
    #jail_deb0_exec_start="/etc/init.d/rc 3"
    #jail_deb0_exec_stop="/etc/init.d/rc 0"
    #jail_deb0_flags="-l -u root"
     
    ifconfig_bge0_alias1="inet 192.168.224.14 netmask 255.255.255.255"
    jail_dns0_rootdir="/tank/jails/dns0"
    jail_dns0_hostname="dns0"
    jail_dns0_ip="192.168.224.14"
    jail_dns0_devfs_enable="YES"
    jail_dns0_exec_stop="/etc/rc.shutdown"
     
    ifconfig_bge0_alias2="inet 192.168.224.15 netmask 255.255.255.255"
    jail_smarty0_rootdir="/tank/jails/smarty0"
    jail_smarty0_hostname="smarty0"
    jail_smarty0_ip="192.168.224.15"
    jail_smarty0_devfs_enable="YES"
    jail_smarty0_exec_stop="/etc/rc.shutdown"
     
    ifconfig_bge0_alias3="inet 192.168.224.16 netmask 255.255.255.255"
    jail_centos_rootdir="/tank/jails/centos"
    jail_centos_hostname="centos"
    jail_centos_ip="192.168.224.16"
    jail_centos_devfs_enable="YES"

Result of jls after /etc/rc.d/jail starts centos (notice there's no entry for centos)

Code:
   JID  IP Address      Hostname                      Path
     1  192.168.224.12  www0                          /tank/jails/www0
     2  192.168.224.14  dns0                          /tank/jails/dns0
     3  192.168.224.15  smarty0                       /tank/jails/smarty0

No error messages when starting or stopping centos jail.
/var/run contains jail_centos.id
Alias exists on bge0.

So I tried [cmd=]jexec 4 /bin/bash[/cmd] figuring jls just isn't showing the centos jail for some reason but:
Code:
jexec: jail_attach(4): Invalid argument

Anybody have any idea about what might be happening here?
 
The alias exists because the variable you used has nothing to do with jails. The pid is probably a left over from a previous run. It's simply not started.

Remove the *_alias entries, they are useless because you also have jail_*_ip. Add a jail_*_interface to bind the jail to a specific interface.
 
That's useful info but doesn't really have anything to do with the problem I described. The issue is the centos jail has an environment setup in its root directory, entries in rc.conf, and doesn't give any errors when I start or stop it but it doesn't show up in jls and I have no way of accessing it. It's as if it isn't even started.
 
Back
Top