Learning Center
Virtualization

Creating Virtual Machines with Templates in Proxmox

3 Sep 2025
Hostman Team
Hostman Team

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.

Creating a Virtual Machine
Copy link

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.

01a4d9ba 7252 430d 8594 Bfe293a5e075.png

  • OS: Select “Do not use any media.”

A3f1850c 2715 4926 9bbe 343c20125012.png

  • System: Check the QEMU Agent box for better integration between Proxmox and the guest OS.

727e9631 4c0f 4647 9e7e 5b265ee5d12b.png

  • Disks: Delete all disks—we will later use a disk from the image.

8faa7c3c 352f 4bfd B228 042918669ac1.png

  • CPU: Set 1 core. Leave other parameters at default. Change them only if you know what you’re doing.

E72dcec0 F114 491f Ae15 4c8b8709c1d5.png

  • Memory: Set minimal parameters.

817f90e6 29e5 493f B62f 73cff2f0db68.png

  • Network: Choose the interface to be used in the virtual machine, e.g., vmbr0.

71bfa53d 7e56 4b52 84ef 73cb52904518.png

Save, but do not start the virtual machine. Remember the VMID, as you will need it later.

Adding a Cloud Disk to the Virtual Server
Copy link

On the Ubuntu downloads page, copy the link to the image with architecture amd64 and extension .img.

Image1

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

347b5e40 5891 4fba Afd7 5ff14f26f483.png

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:

882bf33a 2e7f 4a4e B1e0 1036d41e3e74.png

In the virtual machine settings, under Hardware, you will see the Unused disk:

E03c7a9a 7a02 422c Bbcd 464be0214da0.png

Go into its settings, check Advanced, enable Discard and SSD emulation, then click Add.

73f1ec95 44a2 4f68 87b3 320f3ba629aa.png

In the same section, delete the CD/DVD device—it is no longer needed.

1c3cc9de E873 42f9 Bf27 C308044c568a.png

Add a Cloud-Init disk:

  • Click Add, choose CloudInit Drive.

92a4d9f3 Efaf 460a 9b79 6a936c79f187.png

  • In its settings, select the storage location.

46dee6d2 81df 4ce4 Acd7 7b0f5bb45f25.png

Next, select the disk to boot the system from:

  • Go to OptionsBoot Order.

680de645 F3a8 47f1 961d Ef82fc3dd103.png

  • Uncheck existing boxes and choose the disk attached earlier.

D334bc24 63f0 43b2 A13c 165f1063f4b2.png

Check that the machine was created correctly:

  • Start it, then open the console via Start and Console in the top right corner.

10add5c5 Bbef 43cb 92b0 A2200506415e.png

  • Wait for the login prompt. If it appears, the boot was successful. You can then close the console.

44adb0a6 B03b 4e14 9a8f Ae1212d681f6.png

Creating a Template from the Virtual Server
Copy link

In Proxmox, a template is a “blueprint” for a VM with pre-configured basic parameters.

To create a template from this virtual machine:

  • Right-click it in the VM list.
  • In the menu, select Convert to template.

0a8757a9 2c54 4f13 A2aa B88972fd86d2.png

After conversion, the virtual machine icon will change.

Now, based on this template, we can create virtual machines with parameters defined via Cloud-Init.

Creating a Virtual Server from the Template
Copy link

For example, let’s create a virtual server with storage with the user Hostman.

  • Right-click the template and select Clone.

83be3602 Fa68 432b 8c91 B785c477e905.png

  • Enter a name and choose Full Clone so that the virtual machine is independent of the template.

Fce681e6 C2d2 4192 972e 300eb01b699d.png

  • Open the new machine’s settings and configure CPU and RAM parameters.

67ce5ec9 Eafe 46e7 B421 F27b64206331.png

To change disk size:

  • Select the disk in the list, then in Disk Action choose Resize.

69a13058 3db9 4759 9ab9 32234edd7157.png

  • Enter how many gigabytes to add to the existing size. For example, if you add 10 GB, a disk of 12.2 GB will be created, since the original image disk size is 2.2 GB.
  • Click Resize disk.

9713e392 Ecef 46bf 8813 248aaeeccc16.png

Go to the Cloud-Init section. Here you can:

  • Specify the user and set a login.

Image2

  • Set a password.

Image3

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:

  • SSH public key: Add the SSH key for server access. By default, in a virtual server created from this image, SSH login with a password is disabled.
  • Upgrade packages: Set to yes to update packages when the server is created.
  • IP Config: Assign a static IP address (useful if virtual machines will use different external IPs). You can also use DHCP for a dynamic address.

28a92e6d 820b 4438 919b 3111e4a18bee.png

After specifying all required parameters:

  • Start the machine and open the console.
  • Log in as Hostman.

console

  • Verify that the server was created with the desired configuration.

console

Conclusion
Copy link

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.