mirror of
https://github.com/AuxXxilium/arv-v-dsm.git
synced 2024-11-23 23:10:58 +07:00
feat: Change qcow allocation (#555)
This commit is contained in:
parent
f935c1e28a
commit
53e0330e21
@ -95,7 +95,6 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
environment:
|
environment:
|
||||||
ALLOCATE: "N"
|
|
||||||
DISK_FMT: "qcow2"
|
DISK_FMT: "qcow2"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -422,6 +422,14 @@ addDevice () {
|
|||||||
|
|
||||||
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"
|
||||||
|
@ -15,7 +15,7 @@ trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
|
|||||||
: ${DEBUG:='N'} # Disable debugging mode
|
: ${DEBUG:='N'} # Disable debugging mode
|
||||||
: ${COUNTRY:=''} # Country code for mirror
|
: ${COUNTRY:=''} # Country code for mirror
|
||||||
: ${CONSOLE:='N'} # Disable console mode
|
: ${CONSOLE:='N'} # Disable console mode
|
||||||
: ${ALLOCATE:='Y'} # Preallocate diskspace
|
: ${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
|
||||||
|
Loading…
Reference in New Issue
Block a user