Compare commits

..

29 Commits
v4.02 ... v4.08

Author SHA1 Message Date
Kroese
c33c63114e Merge pull request #278 from lauwie007/master
Update to DSM 7.2 build 64570-1
2023-06-20 21:40:44 +02:00
lauwie007
80169e6b50 Update to DSM 7.2 build 64570-1
New dsm release (previous version returned  an error for me)
2023-06-20 21:36:08 +02:00
Kroese
61f733fe66 Line breaks
Line breaks
2023-06-09 09:58:31 +02:00
Kroese
03da1f38f4 fix: Line breaks 2023-06-09 09:57:55 +02:00
Kroese
8543ea5dad Update to DSM 7.2 build 64570
Update to DSM 7.2 build 64570
2023-06-09 09:48:21 +02:00
Kroese
36ebb950eb Update to DSM 7.2 build 64570 2023-06-09 09:47:44 +02:00
Kroese
76ad3ff502 Add host MAC address
Add host MAC address
2023-05-29 14:03:07 +02:00
Kroese
4673feb282 feat: Add host MAC address 2023-05-29 13:53:02 +02:00
Kroese
df6436bf6a Use dots as seperator
Use dots as seperator
2023-05-29 05:03:56 +02:00
Kroese
d904ebfc85 fix: Use dots as seperator 2023-05-29 04:54:21 +02:00
Kroese
b78342328f Add host model environment variable
Add host model environment variable
2023-05-29 02:57:42 +02:00
Kroese
36c89f0556 feat: Add host model 2023-05-29 02:56:47 +02:00
Kroese
1c62acd1a1 Add host MAC address as environment variable
Add host MAC address as environment variable
2023-05-29 02:22:55 +02:00
Kroese
0795fd1277 feat: Add host MAC address 2023-05-29 02:18:33 +02:00
Kroese
c509ef5ac4 feat: Add host MAC address 2023-05-29 02:10:10 +02:00
Kroese
46be2d583d fix: Decrease delay 2023-05-27 13:26:39 +02:00
Kroese
3441350087 fix: Don't redirect stdout 2023-05-27 07:13:43 +02:00
Kroese
d132b6afa9 Add device cgroup rules
Add device cgroup rules
2023-05-25 23:21:07 +02:00
Kroese
8d0efe7379 feat: Add device cgroup rules 2023-05-25 23:17:10 +02:00
Kroese
2ad9dcc24c Readme
Readme
2023-05-25 23:12:53 +02:00
Kroese
24ab417e9e docs: DHCP mode 2023-05-25 23:10:15 +02:00
Kroese
bc9d3ffc9b docs: DHCP mode 2023-05-25 23:08:20 +02:00
Kroese
4904109b9e Readme
Readme
2023-05-25 22:14:48 +02:00
Kroese
436eca45cc docs: DSM version 2023-05-25 22:09:21 +02:00
Kroese
daa91af2d5 docs: cgroup wildcard 2023-05-25 22:05:33 +02:00
Kroese
3416507ec5 Display QEMU version
Display QEMU version
2023-05-25 20:42:48 +02:00
Kroese
e9a5b50893 feat: Display QEMU version 2023-05-25 20:41:30 +02:00
Kroese
848dd9172d Default to DSM 7.0.1 on ARM systems
Default to DSM 7.0.1 on ARM systems
2023-05-25 14:48:31 +02:00
Kroese
585adabaee fix: Default to DSM 7.0.1 on ARM systems 2023-05-25 14:47:47 +02:00
6 changed files with 26 additions and 13 deletions

View File

@@ -124,7 +124,7 @@ else
fi
delay=5000
delay=500
elapsed=$((($(date +%s%N) - ts)/1000000))
if [[ delay -gt elapsed ]]; then
@@ -143,9 +143,11 @@ else
MSG="http://${IP}:5000"
fi
echo ""
info "--------------------------------------------------------"
info " You can now login to DSM at ${MSG}"
info "--------------------------------------------------------"
echo ""
# Wait for NMI interrupt as a shutdown signal

View File

@@ -10,6 +10,8 @@ services:
devices:
- /dev/kvm
- /dev/vhost-net
device_cgroup_rules:
- 'c *:* rwm'
cap_add:
- NET_ADMIN
ports:

View File

