Compare commits

...

13 Commits
v4.06 ... v4.09

Author SHA1 Message Date
Kroese
64257d1a6f Fix issue #281 and #283
Fix issue #281 and #283
2023-07-03 12:02:33 +02:00
Kroese
d6dde093b2 docs: Resize info 2023-07-03 11:59:40 +02:00
Kroese
d1957f5eb7 fix: Fix issue #281 2023-07-03 11:38:11 +02:00
Kroese
f3f9a9f480 fix: Fix issue #281 2023-07-03 11:26:10 +02:00
Kroese
15d67203c9 fix: Fix issue #283 2023-07-03 11:11:47 +02:00
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
6 changed files with 25 additions and 9 deletions

View File

@@ -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

@@ -60,6 +60,8 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti
environment:
DISK_SIZE: "256G"
```
This can also be used to resize the existing disk to a larger capacity without data loss.
* ### How do I change the location of the virtual disk?

View File

@@ -39,7 +39,9 @@ if [ -f "${DATA}" ]; then
if [[ "${ALLOCATE}" == [Nn]* ]]; then
# Resize file by changing its length
truncate -s "${DATA_SIZE}" "${DATA}";
if ! truncate -s "${DATA_SIZE}" "${DATA}"; then
error "Could not resize the file for the virtual disk." && exit 85
fi
else
@@ -55,7 +57,9 @@ if [ -f "${DATA}" ]; then
# Resize file by allocating more space
if ! fallocate -l "${DATA_SIZE}" "${DATA}"; then
error "Could not allocate a file for the virtual disk." && exit 85
if ! truncate -s "${DATA_SIZE}" "${DATA}"; then
error "Could not resize the file for the virtual disk." && exit 85
fi
fi
if [[ "${ALLOCATE}" == [Zz]* ]]; then
@@ -84,7 +88,10 @@ if [ ! -f "${DATA}" ]; then
if [[ "${ALLOCATE}" == [Nn]* ]]; then
# Create an empty file
truncate -s "${DATA_SIZE}" "${DATA}"
if ! truncate -s "${DATA_SIZE}" "${DATA}"; then
rm -f "${DATA}"
error "Could not create a file for the virtual disk." && exit 87
fi
else
@@ -98,8 +105,10 @@ if [ ! -f "${DATA}" ]; then
# Create an empty file
if ! fallocate -l "${DATA_SIZE}" "${DATA}"; then
rm -f "${DATA}"
error "Could not allocate a file for the virtual disk." && exit 87
if ! truncate -s "${DATA_SIZE}" "${DATA}"; then
rm -f "${DATA}"
error "Could not create a file for the virtual disk." && exit 87
fi
fi
if [[ "${ALLOCATE}" == [Zz]* ]]; then

View File

@@ -10,7 +10,7 @@ DL="https://global.synologydownload.com/download/DSM"
if [ -z "$URL" ]; then
if [ "$ARCH" == "amd64" ]; then
URL="$DL/release/7.2/64561/DSM_VirtualDSM_64561.pat"
URL="$DL/release/7.2/64570-1/DSM_VirtualDSM_64570.pat"
else
URL="$DL/release/7.0.1/42218/DSM_VirtualDSM_42218.pat"
fi
@@ -179,7 +179,9 @@ SPACE=$(df --output=avail -B 1 "$TMP" | tail -n 1)
(( SYSTEM_SIZE > SPACE )) && error "Not enough free space to create a 4 GB system disk." && exit 87
if ! fallocate -l "${SYSTEM_SIZE}" "${SYSTEM}"; then
rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88
if ! truncate -s "${SYSTEM_SIZE}" "${SYSTEM}"; then
rm -f "${SYSTEM}" && error "Could not allocate a file for the system disk." && exit 88
fi
fi
if [[ "${ALLOCATE}" == [Zz]* ]]; then

View File

@@ -21,6 +21,7 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
STORAGE="/storage"
KERNEL=$(uname -r | cut -b 1)
MINOR=$(uname -r | cut -d '.' -f2)
ARCH=$(dpkg --print-architecture)
VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1)
@@ -92,7 +93,7 @@ set -m
)
set +m
if (( KERNEL > 4 )); then
if (( KERNEL > 5 )) || ( (( KERNEL == 5 )) && (( MINOR > 2 )) ); then
pidwait -F "${_QEMU_PID}" & wait $!
else
tail --pid "$(cat "${_QEMU_PID}")" --follow /dev/null & wait $!

View File

@@ -31,7 +31,7 @@ HOST_ARGS=()
HOST_ARGS+=("-cpu=${CPU_CORES}")
HOST_ARGS+=("-cpu_arch=${HOST_CPU}")
[ -n "$HOST_MAC" ] && HOST_ARGS+=("-mac=${HOST_MAC//-/:}")
[ -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}")