Hi folks,
I'd like to run OpenWRT in an LXD container, and I wonder if it can be kept up to date by just upgrading packages with opkg (or soon apk). As the kernel is updated through the underlying Linux host, is there any reason to do the usual <backup config/upgrade/restore config> process ?
Please, can you give some specific links to this evidence ?
I have the feeling that running the only external access to my home network in an unprivileged container has some more security barriers than running it on the host itself...
And my searches around this on the forum were unsuccessful...
I run in an unprivileged LXC on proxmox with 2 vNIC, and it's been reliable and problem free for me. Updating it to a new major version is the only issue I've faced to-date. There's a couple threads that say we shouldn't be updating packages with opkg even, instead waiting for new OpenWRT releases. I donno, I've been problem free so far...but I also have the ability to snapshot my instance before running an upgrade.
Anyway, you can't upgrade a lxc container using the 'firmware upgrades' - it needs to be reinstalled.
The way I did so was
copy contents of /etc/config/interfaces from OpenWRT container to text editor
take backup of OpenWRT config in gui
create a new LXC with new root image, manually add back network adapters duplicating existing MAC addresses
boot new LXC & enter console
edit /etc/config/interfaces to match old /etc/config/interfaces
run /etc/init.d/network restart
log in to gui and restore config (reboot)
log in to gui and make any changes needed (fix dns, reinstall missing packages, etc.) to bring the new lxc to parity with old lxc