Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| docs:guide-user:virtualization:lxc [2019/05/07 14:22] – created aparcar1 | docs:guide-user:virtualization:lxc [2024/07/28 00:56] (current) – Grammar and spelling memicinn19 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | OpenWrt in LXC containers | + | ====== |
| - | OpenWrt can run inside | + | OpenWrt can run inside |
| - | The following gives a rough idea on how to get thing up and running. Before anything, install LXC on the host machine and make sure it supports running unprivileged containers. | + | ===== Privileged vs Unprivileged ===== |
| - | There is currently no template | + | Consult your distro |
| - | * Unordered List ItemCreate | + | |
| - | * Download a snapshot rootfs | + | |
| - | * Create a '' | + | |
| - | '' | + | ===== Basic Overview ===== |
| + | |||
| + | The following gives a rough idea on how to get things up and running. Before anything, install LXC on the host machine and make sure it supports running unprivileged containers. You will likely also need bridge functionality and/or additional underlying related subsystems (macvlan, etc.) if used. | ||
| + | |||
| + | ==== Installing via image ==== | ||
| + | For some (//amd64//, //arm//...) architectures, | ||
| + | To create the OpenWrt container, just do: | ||
| + | < | ||
| + | and spell the release you want to install when asked to. For any error related to fetching the GPG key, just specify a different keyserver (e.g. keyserver.ubuntu.com) by either setting | ||
| + | |||
| + | The container will be created according to your default LXC config files (unless you use '' | ||
| + | |||
| + | === Upgrading to the latest release === | ||
| + | Once a new release becomes available, as announced by the OpenWrt team, you can install and migrate to it: | ||
| + | - install the new release image as above (it will typically be available within the next day) | ||
| + | - replace the new container' | ||
| + | - backup the settings of the currently running OpenWrt as you would usually do, and shut it down | ||
| + | - start the new container and, if it's safe to do so (as it usually is for minor releases), restore OpenWrt settings from backup | ||
| + | |||
| + | Note: if you are still getting the previous image after more than 24h since the new release (images are currently built daily by lxc), chances are an old cached image is being used. In this case, you can delete the old image by appending the '' | ||
| + | ==== Installing via rootfs extraction ==== | ||
| + | For all other architectures, | ||
| + | - Create the VM folder manually at '' | ||
| + | - Download a snapshot rootfs of OpenWrt and unpack it to '' | ||
| + | - Create a '' | ||
| lxc.include = / | lxc.include = / | ||
| lxc.include = / | lxc.include = / | ||
| Line 32: | Line 53: | ||
| # adapt < | # adapt < | ||
| lxc.rootfs.path = dir:/ | lxc.rootfs.path = dir:/ | ||
| - | + | </ | |
| - | '' | + | |
| - | + | | |
| - | | + | - run '' |
| - | | + | |