Skip to main content

Proxmox

Clones and Templates of Virtual Machines in Proxmox

Create similar structured and configured VMs easily by cloning and templating methods in Proxmox.

Sometimes you encounter a situation where you have a VM configuration that you need to duplicate exactly. Maybe it's to deploy servers, or maybe it's for testing.

And in the same sense, it's wise to create templates if you create similar VMs regularly. The templates will allow you to create VMs with a predefined configuration.

The difference between clone and template is that in clone, you have an exact replica of an existing running VM (and everything inside it such as installed applications). The template, on the other hand, is a way to create fresh VMs with the same system resources and configurations.

In this article, I'm going to show you how you can clone virtual machines and containers, as well as create a template for them in Proxmox.

Cloning a Virtual Machine in Proxmox

This one goes without saying. If you want to clone a VM, you need to have a VM first.

I hope you already have created a virtual machine in Proxmox.

Now, here, I have a VM running and I can see it in Proxmox. A VM cannot be cloned while it's running. You need to shut it down first so that it's state is saved.

Listing VMs in Proxmox
Click to expand

Do this by clicking the "shutdown" button at the top right-hand corner while you have selected the desired VM.

Shutting down VM in Proxmox

Once the virtual machine is shut down, right-click on it and click the option "Clone". A box will appear with configuration options.

Cloning a VM in Proxmox
Click to expand

The only configuration you really need to do here is give your cloned VM a new name. Click "Clone" when finished. If you have more than one storage device you can select which disk the clone will be created on here as well.

Name the VM clone in Proxmox
Click to expand

The virtual machine will duplicate itself and give a "TASK OK" signal when complete.

VM successfully cloned
Click to expand

You can now fire up and use your newly cloned VM. Be aware that the hostname will stay the same as the old VM, so if you're going to be using them at the same time, you may want to change this for clarity purposes.

💡
The procedure for creating a clone is exactly the same as the one for cloning a virtual machine. See my tutorial on how to create a container in Proxmox.

Creating Templates in Proxmox

Templates are great for when you have that perfect configuration that you want to save so you can quickly spin up a VM or container to use at a later time. Here's how to create one with Proxmox.

Here I have an Ubuntu 22.04 VM that I like, and I want to make it into a template so I can recreate the same VM whenever I want. I'm going to start by shutting down the VM, and then going over to the top right-hand corner and selecting "More" followed by "Convert to Template"

Create a VM template in Proxmox

Select "Yes" at the confirmation box, and you'll end up with a screen that looks something like this:

Template created in Proxmox
Click to expand

From here on out you can clone this template and it will either create a linked clone or a full clone. A linked clone shares storage with the original template, while a full clone is self-contained.

Right click on the newly created template, and enter the name of the new clone and the type. If everything looks good, then hit "clone" and your clone will be created from the template.

Creating a clone VM from template

You can now start the newly cloned VM, and work with it as normal.

VM created from template
Click to expand

As you can see, you did not need to shut down any VM in this process.

💡
The procedure for creating a template from a container is exactly the same as doing it with a virtual machine.

Conclusion

Cloning and templates make the task of duplicating desired configurations in Proxmox super convinient. This is also one of the reasons why I like Proxmox so much.

Both cloning and templating are easy to accomplish and they make scaling VMs a hell lot simpler.

Join me for my next tutorial as I show you how to cluster Proxmox nodes, along with configuring high availability.

✍🏻
Doron is a long-time system mangler who got his first taste of Linux compiling and configuring ircd servers from source in the mid 90s. He then dwelled into web hosting operations through reseller accounts and dedicated servers. Offline he plays bass, and is an avid music lover. He co-owns an internet radio station called Genesis Radio which plays all kinds of music 24X7 and features events and live shows. If you need hosting services, you can check out his current business, Genesis Hosting
Doron Beit-Halahmi
New York, USA