From 2d264911d784595aec1b7fc8d5191c69547ffeb8 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 5 Dec 2025 10:39:48 +0100 Subject: [PATCH] Update docker-vm.sh --- vm/docker-vm.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vm/docker-vm.sh b/vm/docker-vm.sh index a85a7430..e89fe602 100644 --- a/vm/docker-vm.sh +++ b/vm/docker-vm.sh @@ -736,13 +736,16 @@ fi # ============================================================================== VM_IP="" if [ "$START_VM" == "yes" ]; then + # Disable error exit for optional IP retrieval + set +e for i in {1..5}; do VM_IP=$(qm guest cmd "$VMID" network-get-interfaces 2>/dev/null | jq -r '.[] | select(.name != "lo") | ."ip-addresses"[]? | select(."ip-address-type" == "ipv4") | ."ip-address"' 2>/dev/null | - grep -v "^127\." | head -1) + grep -v "^127\." | head -1) || true [ -n "$VM_IP" ] && break sleep 2 done + set -e fi echo -e "\n${INFO}${BOLD}${GN}VM Configuration Summary:${CL}"