Table of Contents

How to install a LXC container

The following describes the current options on how to setup and install an LXC container onto a Netmodule router.

Before you start you need a licence for virtualisation on your router. Once that is ensured you can enable virtualisation on the router and setup an example container. This documents describes the two ways (manual & automatic) used to setup a container.

Prerequisites

Resources

Automatic Setup

Using router Software >= 4.6.0.101(4.1.0.102) allows you to download and setup containers automatically from an URL.

  1. Open GUI and go to System → Virtualization
  2. Click + to add container
  3. By settings, choose type, create a description and select storage. Root file system will be set automatically
  4. You have to enable networking, go to “Networking”, select routed or bridged by the Network Interface and press Apply (working Network connection is required)
  5. You should see a following screen (if you chose extended storage, the path will have storage1 instead of storage0: /mnt/storage1/lxc/guest0)
  6. Once you applied your virtualisation settings, select the “Install” tab from the virtualisation menu. Provide the URL of your container archive (needs to be .tar.xz).

After those setps your archive gets automatically downloaded and extracted and the rootfs will be stored under /mnt/storage0/lxc/guest0

Manual Setup

  1. Download the container
  2. Open GUI and go to System → Virtualization
  3. Click + to add container
  4. By settings, choose type, create a description and select storage. Root file system will be set automatically
  5. If you want to enable networking, go to “Networking”, select routed or bridged by the Network Interface and press Apply
  6. You should see a following screen (if you chose extended storage, the path will have storage1 instead of storage0: /mnt/storage1/lxc/guest0)
  7. Transfer the downloaded container (you can use WinSCP) to the router and put in /mnt/storage0/lxc
  8. Unpack the container:
     xz -cd /tmp/containerName.tar.xz | tar x -C ./guest0 
  9. The extracted container contains a rootfs directory which is now stored under /mnt/storage0/lxc/guest0.
  10. Type
     lxc-start –n guest0 
  11. Information about container can be accesed by typing
     lxc-info –n guest0 

  12. Now you can attach to the container by typing
     lxc-attach –n guest0 

start container in foreground mode

 lxc-start –F –n guest0 

to get more Information