Questions about using OpenWrt as x64 lxc guest?

Hi, I have been using recent OpenWRT x64 snapshot builds as kvm guest on daily basis. I like living on the cutting edge and won't call it production evironment because it's just my homelab, downtime is no issue. Everything is working nicely at the moment.

I am planning to make it further to lxc guest for daily use but hesitate.

The advantages of linux containers, and OpenWRT running as one are well discussed, so I won't repeat here.

Things that I am not sure:

  1. OpenWRT as an lxc guest, is essentially running on top of the host kernel, in my case, 5.0 kernel for Ubuntu 19.04 without OpenWRT's own customized kernel tweaks.

I suppose, aside from backports, not all patches in OpenWRT source codes are for kernel size scale down, there are tweaks targeted specifically at network application. So will packages dependant on patched kernel modules work as intended if OpenWRT is running on a generic 5.0 x64 kernel? Will I miss something?

  1. If I want to build a custom package-bundled OpenWRT snapshot rootfs image for unprivileged lxc container, rather than use ones from, what extra steps will be needed besides standard buildroot compilation?

  2. Will regular sysupgrade precedure work on the said containers?

Would someone knowledgable please shed some lights on this. Thanks.

1 Like
  1. The regular upgrade procedure for a rootfs is to replace it... so yes... it will work.

As for the rest... you have to try it and see...

OpenWrt on LXC is not so common... and for those that use it the underlying-OS-variances and pace of development make hard and fast answers the understudy to real world use.

it will never be an "out of the box -> all documented features supported" system...

tackling hickups on an application basis would be the way forward... i think you'll find that the hostOS is the one that provides most of the challenges...