I have already found some (older) threads here, but they won't fit anymore. I tried to compile my own image but without success, it won't even start.
Any ideas or an guide? I downloaded an overloaded image and this works, but I want a custom one
thx so long!
edit: I use that "QEMU ARM Virtual Machine" and Cortex-a53
Have you tried creating a rootfs tarball from official sources? Creating a container from there is easy
Also I see some prebuilt containers on docker hub like https://hub.docker.com/r/unifreq/openwrt-aarch64
Unfortunately my lxc is armV7 (32bits) so can't really help here.
Maybe you should start a new thread about the lxc issue @tmomas please move this thread to Installing and using Openwrt
Running OpenWrt on qemu/ kvm is a fully supported solution (just your hypervisor needs to work/ be stable, but that's outside of OpenWrt's realm), running it on lxc/ docker is not (the host kernel needs to support everything OpenWrt needs, but that isn't the case, including in some security sensitive areas, as OpenWrt uses kernel patches and sysctl settings relied upon by firewall and other facilities).
I am using qemu/ kvm for testing OpenWrt and other stuff, however x86 only (never had an RPi, nor any other ARM based SBC), never played with proxmox and always with recent mainline kernels (v6.0.0 right now) on the host, so I can't offer much help with your proxmox-ARM issues.
In general, I would advise against running a virtualized OpenWrt in production, not because it doesn't work (it does), but because doing so adds considerable complexity (you need to maintain two things in lockstep, the hypervisor and your OpenWrt VM, get them to agree on the networking setup, while also exposing the hypervisor to the internet - in return, you get non-funny layering and chicken-vs-egg issues (you need internet to upgrade the hypervisor, but you only have internet with the VM running, let alone dhcp/ dns)). At least for home uses, there is value in simple setups - WAN-in, LAN-out on dedicated cables, if something breaks, replace the router with another one.
Using a virtual OpenWrt is fine for testing, maybe to provide routing for optional VLANs - or if you're really running an enterprise environment with hot-failover and similar things, but in that case hypervisor administration would be a major component in your day-to-day work. At home, it's just easier and more reliable to run your router on bare iron (be it x86_64, RPi4 or a plastic router), following KISS principles.
I was able to successfully run OpenWrt as a container on Pimox( Rpi 4 Proxmox 7). First I tried running UEFI version that "varoudis" provided at https://github.com/varoudis/openwrt_arm64_uefi. In one of his pull requests, he does share details of his VM at this link https://github.com/varoudis/openwrt_arm64_uefi/issues/1. The key to properly get a working OpenWrt VM is to have BIOS as UEFI and Display output needs to be set for Serial Port.
The catch is that after creating and running the container no display output works from console. To surpass that I had to open a terminal on server and enter into the container
pct enter "container id"
Then I had some real struggle setting up the network which I finally got sorted. Following is the network config for my Container.
I am trying to follow your way to launch the OpenWRT 22.03.3 inside (I used the default-root image from here, but using pct enter [container_id] I can run uci command of OpenWRT so I assume OK?)
My setup has 3 dedicated ethernet ports (1 for PiMox, 2 for OpenWRT), assigned 2 NICs to the container but my client computer doesn't get address from it, do I need extra setting?
Edit: I just find that it's the DHCPv4 unable to get by client, reason unknown, if I manual configure v4 address then it can ping OpenWRT container! However opkg won't work....
echo "tty1::askfirst:/usr/libexec/login.sh" >> /etc/inittab
For the default settings (console mode: tty)
You can also bring it up by setting console mode to shell.
Sorry to bump an old thread. But yes, openwrt isn't exactly configured out of the box with proxmox's expectations for a console in mind.
Is your container a privileged one? I found that with a non privileged container by default I have trouble with some DHCPv6 issue as well as clients unable to get IP address from OpenWrt container. Though I already managed to solve the later problem already.