The snapshot feature is available on every virtualization platform—whether you use Proxmox, Hyper-V, VMware or other virtualization tool. A snapshot enables you to preserve the state of a virtual machine, including virtual memory, virtual disks, and settings. Proxmox VE allows you to create live snapshots of the VM so that you can roll back to the point in time when something went wrong.
Latest posts by Surender Kumar (see all)

Proxmox snapshot vs. backup

People often start treating snapshots and backups as alternatives to each other. While both sound similar at first, they work differently and are used in different use cases.

The following table covers some differences between snapshots and backups:

SnapshotsBackups
A snapshot is an image of a VM at a specific point in time.A backup is a fully independent copy of an entire VM or individual files.
A snapshot is stored alongside the original VM disk.A backup can be stored on a local server or remote storage.
Snapshot creation is very fast.Backup creation is a time-consuming process.
The rollback process is also very fast.Recovery from backup is also a time-consuming process.
Snapshots are stored on child disks that are dependent on the source disk. If the source disk is corrupted, the snapshots are useless.A backup is a copy of original data that is completely independent from the source VM, and it can be kept for the long term.
A snapshot allows rollback in case of system failure, a failed update, or user error.A backup ensures data recovery in the event of hardware failure, a failed update, a user error, or a disaster.
Snapshots are useful for development and testing.Backups are useful for business continuity and disaster recovery.

Snapshots can be used in production environments, but they do not guarantee a full restore of the VM if the original virtual disk is corrupted, the original VM is deleted, or the primary storage containing the VM files failed. To recover from such situations, you need to rely on backups. Snapshots work great when you want to test an update, application, or feature that could potentially damage your VM.

Snapshot requirements

To create live snapshots in Proxmox, you need to meet the following requirements:

  • All VM disk images must use the QEMU copy-on-write (qcow2) format.
    Choosing the qcow2 format for VM virtual disk in Proxmox

    Choosing the qcow2 format for VM virtual disk in Proxmox

  • If you can't use the qcow2 format for the virtual disk (e.g., LXC containers support raw disk format only), the disk image must use storage that supports live snapshots. Detailed information about Proxmox storage and snapshot support is available here.

In a nutshell, the availability of the snapshot feature depends on the virtual disk format or the storage type. If you do not choose the right disk format or storage type, you will not be able to create snapshots. Instead, you will see a message stating, "The current guest configuration does not support taking new snapshots," as shown in the screenshot below:

The current guest configuration does not support taking new snapshots 1

The current guest configuration does not support taking new snapshots 1

You can see in the screenshot that the Take Screenshot option is grayed out. To avoid this, make sure you choose the qcow2 format for the virtual disk while provisioning a new VM or use storage that supports live snapshots, such as thin-LVM, ZFS, or Ceph.

Create a snapshot in Proxmox

You can create a snapshot either with the web interface or from the command line.

Create a snapshot using the web interface

To create a snapshot in Proxmox using the web interface, follow these steps:

  1. Log in to the web-based management interface for your Proxmox VE standalone node or cluster.
  2. Select the VM or container, and click the Snapshots tab.
  3. Now click the Take Screenshot button, as shown in the following screenshot:
    Creating a snapshot in Proxmox using the web based GUI

    Creating a snapshot in Proxmox using the web based GUI

  4. In the Create Snapshot dialog box, enter a name and description for the snapshot.
    Create snapshot options in Proxmox

    Create snapshot options in Proxmox

  5. Select the Include RAM checkbox to include the VM state (memory) in your snapshot. If you've allocated a large amount of memory to your VM, the snapshot creation will take longer, so you could clear the selection of the Include RAM option to speed up the process. You can view the progress in the task viewer, as shown in the screenshot.
    Viewing the snapshot creation progress in the task viewer

    Viewing the snapshot creation progress in the task viewer

Create a snapshot using the command line interface

Alternatively, if you would like to create a snapshot using the CLI, do the following:

  1. Select the Proxmox node in the server view, and click Shell to open a shell in the web interface.
    Opening a shell in the Proxmox web GUI

    Opening a shell in the Proxmox web GUI

  2. Now type the qm list command to view a list of all VMs on the current Proxmox host. The first column shows the VM ID, which is needed to create a snapshot.
    Viewing a list of VMs using the command line in Proxmox

    Viewing a list of VMs using the command line in Proxmox

  3. To create a snapshot of a VM using a command, use the following syntax:
    qm snapshot [vmid] [snapshot_name] [OPTIONS]
    
  4. Where the vmid can be obtained using the qm list command, as shown in the above screenshot, and snapshot_name can be any arbitrary name (only uppercase or lowercase letters, numbers, and underscores are allowed). For options, you can use --description <string> to specify a useful description and --vmstate <boolean> to include RAM.
    Creating a snapshot of a VM in Proxmox using the CLI

    Creating a snapshot of a VM in Proxmox using the CLI

  5. In the screenshot above, I used the VM ID 100 to create the snapshot of debian-vm1 with a description and RAM options.
    1. The snapshot tree will be visible in the web interface, as shown in the screenshot.
      Viewing the snapshot tree for a VM in the Proxmox web GUI

      Viewing the snapshot tree for a VM in the Proxmox web GUI

    2. To roll back the VM to a particular state, you just need to select a snapshot, and click the Rollback button.
      Rolling back the VM state using a snapshot in Proxmox

      Rolling back the VM state using a snapshot in Proxmox

    3. Click Yes to confirm the rollback, and your VM will be rolled back to the previous state.
      VM rollback confirmation prompt

      VM rollback confirmation prompt

      If your snapshot doesn't include the RAM, the VM will automatically go into the stopped state after rollback.

    4. To delete a snapshot, select it and click the Remove button.
      Removing a VM snapshot in Proxmox

      Removing a VM snapshot in Proxmox

Conclusion

In this post, I explained how to create and restore a snapshot of the Proxmox virtual machine.

Subscribe to 4sysops newsletter!

In my next article, I will explain how to create backups in Proxmox.

0 Comments

Leave a reply

Please enclose code in pre tags

Your email address will not be published.

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account