OpenWRT on ESXi

This guide is primarily made for Windows, but Linux users can surely adapt ;-)
Tested and confirmed working on ESXi 6.7 U3 (Build 14320388) using ‘ESXi 6.7 U2 virtual machine’ compatibility level and OpenWrt 24.10.2.
It may work on later versions of ESXi and/or OpenWrt, but this configuration is verified.

  • Download an x86/64 OpenWRT image: → https://firmware-selector.openwrt.org/ → Type x86/64 in the 'Model' field
  • Unzip the downloaded file to extract the .img file
  • Required tools:
    • qemu-img – for resizing and converting disk images
    • WinSCP – for transferring files to ESXi
    • SSH-capable terminal (e.g. PuTTY, WinCRT, or Windows Terminal) → Windows SSH guide

Note: EFI Firmware does 'not' work with OpenWRT in this setup.

  • Name: [vm_name]
  • Datastore: [datastore]
  • Guest OS: Other 4.x or later Linux (64-bit)
  • Compatibility: ESXi 6.7 U2 virtual machine
  • vCPUs: 2
  • Memory: 256 MB
  • Network Adapters:
    • Adapter 1: [LAN_portgroup], Type: VMXNET 3
    • Adapter 2: [WAN_portgroup], Type: VMXNET 3
  • SCSI Controller: VMware Paravirtual

Required: Remove the suggested Disk (You will add one later).
Optional: Remove USB controller, CD-ROM drive, and SATA controller from VM hardware — they’re not needed for OpenWRT and simplify the configuration.

Run the following commands:

qemu-img resize -f raw openwrt.img 128M
qemu-img convert -f raw -O vmdk -o adapter_type=lsilogic openwrt.img openwrt-esxi.vmdk
  • Copy openwrt-esxi.vmdk to ESXi using WinSCP → Preferably into the VM’s directory

Make sure SSH and ESXi Shell services are enabled on ESXi. Then run:

vmkfstools -i openwrt-esxi.vmdk openwrt.vmdk -d thin
  • Attach openwrt.vmdk to the VM via Paravirtual SCSI controller

Start the VM and launch the console. Run:

ip a s dev eth1
ip a s dev br-lan
  • eth1 should get a DHCP IP (WAN) → If not, swap the NIC portgroups in VM settings
  • br-lan has static IP: 192.168.1.1 → This is the address for OpenWRT’s web interface

Run:

ping -c 5 8.8.8.8
  • If you get replies, internet is working
  • If not, troubleshoot your network config

Run:

opkg update
opkg install open-vm-tools

You should now be ready to access the OpenWrt configuration pages with your favourite browser at http://192.168.1.1
Default login: no password — just click 'Login'

Suggestions, corrections, or improvements are always welcome.
If you’ve tested this guide on ESXi 6.7 U3, or other versions, and have tips to enhance it, I’d love to hear from you.
Feel free to send feedback to: 'thevancouverman(at)hotmail(dot)com'

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • Last modified: 2025/09/05 13:52
  • by olehaus