diff --git a/src/disk.sh b/src/disk.sh index ed7b210..aca26c7 100644 --- a/src/disk.sh +++ b/src/disk.sh @@ -391,18 +391,24 @@ addMedia () { local index="" local DISK_ID="cdrom$DISK_BUS" [ -n "$DISK_INDEX" ] && index=",bootindex=$DISK_INDEX" - local result="-drive file=$DISK_FILE,id=$DISK_ID,if=none,format=raw,media=cdrom,readonly=on" + local result="-drive file=$DISK_FILE,id=$DISK_ID,if=none,format=raw,readonly=on,media=cdrom" case "${DISK_TYPE,,}" in "usb" ) result="$result \ - -device usb-storage,drive=${DISK_ID}${index}" + -device usb-storage,drive=${DISK_ID}${index},removable=on" + echo "$result" ;; - "ide" | "blk" | "virtio-blk" ) + "ide" ) result="$result \ -device ide-cd,drive=${DISK_ID},bus=ide.${DISK_BUS}${index}" echo "$result" ;; + "blk" | "virtio-blk" ) + result="$result \ + -device virtio-blk-pci,drive=${DISK_ID},scsi=off,bus=pcie.0,addr=$DISK_ADDRESS,iothread=io2${index}" + echo "$result" + ;; "scsi" | "virtio-scsi" ) result="$result \ -device virtio-scsi-pci,id=${DISK_ID}b,bus=pcie.0,addr=$DISK_ADDRESS,iothread=io2 \ diff --git a/src/network.sh b/src/network.sh index 50d3174..ceb688b 100644 --- a/src/network.sh +++ b/src/network.sh @@ -326,7 +326,7 @@ fi if [[ "$DHCP" == [Yy1]* ]]; then - ! checkOS && exit 19 + ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 19 if [[ "$GATEWAY" == "172."* ]]; then warn "your gateway IP starts with 172.* which is often a sign that you are not on a macvlan network (required for DHCP)!" @@ -337,8 +337,8 @@ if [[ "$DHCP" == [Yy1]* ]]; then else - if [[ "$GATEWAY" != "172."* ]] && [[ "$GATEWAY" != "10."* ]]; then - ! checkOS && exit 19 + if [[ "$GATEWAY" != "172."* ]] && [[ "$GATEWAY" != "10.8"* ]] && [[ "$GATEWAY" != "10.9"* ]]; then + ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 19 fi # Configuration for static IP diff --git a/src/proc.sh b/src/proc.sh index 60b8529..f870b9d 100644 --- a/src/proc.sh +++ b/src/proc.sh @@ -10,7 +10,7 @@ set -Eeuo pipefail if [[ "${ARCH,,}" != "arm64" ]]; then KVM="N" - warn "your CPU architecture is ${ARCH} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance." + warn "your CPU architecture is ${ARCH^^} and cannot provide KVM acceleration for ARM64 instructions, this will cause a major loss of performance." fi if [[ "$KVM" != [Nn]* ]]; then