Loading readme.md +4 −5 Original line number Diff line number Diff line Loading @@ -115,12 +115,11 @@ kubectl apply -f kubernetes.yml * ### How do I pass-through a disk? It is possible to pass-through disk devices directly by adding them to your compose file in this way: It is possible to pass-through a disk device directly, by adding it to your compose file in this way: ```yaml devices: - /dev/disk/by-uuid/12345-12345-12345-12345-12345:/disk2 - /dev/disk/by-uuid/45678-45678-45678-45678-45678:/disk3 ``` Make sure to bind the disk via its UUID (obtainable via `lsblk -o name,uuid`) instead of its name (`/dev/sdc`), to prevent ever binding the wrong disk when the drive letters happen to change. Loading @@ -129,11 +128,11 @@ kubectl apply -f kubernetes.yml Do NOT use this feature with the goal of sharing files from the host, they will all be lost without warning when DSM creates the volume. * ### How do I increase the amount of CPU or RAM? * ### How do I change the amount of CPU or RAM? By default, a single CPU core and 1 GB of RAM are allocated to the container. By default, the container will be allowed to use a maximum of 1 CPU core and 1 GB of RAM. If there arises a need to increase this, add the following environment variables: If you want to adjust this, you can specify the desired amount using the following environment variables: ```yaml environment: Loading src/config.sh +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ set -Eeuo pipefail DEF_OPTS="-nodefaults -boot strict=on" RAM_OPTS=$(echo "-m ${RAM_SIZE^^}" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g') CPU_OPTS="-cpu $CPU_FLAGS -smp $CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1" MAC_OPTS="-machine type=q35,usb=off,vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}" MAC_OPTS="-machine type=q35,smm=off,usb=off,vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}" DEV_OPTS="-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4" DEV_OPTS="$DEV_OPTS -object rng-random,id=objrng0,filename=/dev/urandom" DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c" Loading src/disk.sh +9 −6 Original line number Diff line number Diff line Loading @@ -359,26 +359,29 @@ createDevice () { local index="" [ -n "$DISK_INDEX" ] && index=",bootindex=$DISK_INDEX" local result="-drive file=$DISK_FILE,id=$DISK_ID,if=none,format=$DISK_FMT,cache=$DISK_CACHE,aio=$DISK_IO,discard=$DISK_DISCARD,detect-zeroes=on" local result="-drive file=$DISK_FILE,id=$DISK_ID,format=$DISK_FMT,cache=$DISK_CACHE,aio=$DISK_IO,discard=$DISK_DISCARD,detect-zeroes=on" case "${DISK_TYPE,,}" in "auto" ) echo "$result" ;; "usb" ) result="$result \ result="$result,if=none \ -device usb-storage,drive=${DISK_ID}${index}" echo "$result" ;; "ide" ) result="$result \ result="$result,if=none \ -device ide-hd,drive=${DISK_ID},bus=ide.$DISK_INDEX,rotation_rate=$DISK_ROTATION${index}" echo "$result" ;; "blk" | "virtio-blk" ) result="$result \ result="$result,if=none \ -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 \ result="$result,if=none \ -device virtio-scsi-pci,id=${DISK_ID}b,bus=pcie.0,addr=$DISK_ADDRESS,iothread=io2 \ -device scsi-hd,drive=${DISK_ID},bus=${DISK_ID}b.0,channel=0,scsi-id=0,lun=0,rotation_rate=$DISK_ROTATION${index}" echo "$result" Loading Loading @@ -480,7 +483,7 @@ html "Initializing disks..." case "${DISK_TYPE,,}" in "" ) DISK_TYPE="scsi" ;; "ide" | "usb" | "blk" | "scsi" ) ;; "auto" | "ide" | "usb" | "blk" | "scsi" ) ;; * ) error "Invalid DISK_TYPE, value \"$DISK_TYPE\" is unrecognized!" && exit 80 ;; esac Loading src/entry.sh +1 −1 Original line number Diff line number Diff line Loading @@ -32,4 +32,4 @@ tail -fn +0 "$QEMU_LOG" 2>/dev/null & cat "$QEMU_TERM" 2>/dev/null & wait $! || : sleep 1 & wait $! finish 0 [ ! -f "$QEMU_END" ] && finish 0 src/network.sh +3 −3 Original line number Diff line number Diff line Loading @@ -329,8 +329,8 @@ if [[ "$DHCP" == [Yy1]* ]]; then ! 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)!" 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 # Configuration for DHCP IP Loading @@ -341,7 +341,7 @@ if [[ "$DHCP" == [Yy1]* ]]; then else if [[ "$GATEWAY" != "172."* ]] && [[ "$GATEWAY" != "10.8"* ]] && [[ "$GATEWAY" != "10.9"* ]]; then if [[ "$IP" != "172."* ]] && [[ "$IP" != "10.8"* ]] && [[ "$IP" != "10.9"* ]]; then ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 19 fi Loading Loading
readme.md +4 −5 Original line number Diff line number Diff line Loading @@ -115,12 +115,11 @@ kubectl apply -f kubernetes.yml * ### How do I pass-through a disk? It is possible to pass-through disk devices directly by adding them to your compose file in this way: It is possible to pass-through a disk device directly, by adding it to your compose file in this way: ```yaml devices: - /dev/disk/by-uuid/12345-12345-12345-12345-12345:/disk2 - /dev/disk/by-uuid/45678-45678-45678-45678-45678:/disk3 ``` Make sure to bind the disk via its UUID (obtainable via `lsblk -o name,uuid`) instead of its name (`/dev/sdc`), to prevent ever binding the wrong disk when the drive letters happen to change. Loading @@ -129,11 +128,11 @@ kubectl apply -f kubernetes.yml Do NOT use this feature with the goal of sharing files from the host, they will all be lost without warning when DSM creates the volume. * ### How do I increase the amount of CPU or RAM? * ### How do I change the amount of CPU or RAM? By default, a single CPU core and 1 GB of RAM are allocated to the container. By default, the container will be allowed to use a maximum of 1 CPU core and 1 GB of RAM. If there arises a need to increase this, add the following environment variables: If you want to adjust this, you can specify the desired amount using the following environment variables: ```yaml environment: Loading
src/config.sh +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ set -Eeuo pipefail DEF_OPTS="-nodefaults -boot strict=on" RAM_OPTS=$(echo "-m ${RAM_SIZE^^}" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g') CPU_OPTS="-cpu $CPU_FLAGS -smp $CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1" MAC_OPTS="-machine type=q35,usb=off,vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}" MAC_OPTS="-machine type=q35,smm=off,usb=off,vmport=off,dump-guest-core=off,hpet=off${KVM_OPTS}" DEV_OPTS="-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4" DEV_OPTS="$DEV_OPTS -object rng-random,id=objrng0,filename=/dev/urandom" DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c" Loading
src/disk.sh +9 −6 Original line number Diff line number Diff line Loading @@ -359,26 +359,29 @@ createDevice () { local index="" [ -n "$DISK_INDEX" ] && index=",bootindex=$DISK_INDEX" local result="-drive file=$DISK_FILE,id=$DISK_ID,if=none,format=$DISK_FMT,cache=$DISK_CACHE,aio=$DISK_IO,discard=$DISK_DISCARD,detect-zeroes=on" local result="-drive file=$DISK_FILE,id=$DISK_ID,format=$DISK_FMT,cache=$DISK_CACHE,aio=$DISK_IO,discard=$DISK_DISCARD,detect-zeroes=on" case "${DISK_TYPE,,}" in "auto" ) echo "$result" ;; "usb" ) result="$result \ result="$result,if=none \ -device usb-storage,drive=${DISK_ID}${index}" echo "$result" ;; "ide" ) result="$result \ result="$result,if=none \ -device ide-hd,drive=${DISK_ID},bus=ide.$DISK_INDEX,rotation_rate=$DISK_ROTATION${index}" echo "$result" ;; "blk" | "virtio-blk" ) result="$result \ result="$result,if=none \ -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 \ result="$result,if=none \ -device virtio-scsi-pci,id=${DISK_ID}b,bus=pcie.0,addr=$DISK_ADDRESS,iothread=io2 \ -device scsi-hd,drive=${DISK_ID},bus=${DISK_ID}b.0,channel=0,scsi-id=0,lun=0,rotation_rate=$DISK_ROTATION${index}" echo "$result" Loading Loading @@ -480,7 +483,7 @@ html "Initializing disks..." case "${DISK_TYPE,,}" in "" ) DISK_TYPE="scsi" ;; "ide" | "usb" | "blk" | "scsi" ) ;; "auto" | "ide" | "usb" | "blk" | "scsi" ) ;; * ) error "Invalid DISK_TYPE, value \"$DISK_TYPE\" is unrecognized!" && exit 80 ;; esac Loading
src/entry.sh +1 −1 Original line number Diff line number Diff line Loading @@ -32,4 +32,4 @@ tail -fn +0 "$QEMU_LOG" 2>/dev/null & cat "$QEMU_TERM" 2>/dev/null & wait $! || : sleep 1 & wait $! finish 0 [ ! -f "$QEMU_END" ] && finish 0
src/network.sh +3 −3 Original line number Diff line number Diff line Loading @@ -329,8 +329,8 @@ if [[ "$DHCP" == [Yy1]* ]]; then ! 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)!" 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 # Configuration for DHCP IP Loading @@ -341,7 +341,7 @@ if [[ "$DHCP" == [Yy1]* ]]; then else if [[ "$GATEWAY" != "172."* ]] && [[ "$GATEWAY" != "10.8"* ]] && [[ "$GATEWAY" != "10.9"* ]]; then if [[ "$IP" != "172."* ]] && [[ "$IP" != "10.8"* ]] && [[ "$IP" != "10.9"* ]]; then ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 19 fi Loading