qcow2 image file
openwrt-armvirt-64.qcow2
qcow2 files cannot be uploaded to pve through webui
You need to upload it to the server using FileZilla
Remember, the path for the pve iso image folder is
/var/lib/vz/template/iso
The backup image data for pve is
Usually used to store the recoverable xxx.vma.zst files
/var/lib/vz/dump
The openwrt.qcow2 used in this article can be placed anywhere
To maintain some consistency, it is placed in the iso image directory
Create a virtual machine
Give it a random name like openwrtDemo (also remember the current VM ID, like 105, it will be used later)
Click on Advanced, check the option to start automatically
Do not use any media
Other defaults Linux 5.x-2.6 Kernel
Select UEFI BIOS
Select QEMU image format
Disk is default, will be deleted later
Category host core allocation based on configuration needs, this article allocates 1 core 4 CPUs
Memory allocated 2GB in this article
Network card select VirtIO para-virtualization
Note
Uncheck the option to start after creation (which means do not allow starting after creation)
Click finish
Delete everything in the red area
Delete the animated demonstration
Click to delete the CD directly
First click to detach the disk, then click on the unallocated disk, and click delete
Enter the pve shell
Enter the folder where you previously uploaded files via FTP
cd /var/lib/vz/template/iso
You can see the uploaded openwrt source file
openwrt-21.02.3-armvirt-64-zh-argon.qcow2
Use the command to place the openwrt qcow2 file into the newly created disk
qm importdisk 105 ./openwrt-21.02.3-armvirt-64-zh-argon.qcow2 local --format=qcow2
qm importdisk is the virtual machine disk command, 105 is the virtual machine number corresponding to the disk you want to create, which is the previous VM ID
./openwrt-21.02.3-armvirt-64-zh-argon.qcow2 is the relative directory, which is the openwrt qcow2 file in the current directory
local is the pve disk (this system pve only has local, no local-lvm, if there is local-lvm, you can change to local-lvm)
–format=qcow2 is to format the disk to the corresponding type, such as qcow2
Actual process
Go back to 105 hardware view
You can see an unused hard drive
Click edit, then click add
You can see the disk has an additional scsi0, with a size of 1GB
Select the hardware, click disk action, and choose resize
Modify the disk size
The size is incremental, this article adds 4GB, which means adding 4GB of space to the original size
Click adjust
Final disk size is 5GB
Click options
Click boot order
Check scsi0, then drag scsi0 to the first row, click ok
Boot order looks correct
Switch back to hardware
Add display output
Because openwrt does not specify serial port display output, the command line interface cannot be seen
Create a serial device 0, then specify the display output as this serial device 0
Startup process
Click on console, click start
If it gets stuck in the middle, you can try pressing enter
After successful startup, you can check the newly assigned dynamic IP in your router
For example, this 192.168.100.220 is the newly assigned IP, assigned to this virtual machine
Check the default IP of OpenWrt
Enter the command ip addr
You can see the default management IP address of OpenWrt is 192.168.1.1
We need to change it to an address in our same subnet to see the management interface
Edit the /etc/config/network file
vi /etc/config/network
Change it to 192.168.100.220 (which is the address just assigned by the router)
Click stop and then start again
This way the IP will take effect
After startup, enter the command line again to check ip addr
You can see it has changed to 192.168.100.220
Access 192.168.100.220
You can see the prompt
Click Advanced
Click Continue to Proceed
By default, there is no password
Click login
Specific usage
Take your time to explore
For example, changing the password, setting WLAN and LAN, configuring plugins, etc.
At this point, OpenWrt has been successfully set up on ARM64’s PVE
You can later add physical network ports and configure plugins to solve network issues
Once installed successfully, you can back it up in time, so that you can restore it with one click on another PVE (without the hassle of installation as described above)
END.
Send the keywordJoin Group
, to join the discussion group
If you find this article helpful, please give it a thumbs up and bookmark, see you next time.
Recommended Reading
<<HomeLab Development Board (ARM64) [PVE]: Using Win11 on PVE7>>
<<HomeLab Development Board (ARM64) [PVE]: Installing Ubuntu Server 22.04 Virtual Machine on PVE7>>
☕ Friends, if you have seen this, are you sure you won’t follow us? 👇
Leave a Comment
Your email address will not be published. Required fields are marked *