Proxmox is a powerful, free, and convenient virtualization platform that turns a single physical server into a flexible control center for virtual machines. Using a unified web interface, you can launch and manage multiple servers, create their backups, and combine them into local networks.
Virtualization is not only about environment isolation but also about deployment speed. A traditional operating system installation on virtual servers via an ISO image is a reliable but slow method: booting, manual installation, network configuration, and adding users. Such a process takes time and requires administrator attention at every step.
Modern infrastructure management practices require a different approach—fast, reproducible, and automatable.
Using ready-made cloud images in Proxmox allows you to get a working virtual machine (VM) in minutes, immediately ready for work and integration into workflows. With Cloud-Init, you can automatically add a user, set a password, add SSH keys, and configure network parameters.
In this guide, we will look at how to create a template from an Ubuntu 22.04 cloud image in Proxmox and, based on it, create new virtual machines and set up their parameters using Cloud-Init.
The described method is suitable for images in .img
and .qcow2
formats.
This guide assumes that Proxmox is already deployed on your dedicated server.
Go to the Proxmox web interface at: https://your-ip-address:8006
.
In it, create a VM, going through the tabs:
General: Set the virtual machine name and its ID. You can use any number as the ID—it is used to reference the server in console commands.
OS: Select “Do not use any media.”
System: Check the QEMU Agent box for better integration between Proxmox and the guest OS.
Disks: Delete all disks—we will later use a disk from the image.
CPU: Set 1 core. Leave other parameters at default. Change them only if you know what you’re doing.
Memory: Set minimal parameters.
Network: Choose the interface to be used in the virtual machine, e.g., vmbr0
.
Save, but do not start the virtual machine. Remember the VMID, as you will need it later.
On the Ubuntu downloads page, copy the link to the image with architecture amd64
and extension .img
.
Next, you need to add a monitor emulator to the created virtual machine, since it may be missing in some images. It is required for the virtual machine console to work in the Proxmox interface.
Connect to the Proxmox server via SSH and run the following command (replace 100 with your VMID):
qm set 100 --serial0 socket --vga serial0
Then download the image to the server using wget
:
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
Bind the disk image to the created machine:
qm disk import 100 jammy-server-cloudimg-amd64.img local-lvm
In our case, the storage name is local-lvm
, but yours may differ.
After a successful import, you will see a notification like that:
In the virtual machine settings, under Hardware, you will see the Unused disk:
Go into its settings, check Advanced, enable Discard and SSD emulation, then click Add.
In the same section, delete the CD/DVD device—it is no longer needed.
Add a Cloud-Init disk:
Click Add, choose CloudInit Drive.
In its settings, select the storage location.
Next, select the disk to boot the system from:
Go to Options → Boot Order.
Uncheck existing boxes and choose the disk attached earlier.
Check that the machine was created correctly:
Start it, then open the console via Start and Console in the top right corner.
Wait for the login prompt. If it appears, the boot was successful. You can then close the console.
In Proxmox, a template is a “blueprint” for a VM with pre-configured basic parameters.
To create a template from this virtual machine:
After conversion, the virtual machine icon will change.
Now, based on this template, we can create virtual machines with parameters defined via Cloud-Init.
For example, let’s create a virtual server with the user Hostman
.
To change disk size:
Select the disk in the list, then in Disk Action choose Resize.
Go to the Cloud-Init section. Here you can:
Specify the user and set a login.
Set a password.
If you specify the root user and set a password, you will be able to log in as root with the new password. This is useful if you don’t need to create a new user.
Other Cloud-Init options include:
After specifying all required parameters:
Hostman
.With templates, we can quickly add virtual machines with different operating systems and required configurations, modify user parameters in Cloud-Init, and configure the network.
In addition, cloud image sizes take up significantly less disk space. For example, the Ubuntu 22.04 cloud image is only 646 MB, while the ISO image is 2 GB.
This method of creating virtual machines is especially valuable when speed, stability, and predictability of results are important: in test environments, DevOps infrastructure, and when massively deploying identical services.
Most importantly, it frees up time that would otherwise be spent on endless "Next" clicks in the installer, allowing you to focus on truly important tasks: infrastructure development and optimization.