SOLVED Cannot create jail V11.3-U3.2 U3

norskman

Contributor
Joined
Sep 28, 2012
Messages
149
I have a number of jails all working ok.
But when I create more jails I get this error:
'Invalid mac_prefix. Must match `?X????` where ? can be any valid hex digit (0-9, A-F) and X is one of 2, 6, A or E. '

I am running the latest version of FreeNAS 11.3-U3.2

I disabled the local Intel Ethernet ports on the ASUS motherboard ( Ports are reported as ASUS not intel!!) and am running the Chelsio 10G card in the PCI slot with one 10G port - works no problem including jails using VNET0 on that same single port.

NO other errors reported and looks like everything else is working.

Should I be reporting this error on the bug tracker? Or does anyone know anything about this error?
I can see that the Chelsio MAC is reported as 07XXXX which in fact does NOT match the required MAC addresing scheme. However, why should you have to change the MAC address of a real NIC anyway?
Surely this is a bug?

There does not seem to be a place in the GUI to change the MAC - although Editing the NIC does in fact show the MAC address.
There is nothing in the manual about this. I did in fact RTFM.

many thanks




DETAILED ERROR OUPUT:
Error: Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_create.py", line 495, in _create_jail
value, config = iocjson.json_check_prop(key, value, config)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_json.py", line 2440, in json_check_prop
silent=self.silent
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 103, in logit
callback(content, exception)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 76, in callback
raise callback_exception(message)
RuntimeError: Invalid mac_prefix. Must match `?X????` where ? can be any valid hex digit (0-9, A-F) and X is one of 2, 6, A or E.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 349, in run
await self.future
File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 388, in __run_body
rv = await self.middleware.run_in_thread(self.method, *([self] + args))
File "/usr/local/lib/python3.7/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.7/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 965, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py", line 771, in do_create
empty=empty
File "/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py", line 587, in create
clone_basejail=clone_basejail
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_create.py", line 100, in create_jail
return self._create_jail(jail_uuid, location)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_create.py", line 501, in _create_jail
raise RuntimeError(f"***\n{err}\n***\n")
RuntimeError: ***
Invalid mac_prefix. Must match `?X????` where ? can be any valid hex digit (0-9, A-F) and X is one of 2, 6, A or E.
***
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
In the jail GUI, this is in the Network Properties pane.

1592852487703.png


This sets a virtual MAC prefix for the 2 sides of the epairna/b interfaces for the jail (epairna outside the jail, epairnb inside the jail). This has nothing to do with the physical MACs on the interfaces.
 
Joined
Jul 10, 2016
Messages
521
This setting above changes the value for the specified jail. To change the default setting for all jails going forward, you can also enter iocage set mac_prefix=02ff60 default at the command line.
 

alwu

Dabbler
Joined
Jan 24, 2018
Messages
36
i'm running into a similar problem where i get the error message about an invalid mac_prefix. during jail creation, the gui is setting the mac_prefix to ac1f6b. does it matter what i change the prefix to or can it be any random hex number as long as it matches the pattern?

also, i have existing jails that work, but their the mac_prefix set to ac1f6b. should i change the mac_prefix for those jails to match the pattern?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Any random hex string that matches the pattern will work. If you have jails that work, I would leave them alone.
 
Top