Proxmox Cloud-Init Template Preparation Guide
Test networking, SSH keys, machine identities and disk expansion when preparing a Proxmox Cloud-Init template. Review the checks needed before delivery.
Preparing a Proxmox Cloud-Init template involves more than copying a Linux installation. A clone may boot without being ready for delivery if its username, SSH key, network configuration or machine identity is wrong. A useful template needs reproducible acceptance tests as well as reproducible provisioning.
This guide describes a preparation model for hosting businesses that provision servers for different customers from one Linux image. These are recommended operational checks, not a claim that any particular VMRobot version performs every step automatically. The overall order-to-delivery framework is covered in the Proxmox automation guide.
Separate template and customer information
The base image contains the operating system, required drivers, update settings and standard monitoring tools. Set each customer’s IP address, password or SSH key, hostname and order number during deployment. Storing customer-specific details in a shared template can cause incorrect delivery and duplicate identities in later clones.
Record image source, template version and deployment-specific values separately. Retaining a download URL and checksum distinguishes image versions that share a filename. A label such as “current Ubuntu” is insufficient for troubleshooting.
An operating-system vendor’s supported cloud image can simplify preparation. It does not prove compatibility with your disk controller, boot mode or network policy. Check the release’s support lifetime and package sources and add them to the template record.
How does Cloud-Init distinguish the first boot?
Cloud-Init uses instance identity and cached state to distinguish a new instance from a later boot of the same instance. The official first-boot documentation explains why cached state from a previously booted image can affect a new deployment. Do not carry test state from the preparation VM into the template without controlling how it is handled.
Do not run image-cleanup procedures on a live customer VM. When creating a template, use the distribution’s recommended image-preparation method and verify how each step handles user data, host identities and logs. Do not assume one cleanup command prepares every Linux distribution in the same way.
Test two clones for duplicate identities
One test VM cannot reveal identities shared between clones. Create two independent clones from the same template and compare their hostnames, machine IDs, SSH host keys and assigned network addresses. If both boot with duplicate identity information, the template is not ready for delivery. Keep test records separate from customer records.
Create an acceptance table for networking and access
| Check | Expected evidence | Delivery decision on failure |
|---|---|---|
| IP and netmask | Assigned value matches guest configuration | Stop delivery |
| Default route | Connectivity to an allowed destination works | Examine the network definition |
| DNS | The specified resolver is performing name resolution | Correct the resolver configuration |
| SSH access | Only the relevant customer's key is accepted | Check the identity transfer |
| Reboot | Network and access values preserved | Examine persistent configuration |
Internet access alone is not enough: a VM may connect using the wrong IP address. Compare the IP reserved for the order with both the Proxmox configuration and the guest’s settings. For DHCP, define how reservations are made; for static addressing, define how gateway and subnet compatibility is verified.
Never put an SSH private key in the template. Applying a customer’s public key to the correct user is separate from arranging support access. If support access is needed, define its permissions, logging and removal policy separately. If access fails, show provisioning as pending instead of telling the customer the server is ready.
Check disk size, partitions and filesystems separately
An 80 GB package may start from an image with a smaller filesystem. A larger Proxmox disk does not prove that the guest partition and filesystem expanded too. Record capacity at every layer. For further detail, see the VDS disk expansion guide.
Cloud-Init’s disk and partition modules may help, depending on image configuration. The official disk configuration examples distinguish partition and filesystem operations. Verify the expected result on a test VM before adapting an example to another disk layout.
Check readiness beyond the running state
A VM’s running state does not prove its operating system has completed first-boot tasks. Package updates, network configuration or user creation may still be in progress. Base delivery on the VM state, Cloud-Init results and access tests together. This avoids notifying customers about servers that are still being prepared during busy ordering periods.
Do not blindly create another clone after a preparation task fails. Record the first attempt’s VMID, task result and failure stage. Allocating the same resources again can cause IP and disk conflicts. After a timeout, first investigate whether the operation completed; a timeout is not the same as failure.
A hypothetical delivery scenario
Suppose a customer is allocated a Linux server with 4 vCPUs, 8 GB RAM and an 80 GB disk. The clone boots, but its hostname still belongs to the previous test. Even with working network access, it fails the identity check. Do not deliver this deployment until the template is corrected and retested. This is a hypothetical example, not an actual customer case.
Make template versions manageable
Avoid changing an approved template in place and obscuring the basis of earlier deliveries. Prepare and test a new version, then switch new orders to it through a controlled change. Knowing which VMs used an earlier version helps identify affected customers after a driver or update fault. Include rollback plans in the template-release record.
Updating a template does not automatically update existing customer VMs. Explain OS security-update responsibilities and managed-service scope separately. Review clone-method effects on base-image dependencies in the full clone and linked clone comparison.
WHMCS or WISECP integration setup should include test-environment checks of the template version, node and network pool assigned to each product. When reviewing the WISECP Proxmox integration page, ask about error visibility and checks before delivery. A prepared template, correct order mapping and recorded acceptance tests must work together.
Use first-boot logs as delivery evidence
A screenshot alone is not sufficient evidence of template acceptance. Record the template version, node and data source used to create the test instance, task results, and start and end times. Identify the owner of the public key used in the successful access test without recording private keys or passwords. The record should let operators trace a faulty preparation stage without collecting secrets.
Check the image for unexpected users and authorized keys. A temporary test account left in the shared template may appear in later clones. Add a separate account-list and access-method review before approving the image. If monitoring or support software is installed, consult its documentation to determine whether its identity must be regenerated for each clone.
If package installation is expected before DNS is running
A first-boot task that accesses an external package repository may fail before DNS or the gateway is ready. Identify the failing stage instead of replacing the entire template. Test delayed network readiness and an unavailable package repository under controlled conditions. Define retry limits and customer notifications in advance; delivering a server after an update fails without recording it makes later support harder.
For a final acceptance test, reboot two VMs created from the clean template. Check that initialization does not remove the customer’s key, persistent network settings remain intact and the template’s test identity is absent. Afterwards, remove test resources using their own records and verify that reserved customer-pool IP addresses have been released. This cleanup keeps test and production customer resources from becoming mixed.