This is an old revision of the document!


Virtualisation / LXC on NetModule Wireless Routers

Netmodule Routers offer virtualisation through lxc containers which offer a great way of implementing your own custom services. The following page will give you an overview about lxc containers, their concept as well as example use cases and ready to use containers.

Possibilities

  • Server functionalities / replacing PCs
  • Dedicted services (ex: running a webserver)
  • More functions than SDK
  • Personal freedom on a specific product
  • No worries about connectivity

Limits

  • No Microsoft Windows
  • Kernel is predefined on the host (no additional kernel modules)
  • Flash/Space
  • No High-End CPU power
  • Only ARM based software
  • Not suitable Use-Cases: Live Video Encoding, Bitcoin Mining

Internals

LXC containers allow you to run multiple isolated Linux systems or applications on a single host. They differ from traditional virtual machines because there is no hypervisor nor full OS required meaning that the containers all use the same kernel from the host system each running in their own isolated environment (done through cgroups and namespaces). Therefore they offer an environment as close as possible to a full VM but without the overhead that comes with running a separate kernel and simulating all the hardware.

Container Internals

Devices

What Devices can be mapped into LXC

Networking

To establish network connectivity from a container to the outside world you have two main options. Please be aware that the amount of available interfaces depends on your router model.

Generally you can either create a routed interface, where you set your own IP settings that will connect the router (through a virtual interface, virt0) to the guest interface of your cotnainer. The other option is that you bridge the containers interface to an existing one on the router.

Routed and Bridged Interfaces → Detailed Subpage

Examples

Generic

Container Templates

Always up-to-date generic containers can be found on the official jenkins of linuxcontainers.org. Once you select the Linux OS of your flavor, be sure that you download your container for the armhf architecture to ensure it will be compatible with the router.

This is a great way to have a fresh start for your own container or to try a newer version of a specific OS. Please be aware that those contain just a basic container OS that can then be customized to ones needs.

The following list contains some generic OS based Containers, that are available through our ftp server:

  • Ubuntu Bionic Beaver 18.04 LTS (armhf) / md5sum: f91b9f6ff431fdc01194bc100fde296f / Download
  • Debian Stretch (armhf) / md5sum: 6b716a50df69404dfe54f61021374008 / Download
  • Debian Jessie (armhf) / md5sum: b3907135c41721a70cfbd72cc2873cda / Download
  • Alpine Linux 3.8 (armhf) / md5sum: 80bfd7775c48757d37124c844b88d5e9 / Download

Example Containers

Here are some ready to use containers and descriptions about the setup:

Integrating Software into a Container

Lifecycle

Overview of typicle “Duties” during a lifecycle: Creating, Provision, Installing, Updating

Provisioning

Possibilites of Provisioning a Container _→ new Wiki page

Installing

Maintaining Containers