mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-17 10:43:26 +01:00
Adds error classification, recovery menu, and retry mechanism for VM creation failures in docker-vm.sh. vm-core.func: - vm_classify_error(): classifies errors into 7 categories (download, disk_import, virt_customize, vmid_conflict, storage_full, network, unknown) - is_vm_download_error(), is_vm_disk_import_error(), is_vm_virt_customize_error(), is_vm_vmid_conflict(), is_vm_storage_full(), is_vm_network_error(): detection helpers - vm_show_recovery_menu(): dynamic whiptail menu with options based on error category (retry, retry w/ settings, skip virt-customize, new VMID, keep VM, abort) - vm_handle_recovery(): orchestrates classification, menu, and chosen action (cleanup + retry / keep / abort) - vm_log_cmd(): stderr capture wrapper for VM_ERROR_LOG - VM_MAX_RETRIES=2 (bounded recursion depth) docker-vm.sh: - Wrapped VM creation in create_vm() function for retry - error_handler(): during VM_CREATION_PHASE, delegates to vm_handle_recovery; on retry, temporarily disables ERR trap, re-invokes create_vm recursively (bounded by VM_MAX_RETRIES) - SKIP_VIRT_CUSTOMIZE flag: virt-customize failure recovery can skip it and use first-boot Docker install fallback - Critical commands (qm create, disk import) now capture stderr to VM_ERROR_LOG for error classification