Compare commits

..

No commits in common. "master" and "v7.35" have entirely different histories.

9 changed files with 14 additions and 29 deletions

View File

@ -21,7 +21,6 @@ body:
attributes: attributes:
label: Docker compose label: Docker compose
description: The compose file (or otherwise the `docker run` command used). description: The compose file (or otherwise the `docker run` command used).
render: yaml
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -29,7 +28,6 @@ body:
attributes: attributes:
label: Docker log label: Docker log
description: The logfile of the container (as shown by `docker logs dsm`). description: The logfile of the container (as shown by `docker logs dsm`).
render: shell
validations: validations:
required: true required: true
- type: textarea - type: textarea

View File

@ -23,7 +23,6 @@ body:
attributes: attributes:
label: Docker compose label: Docker compose
description: The compose file (or otherwise the `docker run` command used). description: The compose file (or otherwise the `docker run` command used).
render: yaml
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -31,7 +30,6 @@ body:
attributes: attributes:
label: Docker log label: Docker log
description: The logfile of the container (as shown by `docker logs dsm`). description: The logfile of the container (as shown by `docker logs dsm`).
render: shell
validations: validations:
required: true required: true
- type: textarea - type: textarea

View File

@ -61,9 +61,9 @@ ADD --chmod=775 https://raw.githubusercontent.com/sud0woodo/patology/refs/heads/
VOLUME /storage VOLUME /storage
EXPOSE 22 139 445 5000 EXPOSE 22 139 445 5000
ENV RAM_SIZE="2G" ENV RAM_SIZE="1G"
ENV CPU_CORES="2"
ENV DISK_SIZE="16G" ENV DISK_SIZE="16G"
ENV CPU_CORES="1"
HEALTHCHECK --interval=60s --start-period=45s --retries=2 CMD /run/check.sh HEALTHCHECK --interval=60s --start-period=45s --retries=2 CMD /run/check.sh

View File

@ -47,7 +47,7 @@ services:
##### Via Docker CLI: ##### Via Docker CLI:
```bash ```bash
docker run -it --rm --name dsm -p 5000:5000 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v "${PWD:-.}/dsm:/storage" --stop-timeout 120 vdsm/virtual-dsm docker run -it --rm --name dsm -p 5000:5000 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/dsm:/storage --stop-timeout 120 vdsm/virtual-dsm
``` ```
##### Via Kubernetes: ##### Via Kubernetes:
@ -135,7 +135,7 @@ kubectl apply -f https://raw.githubusercontent.com/vdsm/virtual-dsm/refs/heads/m
### How do I change the amount of CPU or RAM? ### How do I change the amount of CPU or RAM?
By default, the container will be allowed to use a maximum of 2 CPU cores and 2 GB of RAM. By default, the container will be allowed to use a maximum of 1 CPU core and 1 GB of RAM.
If you want to adjust this, you can specify the desired amount using the following environment variables: If you want to adjust this, you can specify the desired amount using the following environment variables:

View File

@ -320,7 +320,7 @@ convertDisk() {
msg="Conversion of $DISK_DESC" msg="Conversion of $DISK_DESC"
html "$msg completed..." html "$msg completed..."
info "$msg to $DST_FMT completed successfully!" info "$msg to $DST_FMT completed succesfully!"
return 0 return 0
} }

View File

@ -8,9 +8,7 @@ set -Eeuo pipefail
: "${DISPLAY:="none"}" # Display type : "${DISPLAY:="none"}" # Display type
: "${RENDERNODE:="/dev/dri/renderD128"}" # Render node : "${RENDERNODE:="/dev/dri/renderD128"}" # Render node
CPU_VENDOR=$(lscpu | awk '/Vendor ID/{print $3}') if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then
if [[ "$GPU" != [Yy1]* ]] || [[ "$CPU_VENDOR" != "GenuineIntel" ]] || [[ "$ARCH" != "amd64" ]]; then
[[ "${DISPLAY,,}" == "none" ]] && VGA="none" [[ "${DISPLAY,,}" == "none" ]] && VGA="none"
DISPLAY_OPTS="-display $DISPLAY -vga $VGA" DISPLAY_OPTS="-display $DISPLAY -vga $VGA"

View File

