feat: Change raw allocation (#320)

This commit is contained in:
Kroese 2024-01-13 00:02:52 +01:00 committed by GitHub
parent b3598088bc
commit 7998d931bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -433,6 +433,14 @@ fi
DISK_EXT="$(fmt2ext "$DISK_FMT")" || exit $? DISK_EXT="$(fmt2ext "$DISK_FMT")" || exit $?
if [ -z "$ALLOCATE" ]; then
if [[ "${DISK_FMT,,}" == "raw" ]]; then
ALLOCATE="Y"
else
ALLOCATE="N"
fi
fi
if [[ "$ALLOCATE" == [Nn]* ]]; then if [[ "$ALLOCATE" == [Nn]* ]]; then
DISK_TYPE="growable" DISK_TYPE="growable"
DISK_ALLOC="preallocation=off" DISK_ALLOC="preallocation=off"

View file

@ -12,8 +12,8 @@ trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
# Docker environment variables # Docker environment variables
: ${BOOT:=''} # URL of the ISO file : ${BOOT:=''} # URL of the ISO file
: ${DEBUG:='N'} # Disable debugging mode : ${DEBUG:='N'} # Disable debugging
: ${ALLOCATE:='N'} # Disable preallocation : ${ALLOCATE:=''} # Preallocate diskspace
: ${ARGUMENTS:=''} # Extra QEMU parameters : ${ARGUMENTS:=''} # Extra QEMU parameters
: ${CPU_CORES:='1'} # Amount of CPU cores : ${CPU_CORES:='1'} # Amount of CPU cores
: ${RAM_SIZE:='1G'} # Maximum RAM amount : ${RAM_SIZE:='1G'} # Maximum RAM amount