Compare commits

...

4 Commits
v7.13 ... v7.14

Author SHA1 Message Date
Kroese
c135c4cac3 feat: Add automatic device type (#749) 2024-05-27 17:25:52 +02:00
Kroese
fb1751ff26 docs: Updated issue templates (#747) 2024-05-25 14:07:30 +02:00
Kroese
34f32d4ac6 docs: Docker CLI example (#746) 2024-05-22 07:55:38 +02:00
Kroese
36f1e47c0a fix: Check for Podman IP ranges (#745) 2024-05-21 13:48:05 +02:00
9 changed files with 28 additions and 77 deletions

View File

@@ -1,35 +1,12 @@
name: "\U0001F6A8 Technical issue" name: "\U0001F6A8 Technical issue"
description: When you're experiencing problems using the container description: When you're experiencing problems using the container
body: body:
- type: checkboxes
attributes:
label: Is there no existing issue for this?
description: Please search to see if no solution was already provided before.
options:
- label: I have searched the existing issues
required: true
- type: input
id: cpu
attributes:
label: Machine specifications
description: The processor and RAM amount in your machine.
placeholder: e.g. Intel N5105 / 16 GB
validations:
required: true
- type: input - type: input
id: os id: os
attributes: attributes:
label: Operating system label: Operating system
description: The distribution and kernel version (as shown by `uname -a`). description: Your Linux distribution (can be shown by `lsb_release -a`).
placeholder: e.g. Ubuntu 24.04 / Kernel 6.8.0-22-generic placeholder: e.g. Ubuntu 24.04
validations:
required: true
- type: input
id: docker
attributes:
label: Docker version
description: The version of the Docker engine (as shown by `docker -v`).
placeholder: e.g. 26.0.1
validations: validations:
required: true required: true
- type: textarea - type: textarea

View File

@@ -3,13 +3,6 @@ description: Suggest an idea for improving the container
title: "[Feature]: " title: "[Feature]: "
labels: ["enhancement"] labels: ["enhancement"]
body: body:
- type: checkboxes
attributes:
label: Is there no existing feature request for this?
description: Please search to see if the feature was not already requested before.
options:
- label: I have searched the existing feature requests
required: true
- type: textarea - type: textarea
id: problem id: problem
attributes: attributes:

View File

@@ -3,35 +3,12 @@ description: Create a report to help us improve the container
title: "[Bug]: " title: "[Bug]: "
labels: ["bug"] labels: ["bug"]
body: body:
- type: checkboxes
attributes:
label: Is there no existing bug report for this?
description: Please search to see if the bug was not already reported before.
options:
- label: I have searched the existing bug reports
required: true
- type: input
id: cpu
attributes:
label: Machine specifications
description: The processor and RAM amount in your machine.
placeholder: e.g. Intel N5105 / 16 GB
validations:
required: true
- type: input - type: input
id: os id: os
attributes: attributes:
label: Operating system label: Operating system
description: The distribution and kernel version (as shown by `uname -a`). description: Your Linux distribution (can be shown by `lsb_release -a`).
placeholder: e.g. Ubuntu 24.04 / Kernel 6.8.0-22-generic placeholder: e.g. Ubuntu 24.04
validations:
required: true
- type: input
id: docker
attributes:
label: Docker version
description: The version of the Docker engine (as shown by `docker -v`).
placeholder: e.g. 26.0.1
validations: validations:
required: true required: true
- type: textarea - type: textarea

View File

@@ -44,7 +44,7 @@ services:
Via Docker CLI: Via Docker CLI:
```bash ```bash
docker run -it --name dsm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 vdsm/virtual-dsm docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-timeout 120 vdsm/virtual-dsm
``` ```
Via Kubernetes: Via Kubernetes:
@@ -115,12 +115,11 @@ kubectl apply -f kubernetes.yml
* ### How do I pass-through a disk? * ### 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 ```yaml
devices: devices:
- /dev/disk/by-uuid/12345-12345-12345-12345-12345:/disk2 - /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. 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.
@@ -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. 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 ```yaml
environment: environment:

View File

@@ -4,7 +4,7 @@ set -Eeuo pipefail
DEF_OPTS="-nodefaults -boot strict=on" 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') 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" 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="-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 -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" DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c"

View File

@@ -359,25 +359,29 @@ createDevice () {
local index="" local index=""
[ -n "$DISK_INDEX" ] && index=",bootindex=$DISK_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 case "${DISK_TYPE,,}" in
"auto" )
echo "$result"
;;
"usb" ) "usb" )
result="$result \ result="$result,if=none \
-device usb-storage,drive=${DISK_ID}${index}" -device usb-storage,drive=${DISK_ID}${index}"
echo "$result"
;; ;;
"ide" ) "ide" )
result="$result \ result="$result,if=none \
-device ide-hd,drive=${DISK_ID},bus=ide.$DISK_INDEX,rotation_rate=$DISK_ROTATION${index}" -device ide-hd,drive=${DISK_ID},bus=ide.$DISK_INDEX,rotation_rate=$DISK_ROTATION${index}"
echo "$result" echo "$result"
;; ;;
"blk" | "virtio-blk" ) "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}" -device virtio-blk-pci,drive=${DISK_ID},scsi=off,bus=pcie.0,addr=$DISK_ADDRESS,iothread=io2${index}"
echo "$result" echo "$result"
;; ;;
"scsi" | "virtio-scsi" ) "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 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}" -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" echo "$result"
@@ -479,7 +483,7 @@ html "Initializing disks..."
case "${DISK_TYPE,,}" in case "${DISK_TYPE,,}" in
"" ) DISK_TYPE="scsi" ;; "" ) DISK_TYPE="scsi" ;;
"ide" | "usb" | "blk" | "scsi" ) ;; "auto" | "ide" | "usb" | "blk" | "scsi" ) ;;
* ) error "Invalid DISK_TYPE, value \"$DISK_TYPE\" is unrecognized!" && exit 80 ;; * ) error "Invalid DISK_TYPE, value \"$DISK_TYPE\" is unrecognized!" && exit 80 ;;
esac esac

View File

@@ -32,4 +32,4 @@ tail -fn +0 "$QEMU_LOG" 2>/dev/null &
cat "$QEMU_TERM" 2>/dev/null & wait $! || : cat "$QEMU_TERM" 2>/dev/null & wait $! || :
sleep 1 & wait $! sleep 1 & wait $!
finish 0 [ ! -f "$QEMU_END" ] && finish 0

View File

@@ -327,10 +327,10 @@ fi
if [[ "$DHCP" == [Yy1]* ]]; then if [[ "$DHCP" == [Yy1]* ]]; then
! checkOS && exit 19 ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 19
if [[ "$GATEWAY" == "172."* ]]; then if [[ "$IP" == "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)!" warn "container IP starts with 172.* which is often a sign that you are not on a macvlan network (required for DHCP)!"
fi fi
# Configuration for DHCP IP # Configuration for DHCP IP
@@ -341,8 +341,8 @@ if [[ "$DHCP" == [Yy1]* ]]; then
else else
if [[ "$GATEWAY" != "172."* ]] && [[ "$GATEWAY" != "10."* ]]; then if [[ "$IP" != "172."* ]] && [[ "$IP" != "10.8"* ]] && [[ "$IP" != "10.9"* ]]; then
! checkOS && exit 19 ! checkOS && [[ "$DEBUG" != [Yy1]* ]] && exit 19
fi fi
# Shutdown nginx # Shutdown nginx

View File

@@ -43,7 +43,8 @@ HOST=$(hostname -s)
KERNEL=$(echo "$SYS" | cut -b 1) KERNEL=$(echo "$SYS" | cut -b 1)
MINOR=$(echo "$SYS" | cut -d '.' -f2) MINOR=$(echo "$SYS" | cut -d '.' -f2)
ARCH=$(dpkg --print-architecture) ARCH=$(dpkg --print-architecture)
CPU=$(lscpu | grep -m 1 'Model name' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g') SOCKETS=$(lscpu | grep -m 1 -i 'socket(s)' | awk '{print $(2)}')
CPU=$(lscpu | grep -m 1 -i 'model name' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g')
# Check system # Check system