From 34f91ba2061b805bc1a73a1a0df004a77c1040c6 Mon Sep 17 00:00:00 2001 From: Marius Date: Thu, 6 Nov 2025 11:37:27 +0200 Subject: [PATCH] Fix Oracle DR test cron execution by adding explicit PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: The weekly DR test script worked when run manually but failed when executed via cron with "Failed to start VM 109" error at 0 seconds. Cause: Cron jobs run with a minimal PATH that doesn't include /usr/sbin where Proxmox commands (qm, pvesh, etc.) are located. Manual execution had the full PATH including /usr/sbin. Solution: Added explicit PATH export at the start of the script to ensure all required system binaries are accessible regardless of execution context. Testing: Successfully verified with cron test at 11:32 - VM started properly, restore process completed normally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- oracle/standby-server-scripts/weekly-dr-test-proxmox.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oracle/standby-server-scripts/weekly-dr-test-proxmox.sh b/oracle/standby-server-scripts/weekly-dr-test-proxmox.sh index 15b6d4e..3adc80e 100644 --- a/oracle/standby-server-scripts/weekly-dr-test-proxmox.sh +++ b/oracle/standby-server-scripts/weekly-dr-test-proxmox.sh @@ -22,6 +22,9 @@ set -euo pipefail +# Set proper PATH for cron execution +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + # Configuration DR_VM_ID="109" DR_VM_IP="10.0.20.37"