- 创建虚拟机
这里创建的efi磁盘稍后要删除掉,不然无法启动
磁盘要删掉
2. 导入openwrt镜像
进入pve控制台执行以下命令
wget https://mirror.sjtu.edu.cn/openwrt/releases/23.05.0/targets/x86/64/openwrt-23.05.0-x86-64-generic-squashfs-combined-efi.img
gzip -d openwrt-23.05.0-x86-64-generic-squashfs-combined-efi.img
qm disk import 117 openwrt-23.05.0-x86-64-generic-squashfs-combined-efi.img data-lvm
命令执行结果如下图
上面未使用的磁盘就是刚才导入的磁盘
3. 设置引导
passwd
ip addr del 192.168.1.1/24 dev br-lan
ip addr add 192.168.33.30/24 dev br-lan
ip route add default via 192.168.33.1
echo nameserver 192.168.33.1 > /etc/resolve.conf
sed -i 's/downloads.openwrt.org/mirror.sjtu.edu.cn\/openwrt/g' /etc/opkg/distfeeds.conf