Jails

From Freenas
Jump to: navigation, search

The previous section described how to find, install, and configure software using the Plugins method.

This section describes how to use the Jails method, which allows users who are comfortable using the command line to have more control over software installation and management.

While the Plugins method automatically created a FreeBSD jail for each installed PBI, the Jails method allows the user to create as many jails as needed and to specify the type of jail. Unlike the Plugins method, one is not limited to installing only one application per jail.

Essentially, a FreeBSD jail provides a very light-weight, operating system-level virtualization. Consider it as an independent FreeBSD operating system running on the same hardware, without all of the overhead usually associated with virtualization. This means that any software and configurations within a jail are isolated from both the FreeNAS® operating system and any other jails running on that system. During creation, some jail types provide a VIMAGE option which provides that jail with its own, independent networking stack. This allows the jail to do its own IP broadcasting, which is required by some applications.

The following types of jails can be created:

1. Plugin jail: this type of jail provides the most flexibility for software installation. Similar to the Plugins method, this type of jail supports the installation of FreeNAS® PBIs, which integrate into the FreeNAS® GUI. In addition to FreeNAS® PBIs, you can also install the following types of software within a plugin jail: FreeBSD ports and FreeBSD pkgng packages. However, only FreeNAS® PBIs can be managed from the GUI as the other types of software are managed from the command line of the jail. Further, the other types of jails do not support the ability to install FreeNAS® PBIs. If you plan to install FreeNAS® PBIs, create a plugin jail.

2. Port jail: 2. this type of jail supports the installation of FreeBSD ports and FreeBSD pkgng packages. It does not support the installation of FreeNAS® PBIs, meaning that any software installed in this type of jail must be managed from the command line of the jail.

3. Standard jail: this type of jail is functionally the same as a port jail. A distinction is made for those users who prefer to separate network services, such as DHCP or DNS servers, from other installed software.

4. Linux jail: due to the FreeBSD linux binary compatibility layer, Linux can be installed into a jail and software can be installed using the package management system provided by the installed Linux distro. At this time, the Linux distro must be a 32-bit version and any applications installed into the jail must be available as a 32-bit binary.

Table 10a summarizes the type of software which can be installed into each type of jail. Click the name of the type of software for instructions on how to install that type of software.

NOTE: the software which can be installed into a Linux jail is limited to the command line package management tool provided by that Linux distribution. If you install software into a Linux jail, install the 32-bit version of the software.

Table 10a: What Type of Software can be Installed Into a Jail?

Type of Jail FreeNAS® PBI FreeBSD pkgng package FreeBSD port
Plugin yes yes yes
Port no no, unless vanilla is unchecked during jail creation yes
Standard no no, unless vanilla is unchecked during jail creation yes
Linux no no no

The ability to create multiple jails and multiple types of jails offers great flexibility and application separation to the administrator. For example, one could create a separate plugin jail for each FreeNAS® plugin, a separate port jail for each application that is not available as a FreeNAS® plugin, and a separate standard jail for each installed network server. Alternately, one has the ability to create one jail and to mix and match how the software is installed into that jail.

The rest of this section describes the following:

Personal tools
Navigation