jail not getting an IP address

mrjoli021

Explorer
Joined
Dec 8, 2012
Messages
50
Hello,

I am creating a jail on FreeNas 11.1-U7. When I attempt to start the jail without any changes the jail starts, but does not get an IP. I then stop the jail and realize that it has no NIC set on it. I disable DHCP and VIMAGE in order to see the dropdown list of NIC's. It doesn't matter what NIC, I choose all of them give me the error below and the Jail fails to start. I have even attempted to put a static IP and no luck their either. How can I get the jail boot up and get an IP address either through DHCP or me assigning it statically?

ClientException('[warden_exception: ifconfig: DHCP: bad value\njail: ip4.addr: not an IPv4 address: DHCP\nERROR: Failed starting jail with above command...\n]', 22, {'class': 'warden_exception', 'frames': [{'filename': '/usr/local/lib/python3.6/site-packages/middlewared/main.py', 'lineno': 173, 'method': 'call_method', 'line': '
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you want to attach a jail to a NIC you need to enable VIMAGE ...

If you want to use an IP based jail without virtualised network stack you need to define the alias address on the host first and assign it to the jail afterwards.
 

mrjoli021

Explorer
Joined
Dec 8, 2012
Messages
50
Sorry for not explaining it correctly. In order for me choose the correct NIC, I have to disable VIMAGE. Once I set the correct NIC, I reenable VIMAGE. So right now I have the following set:
IPV4 DHCP: checked
IPv4 address: DHCP
NIC: em2
Sysctls: allow.raw_sockets=true
VIMAGE: checked

and the Jail won't start. I keep getting the error below:

ClientException('[warden_exception: ifconfig: DHCP: bad value\njail: ip4.addr: not an IPv4 address: DHCP\nERROR: Failed starting jail with above command...\n]', 22, {'class': 'warden_exception', 'frames': [{'filename': '/usr/local/lib/python3.6/site-packages/middlewared/main.py', 'lineno': 173, 'method': 'call_method', 'line': '
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Leave the IPv4 address field empty. The check mark for IPv4 DHCP is enough.

If it still does not work consider upgrading to a supported release like 11.3-U5. I really cannot remember if anything about iocage and DHCP was still broken in 11.1 ...

Ooops ... come to think of it, you are not trying to configure a legacy (Warden) jail, are you? Does anyone else know from the top of their head what the state in 11.1 was? Warden still supported, yes. Up to 11.2. But does the UI offer iocage jails or only Warden with iocage via CLI only?

@mrjoli021 if this is legacy jails, simply don't do it. You won't be able to upgrade. 11.1 is dead (unsupported), Warden is dead. Upgrade first and then create your jails.

HTH,
Patrick
 
Top