Commit Graph

267 Commits

Author SHA1 Message Date
CanbiZ (MickLesk)
99ff914831 Validation, hostname sanitization, update traps
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.
2026-03-23 14:54:50 +01:00
CanbiZ (MickLesk)
54bc5559d3 fixes alma linux stp 1 2026-03-23 14:43:38 +01:00
CanbiZ (MickLesk)
b5fbff55ef bump dockervm from ve 2026-03-23 14:43:27 +01:00
CanbiZ (MickLesk)
aaaf18de91 switch urls back to github (due slow gitea syncs) 2026-03-18 14:47:29 +01:00
CanbiZ (MickLesk)
37e53c19ec force gitea sync 2026-03-12 09:18:29 +01:00
CanbiZ (MickLesk)
19cc18037c vm app-deployer 2026-03-12 09:06:41 +01:00
Dereck
7a211fd407 Address third CodeRabbit review feedback
- 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
2026-03-12 00:54:39 -04:00
Dereck
1db68f32b5 Address second CodeRabbit review feedback
- Quote $VMID in error_handler for robustness
- Reduce port 11443 wait loop from 15min to 5min and update message
2026-03-12 00:45:49 -04:00
Dereck
3da60ba0a2 Address CodeRabbit review feedback
- 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)
2026-03-12 00:30:01 -04:00
Dereck
afa4e4ef07 Fix and improve UniFi OS Server VM script
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
2026-03-12 00:22:10 -04:00
CanbiZ (MickLesk)
e5d9a3c5d6 Merge pull request #1486 from Agent-Fennec/almalinux-10-vm
Add AlmaLinux 10 VM
2026-02-23 08:46:59 +01:00
MickLesk
5ab302102b refactor: clean COMMUNITY_SCRIPTS_URL pattern (#1449)
- ct/vm scripts: split to 2-line pattern (variable + source)
- func files: remove redundant inline defaults
- Only entry points keep the default (ct/*.sh, vm/*.sh, build.func,
  install.func, alpine-install.func)
- Downstream sources use $COMMUNITY_SCRIPTS_URL without default
2026-02-22 14:43:08 +01:00
MickLesk
4b9121f41c feat: add configurable COMMUNITY_SCRIPTS_URL for dev sourcing (#1449)
- Replace all hardcoded source URLs with $COMMUNITY_SCRIPTS_URL variable
- Default: https://git.community-scripts.org/.../ProxmoxVED/raw/branch/main
- Override: export COMMUNITY_SCRIPTS_URL=https://.../your-fork/raw/branch/xyz
- Propagates into container via build.func exports
- Updated: 43 ct scripts, 14 deferred, 22 vm scripts, 5 func files
- Document in docs/DEV_MODE.md with usage examples
- Also normalizes legacy GitHub URLs to Gitea canonical URL
2026-02-22 14:36:31 +01:00
Agent-Fennec
4a3e0019ca fix: review feedback 2026-02-20 18:08:01 -05:00
Agent-Fennec
1ec86f7b61 Add AlmaLinux 10 VM 2026-02-20 17:25:35 -05:00
github-actions[bot]
9743e23292 Delete truenas-vm (vm) after migration to ProxmoxVE (#1479)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-19 07:47:12 +00:00
juronja
feabc81cfb missed set truncation to 45 2026-02-17 10:34:06 +00:00
juronja
bfa2a45a54 set truncation to 45 char 2026-02-17 10:29:52 +00:00
juronja
ef54d4fd6c show no tags 2026-02-17 08:19:06 +00:00
juronja
18b70e7c39 truncating longer strings 2026-02-17 08:12:52 +00:00
CanbiZ (MickLesk)
f9628d4935 Merge pull request #1457 from juronja/truenas-vm-fixes
truenas-vm - SERIAL ID and other minor fixes
2026-02-16 12:58:33 +01:00
CanbiZ (MickLesk)
1da0d502d7 Simplify VM disk setup in cachyos-vm.sh
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.
2026-02-16 10:07:29 +01:00
CanbiZ (MickLesk)
d87c93a364 Update cachyos-vm.sh 2026-02-14 15:22:23 +01:00
CanbiZ (MickLesk)
1d3f45f792 Use local ISO cache; remove ISO storage selection
Remove interactive ISO storage detection/selection and associated ISO_PATH logic. Default to a fixed cache directory (/var/lib/vz/template/iso) via CACHE_DIR and update CACHE_FILE and mkdir usage accordingly. Also update VM configuration to reference the local ISO store (local:iso/<file>) instead of the previously selectable storage. This simplifies ISO handling by avoiding pvesm/whiptail prompts; note this hardcodes the ISO location and removes support for alternate ISO storages.
2026-02-14 14:58:11 +01:00
juronja
ed547dc464 using udevadm to get device serial 2026-02-14 10:04:13 +00:00
juronja
7f4d78f0a3 Merge branch 'main' into truenas-vm-fixes 2026-02-14 09:39:55 +00:00
CanbiZ (MickLesk)
fe369825a5 Merge pull request #1456 from heinemannj/truenas-vm
truenas-vm: Refactor pve_check function and update disk listing
2026-02-14 09:12:11 +01:00
CanbiZ (MickLesk)
7d7c6e4096 Add CachyOS VM creation script
Introduce an interactive script (vm/cachyos-vm.sh) to create and configure a CachyOS VM on Proxmox. The script validates Proxmox environment and architecture, offers default and advanced settings via whiptail, detects storage/ISO locations, downloads the CachyOS desktop ISO, allocates EFI and main disks, creates and configures the VM (network, CPU, memory, disks, boot order, OVMF), sets a rich VM description, and optionally starts the VM. Also add an ASCII header file (vm/headers/cachyos-vm) used by the script.
2026-02-13 15:26:17 +01:00
juronja
8ffbe015f1 preselect only stable releases 2026-02-13 14:23:54 +00:00
juronja
4a0824777a second attempt to preselect last item 2026-02-13 14:16:51 +00:00
juronja
a004ae98dd reversed the preselect logic 2026-02-13 14:09:44 +00:00
juronja
02398c167e preincrement 2026-02-13 14:03:47 +00:00
juronja
872eda28a0 added variables instead of hardcoded values 2026-02-13 13:55:46 +00:00
Joerg Heinemann
684ae3e762 Refactor pve_check function and update disk listing
See: https://github.com/community-scripts/ProxmoxVED/issues/1362#issuecomment-3897164396
2026-02-13 14:41:11 +01:00
juronja
e238543993 fallback If no stable was found 2026-02-13 13:35:40 +00:00
juronja
c997910d58 order of operations fix 2026-02-13 13:22:13 +00:00
juronja
989580629a preselect latest stable ISO fix 2026-02-13 13:12:41 +00:00
CanbiZ (MickLesk)
e7057f29d4 Add interactive SSH key selection for cloud-init
Make SSH key provisioning explicit and interactive for cloud-init VMs. Default CLOUDINIT_SSH_KEYS is now empty; new helper functions discover and extract public keys from common host files, count them, and present a whiptail menu (import all host keys, paste one key, specify a file, or none). configure_cloudinit_ssh_keys writes selected keys to a temp file and sets CLOUDINIT_SSH_KEYS accordingly (removing the temp file if empty). setup_cloud_init now only applies --sshkeys when CLOUDINIT_SSH_KEYS is explicitly provided and logs the source, and vm/docker-vm.sh invokes the key selection UI for cloud-init VMs.
2026-02-04 11:16:41 +01:00
CanbiZ (MickLesk)
49318cc629 remove ssh check 2026-02-03 14:11:38 +01:00
CanbiZ (MickLesk)
e91972e02c Enhance VM image customization and auto-login
Add informative status messages and improve image customization flow: install base packages and Docker during virt-customize, enable Docker service, and configure /etc/docker/daemon.json (sets DOCKER_PREINSTALLED on success). Add finalization messages while setting hostname and SSH config. For images without cloud-init, add systemd drop-ins to enable root autologin on serial-getty@ttyS0 and getty@tty1. Also add a trailing newline to nginx-ui.json.
2026-02-03 13:10:52 +01:00
CanbiZ (MickLesk)
b7b988bc75 Remove duplicate qm set; show Cloud-Init output
Collapse duplicated qm set invocation into a single call when attaching the EFI and root disk, removing the duplicate conditional block. Also stop redirecting setup_cloud_init output (remove >/dev/null 2>&1) so Cloud-Init setup logs and errors are visible for debugging. Note: the previous conditional added a --scsi1 "${STORAGE}:cloudinit" only when USE_CLOUD_INIT=yes; that explicit scsi1 assignment is no longer present in this unified call.
2026-02-03 12:17:01 +01:00
CanbiZ (MickLesk)
5037dad561 Update docker-vm.sh 2026-02-03 11:39:23 +01:00
CanbiZ (MickLesk)
044fc85fac Refactor Docker VM: image caching & preinstall
Remove Portainer option and related install/helper functions. Add caching of downloaded OS images to /var/lib/vz/template/cache and use a temporary work qcow2 for customization. Try to preinstall qemu-guest-agent and Docker with virt-customize (marking DOCKER_PREINSTALLED on success) and provide a fallback first-boot install-docker.service script when customization fails. Replace import flow to detect qm disk import vs qm importdisk, import the prepared image into storage, resize the disk, attach EFI/root disks, and simplify VM creation steps. Include various UX/cleanup tweaks (spinner handling, storage import flags, status messages and Cloud-Init/SSH handling).
2026-02-03 11:27:11 +01:00
juronja
162f62daa2 reversed the disk placeholder size 2026-01-30 10:07:10 +00:00
juronja
05416f9fe5 removing iothread and adding serial ID trim for robustness 2026-01-30 09:39:52 +00:00
juronja
e43427548e added disk size placeholder and changed boot diks to sata 2026-01-30 09:31:47 +00:00
juronja
773e748d95 imported disks now have a serial ID. TrueNAS needs it. 2026-01-30 09:18:42 +00:00
juronja
dd60bb0c51 Merge branch 'truenasvm' of https://github.com/juronja/ProxmoxVED into truenasvm 2026-01-29 20:08:28 +00:00
juronja
2c9fb7b6f9 removed comments 2026-01-29 19:01:49 +00:00
juronja
f04946cae8 Adding source in file header
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-01-16 13:20:18 +01:00