Compare commits

...

3 Commits

Author SHA1 Message Date
MickLesk 65219d9469 host-migrate: add CIFS, logging, and export/import improvements
Enhance tools/pve/host-migrate.sh with several usability and reliability features:

- Add run logfile and mlog helper for traceability (writes /var/log/host-migrate-<ts>.log).
- Add CIFS/SMB share support to the location picker, auto-install cifs-utils, and mount CIFS shares for exports.
- Make export component selection more granular (pvecfg, network, hostid, dns, apt sources/keyrings, pkglist, cron, systemd, roothome, etc) and reorganize collection logic accordingly.
- Capture per-guest requirements (bridges and storages) into host/guest-requirements.info for import preflight checks.
- Generate bundle manifest with additional metadata (kernel, tool version, cluster flag) and produce sha256sums.txt; offer optional integrity verification on import.
- Add optional rsync/SSH push after export and install rsync if missing.
- Import-side: warn on architecture and cluster source, verify checksums, preflight missing bridges/storages, and allow package reinstallation from selection file.
- Add cleanup UI to manage and delete stored bundles.
- Various UI tweaks and messaging improvements, and minor safety/backups when restoring files.

These changes improve cross-host portability, provide better diagnostics, and make bundle management and restoration safer and more transparent.
2026-06-28 15:02:36 +02:00
MickLesk 5bea573281 Improve storage prep & mounting in host-migrate
Add interactive storage preparation and safer mount handling for host-migrate.

- Track and clean up on-demand mounts via TEMP_MOUNTS and extend cleanup handler.
- Add helpers: _new_mountpoint, _offer_fstab, mount_existing_fs, format_and_mount, create_lv_and_mount to mount, format, or create LVs and optionally persist to /etc/fstab.
- Enhance browse_mounts to list unmounted block devices and LVM VGs, offer mount/format/LV creation, and return prepared mount via BROWSE_RESULT.
- Integrate prepared target into choose_location and do_export; show free-space warning before export.
- Improve vzdump output detection to pick the newest non-log file.
- Minor UX/message tweaks and quoting fixes for backup filenames when restoring storage.cfg and /etc/hosts.

These changes let users pick or prepare target storage (mount existing FS, format disks, create LVs) interactively and ensures temporary mounts are cleaned up.
2026-06-28 11:24:31 +02:00
MickLesk 5603b69b81 Add host-migrate.sh Proxmox VE tool
Add tools/pve/host-migrate.sh — an interactive Proxmox VE host migration utility. The script (whiptail UI) can export host configuration, /etc tarball, SSH keys, APT state and LXC/QEMU guests (vzdump or config-only) into a timestamped bundle, with optional on-demand NFS mounting. It also supports importing bundles to restore guests and selective host components (storage, users, SSH, APT, hosts, network, hostname) with explicit warnings for dangerous operations (network/hostname). Implements preflight checks, manifest creation, storage mapping checks, cleanup trap for NFS, and integrates helper functions loaded from the project's core scripts.
2026-06-28 11:17:47 +02:00
File diff suppressed because it is too large Load Diff