- abort on first error (set -euo pipefail), errors to stderr
- check root and non-empty ssh-keys.pub before any question
- install libguestfs-tools only if virt-customize is missing
- suggest next free VM ID, reject invalid or used IDs
- validate VM name as DNS name
- verify SHA256 checksum of the cloud image
- reset /etc/machine-id in the image
- unique temp file for the modified image
- ostype l26, cpu x86-64-v2-AES, serial console, 32G disk
- destroy incomplete VM if a later step fails
- fix "(latest)" marker pointing to the oldest LTS release
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds cpu to --hotplug so vCPUs can be added to running VMs without a
reboot (up to sockets * cores, by raising --vcpus).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without discard=on, blocks freed inside the guest (fstrim.timer is
enabled by default in Ubuntu cloud images) are never released on
thin-provisioned storage like Ceph RBD, so disks only grow. Clones
inherit the disk options from the template.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds memory to --hotplug and enables --numa 1 so RAM can be added to
running VMs without a reboot (Proxmox requires NUMA for the guest to
recognize hot-added memory).