mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-11-07 18:43:41 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b967a471b5 | ||
|
|
f40127df01 | ||
|
|
8c5e0ee274 | ||
|
|
2adf0b292b | ||
|
|
1c9b793c75 | ||
|
|
00c4ef7795 | ||
|
|
619657adf2 |
@@ -35,6 +35,7 @@ RUN set -eu && extra="" && \
|
|||||||
dnsmasq \
|
dnsmasq \
|
||||||
fakeroot \
|
fakeroot \
|
||||||
net-tools \
|
net-tools \
|
||||||
|
e2fsprogs \
|
||||||
qemu-utils \
|
qemu-utils \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
@@ -49,7 +50,7 @@ RUN set -eu && extra="" && \
|
|||||||
COPY --chmod=755 ./src /run/
|
COPY --chmod=755 ./src /run/
|
||||||
COPY --chmod=755 ./web /var/www/
|
COPY --chmod=755 ./web /var/www/
|
||||||
COPY --chmod=755 --from=builder /qemu-host.bin /run/host.bin
|
COPY --chmod=755 --from=builder /qemu-host.bin /run/host.bin
|
||||||
COPY --chmod=744 ./web/nginx.conf /etc/nginx/sites-enabled/web.conf
|
COPY --chmod=744 ./web/conf/nginx.conf /etc/nginx/sites-enabled/web.conf
|
||||||
|
|
||||||
VOLUME /storage
|
VOLUME /storage
|
||||||
EXPOSE 22 139 445 5000
|
EXPOSE 22 139 445 5000
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ services:
|
|||||||
- 5000:5000
|
- 5000:5000
|
||||||
volumes:
|
volumes:
|
||||||
- /var/dsm:/storage
|
- /var/dsm:/storage
|
||||||
|
restart: always
|
||||||
stop_grace_period: 2m
|
stop_grace_period: 2m
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuo pipefail
|
||||||
|
|
||||||
APP="Virtual DSM"
|
: "${APP:="Virtual DSM"}"
|
||||||
SUPPORT="https://github.com/vdsm/virtual-dsm"
|
: "${SUPPORT:="https://github.com/vdsm/virtual-dsm"}"
|
||||||
|
|
||||||
cd /run
|
cd /run
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,13 @@ configureNAT() {
|
|||||||
error "$tuntap" && return 1
|
error "$tuntap" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
GATEWAY_MAC=$(echo "$VM_NET_MAC" | rev)
|
||||||
|
GATEWAY_MAC="02:${GATEWAY_MAC:0:14}"
|
||||||
|
|
||||||
|
if ! ip link set dev "$VM_NET_TAP" address "$GATEWAY_MAC"; then
|
||||||
|
warn "Failed to set gateway MAC address.."
|
||||||
|
fi
|
||||||
|
|
||||||
while ! ip link set "$VM_NET_TAP" up promisc on; do
|
while ! ip link set "$VM_NET_TAP" up promisc on; do
|
||||||
info "Waiting for TAP to become available..."
|
info "Waiting for TAP to become available..."
|
||||||
sleep 2
|
sleep 2
|
||||||
@@ -389,6 +396,11 @@ if [[ "$IP" == "172.17."* ]]; then
|
|||||||
warn "your container IP starts with 172.17.* which will cause conflicts when you install the Container Manager package inside DSM!"
|
warn "your container IP starts with 172.17.* which will cause conflicts when you install the Container Manager package inside DSM!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -d "/sys/class/net/$VM_NET_TAP" ]]; then
|
||||||
|
info "Lingering interface will be removed..."
|
||||||
|
ip link delete "$VM_NET_TAP" || true
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$DHCP" == [Yy1]* ]]; then
|
if [[ "$DHCP" == [Yy1]* ]]; then
|
||||||
|
|
||||||
checkOS
|
checkOS
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ if [ -z "${CPU// /}" ] && grep -qi "model:" <<< "$CPI"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CPU="${CPU// CPU/}"
|
CPU="${CPU// CPU/}"
|
||||||
|
CPU="${CPU// 8 Core/}"
|
||||||
CPU="${CPU// 16 Core/}"
|
CPU="${CPU// 16 Core/}"
|
||||||
CPU="${CPU// 32 Core/}"
|
CPU="${CPU// 32 Core/}"
|
||||||
CPU="${CPU// 64 Core/}"
|
CPU="${CPU// 64 Core/}"
|
||||||
|
|||||||
Reference in New Issue
Block a user