Compiling a custom FreeBSD kernel to enable VNET support for jails
One issue I had while replacing FreeNAS with FreeBSD was that, by defualt, vnet support isn’t enabled in the kernel. To resolve this, I compiled a custom kernel as follows:
Step 1 - download the kernel sources
Change the FreeBSD version, as appropriate.
Step 2 - create a custom config
Once you’ve got a copy of the generic kernel configuration (
MYKERNEL), make any required changes. In my case, I added the following, as per the instructions on the iocage README:
Step 3 - build and install the kernel
Let me know if you have any questions or… more importantly, if there’s an easier way of doing this!