OpenWrt news, tools, tips and discussion. Related projects, such as DD-WRT, Tomato and OpenSAN, are also on-topic.
OpenWRT over Proxmox in a mini pc Ryzen 5
Hi all, OpenWRT newbie here. I just got a new minipc with Ryzen 5 6650U. I just installed Proxmox and I wqs thinking about replacing my router with a VM. The minipc has got 2xRJ45 2.5Gb Realtek and a Wifi6e m2 card (Mediatek MT7921). Right now my internet connection is a FTTC 50Mb download, 15Mb upload; in less then a month I’ll get FTTH 2500/100. My plan is simple: - disable every function in my router (wifi, dhcp, dns) but keep using it to convert old phone cable to ethernet cable (in the future I’ll use external ONU to convert fiber to ethernet); - install OpenWRT in a VM; - connect the router to one of the two minipc RJ45 (eth0); - connect my devices to the other RJ45 of the minipc (eth1); right now I have only one computer but in the future I’ll use a switch; - create a WLAN to connect the other devices;
Could you please help me with OpenWRT configuration for the above? Could you please help me with passing the right network devices from Proxmox to VM? Is there a way to still access Proxmox web console if OpenWRT VM is down? I’ll always have a spare router as a backup…
Thank you so much for your help!

there are two methods to install openwrt on proxmox -- either vm or lxc. I would suggest vm in this case because of the possibility of passing through pcie WiFi NIC and use it as a hotspot. Rough steps are as follows:
In Proxmox admin panel, go to your node, then system > network, create virtual switches (linux bridge) vmbr0 and vmbr1. Let vmbr0 be your WAN and add your Ethernet port eno0 as its bridged port. Similarly, vmbr1 is your LAN, with eno1 as its bridged port.
Prepare a OpenWrt VM by following this tutorial. I suggest 8GB disk, 1 vCPU (host), 512MB RAM. When downloading image, you can use ext4-efi-combined, and contrary to the tutorial, BIOS choose OVMF without adding UEFI disk. Also pcie passthrough the MT7921 to this vm. It will not affect bluetooth because the Bluetooth part of MT7921 is very likely enumerated as a USB device (lsusb to make sure). https://i12bretro.github.io/tutorials/0405.html
after successfully logging in, run filesystem expansion script found here https://openwrt.org/docs/guide-user/advanced/expand_root
Log in to Luci, then Network > Interface and configure LAN and WAN there. basically your eth0 should correspond to the physical WAN port and is set to DHCP and DHCPv6. eth1 should be added to a br-lan which will have static address say 192.168.11.1/24
opkg update && opkg install qemu-ga to install the Qemu Guest Agent
To enable MT7921, you might need to install the following packages with opkg: kmod-mt7921-common kmod-mt7921-firmware wireless-tools iwinfo kmod-cfg80211 iw-full wpad
restart and see if Network > Wireless appears. You should be able to use it as a AP with encrypted password. If not, there may be some package missing, and `logread` command is your friend. Sometimes choosing `auto` for channels breaks the wireless because of DFS not working. You can instead designate channel # manually based on the specific country you are in.
As long as your host having the driver of WiFi, you can also use LXC and pass the device to OpenWrt container (I did it with USB WiFi NIC as test)
And for wireless, by default it's disabled and you need to edit /etc/config/wireless to enable it first.
I v got similar problem
Let me know if you resolve it :)
Don't use a PC running other systems as an edge device.
It’s inside a VM and I’ll always have a spare router if it’s not working :)
Not a good idea to put your core router as a VM. If the pc ever goes down, so does your whole network.
I’ll always have a spare router if it’s not working :)
Router as a VM is fine, but not on a pc used for work/hobby activities every day.