# 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:
$ 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: ash: od: not found _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- OpenWrt 23.05.5, r24106-10cc5fcd00 -----------------------------------------------------
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/base/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_base Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/base/Packages.sig Signature check passed. Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/luci/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_luci Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/luci/Packages.sig Signature check passed. Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/packages/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_packages Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/packages/Packages.sig Signature check passed. Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/routing/Packages.gz Updated list of available packages in /var/opkg-lists/openwrt_routing Downloading https://downloads.openwrt.org/releases/23.05.5/packages/x86_64/routing/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.