[SOLVED] OpenWrt LXC installation error

diversity

Active Member
Feb 19, 2020
245
15
38
54
I'd like to create an OpenWrt lxc container. I have confirmed that the image is in order.

When creating the CT I get this error message

extracting archive '/var/lib/vz/template/cache/openwrt.tar.gz'
Total bytes read: 11192320 (11MiB, 137MiB/s)
Detected container architecture: amd64
unknown ID 'openwrt' in /etc/os-release file, trying fallback detection
TASK ERROR: unable to create CT 100 - unable to detect OS distribution

How do I work around this issue?
 
I have done this (openwrt container) and it took alot of trial and error. It can be done. I have since switched my openwrt to an actual vm because I managed to find issues (with openwrt) in an lxc environment.

Are you completely set on using openwrt in lxc or are you willing to use a vm? My openwrt vm is still sparse overall (512MB boot disk size, 512MB RAM, 1 vCPU) and I have two linux bond groups (4x NICs for LAN and 2x NICs for WAN) and the vm has no trouble with all the traffic it is processing.
 
thanks but I am already running an OpenWrt VM. I am having issues though getting wireless AP's to work as the kernel is a bit behind mainstraim. currently 5.4
 
Last edited:
  • Like
Reactions: borekon
Hello,

I'm completly new in proxmox (pve 7.1-12) and lxc.
My aim is to have 3 openwrt CT's running for testing only.

I'm trying to get OpenWrt work but I fail with the same problem.
Tested all openwrt 19.07 and 21.02 amd64 downloads ...

When I try to get an lxc conainter running like described in OpenWrt I got an lxc container running, but looks like standard lxc containers are out of scope in pve ...
Code:
$ lxc-create -n openwrt -t download -- -d openwrt -r 21.02 -a amd64
$ lxc-start -n openwrt

Is there any solution to get OpenWrt running as LXC container. No VM please ....
 
I second this request.

However this is not really a proxmox issue. This is an LXC issue. So we should focus our efforts there.

It would be great though if one of the proxmox gurus find a solution
 
having OpenWrt as a container would be great indeed.

But @ProxmoxStaff, Can you recommend any other GUI to get a true OpenWrt experience?
 
I mean it is, as far as I was able to determine, by far the best in class. even going well beyond it's class
 
How are your owrt ct's failing. I reviewed my notes on how I got my ct to work but it required a file edit (setup.pm IIRC) and it would "break" during updates. That was on proxmox6 though and I am using a vm now on proxmox7.
 
How are your owrt ct's failing. I reviewed my notes on how I got my ct to work but it required a file edit (setup.pm IIRC) and it would "break" during updates. That was on proxmox6 though and I am using a vm now on proxmox7.
I could check again for more info. But I'd rather hear from you if you ahve OpenWrt as your main driver at the moment or have moved to another solution in the time being?

Reason I ask is because I am still trying to figure out what best suits my goals
 
I use openwrt in a vm as my main router. I use openwrt on a netgear wac510 as my wireless ap. I had to compile owrt myself (at the time) for the wac510 and that also was alot of trial and error. I can test bringing up another owrt ct on my proxmox7 without the file edit and see if that starts but it won't be for a while since I'm at work and have a planned event over the weekend.
 
  • Like
Reactions: alcw and diversity
I use openwrt in a vm as my main router. I use openwrt on a netgear wac510 as my wireless ap. I had to compile owrt myself (at the time) for the wac510 and that also was alot of trial and error. I can test bringing up another owrt ct on my proxmox7 without the file edit and see if that starts but it won't be for a while since I'm at work and have a planned event over the weekend.
It's great to find an OpenWrt user here.
 
How are your owrt ct's failing. I reviewed my notes on how I got my ct to work but it required a file edit (setup.pm IIRC) and it would "break" during updates. That was on proxmox6 though and I am using a vm now on proxmox7.
pls give me some time, maybe early next week
 
OpenWrt on real hardware is no problem ...
I have a Nanopi R2S as main router, 2 Archer C7 and a WDR4900 as dump AP's, and 3 * GS108T as managed switches running. (I'm using several VLAN's) A x86 FreiFunk Offloader in fact is OpenWrt too.

So I would like to build a test environment on Proxmox with LXC containers.

And for now I did not understand, why its possible to create and run a CT with lxc-create but not via pve gui (on same machine)
And/or how to make this running container visible in pve gui.
 
After hours of investigating I have found a solution, that seems to work ...

First find the container you wish to install. I wish to use OpenWrt 21.02
In pve gui navigate to "CT Templates" and choose "Download URL"
Paste the url and choose a filename. This name is to identify the correct template afterwards. I choosed "openwrt-21.02.rootfs.tar.xz"

Next step has to be done via CLI because you have to set the parm ostype=unmanaged. This could not be done in the gui :(
The following command will create the CT.

Code:
root@pve:/# pct create 202 /var/lib/pve/local-btrfs/template/cache/openwrt-21.02.rootfs.tar.xz --arch amd64 --hostname OpenWrt-21.02 --rootfs local-btrfs:202 --memory 1024 --cores 2 --ostype unmanaged --unprivileged 1

Adding 2 network interfaces (eth0, eth1) can be done via gui or CLI.

Code:
root@pve:/# pct set 202 -net0 name=eth0,bridge=vmbr0,ip=dhcp,ip6=auto,firewall=1,type=veth
root@pve:/# pct set 202 -net1 name=eth1,bridge=vmbr0,ip=dhcp,ip6=auto,firewall=1,type=veth,tag=10

All prepared for the first start now.

After starting OpenWrt and looking into the OpenWrt console you will find, that there is just interface eth0. This is not a pve or lxc problem.
There is just no interface "LAN" defined in OpenWrt ....

You can do this via uci commands or go the easy way. Login into LuCI, which is already running , go to network and add the LAN Interface. Thats it.
 
@fowr0yl
That is along the lines of how I got my owrt ct to work in proxmox6. Nice to see it works in proxmox7 without the extra file edit. When I got mine to work, I added one nic first and it automatically showed up as a LAN. After I setup my LAN I shut down the ct, added the second nic and then restarted the ct and added the second nic as WAN.

I stopped using the ct method because there were some issues with owrt in a ct that I didn't like.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!