@ -176,11 +176,7 @@ getHostPorts() {
configureUser() { configureUser() {
if [ -z "$IP6" ]; then NET_OPTS="-netdev user,id=hostnet0,host=${VM_NET_IP%.*}.1,net=${VM_NET_IP%.*}.0/24,dhcpstart=$VM_NET_IP,hostname=$VM_NET_HOST"
NET_OPTS="-netdev user,id=hostnet0,host=${VM_NET_IP%.*}.1,net=${VM_NET_IP%.*}.0/24,dhcpstart=$VM_NET_IP,hostname=$VM_NET_HOST"
else
NET_OPTS="-netdev user,id=hostnet0,ipv4=on,host=${VM_NET_IP%.*}.1,net=${VM_NET_IP%.*}.0/24,dhcpstart=$VM_NET_IP,ipv6=on,hostname=$VM_NET_HOST"
fi
local forward local forward
forward=$(getUserPorts "$USER_PORTS") forward=$(getUserPorts "$USER_PORTS")
@ -209,9 +205,8 @@ configureNAT() {
# Check port forwarding flag # Check port forwarding flag
if [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then if [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then
{ sysctl -w net.ipv4.ip_forward=1 > /dev/null 2>&1; rc=$?; } || : { sysctl -w net.ipv4.ip_forward=1 > /dev/null; rc=$?; } || :
if (( rc != 0 )) || [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then if (( rc != 0 )) || [[ $(< /proc/sys/net/ipv4/ip_forward) -eq 0 ]]; then
[[ "$PODMAN" == [Yy1]* ]] && return 1
error "IP forwarding is disabled. $ADD_ERR --sysctl net.ipv4.ip_forward=1" error "IP forwarding is disabled. $ADD_ERR --sysctl net.ipv4.ip_forward=1"
return 1 return 1
fi fi

View File

@ -17,8 +17,8 @@ echo " For support visit $SUPPORT"
: "${CONSOLE:="N"}" # Disable console mode : "${CONSOLE:="N"}" # Disable console mode
: "${ALLOCATE:=""}" # Preallocate diskspace : "${ALLOCATE:=""}" # Preallocate diskspace
: "${ARGUMENTS:=""}" # Extra QEMU parameters : "${ARGUMENTS:=""}" # Extra QEMU parameters
: "${CPU_CORES:="2"}" # Amount of CPU cores : "${CPU_CORES:="1"}" # Amount of CPU cores
: "${RAM_SIZE:="2G"}" # Maximum RAM amount : "${RAM_SIZE:="1G"}" # Maximum RAM amount
: "${RAM_CHECK:="Y"}" # Check available RAM : "${RAM_CHECK:="Y"}" # Check available RAM
: "${DISK_SIZE:="16G"}" # Initial data disk size : "${DISK_SIZE:="16G"}" # Initial data disk size
: "${STORAGE:="/storage"}" # Storage folder location : "${STORAGE:="/storage"}" # Storage folder location

View File

@ -113,15 +113,15 @@ cpu() {
local cpu="" local cpu=""
ret=$(lscpu) ret=$(lscpu)
if grep -qi "model name" <<< "$ret"; then if grep -qi "model name" <<< "$ret"; then
cpu=$(echo "$ret" | 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') cpu=$(echo "$ret" | 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')
fi fi
if [ -z "${cpu// /}" ] && grep -qi "model:" <<< "$ret"; then if [ -z "${cpu// /}" ] && grep -qi "model:" <<< "$ret"; then
cpu=$(echo "$ret" | grep -m 1 -i 'model:' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g') cpu=$(echo "$ret" | grep -m 1 -i 'model:' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g')
fi fi
cpu="${cpu// CPU/}" cpu="${cpu// CPU/}"
cpu="${cpu// 4 Core/}" cpu="${cpu// 4 Core/}"
cpu="${cpu// 6 Core/}" cpu="${cpu// 6 Core/}"
@ -130,10 +130,7 @@ cpu() {
cpu="${cpu// 12 Core/}" cpu="${cpu// 12 Core/}"
cpu="${cpu// 16 Core/}" cpu="${cpu// 16 Core/}"
cpu="${cpu// 32 Core/}" cpu="${cpu// 32 Core/}"
cpu="${cpu// 48 Core/}"
cpu="${cpu// 64 Core/}" cpu="${cpu// 64 Core/}"
cpu="${cpu// 96 Core/}"
cpu="${cpu// 128 Core/}"
cpu="${cpu//7th Gen /}" cpu="${cpu//7th Gen /}"
cpu="${cpu//8th Gen /}" cpu="${cpu//8th Gen /}"
cpu="${cpu//9th Gen /}" cpu="${cpu//9th Gen /}"
@ -150,8 +147,7 @@ cpu() {
cpu="${cpu// Core TM/ Core}" cpu="${cpu// Core TM/ Core}"
cpu="${cpu// with Radeon Graphics/}" cpu="${cpu// with Radeon Graphics/}"
cpu="${cpu// with Radeon Vega Graphics/}" cpu="${cpu// with Radeon Vega Graphics/}"
cpu="${cpu// with Radeon Vega Mobile Gfx/}"
[ -z "${cpu// /}" ] && cpu="Unknown" [ -z "${cpu// /}" ] && cpu="Unknown"
echo "$cpu" echo "$cpu"