This episode covers why manual OS installation is inefficient at scale, how cloud-init works for automatic configuration at first boot, the steps to create a VM template, and the difference between full clones and linked clones for provisioning VMs in seconds.

Installing an OS manually once or twice is enjoyable. Repeating it for the thirtieth VM — entering the hostname, creating a user, copying SSH keys, setting the IP — is a recipe for fatigue and human error. Episode 4 introduces the solution used by modern data centers: cloud-init and VM templates.
We'll understand why manual installation is inefficient, master the cloud-init concept, assemble a base VM into a ready-to-use template, and then use full clones and linked clones to birth new VMs in seconds. By the end of the episode, you'll be able to do rapid provisioning like a real infrastructure engineer.
At the scale of one or two servers, the installation wizard feels natural. But once workloads grow, the manual approach reveals its weaknesses: each VM takes tens of minutes to install and configure, results are often inconsistent between VMs, and off-spec configurations become a source of bugs that are hard to track down. Not to mention when a VM needs to be rebuilt after migration or disaster recovery.
The principle of modern infrastructure is reproducibility: VMs should be born from the same recipe every time, with unique identities (hostname, IP, password) injected at birth. This is what enables automation and scale.
cloud-init is the industry standard for cloud configuration bootstrap. When a VM first boots, cloud-init reads data from a configured source — in Proxmox, that source is the cloud-init disk attached to the VM as an extra drive.
Hostname and domain
User, password, and SSH keys
IP address, netmask, gateway, and DNS
Sequence of commands (user-data scripts)Proxmox injects this data into the cloud-init disk from the Cloud-init page in the VM configuration, and the cloud-init agent inside the guest reads it at first boot. Because identity is injected at boot, one template can give birth to VMs with different identities without any manual modification.
qemu-guest-agent is a service inside the guest that communicates with the host through the QEMU channel. With the agent active, Proxmox can automatically read the guest's IP address, trigger clean shutdowns, and take screenshots — all without logging into the VM. This agent must be installed in the base VM before turning it into a template, because many features like backup snapshots depend on it.
The first step is to create a regular VM from an ISO (like in episode 3), install its OS, and then install two important components:
apt update && apt install -y qemu-guest-agent cloud-init
systemctl enable --now qemu-guest-agentAfter both packages are installed, do a clean up: remove temporary files, clean the hostname that cloud-init has set, empty the logs, and run cloud-init clean to remove previous state. Make sure the VM is shut down cleanly before conversion.
Before conversion, add a cloud-init disk in the Hardware -> Add -> CloudInit Drive tab. Proxmox automatically provides a small disk (about 4 MB) that will later hold the per-VM configuration data. Without this disk, cloned VMs won't receive any configuration injection.
In the web UI, right-click the VM and choose Convert to Template, or use the CLI:
qm template 100After conversion, the VM can no longer be started directly — it becomes a passive blueprint that can only be cloned. Keep this template as a long-term asset.
Proxmox offers two types of clones:
qm clone 100 200 --name web-01 --full trueFor production workloads that require full independence, use a full clone. For laboratories and rapid testing, linked clones are very efficient.
With the template ready, provisioning new VMs becomes fast and consistent:
qm clone 100 200 --name db-01
qm set 200 --ipconfig0 ip=192.168.1.50/24,gw=192.168.1.1
qm set 200 --ciuser admin --sshkeys ~/.ssh/id_ed25519.pub
qm start 200The qm set 200 --ipconfig0 ip=192.168.1.50/24,gw=192.168.1.1 command injects a static IP, while --ciuser and --sshkeys set up the user and SSH keys. The VM boots, cloud-init applies the configuration, and within seconds the VM is ready to use without ever touching the installation wizard.
A few habits that keep templates healthy in the long run:
local-lvm or ZFS.ubuntu-24.04-cloudinit, so they're easy to recognize.To refresh a template, simply create a new VM from the old template, install updates inside it, then convert it back into a template:
qm clone 9000 300 --name refresh-tpl
qm start 300
# install updates inside VM 300, then shut it down
qm template 300With this flow, new VMs born from the template are always based on a fresh OS version. The qm template 300 command turns the refreshed VM into a new template, replacing the old one.
Tip
Keep templates as valuable assets. One base template per major distribution (e.g. Ubuntu and Debian) is enough for most needs — don't create too many templates that become hard to maintain.
Episode 4 changed the way you give birth to VMs: understanding the inefficiency of manual installation, mastering cloud-init for automatic boot-time configuration, assembling a base VM with qemu-guest-agent and cloud-init into a template, and distinguishing full clones from linked clones for fast provisioning.
The key takeaways:
qm template turns a VM into a passive blueprint that can only be cloned.In the next episode, episode 5, we will cover LXC Containers — the lightweight alternative to full VMs that shares the host kernel, the difference between Proxmox's LXC and Docker, how to download container templates with pveam, and why unprivileged containers are more secure. Open the template you created in episode 4, because you'll encounter the same concepts here!