// Module included in the following assemblies:
//
// * virt/backup_restore/virt-managing-vm-snapshots.adoc

:_mod-docs-content-type: CONCEPT
[id="virt-about-vm-snapshots_{context}"]
= About snapshots

[role="_abstract"]
A _snapshot_ represents the state and data of a virtual machine (VM) at a specific point in time. You can use a snapshot to restore an existing VM to a previous state (represented by
the snapshot) for backup and disaster recovery or to rapidly roll back to a previous development version.

A VM snapshot is created from a VM that is powered off (Stopped state) or powered on (Running state).

When taking a snapshot of a running VM, the controller checks that the QEMU guest agent is installed and running. If so, it freezes the VM file system before taking the snapshot, and thaws the file system after the snapshot is taken.

The snapshot stores a copy of each Container Storage Interface (CSI) volume attached to the VM and a copy of the VM specification and metadata. Snapshots cannot be changed after creation.

You can perform the following snapshot actions:

* Create a new snapshot
* Create a clone of a virtual machine from a snapshot
+
[IMPORTANT]
====
Cloning a VM with a vTPM device attached to it or creating a new VM from its snapshot is not supported.
====

* List all snapshots attached to a specific VM
* Restore a VM from a snapshot
* Delete an existing VM snapshot

== VM snapshot controller and custom resources

The VM snapshot feature introduces three new API objects defined as custom resource definitions (CRDs) for managing snapshots:

* `VirtualMachineSnapshot`: Represents a user request to create a snapshot. It contains information about the current state of the VM.
* `VirtualMachineSnapshotContent`: Represents a provisioned resource on the cluster (a snapshot). It is created by the VM snapshot controller and contains references to all resources required to restore the VM.
* `VirtualMachineRestore`: Represents a user request to restore a VM from a snapshot.

The VM snapshot controller binds a `VirtualMachineSnapshotContent` object with the `VirtualMachineSnapshot` object for which it was created, with a one-to-one mapping.
