# increase the raw disk root@sense:~# qemu-img resize -f raw ./openwrt.raw 1024M Image resized.
Convert OpenWRT image to VM disk:
1 2 3 4 5 6 7 8 9
# import the raw disk to OpenWRT VM root@sense:~# qm importdisk 104 openwrt.raw local-lvm Use of uninitialized value $dev in hash element at /usr/share/perl5/PVE/QemuServer/Drive.pm line 555. importing disk 'openwrt.raw' to VM 104 ... Logical volume "vm-104-disk-0" created. transferred 0.0 B of 1.0 GiB (0.00%) ... transferred 1.0 GiB of 1.0 GiB (100.00%) unused0: successfully imported disk 'local-lvm:vm-104-disk-0'
Double click the Unused Disk, then click the Add button:
Configure OpenWRT
Start up VM; change the user root password; set LAN ip address temporarily to 192.168.2.3 (Default: 192.168.1.1):
$ ssh -l root 192.168.2.3 The authenticity of host '192.168.2.3 (192.168.2.3)' can't be established. ED25519 key fingerprint is SHA256:AggWAL1oU8+r1f84KoqpvcsYUylZOTfN0sXwHSby3b0. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.2.3' (ED25519) to the list of known hosts. root@192.168.2.3's password: _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- OpenWrt 23.05.5, r24106-10cc5fcd00 -----------------------------------------------------
root@OpenWrt:~# ls -al /var/opkg-lists/ drwxr-xr-x 2 root root 320 Dec 6 03:15 . drwxrwxrwt 17 root root 440 Dec 6 03:15 .. -rw-r--r-- 1 root root 72705 Dec 6 03:15 openwrt_base -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_base.sig -rw-r--r-- 1 root root 10039 Dec 6 03:15 openwrt_core -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_core.sig -rw-r--r-- 1 root root 100416 Dec 6 03:15 openwrt_kmods -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_kmods.sig -rw-r--r-- 1 root root 197242 Dec 6 03:15 openwrt_luci -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_luci.sig -rw-r--r-- 1 root root 516243 Dec 6 03:15 openwrt_packages -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_packages.sig -rw-r--r-- 1 root root 9918 Dec 6 03:15 openwrt_routing -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_routing.sig -rw-r--r-- 1 root root 58240 Dec 6 03:15 openwrt_telephony -rw-r--r-- 1 root root 142 Dec 6 03:15 openwrt_telephony.sig
There is some issue with IPv6 support in OpenWRT when download update. Errors thrown when wan connected to a IPv6 router:
1 2 3 4 5 6 7 8 9 10 11 12 13
root@OpenWrt:~# opkg update Downloading https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/Packages.gz *** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/Packages.gz ... Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/telephony/Packages.gz *** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/telephony/Packages.gz
Collected errors: * opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/Packages.gz, wget returned 4. * opkg_download: Check your network settings and connectivity. ... * opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/telephony/Packages.gz, wget returned 4. * opkg_download: Check your network settings and connectivity.
Turn off IPv6 on router to workaround.
1 2 3 4 5 6 7 8 9 10
root@OpenWRT:~# opkg update Downloading https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_core Downloading https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/packages/Packages.sig Signature check passed. ... Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/telephony/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_telephony Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/telephony/Packages.sig Signature check passed.