Skip to content

Instantly share code, notes, and snippets.

@jnaudon
Forked from subrezon/openwrt-on-proxmox.md
Created December 31, 2024 14:00
Show Gist options
  • Save jnaudon/a95702654a889b8367798eedf9e36e10 to your computer and use it in GitHub Desktop.
Save jnaudon/a95702654a889b8367798eedf9e36e10 to your computer and use it in GitHub Desktop.

Revisions

  1. @subrezon subrezon revised this gist Nov 18, 2024. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions openwrt-on-proxmox.md
    Original file line number Diff line number Diff line change
    @@ -21,14 +21,16 @@ qemu-img resize -f raw openwrt-*.img 8G

    Do not start the VM yet.

    5) Import the resized OpenWRT image into the new VM:
    5) Import the resized OpenWRT image into the new VM (replace VMID and STORAGEID with yours):

    ```
    qm importdisk *VMID* openwrt-*.img *STORAGEID*
    qm importdisk VMID openwrt-*.img STORAGEID
    ```

    6) Go to the VM -> Hardware, select the newly imported disk named "Unused Disk 0", press "Edit", set it to VirtIO with "Discard" and "IO Thread" enabled, then press OK.

    7) Add whatever networking or other devices you need.
    7) Go to the VM -> Options -> Boot Order, make sure that ```virtio0``` is at the top and is the only one that is ticked.

    8) You're done! Start the VM and enjoy all the routing.
    8) Add whatever networking or other devices you need.

    9) You're done! Start the VM and enjoy all the routing.
  2. @subrezon subrezon created this gist Feb 15, 2023.
    34 changes: 34 additions & 0 deletions openwrt-on-proxmox.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    1) Go to OpenWRT [release page](https://downloads.openwrt.org/releases/), select the latest release stable release, then ```targets``` -> ```x86``` -> ```64```. Right-click ```generic-ext4-combined.img.gz``` (not the "efi"!) and copy the link.

    2) On the Proxmox host, download the archive and unpack it:

    ```
    wget *paste link here*
    gunzip openwrt-*.img.gz
    ```

    3) Resize the image to be the size you want your VM's disk to be (example with 8 GiB):

    ```
    qemu-img resize -f raw openwrt-*.img 8G
    ```

    4) Create a new VM in Proxmox. Make sure to use:

    * No installation media
    * SeaBIOS
    * No drives

    Do not start the VM yet.

    5) Import the resized OpenWRT image into the new VM:

    ```
    qm importdisk *VMID* openwrt-*.img *STORAGEID*
    ```

    6) Go to the VM -> Hardware, select the newly imported disk named "Unused Disk 0", press "Edit", set it to VirtIO with "Discard" and "IO Thread" enabled, then press OK.

    7) Add whatever networking or other devices you need.

    8) You're done! Start the VM and enjoy all the routing.