Update openwrt.sh

This commit is contained in:
Sam Heinz
2024-12-31 03:02:48 +10:00
committed by GitHub
parent 414ccb5d4c
commit a1d51ea790
+3 -2
View File
@@ -467,10 +467,10 @@ done
msg_info "Creating OpenWrt VM" msg_info "Creating OpenWrt VM"
qm create $VMID -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \ qm create $VMID -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \
-onboot 1 -ostype l26 -scsihw virtio-scsi-pci --tablet 0 -onboot 1 -ostype l26 -scsihw virtio-scsi-pci --tablet 0
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 64M 1>&/dev/null
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \ qm set $VMID \
-efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -efidisk0 ${DISK0_REF},efitype=4m,size=64M \
-scsi0 ${DISK1_REF},size=512M \ -scsi0 ${DISK1_REF},size=512M \
-boot order=scsi0 \ -boot order=scsi0 \
-tags proxmox-helper-scripts \ -tags proxmox-helper-scripts \
@@ -500,6 +500,7 @@ send_line_to_vm "uci set firewall.@zone[1].input='ACCEPT'"
send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'" send_line_to_vm "uci set firewall.@zone[1].forward='ACCEPT'"
send_line_to_vm "uci commit" send_line_to_vm "uci commit"
send_line_to_vm "halt" send_line_to_vm "halt"
qm stop $VMID
msg_ok "Network interfaces have been successfully configured." msg_ok "Network interfaces have been successfully configured."
until qm status $VMID | grep -q "stopped"; do until qm status $VMID | grep -q "stopped"; do
sleep 2 sleep 2