Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| lxc_openwrt_host [2021/09/19 09:07] – reorder darksky2 | lxc_openwrt_host [2021/09/22 08:05] – [Setup on the OpenWRT host] darksky2 | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| This example was using OpenWRT ARM64 MVEBU ESPRESSOBIN et ESPRESSOBIN ULTRA. | This example was using OpenWRT ARM64 MVEBU ESPRESSOBIN et ESPRESSOBIN ULTRA. | ||
| + | [[https:// | ||
| ==== Setup on the OpenWRT host ==== | ==== Setup on the OpenWRT host ==== | ||
| Install some necessary tools and prerequisites: | Install some necessary tools and prerequisites: | ||
| Line 22: | Line 23: | ||
| < | < | ||
| - | Install the lxc packages | + | Install the core lxc packages: |
| - | < | + | < |
| - | Check the kernel config to see if anything required is missing: | + | FIXME: Note that getopt should be a package dependency, see: [[https:// |
| - | < | + | |
| + | Additional packages exist that can add functionality but that aren't strictly required. | ||
| + | < | ||
| + | |||
| + | FIXME: Note that until [[https:// | ||
| + | |||
| + | Edit ''/ | ||
| + | < | ||
| + | |||
| + | Optionally check the kernel config to see if anything required is missing: | ||
| + | < | ||
| + | # lxc-checkconfig | ||
| LXC version 4.0.5 | LXC version 4.0.5 | ||
| --- Namespaces --- | --- Namespaces --- | ||
| Line 95: | Line 107: | ||
| < | < | ||
| - | Alternatively, | + | Alternatively, |
| Example: | Example: | ||
| Line 112: | Line 124: | ||
| lxc-create: myLMS: tools/ | lxc-create: myLMS: tools/ | ||
| - | ==== List container and status | + | ==== Container management |
| + | |||
| + | To list the installed containers and query their status, use **lxc-ls**: | ||
| < | < | ||
| NAME STATE | NAME STATE | ||
| myLMS STOPPED 0 | myLMS STOPPED 0 | ||
| - | ==== Starting the container ==== | + | Start and stop containers with **lxc-start** and **lxc-stop** respectively: |
| < | < | ||
| root@ultra: | root@ultra: | ||
| Line 123: | Line 138: | ||
| myLMS RUNNING 0 | myLMS RUNNING 0 | ||
| - | ==== Stopping the container ==== | ||
| < | < | ||
| root@ultra: | root@ultra: | ||
| Line 129: | Line 143: | ||
| myLMS STOPPED 0 | myLMS STOPPED 0 | ||
| - | ==== Networking | + | Setup networking |
| < | < | ||
| ... | ... | ||
| Line 139: | Line 153: | ||
| lxc.net.0.hwaddr = 00: | lxc.net.0.hwaddr = 00: | ||
| - | ==== Optionally mount a share from the OpenWRT host inside the guest ==== | + | Optionally mount a share from the OpenWRT host inside the guest |
| Make sure to create the path to the share in the container, then edit the container config adding the following line: | Make sure to create the path to the share in the container, then edit the container config adding the following line: | ||
| < | < | ||
| Line 172: | Line 186: | ||
| ==== Auto start the container on OpenWRT host ==== | ==== Auto start the container on OpenWRT host ==== | ||
| - | < | + | < |
| + | uci show lxc-auto | ||
| uci add lxc-auto container | uci add lxc-auto container | ||
| uci set lxc-auto.@container[-1].name=myLMS | uci set lxc-auto.@container[-1].name=myLMS | ||