Unverified Commit c1fda2c4 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Check diskspace during download (#551)

parent 14162c0a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ Docker container for running virtual machines using QEMU.

It allows you to create VM's which behave just like normal containers, meaning you can manage them using all your existing tools (like Portainer) and configure them in a language (YAML) you are already familiar with.

This greatly reduces the learning curve and also eliminates the need for a dedicated Proxmox or ESXi server in many cases.
This greatly reduces the learning curve and eliminates the need for a dedicated Proxmox or ESXi server in many cases.

It uses high-performance QEMU options (like KVM acceleration, kernel-mode networking, IO threading, etc.) to achieve near-native speed.

+6 −6
Original line number Diff line number Diff line
@@ -21,33 +21,33 @@ SECURE="off"
[[ "$SMM" == [Yy1]* ]] && SECURE="on"

case "${BOOT_MODE,,}" in
  uefi)
  "uefi" )
    BOOT_DESC=" with UEFI"
    ROM="OVMF_CODE_4M.fd"
    VARS="OVMF_VARS_4M.fd"
    ;;
  secure)
  "secure" )
    SECURE="on"
    BOOT_DESC=" securely"
    ROM="OVMF_CODE_4M.secboot.fd"
    VARS="OVMF_VARS_4M.secboot.fd"
    ;;
  windows | windows_plain)
  "windows" | "windows_plain" )
    ROM="OVMF_CODE_4M.fd"
    VARS="OVMF_VARS_4M.fd"
    ;;
  windows_secure)
  "windows_secure" )
    TPM="Y"
    SECURE="on"
    BOOT_DESC=" securely"
    ROM="OVMF_CODE_4M.ms.fd"
    VARS="OVMF_VARS_4M.ms.fd"
    ;;
  windows_legacy)
  "windows_legacy" )
    BOOT_DESC=" (legacy)"
    USB="usb-ehci,id=ehci"
    ;;
  legacy)
  "legacy" )
    BOOT_OPTS=""
    ;;
  *)
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ info "$msg..." && html "$msg..."
fKill "progress.sh"

msg="Failed to download $BOOT"
(( rc == 3 )) && error "$msg , cannot write file (disk full?)" && exit 60
(( rc == 4 )) && error "$msg , network failure!" && exit 60
(( rc == 8 )) && error "$msg , server issued an error response!" && exit 60
(( rc != 0 )) && error "$msg , reason: $rc" && exit 60
+4 −5
Original line number Diff line number Diff line
@@ -296,8 +296,7 @@ checkOS() {
  [[ "${name,,}" == *"microsoft"* ]] && os="Windows"

  if [ -n "$os" ]; then
    error "You are using Docker Desktop for $os which does not support macvlan, please revert to bridge networking!"
    return 1
    warn "you are using Docker Desktop for $os which does not support macvlan, please revert to bridge networking!"
  fi

  return 0
@@ -369,19 +368,19 @@ fi

if [[ "$DHCP" == [Yy1]* ]]; then

  ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 20
  checkOS

  if [[ "$IP" == "172."* ]]; then
    warn "container IP starts with 172.* which is often a sign that you are not on a macvlan network (required for DHCP)!"
  fi

  # Configure for macvtap interface
  ! configureDHCP && exit 21
  ! configureDHCP && exit 20

else

  if [[ "$IP" != "172."* ]] && [[ "$IP" != "10.8"* ]] && [[ "$IP" != "10.9"* ]]; then
    ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 22
    checkOS
  fi

  if [[ "${NETWORK,,}" != "user"* ]]; then