Skip to main content

Proxmox VE: VM Snapshots and Cloning

Proxmox VE · 19.04.2026 · 5 min read
Illustration for “Proxmox VE: VM Snapshots and Cloning”

Snapshots and cloning are among the most powerful features of Proxmox VE. A snapshot lets you instantly capture a VM's state and return to it at any time, while cloning quickly creates an identical copy.

VM Snapshots

Requirements: Instant snapshots are available only on storage that supports them: ZFS, LVM-Thin, Ceph/RBD. On Directory storage, only qcow2 snapshots are available.
# Create a snapshot (the VM can be running)
qm snapshot 100 pre-update --description "Before the system update" --vmstate 1

# List snapshots
qm listsnapshot 100

# Roll back the VM to a snapshot
qm rollback 100 pre-update

# Delete a snapshot
qm delsnapshot 100 pre-update

The --vmstate 1 flag saves the VM's RAM — this lets you restore it in exactly the running state it was in.

Cloning a VM

Clone typeDescriptionTimeDepends on source
Linked CloneUses the source disk as a base (CoW)SecondsYes (source cannot be deleted)
Full CloneA full independent copyMinutesNo
# Full clone into a new VM with ID 101
qm clone 100 101 --name ubuntu-copy --full 1

# Linked clone (the source must be a template)
qm clone 100 102 --name ubuntu-linked

# Clone to a different storage
qm clone 100 103 --name ubuntu-ceph --full 1 --storage ceph-pool

Creating a VM Template

A template is a "frozen" VM from which linked clones are created. It lets you deploy a new VM in seconds:

# Prepare the VM for use as a template
# 1. Install cloud-init (for Linux)
apt install cloud-init -y

# 2. Clear unique data
cloud-init clean
truncate -s 0 /etc/machine-id

# 3. On the Proxmox host — convert the VM into a template
qm template 100

# 4. Now clones are created instantly
qm clone 100 201 --name new-vm --full 0

Cloud-Init Integration

Cloud-Init lets you automatically configure a VM on first boot (hostname, SSH keys, network settings):

# Add a Cloud-Init disk to the VM
qm set 100 --ide2 local-lvm:cloudinit

# Configure Cloud-Init parameters
qm set 100   --ciuser ubuntu   --cipassword SecurePass   --sshkey ~/.ssh/id_rsa.pub   --ipconfig0 ip=dhcp

# Regenerate the Cloud-Init image
qm cloudinit dump 100 network
After creating a template, the VM cannot be started directly. It can only be cloned. Make sure the VM is configured correctly before converting it.

Snapshot and clone errors

Three errors you are most likely to run into when working with snapshots and clones — all three trace back not to the operation itself, but to state left behind by a previous unfinished attempt.

TASK ERROR: unable to create image: rbd: create error: (17) File exists
cannot lock file '/var/lock/qemu-server/100.conf' - got timeout
TASK ERROR: zfs error: cannot destroy 'tank/vm-100-disk-0@pre-update': snapshot has dependent clones
  • rbd: create error: (17) File exists: a previous failed clone attempt on Ceph left behind a partially created image. Remove it manually with rbd rm before retrying.
  • cannot lock file ... got timeout: another operation (backup, migration, another snapshot) is already running against the VM. Wait for it to finish — concurrent operations on a VM's configuration are deliberately blocked.
  • snapshot has dependent clones: the ZFS snapshot has a linked clone — first run qm clone with the --full 1 flag to turn the linked clone into an independent one, then delete the snapshot.

In all three cases, check the list of active tasks and snapshots for the same VM before retrying the command — running it again on dirty state usually just stacks a new error on top of the old one.

When snapshots and clones are not the right fit

Both technologies save time, but they do not replace other data-protection mechanisms.

  • A snapshot without --vmstate 1 is a crash-consistent disk copy, not a guarantee of application-level data integrity — for databases, also run a proper dump.
  • A Linked Clone cannot be treated as an independent copy: the source (template) cannot be deleted or substantially changed while at least one linked clone still exists.
  • A snapshot is not a backup: it lives on the same storage and the same host as the VM itself, and disappears along with it if the disk or host fails.

Verifying the result

After creating a snapshot or a clone, confirm that it actually works.

# List snapshots and their size
qm listsnapshot 100

# After a rollback - check the configuration state and boot
qm rollback 100 pre-update
qm start 100
qm status 100

# Confirm the full clone does not depend on the source
qm config 103 | grep scsi0

If the VM boots and runs normally after a rollback, and the full clone's disk points to a separate storage, the result is correct. See templates and Cloud-Init in Proxmox for more on creating templates.

Was this article helpful?
← Back to Knowledge Base Ask Support