--------------------------------------------------------------------
Setting Up the OpenWRT Disk
--------------------------------------------------------------------
01. Select the Proxmox node name in the left navigation menu
02. Click Shell in the left sub-navigation
03. Run the following commands in the terminal
lookup the latest stable version number
regex='≪strong≫Current Stable Release - OpenWrt ([^/]*)≪\/strong≫' && response=$(curl -s https://openwrt.org) && [[ $response =~ $regex ]] && stableVersion="${BASH_REMATCH[1]}"
download openwrt image
wget -O openwrt.img.gz https://downloads.openwrt.org/release...
extract the openwrt img
gunzip ./openwrt.img.gz
rename the extracted img
mv ./openwrt*.img ./openwrt.raw
increase the raw disk to 512 MB
qemu-img resize -f raw ./openwrt.raw 512M
import the disk to the openwrt vm
update the vm id and storage device as needed
usage: qm importdisk
qm importdisk 123 openwrt.raw HDD_500GB
04. Once the disk import completes, select the OpenWRT VM from the left navigation menu ≫ Hardware
05. Double click the Unused Disk ≫ Click the Add button
06. Select Options from the left sub-navigation menu
07. Double click Boot Order
08. Check the Enabled box next to the hard disk
09. Drag the Hard disk up in the boot order as needed, typically below the CD-ROM device
10. Click OK
11. Double click Use tablet pointer ≫ Uncheck the Enabled box ≫ Click OK
12. Click the Start button in the top right of the screen
13. Click the Console link to watch the boot process
14. Wait for the text to stop scrolling and press Enter
15. Run the following command to change/set the root password
passwd
16. Type a new root password twice to set it
17. Continue the configuration by running the following commands
set the lan ip address, use something in the same subnet as your LAN
uci set network.lan.ipaddr='10.10.27.151'
restart network services
service network restart
update openwrt packages
opkg update
install the luci web ui
opkg install luci
18. Open a new browser tab and navigate to http://IPofVM, http://10.10.27.151 in the example
19. At the login screen, enter the username root and the password set above ≫ Click the Login button
20. Enjoy OpenWRT running in Proxmox