we are running some jails in FreeBSD 10 and the decision has been made to decommission the FreeBSD server and migrate all the jails to Linux environment Red Hat 6 or 7.

Is there a straight forward way of migrating BSD jails to linux -- as containers that can be run via docker

or any other way to convert BSD jails to containers and pull/run via docker again.

Any other way of doing it ? I'm unsure whether this is actually possible or not because I tried reading on google but has not come across anything like that.


Depending of your current running services, it can be straightforward. Lot of tools are available between these two platforms.

  1. backup your server, jails and every data. If you are using zfs, you can use zfs snapshot with zfs send and zfs receive. If you don't have ZFS, and use standard FreeBSD filesystem, you can use mksnap_ffs. I hope you have decent solution to backup your data, like bacula, little hard to use the first time, but really useful if you make mistakes!

  2. list all your services on FreeBSD server or FreeBSD jails (e.g. service -le), don't forget to migrate cronjob (all crontabs are stored in /var/cron/tabs on FreeBSD) and at job if you are using it.

  3. try to find same service working on RHEL server, you can use yum search, freshports and pbone. Be careful with this step, FreeBSD has recent version of software, RHEL freeze its package collection, read release notes before doing something wrong and test configuration compatibility.

  4. make your test platform with all these information.

  5. test your services.

  6. read logs. If something go wrong, read FreeBSD and RHEL documentation concerning your issue.

I don't know how your platform is configured currently, but, if all data (customer, backend...) are remotely stored on SAN or NAS (e.g. NFS, iSCSI...), it can be really easy to migrate. In this particular case, only configuration on FreeBSD and RHEL server will be modified.

Last advice: read old log and try to find working/not working pattern on it and replay it on your new testing platform.


You are going to have to port the applications one by one im afraid as has previously been mentioned the linux containers and bsd jails are two completely different things. This shouldn't be to hard for opensource applications as you can match the versions and then copy the configs and data. Bear in mind some things will need tweaking, eg anything that references network interfaces etc as they are bound to be different. Hopefully there isn't any funky networking going on with vimage as that will complicate things.