* Ensure API update is sent on script exit
Add exit-time telemetry handling across scripts to avoid orphaned "installing" records. Introduce local exit_code capture in api_exit_script and cleanup handlers and, when POST_TO_API_DONE is true but POST_UPDATE_DONE is not, post a final status (marking failures on non-zero exit codes, or marking done/failed in VM cleanups based on exit code). Changes touch misc/build.func, misc/vm-core.func and various vm/*-vm.sh cleanup functions to reliably send post_update_to_api on normal or early exits.
* Update api.func
* fix(telemetry): add missing exit codes to explain_exit_code()
- Add curl error codes: 4, 5, 8, 23, 25, 30, 56, 78
- Add code 10: Docker/privileged mode required (used in ~15 scripts)
- Add code 75: Temporary failure (retry later)
- Add BSD sysexits.h codes: 64-77
- Sync error_handler.func fallback with canonical api.func
* fix(archlinux-vm): fix LVM/LVM-thin storage and improve error reporting
- Add catch-all (*) case for storage types (LVM, LVM-thin, zfspool)
Previously only nfs/dir/cifs and btrfs were handled, leaving
DISK_EXT, DISK_REF, and DISK_IMPORT unset on LVM/LVM-thin storage
- Fix error_handler to send numeric exit_code to API instead of
bash command text (which caused 'Unknown error' in telemetry)
- Replace fragile pvesm alloc for EFI disk with Proxmox-managed
:0,efitype=4m (consistent with docker-vm.sh)
- Modernize disk import: auto-detect qm disk import vs qm importdisk,
parse output to get correct disk reference instead of guessing names
- Use --format flag (double dash) consistent with modern Proxmox API
- Remove unused FORMAT variable (EFI type now always set correctly)
- Remove fragile eval-based disk name construction
* fix(vm): fix LVM/LVM-thin storage and error reporting for all VM scripts
- Add catch-all (*) case to storage type detection in all VM scripts
that were missing it (debian-vm, debian-13-vm, ubuntu2204/2404/2504,
nextcloud-vm, owncloud-vm, opnsense-vm, pimox-haos-vm)
- Add catch-all to mikrotik-routeros (had zfspool but not lvm/lvmthin)
- Fix error_handler in ALL 14 VM scripts to send numeric exit_code
to post_update_to_api instead of bash command text, which caused
'Unknown error' in telemetry because the API expects a number
fix(vm-creation): ensure whiptail VMID inputbox is pre-filled with a valid and available ID
- Replaced hardcoded NEXTID usage with a new get_valid_nextid() function
- Ensures no collision with existing VMs, LXCs or orphaned LVM volumes
- Improves user experience by properly pre-filling whiptail inputbox
- Automatically skips invalid IDs instead of failing on alloc
* haos-vm.sh tag
* debian-vm.sh tag
* Update mikrotik-routeros.sh tag
* Update nextcloud-vm.sh tag
* Update openwrt.sh tag
* Update owncloud-vm.sh tag
* Update ubuntu2204-vm.sh tag
* Update ubuntu2404-vm.sh tag
* Add pimox-haos-vm.sh tag
* Undo add tag
Unable to test