Snapshot
A snapshot is a save point. Before you try something risky on a virtual machine, you take a snapshot. If the change breaks the system, you roll back and it is as if the change never happened. Snapshots are fast because they only record what changes after the save point, not a full copy of everything.
A snapshot captures the state of a VM disk, a filesystem, or a volume at one instant. Most implementations use copy-on-write (CoW): after the snapshot, new writes go to new blocks while the original blocks stay frozen, so creating a snapshot takes seconds and uses almost no space at first.
Where snapshots live:
- Hypervisors: VirtualBox, VMware Workstation, Proxmox VE, and KVM/libvirt with qcow2 disks. VM snapshots can include RAM state, so you return to a running machine.
- Filesystems: ZFS and Btrfs snapshot datasets and subvolumes natively.
- Volume managers: LVM snapshots of logical volumes.
- Cloud: AWS EBS snapshots, Azure managed disk snapshots.
Snapshots are not backups. A snapshot usually depends on the original disk. If that disk fails, the snapshot goes with it. A backup is an independent copy on separate storage. Follow 3-2-1: three copies, two media types, one offsite.
Snapshot chains have costs. Each snapshot adds a layer the hypervisor must track. Long chains slow disk I/O and grow over time. Take one before a change, verify the change, then delete or merge it.
Snapshots in VirtualBox and ZFS
# VirtualBox: take, list, and restore (VM must be powered off to restore)
$ VBoxManage snapshot "ubuntu-lab" take "before-fstab-lab" --description "clean install"
$ VBoxManage snapshot "ubuntu-lab" list
Name: before-fstab-lab (UUID: 9c1e...) *
$ VBoxManage snapshot "ubuntu-lab" restore "before-fstab-lab"
# Proxmox VE
$ qm snapshot 103 pre-upgrade
$ qm rollback 103 pre-upgrade
# ZFS dataset snapshot and rollback
$ sudo zfs snapshot tank/data@2026-11-01
$ zfs list -t snapshot
$ sudo zfs rollback tank/data@2026-11-01 Snapshots are what make labs safe. Every BNLC Foundations lab that breaks the boot process starts with “take a snapshot,” so a mistake costs one click instead of a reinstall. In production, admins snapshot a VM before OS upgrades, database migrations, or config changes, then delete the snapshot once the change is confirmed. The common failure is forgetting them: a VM with months of old snapshots fills its datastore and slows down. Treat a snapshot as a short-term undo button, and keep real backups for everything else.