Skip to content

Instantly share code, notes, and snippets.

@rikka0w0
Last active March 27, 2024 13:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rikka0w0/bfdf235271d0b152cf85a1fea36f9d8d to your computer and use it in GitHub Desktop.
Save rikka0w0/bfdf235271d0b152cf85a1fea36f9d8d to your computer and use it in GitHub Desktop.
Install an OpenWrt KVM on a PVE host machine
  1. Install PVE using the official ISO and create a KVM with 512MB of ram and no disk.
  2. In the PVE host shell, run these commands to import the official OpenWrt image into the VM:
cd /tmp
wget https://downloads.openwrt.org/releases/23.05.2/targets/x86/64/openwrt-23.05.2-x86-64-generic-squashfs-combined-efi.img.gz
gunzip openwrt-23.05.2-x86-64-generic-squashfs-combined-efi.img.gz
# Replace 101 with the VM ID 
qm importdisk 101 openwrt-23.05.2-x86-64-generic-squashfs-combined-efi.img local-lvm

https://medium.com/@aj.abdelwahed/openwrt-on-proxmox-ve-turn-your-raspberry-pi-into-a-networking-powerhouse-ee61bd2f342c

Somehow, the official download is extremely slow in Australia. If encounter this case, replace https://downloads.openwrt.org/ in the URL with https://mirror.0x.sg/openwrt/

  1. The first network interface in the OpenWrt VM should be the LAN interface, the second one (If present) will be the WAN interface.
  2. SSH Access: https://gist.github.com/lynus/3446706

Why KVM not LXC?

LXC is not officially supported by OpenWrt, patches and tricks are required.

Why squashfs not ext4?

squashfs is easier to upgrade and factory reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment