Update pve_check logic and messages to allow Proxmox VE 9.2 across scripts. Adjusted version bounds (minor <= 2), regex checks (9\.[0-2]), and user-facing error text in misc/core.func, misc/vm-core.func and multiple vm/* scripts (allstarlink, archlinux, cachyos, debian-13, docker-vm-debug, nextcloud, openwrt, opnsense, owncloud, ubuntu2204, ubuntu2404, ubuntu2410, umbrel-os, unifi-os-server). No functional changes beyond expanding supported PVE minor version range and updating messages.
Call stop_spinner in cleanup() to ensure any active spinner is stopped on exit. Consolidate duplicated qm set branches in ubuntu2604-vm.sh into a single invocation to reduce code duplication and simplify VM disk/serial configuration. Remove the explicit ide2 cloudinit device and redundant cloud-init status messages; setup_cloud_init() is still invoked when USE_CLOUD_INIT is enabled, keeping cloud-init configuration centralized.
Introduce optional Cloud-Init integration and better machine type handling for VMs. Changes include: loading cloud-init helpers lazily (load_cloud_init_functions), interactive cloud-init prompt/configuration (vm_prompt_cloud_init) and SSH key handling, a cloud icon for UI, and vm_machine_type_label for readable machine type display. Default machine type switched to q35 and displays the label in prompts and summaries. VM creation logic now conditionally attaches the cloudinit drive (ide2) and runs setup_cloud_init when enabled; otherwise it creates the VM without the cloudinit device. Post-install messaging now either shows cloud-init details or a guidance message about manual guest filesystem expansion. Minor UI/output adjustments and defaults updated accordingly.
Introduce a shared vm-core loader and refactor the Ubuntu 26.04 VM script to use reusable helper functions. misc/vm-core.func: add COMMUNITY_SCRIPTS_URL default and load_api_functions to dynamically source API helpers, then call load_api_functions from load_functions. vm/ubuntu2604-vm.sh: switch to sourcing the shared vm-core via COMMUNITY_SCRIPTS_URL, replace many inline UI and utility functions with generic vm_* helpers (vm_confirm_new_vm, vm_prompt_*, vm_select_storage, vm_define_disk_references, set_description, etc.), modernize quoting and pushd usage, simplify disk import/resizing logic, and set START_VM default to yes. Also update repository URLs to ProxmoxVED and adjust some behavior (machine type handling, storage/disk references). Overall this centralizes common functionality, reduces duplication, and prepares scripts to use the shared core utilities.
Modernize and simplify VM installer and lobehub installation flows.
Key changes:
- install/lobehub-install.sh: consolidated apt invocation, replaced manual ParadeDB .deb download with fetch_and_deploy_gh_release helper, added postgresql pg_search preload configuration and restart, moved pnpm installation into setup_nodejs via NODE_MODULE, and adjusted build env handling.
- vm/almalinux-10-vm.sh: major refactor to source shared functions from COMMUNITY_SCRIPTS_URL, add load_functions, centralize cloud-init handling (configure_cloudinit_ssh_keys / setup_cloud_init), replace many custom UI/helper functions with standardized helpers and exit_script, update traps and error handling, simplify prompts/defaults, use $STD for apt operations, and streamline image customization and VM creation flow.
- Added vm/headers/almalinux-10-vm containing the VM header art and title.
These changes centralize common logic, improve cloud-init integration, reduce duplicated code, and make maintenance easier.
Seed a default admin account and harden the installer; update symlink behavior and LXC hook argument handling.
- Install: downgrade Node setup to 22, write ADMIN_EMAIL/ADMIN_PASSWORD into /opt/trek/server/.env for initial boot, chmod the file, wait for app health, then remove plaintext creds from the env and print the default admin credentials. Remove previous DB patching script and credentials file generation. Add health-check failure handling.
- ct/trek.sh: check for /opt/trek instead of ~/.trek, run npm ci without --production, and recreate server data/uploads by removing any existing dirs and creating explicit symlinks.
- Installer: mirror symlink strategy used in the container (rm then ln -s) and ensure generated ENCRYPTION_KEY note; add ADMIN_EMAIL default.
- json: set default username to admin@trek.local, update notes about seeded admin, ENCRYPTION_KEY storage, and APP_URL recommendation.
- tools/pve/lxc-prehook.sh: fix append_unique_line_in_ct to pass positional arguments into the bash -c snippet safely (avoid parent-shell expansion).
These changes ensure a reproducible default admin creation flow without leaving plaintext credentials, improve symlink handling, and fix a bug in the LXC prehook.
Improve robustness by adding input validation and sanitization. Replace SIGINT/SIGTERM trap payloads with numeric exit codes (130 and 143). Sanitize hostname to allowed characters and notify the user if it was adjusted. Add validation loops and user messages for CPU cores and RAM (positive integers), MAC address format (XX:XX:XX:XX:XX:XX), VLAN (1-4094 or default), and MTU (576-65520 or default). Minor output ordering tweaks to ensure values are echoed after processing.
- Remove unused send_line_to_vm function (replaced by virt-customize)
- Quote $VMID and add guard in cleanup_vmid
- Guard cleanup() against unset TEMP_DIR and quote variable
- Remove unused CLOUDINIT_PASSWORD variable
- Separate local declaration from assignment in get_image_url()
- Add retry loop for apt-get install (matches apt-get update pattern)
- Fix timeout message to match actual loop duration (~5-6 min)
Bug fixes:
- Add ~20 missing fi statements throughout advanced_settings(), check_root(),
arch_check(), ssh_check(), select_os(), start_script(), etc.
- Fix pve_check() missing elif/else/fi structure
- Fix DISK_SIZE unbound variable, initialized before machine type dialog
- Fix error_handler() with ${VMID:-} guard to prevent unbound variable error
Architecture improvement:
- Migrate from send_line_to_vm serial console approach to virt-customize with
a first-boot systemd service, consistent with other VM scripts
- First-boot service handles: clock sync (NTP + HTTP fallback), package
installation, swap setup, and UniFi OS installer execution
New features:
- Root password prompt with confirmation
- SSH public key support
- SSH enabled by default
- Cloud-init password override with user-set password
- Port 11443 readiness check after VM boot
- Elapsed time counter during wait loops
Remove storage type detection and explicit pvesm alloc/qm set steps, and inline EFI/disk/CD configuration into the initial qm create call. Uses unified storage refs (efidisk0 ${STORAGE}:1,efitype=4m,pre-enrolled-keys=0 and scsi0 ${STORAGE}:${DISK_SIZE},${DISK_CACHE}${THIN%,}) and sets the ISO via -cdrom local:iso/${FILENAME}. Adds a success message and streamlines VM creation by eliminating per-storage branching and manual allocation logic.