From 8652e14661690e414f0461aedaede6bc954286ac Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Fri, 23 Oct 2026 10:02:57 +0200 Subject: [PATCH] Let vm_timezone_default survive a host without /etc/timezone Debian 13 no longer ships /etc/timezone, so on a fresh Proxmox VE 9 host the failed cat tripped the ERR trap before the timedatectl fallback ran, and every cloud-image VM stopped at 'Preparing the image' (ProxmoxVE #18076). --- pve/vm-core.func | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pve/vm-core.func b/pve/vm-core.func index b9aab0b..0d97867 100644 --- a/pve/vm-core.func +++ b/pve/vm-core.func @@ -1670,8 +1670,9 @@ vm_prompt_keyboard() { # VM_TIMEZONE, else the host's zone; empty when neither names a known zone. vm_timezone_default() { local tz="${VM_TIMEZONE:-}" - [[ -n "$tz" ]] || tz="$(cat /etc/timezone 2>/dev/null)" - [[ -n "$tz" ]] || tz="$(timedatectl show -p Timezone --value 2>/dev/null)" + # Debian 13 no longer ships /etc/timezone; a failed read must fall through, not trip the ERR trap + [[ -n "$tz" ]] || tz="$(cat /etc/timezone 2>/dev/null || true)" + [[ -n "$tz" ]] || tz="$(timedatectl show -p Timezone --value 2>/dev/null || true)" [[ -n "$tz" && -f "/usr/share/zoneinfo/$tz" ]] && printf '%s' "$tz" return 0 }