@@ -152,10 +152,10 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
devices:
- /dev/vhost-net
device_cgroup_rules:
- 'c 511:* rwm'
- 'c *:* rwm'
```
Please note that the exact `cgroup` rule number may vary depending on your system, but the log output will indicate the correct number in the event of an error.
Please note that even if you don't need DHCP, it's still recommended to enable this feature as it prevents NAT issues and increases performance by using a `macvtap` interface.
* ### How do I install a specific version of vDSM?
@@ -163,7 +163,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
```yaml
environment:
URL: "https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat"
URL: "https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
```
With this method, you are able to switch between different versions while keeping your file data.

View File

@@ -9,9 +9,11 @@ DL="https://global.synologydownload.com/download/DSM"
if [ -z "$URL" ]; then
URL="$DL/release/7.2/64561/DSM_VirtualDSM_64561.pat"
#URL="$DL/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat"
#URL="$DL/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
if [ "$ARCH" == "amd64" ]; then
URL="$DL/release/7.2/64570-1/DSM_VirtualDSM_64570.pat"
else
URL="$DL/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
fi
fi
@@ -98,10 +100,10 @@ if [ -f "${RDC}" ]; then
mv /run/extract/scemd /run/extract/syno_extract_system_patch
chmod +x /run/extract/syno_extract_system_patch
rm -rf "$TMP" && mkdir -p "$TMP"
fi
rm -rf "$TMP" && mkdir -p "$TMP"
info "Install: Downloading $(basename "$URL")..."
PAT="/$BASE.pat"
@@ -136,6 +138,7 @@ else
apt-get -qq --no-install-recommends -y install qemu-user > /dev/null
export DEBIAN_FRONTEND=""
export DEBCONF_NOWARNINGS=""
fi
@@ -147,9 +150,10 @@ else
{ qemu-x86_64 /run/extract/syno_extract_system_patch "$PAT" "$TMP/."; rc=$?; } || :
fi
(( rc != 0 )) && error "Failed to extract PAT file, reason $rc" && exit 63
export LD_LIBRARY_PATH=""
(( rc != 0 )) && error "Failed to extract PAT file, reason $rc" && exit 63
fi
HDA="$TMP/hda1"

View File

@@ -22,6 +22,7 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
STORAGE="/storage"
KERNEL=$(uname -r | cut -b 1)
ARCH=$(dpkg --print-architecture)
VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1)
[ ! -d "$STORAGE" ] && error "Storage folder (${STORAGE}) not found!" && exit 13
@@ -85,7 +86,7 @@ trap - ERR
set -m
(
[[ "${DEBUG}" == [Yy1]* ]] && set -x
[[ "${DEBUG}" == [Yy1]* ]] && info "$VERS" && set -x
qemu-system-x86_64 ${ARGS:+ $ARGS} & echo $! > "${_QEMU_PID}"
{ set +x; } 2>/dev/null
)

View File

@@ -4,10 +4,12 @@ set -Eeuo pipefail
# Docker environment variables
: ${HOST_CPU:=''}
: ${HOST_MAC:=''}
: ${HOST_BUILD:=''}
: ${HOST_DEBUG:=''}
: ${HOST_SERIAL:=''}
: ${GUEST_SERIAL:=''}
: ${HOST_MODEL:=''}
: ${HOST_VERSION:=''}
: ${HOST_TIMESTAMP:=''}
@@ -26,10 +28,12 @@ else
fi
HOST_ARGS=()
HOST_ARGS+=("-cpu=${CPU_CORES}")
HOST_ARGS+=("-cpu_arch=${HOST_CPU}")
[ -n "$CPU_CORES" ] && HOST_ARGS+=("-cpu=${CPU_CORES}")
[ -n "$HOST_MAC" ] && HOST_ARGS+=("-mac=${HOST_MAC}")
[ -n "$HOST_BUILD" ] && HOST_ARGS+=("-build=${HOST_BUILD}")
[ -n "$HOST_MODEL" ] && HOST_ARGS+=("-model=${HOST_MODEL}")
[ -n "$HOST_SERIAL" ] && HOST_ARGS+=("-hostsn=${HOST_SERIAL}")
[ -n "$GUEST_SERIAL" ] && HOST_ARGS+=("-guestsn=${GUEST_SERIAL}")
[ -n "$HOST_VERSION" ] && HOST_ARGS+=("-version=${HOST_VERSION}")
@@ -41,7 +45,7 @@ if [[ "${HOST_DEBUG}" == [Yy1]* ]]; then
{ set +x; } 2>/dev/null
echo
else
./run/host.bin "${HOST_ARGS[@]}" > /dev/null 2>&1 &
./run/host.bin "${HOST_ARGS[@]}" 2> /dev/null &
fi
# Configure serial ports