If you set up virtual machines manually every time, you already know how slow and repetitive it gets. A Proxmox Ubuntu 26.04 cloud-init template fixes that problem. You build the template once, and after that every new VM is ready in seconds, with the right user, SSH key, network settings, and disk size already applied.
This guide shows you the full process on Proxmox VE 9.2, using the official Ubuntu 26.04 LTS "Resolute Raccoon" cloud image.
What Is a Proxmox Ubuntu 26.04 Cloud-Init Template
A cloud-init template is a Proxmox VM that's already set up with a cloud OS image, then saved as a template instead of a regular VM. Cloud images are small disk images made by the OS vendor. They boot quickly and expect Proxmox to send in basic settings, such as hostname, SSH keys, users, and IP address, through a small tool called cloud-init. This tool runs the first time the VM boots and sets everything up on its own.
Once you have the template, cloning it takes just a few seconds and creates what's called a linked clone. Each clone gets its own small disk on top of the template, its own cloud-init settings, and boots up as its own independent Ubuntu 26.04 server.
This is basically how most VPS companies create customer servers behind the scenes, so building your own template gives you the same speed and consistency.
Requirements Before You Start
Before building a Proxmox Ubuntu 26.04 cloud-init template, make sure you have:
- A working Proxmox VE 9.2 host.
- Root or sudo access to the Proxmox shell.
- At least one storage location that supports disk images, such as local-lvm, a ZFS pool, or a directory storage.
- An SSH key pair on your workstation. If you don't have one yet, generate it with
ssh-keygen -t ed25519.
- Internet access on the Proxmox node to download the Ubuntu cloud image, or a way to copy the file over with
scp.
If you want stronger storage that can survive a disk failure, set that up before you start. Our Proxmox VE ZFS mirror setup guide shows how to build a mirrored ZFS pool.
Step 1: Download the Ubuntu 26.04 Cloud Image
Ubuntu publishes ready-to-use cloud images for every release. Log in to your Proxmox node over SSH and download the Ubuntu 26.04 LTS server image directly onto the node:
cd /var/lib/vz/template/isowget https://cloud-images.ubuntu.com/releases/26.04/release/ubuntu-26.04-server-cloudimg-amd64.img
This file is a .img cloud image, not a normal installer ISO. It has no installer wizard; it boots straight into a minimal Ubuntu 26.04 system and waits for cloud-init to configure it. This is the image behind every Proxmox Ubuntu 26.04 cloud-init template in this guide.
Step 2: Create the Base VM in Proxmox
You must choose a VM ID that's not already in use. Many people use IDs starting at 9000 for templates, since they're easy to remember and won't clash with regular VM IDs. Create the empty VM shell with qm create:
qm create 9000 \ --name ubuntu-26-04-cloudinit-template \ --memory 2048 \ --cores 2 \ --net0 virtio,bridge=vmbr0 \ --scsihw virtio-scsi-pci \ --ostype l26
--name gives the VM a label you'll recognize in the UI.
--memory and --cores are just starting values; clones can change them later.
--net0 virtio,bridge=vmbr0 adds a VirtIO network card on your bridge. Change vmbr0 if yours has a different name.
--scsihw virtio-scsi-pci is required; Ubuntu's cloud image needs it to boot.
--ostype l26 tells Proxmox it's a modern Linux guest, so it uses the right defaults.
Step 3: Import the Cloud Image as the VM Disk
Proxmox VE 9.2 has an import-from option that lets you import and attach the disk image in one command:
qm set 9000 --scsi0 local-lvm:0,import-from=/var/lib/vz/template/iso/ubuntu-26.04-server-cloudimg-amd64.img
You can swap local-lvm for any storage you use, such as a ZFS pool, a directory storage, or Ceph. It all works the same way. This one command copies the cloud image into that storage and attaches it as scsi0 on VM 9000.
If you prefer the older two-step method, it still works on Proxmox VE 9.2:
qm importdisk 9000 ubuntu-26.04-server-cloudimg-amd64.img local-lvmqm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0
Now you have a disk based on the real Ubuntu 26.04 image, ready to become the base of your template.
Step 4: Attach Cloud-Init Drive, Serial Console, and Boot Order
Cloud-init needs its own small virtual CD-ROM drive to pass configuration data, such as hostname, users, SSH keys, and network, into the VM at boot. Add it as ide2:
qm set 9000 --ide2 local-lvm:cloudinit
Next, set the boot order so the VM boots straight from the imported disk instead of wasting time checking a CD-ROM:
qm set 9000 --boot order=scsi0
Ubuntu cloud images generally work fine with the standard display, but many cloud images expect a serial console. If the VM console looks blank after boot, switch to serial:
qm set 9000 --serial0 socket --vga serial0
If this causes problems, just remove it and switch back to the default display; not every image needs a serial console.
Step 5: Enable QEMU Guest Agent
The QEMU guest agent lets Proxmox get accurate information from inside the VM, such as its real IP address, and lets Proxmox shut it down cleanly. Ubuntu's official cloud image already has qemu-guest-agent installed and enabled by default, so you only need to tell Proxmox to expect it:
qm set 9000 --agent enabled=1
Without this setting, Proxmox won't wait for or use the agent, even though it's running inside the guest.
Step 6: Resize the Disk for Real Workloads
Cloud images come with a very small root disk, usually only 2 to 3 GB. They're built to be resized by whoever sets them up. Grow the disk now, before turning the VM into a template, so every clone starts with the larger size:
qm resize 9000 scsi0 +30G
This adds 30 GB to the existing disk. You don't need to do anything inside the VM; cloud-init automatically grows the partition and filesystem the first time each cloned VM boots.
Step 7: Convert the VM Into a Template
Once the disk, cloud-init drive, guest agent, and boot order are all set up, save the VM as a template:
After this, VM 9000 can't boot on its own anymore. It becomes read-only and exists only so you can clone it.
Step 8: Clone the Template Into New VMs
To create an actual server, you must clone the template. Linked clones are fast and share the base disk with the template, which is ideal for testing or short-lived VMs:
qm clone 9000 201 --name web-01
For production VMs where you want a fully independent disk with no dependency on the template, you can use a full clone instead:
qm clone 9000 201 --name web-01 --full
Repeat this command with a new VM ID and name for every server you need. This is where the real value of building a Proxmox Ubuntu 26.04 cloud-init template shows up. Instead of repeating ten manual installs, you run one clone command per server.
Step 9: Set Cloud-Init Users, SSH Keys, and Networking
Each cloned VM needs its own cloud-init settings before the first boot. You must set the SSH key, a login user, and the network configuration:
qm set 201 --ciuser ubuntuqm set 201 --sshkeys ~/.ssh/id_rsa.pubqm set 201 --ipconfig0 ip=10.0.10.201/24,gw=10.0.10.1
If you'd rather use DHCP instead of a static IP, set ip=dhcp instead:
qm set 201 --ipconfig0 ip=dhcp
Also, you can set a fallback password, though SSH keys are the safer option:
qm set 201 --cipassword 'a-strong-password-here'
These settings are saved separately for each VM. So if you clone ten VMs from the same template, giving each one its own IP and hostname only takes a couple of commands per VM.
Step 10: First Boot and Verification
Now you can start the cloned VM and check that everything applied correctly:
qm start 201qm agent 201 ping
If the agent responds, cloud-init has already run, and the guest agent is active. Log in over SSH using the key you configured:
Once inside, confirm the disk actually grew as expected:
If everything checks out, your template is now creating consistent, correctly-sized, and ready-to-use VMs every time.
Use Custom Cloud-Init Files for Advanced Setups
For more control than the built-in options give you, Proxmox supports fully custom cloud-init files through cicustom. This is useful if you need extra packages installed, custom write_files entries, or specific runcmd steps on first boot.
First, make sure you have a snippets storage location. If not, turn on the Snippets option for storage under Datacenter > Storage. Then create a user-data file:
nano /var/lib/vz/snippets/web-userdata.yaml
package_update: truepackages: - nginx - fail2banruncmd: - systemctl enable nginx
Save and exit. Then, attach it to the cloned VM instead of the automatic config:
qm set 201 --cicustom "user=local:snippets/web-userdata.yaml"
This still uses the same base image, so every VM you build this way is still a clone of your Proxmox Ubuntu 26.04 cloud-init template. You're just adding extra automation on top.
Clone Multiple VMs Consistently
The real benefit of a Proxmox Ubuntu 26.04 cloud-init template isn't the template itself; it's what you can do with it next. A short script can loop through several VM IDs, clone the template for each one, and apply its own settings:
for i in 201 202 203; do qm clone 9000 $i --name "web-$i" --full qm set $i --ciuser ubuntu qm set $i --sshkeys ~/.ssh/id_rsa.pub qm set $i --ipconfig0 ip=10.0.10.$i/24,gw=10.0.10.1 qm start $idone
This turns a slow and manual install process into a repeatable and VPS-style setup.
Note: Cloud-init templates work best on a host with steady performance and full control over storage and networking. For real production use, try running Proxmox on a dedicated server with fast NVMe storage.
Conclusion
Building a Proxmox Ubuntu 26.04 cloud-init template is straightforward. Download the image once, attach it with import-from, add the cloud-init drive, resize the disk, turn on the guest agent, and save it as a template. After that, each new server needs just one clone command plus a few qm set commands, with SSH keys, user, and network already set up.
We hope you enjoy this guide. For more detailed information, check the Proxmox VE Cloud-Init Support documentation.