Stop Wasting Time: Deploy Proxmox Ubuntu VMs in Under 30 Seconds

HomeLab tutorial - IT technology blog
HomeLab tutorial - IT technology blog

The End of the ISO Era in My HomeLab

Half a year ago, my HomeLab workflow was a slog. Every time I needed a new node, I’d download an ISO, mount it, and click through the same Ubuntu installer screens for the thousandth time. It was repetitive, error-prone, and a massive time sink. I realized I was spending 15 to 20 minutes just to get a basic prompt.

Moving to a Cloud-init workflow changed everything. Now, my deployment time has dropped from 15 minutes to exactly 28 seconds. I have run this setup in a production environment for six months without a single failure. Whether I am spinning up a 3-node K3s cluster or a quick disposable database, the process is now identical and instant.

ISO vs. Cloud-init: Why the Old Way is Costing You

If you manage more than two VMs, the manual method is a bottleneck. Let’s look at why the industry moved away from it.

The Traditional ISO Method

Think of this as the manual labor approach. You treat the VM like a physical desktop. You boot from a virtual CD-ROM, select a language, partition disks, and wait for the installer to pull packages. It works for a one-off project, but it fails to scale. If you need a five-node cluster, you are stuck repeating those steps five times.

The Cloud-init Template Method

Cloud-init is the standard for cloud providers like AWS or DigitalOcean. Instead of an installer, we use a pre-installed “Gold Image” provided by Canonical. We inject our configuration—SSH keys, network settings, and user accounts—directly into the image. Proxmox clones this image, applies your custom metadata, and the VM is ready for work before you can finish a sip of coffee.

The Real-World Trade-offs

Why This Wins

  • Blazing Speed: Cloning a linked template takes about 3 seconds on SSD storage.
  • Zero Drift: Every VM starts with the exact same security patches and user permissions.
  • Infrastructure as Code: This setup is the mandatory first step if you want to use tools like Terraform or Ansible later.
  • Headless Setup: You will never need to open the Proxmox VNC console again. Your SSH keys are ready the moment the VM heartbeats.

The Minor Hurdles

  • One-Time Effort: You need to spend roughly 10 minutes on the command line to build your first template.
  • Disk Resizing: Cloud images usually start small (around 2GB). You must remember to grow the disk in Proxmox, though this can be automated.

Prerequisites

I am running this on Proxmox VE 8.1 using Ubuntu 24.04 LTS (Noble Numbat). These commands are also compatible with Ubuntu 22.04 or Debian 12 images.

You will need:

  • A functional Proxmox VE node.
  • SSH access to your Proxmox host (copy-pasting commands into the web shell is a nightmare).
  • A basic grasp of the Linux terminal.

Step-by-Step: Creating the Ubuntu Template

I use the CLI because it is repeatable and prevents accidental misclicks in the GUI. Run these commands directly on your Proxmox host.

1. Download the Official Image

We start by grabbing the latest verified Ubuntu cloud image. I usually store this in a temporary folder like /tmp.

wget https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

2. Prepare the Image with Guest Tools

Cloud images are often stripped down and lack the qemu-guest-agent. We can inject it into the image before we ever boot it. This ensures Proxmox can see the VM’s IP address immediately.

apt-get update && apt-get install libguestfs-tools -y
virt-customize -a noble-server-cloudimg-amd64.img --install qemu-guest-agent

3. Define the VM Shell

We will create a new VM using ID 9000. I give it 2GB of RAM and 2 CPU cores as a sensible baseline for a template.

qm create 9000 --name "ubuntu-2404-template" --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0

4. Import the Virtual Disk

This step moves the Ubuntu image into your Proxmox storage. Replace local-lvm with your specific storage name, such as zfs-thin or ceph.

qm importdisk 9000 noble-server-cloudimg-amd64.img local-lvm
qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0

5. Configure Cloud-init and Hardware Settings

We need to add a small virtual drive to hold the Cloud-init metadata. I also enable a serial console. This prevents the common “black screen” issue when viewing cloud images in the Proxmox console.

qm set 9000 --ide2 local-lvm:cloudinit
qm set 9000 --boot c --bootdisk scsi0
qm set 9000 --serial0 socket --vga serial0
qm set 9000 --agent enabled=1

6. Finalize the Template

With the configuration locked in, we convert the VM into a read-only template.

qm template 9000

How to Launch a New VM

Your template is now ready. To deploy, right-click it in the Proxmox sidebar and select Clone. Choose “Full Clone” for independence or “Linked Clone” to save disk space. Before starting the new VM, go to the Cloud-Init tab and set:

  1. User: Your admin username (e.g., devops).
  2. Password: Something strong, though SSH keys are better.
  3. SSH Keys: Paste your id_rsa.pub here. This is non-negotiable for a secure lab.
  4. IP Config: Most home labs use DHCP, but you can hardcode a static IP here too.

Hit Regenerate Image, click start, and wait 20 seconds. You can now SSH directly into your new server.

The Verdict After 6 Months

Since switching, I haven’t manually installed an OS once. My HomeLab feels like a professional environment rather than a collection of messy experiments. If you are tired of clicking through menus and want to focus on actually running software, this is the single best upgrade you can make to your Proxmox workflow. It is fast, stable, and saves me hours of frustration every month.

Share: